Gentoo Archives: gentoo-commits

From: "Theo Chatzimichos (tampakrap)" <tampakrap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-libs/qt-core/files: qt-core-4.7.4-fix-libreoffice-crash.patch
Date: Mon, 28 Nov 2011 20:48:34
Message-Id: 20111128204825.23CFE2004C@flycatcher.gentoo.org
1 tampakrap 11/11/28 20:48:25
2
3 Added: qt-core-4.7.4-fix-libreoffice-crash.patch
4 Log:
5 Backport patch from Qt 4.8 to fix crash in LibreOffice, as pointed out by scarabeus. FreeDesktop bug 40298
6
7 (Portage version: 2.2.0_alpha77/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 x11-libs/qt-core/files/qt-core-4.7.4-fix-libreoffice-crash.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/qt-core/files/qt-core-4.7.4-fix-libreoffice-crash.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/qt-core/files/qt-core-4.7.4-fix-libreoffice-crash.patch?rev=1.1&content-type=text/plain
14
15 Index: qt-core-4.7.4-fix-libreoffice-crash.patch
16 ===================================================================
17 --- src/corelib/global/qnamespace.qdoc.sav 2011-08-23 14:02:27.000000000 +0200
18 +++ src/corelib/global/qnamespace.qdoc 2011-11-22 13:06:00.879288001 +0100
19 @@ -167,6 +167,10 @@
20 attribute is true. This attribute must be set after QApplication is
21 constructed. This is only supported in Symbian^3 and later Symbian releases.
22
23 + \value AA_X11InitThreads Calls XInitThreads() as part of the QApplication
24 + construction in order to make Xlib calls thread-safe.
25 +
26 +
27 \omitvalue AA_AttributeCount
28 */
29
30 --- src/corelib/global/qnamespace.h.sav 2011-08-23 14:02:27.000000000 +0200
31 +++ src/corelib/global/qnamespace.h 2011-11-22 13:07:35.925288002 +0100
32 @@ -544,6 +544,7 @@ public:
33 AA_MacDontSwapCtrlAndMeta = 7,
34 AA_S60DontConstructApplicationPanes = 8,
35 AA_S60DisablePartialScreenInputMode = 9,
36 + AA_X11InitThreads = 10,
37
38 // Add new attributes before this line
39 AA_AttributeCount
40 --- src/gui/kernel/qapplication_x11.cpp.sav 2011-08-23 14:02:27.000000000 +0200
41 +++ src/gui/kernel/qapplication_x11.cpp 2011-11-22 13:06:00.881288001 +0100
42 @@ -1739,6 +1739,9 @@ void qt_init(QApplicationPrivate *priv,
43 } else {
44 // Qt controls everything (default)
45
46 + if (QApplication::testAttribute(Qt::AA_X11InitThreads))
47 + XInitThreads();
48 +
49 // Set application name and class
50 char *app_class = 0;
51 if (argv && argv[0]) {
52 --- src/gui/image/qpixmap.cpp.sav 2011-08-23 14:02:27.000000000 +0200
53 +++ src/gui/image/qpixmap.cpp 2011-11-22 13:06:39.723288001 +0100
54 @@ -99,7 +99,7 @@ static bool qt_pixmap_thread_test()
55 return false;
56 }
57 #ifndef Q_WS_WIN
58 - if (qApp->thread() != QThread::currentThread()) {
59 + if (!QApplication::testAttribute(Qt::AA_X11InitThreads) && qApp->thread() != QThread::currentThread()) {
60 qWarning("QPixmap: It is not safe to use pixmaps outside the GUI thread");
61 return false;
62 }