SHA256
1
0
forked from pool/libreoffice
libreoffice/correctly-init-xthreads-in-qt.diff
Stephan Kulow 601058e269 Accepting request 89119 from LibreOffice:Unstable
- correctly-init-xthreads-in-qt.diff: let Qt call XInitThreads(),
  so that it knows it's been called (fdo#40298)
- avoid-wrong-asserts.diff: fix a bad assert; the following fix depends on it
- horizontal-scrollbars-with-kde-oxygen-style.diff: horizontal scrollbars with
  KDE Oxygen style (bnc#722918)

- kde4-tooltips-style.diff: tooltips are all black in KDE4 (bnc#723074,
  fdo#40461)
- do-not-display-math-in-desktop-menu.diff: do not display math in desktop
  menu (fdo#41681)
- desktop-submenu.diff: display LO application in the right desktop submenu
  (bnc#718694)
- bash-completion-for-loffice.diff: define bash completion for 'loffice'
  wrapper (bnc#719656)

- legacy-fragment-import-*.diff: legacy fragment PPTX import (bnc#699334)

OBS-URL: https://build.opensuse.org/request/show/89119
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=25
2011-10-24 10:37:06 +00:00

30 lines
1.2 KiB
Diff

Author: Luboš Luňák <l.lunak@suse.cz>
Date: Thu Oct 20 16:41:50 2011 +0200
let Qt call XInitThreads(), so that it knows it's been called (fdo#40298)
Otherwise QPixmap complains when used outside of the main Qt thread
and resets itself to null pixmap, eventually leading to crashes.
--- vcl/unx/kde4/main.cxx.old 2011-10-21 17:50:26.000000000 +0200
+++ vcl/unx/kde4/main.cxx 2011-10-21 17:52:07.000000000 +0200
@@ -54,7 +54,18 @@ extern "C" {
established, so protect X against itself
*/
if( ! ( pNoXInitThreads && *pNoXInitThreads ) )
+ {
+#if QT_VERSION >= 0x040800
+ // let Qt call XInitThreads(), so that also Qt knows it's been used
+ // (otherwise QPixmap may warn about threads not being initialized)
+ QApplication::setAttribute( Qt::AA_X11InitThreads );
+#else
XInitThreads();
+ // just in case somebody builds with old version and then upgrades Qt,
+ // otherwise this is a no-op
+ QApplication::setAttribute( static_cast< Qt::ApplicationAttribute >( 10 ));
+#endif
+ }
#if QT_VERSION < 0x050000
// Qt 4.x support needs >= 4.1.0