diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-11-28 02:34:44 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-11-28 02:34:44 +0100 |
commit | 644110a847c5911c2eb04eb53c93031740561efc (patch) | |
tree | 9658dde1cc70b52b233957b7852f87d997e98156 /dev-qt/qt/files | |
download | tde-packaging-gentoo-644110a847c5911c2eb04eb53c93031740561efc.tar.gz tde-packaging-gentoo-644110a847c5911c2eb04eb53c93031740561efc.zip |
Initial import of an ebuilds tree
from Fat-Zer's (Alexander Golubev) repository.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'dev-qt/qt/files')
16 files changed, 2074 insertions, 0 deletions
diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2012-12-12_02_54_53-Ensure-that-a-valid-DPI-is-always-set-cbe0a27.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2012-12-12_02_54_53-Ensure-that-a-valid-DPI-is-always-set-cbe0a27.patch new file mode 100644 index 00000000..313d9ee5 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2012-12-12_02_54_53-Ensure-that-a-valid-DPI-is-always-set-cbe0a27.patch @@ -0,0 +1,26 @@ +diff --git a/src/kernel/qpaintdevice_x11.cpp b/src/kernel/qpaintdevice_x11.cpp +index a755c01..5941657 100644 +--- a/src/kernel/qpaintdevice_x11.cpp ++++ b/src/kernel/qpaintdevice_x11.cpp +@@ -529,11 +529,16 @@ static void create_dpis() + Q_CHECK_PTR( dpisX ); + Q_CHECK_PTR( dpisY ); + for ( i = 0; i < screens; i++ ) { +- dpisX[ i ] = (DisplayWidth(dpy,i) * 254 + DisplayWidthMM(dpy,i)*5) +- +- / (DisplayWidthMM(dpy,i)*10); +- dpisY[ i ] = (DisplayHeight(dpy,i) * 254 + DisplayHeightMM(dpy,i)*5) +- / (DisplayHeightMM(dpy,i)*10); ++ if (DisplayWidthMM(dpy,i) < 1) ++ dpisX[ i ] = 75; // default the dpi to 75. ++ else ++ dpisX[ i ] = (DisplayWidth(dpy,i) * 254 + DisplayWidthMM(dpy,i)*5) ++ / (DisplayWidthMM(dpy,i)*10); ++ if (DisplayHeightMM(dpy,i) < 1) ++ dpisY[ i ] = 75; // default the dpi to 75. ++ else ++ dpisY[ i ] = (DisplayHeight(dpy,i) * 254 + DisplayHeightMM(dpy,i)*5) ++ / (DisplayHeightMM(dpy,i)*10); + } + } + diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-01-13_02_45_04-Verify-desktop-widget-screen-number-before-applying-size-changes-This-resolves-Bug-1378-b8ca17c.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-01-13_02_45_04-Verify-desktop-widget-screen-number-before-applying-size-changes-This-resolves-Bug-1378-b8ca17c.patch new file mode 100644 index 00000000..980268de --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-01-13_02_45_04-Verify-desktop-widget-screen-number-before-applying-size-changes-This-resolves-Bug-1378-b8ca17c.patch @@ -0,0 +1,38 @@ +diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp +index 203cb39..4a03d95 100644 +--- a/src/kernel/qapplication_x11.cpp ++++ b/src/kernel/qapplication_x11.cpp +@@ -3446,13 +3446,26 @@ int QApplication::x11ProcessEvent( XEvent* event ) + // update the size for desktop widget + int scr = XRRRootToScreen( appDpy, event->xany.window ); + QWidget *w = desktop()->screen( scr ); +- QSize oldSize( w->size() ); +- w->crect.setWidth( DisplayWidth( appDpy, scr ) ); +- w->crect.setHeight( DisplayHeight( appDpy, scr ) ); +- if ( w->size() != oldSize ) { +- QResizeEvent e( w->size(), oldSize ); +- QApplication::sendEvent( w, &e ); +- emit desktop()->resized( scr ); ++ ++ if (w) { ++ int widgetScr = -1; ++ // make sure the specified widget is on the same screen that received the XRandR event ++ XWindowAttributes widgetAttr; ++ XGetWindowAttributes(appDpy, w->winId(), &widgetAttr); ++ if (widgetAttr.screen) { ++ widgetScr = XScreenNumberOfScreen(widgetAttr.screen); ++ } ++ ++ if ((widgetScr < 0) || (widgetScr == scr)) { ++ QSize oldSize( w->size() ); ++ w->crect.setWidth( DisplayWidth( appDpy, scr ) ); ++ w->crect.setHeight( DisplayHeight( appDpy, scr ) ); ++ if ( w->size() != oldSize ) { ++ QResizeEvent e( w->size(), oldSize ); ++ QApplication::sendEvent( w, &e ); ++ emit desktop()->resized( scr ); ++ } ++ } + } + } + #endif // QT_NO_XRANDR diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-02-20_21_52_12-Doublebuffer-QIconView-to-reduce-flicker-This-closes-Bug-1408-897cd5c.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-02-20_21_52_12-Doublebuffer-QIconView-to-reduce-flicker-This-closes-Bug-1408-897cd5c.patch new file mode 100644 index 00000000..6da074b5 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-02-20_21_52_12-Doublebuffer-QIconView-to-reduce-flicker-This-closes-Bug-1408-897cd5c.patch @@ -0,0 +1,98 @@ +diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp +index c1ea8cc..36b5da2 100644 +--- a/src/iconview/qiconview.cpp ++++ b/src/iconview/qiconview.cpp +@@ -214,6 +214,7 @@ public: + QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, + *startDragItem, *pressedItem, *selectAnchor, *renamingItem; + QRect *rubber; ++ QPixmap *backBuffer; + QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, + *fullRedrawTimer; + int rastX, rastY, spacing; +@@ -2789,6 +2790,7 @@ QIconView::QIconView( QWidget *parent, const char *name, WFlags f ) + d->currentItem = 0; + d->highlightedItem = 0; + d->rubber = 0; ++ d->backBuffer = 0; + d->scrollTimer = 0; + d->startDragItem = 0; + d->tmpCurrentItem = 0; +@@ -2942,6 +2944,8 @@ QIconView::~QIconView() + delete item; + item = tmp; + } ++ delete d->backBuffer; ++ d->backBuffer = 0; + delete d->fm; + d->fm = 0; + #ifndef QT_NO_TOOLTIP +@@ -4943,6 +4947,47 @@ void QIconView::contentsDropEvent( QDropEvent *e ) + #endif + + /*! ++ This function grabs all paintevents that otherwise would have been ++ processed by the QScrollView::viewportPaintEvent(). Here we use a ++ doublebuffer to reduce 'on-paint' flickering on QIconView ++ (and of course its children). ++ ++ \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() ++*/ ++ ++void QIconView::bufferedPaintEvent( QPaintEvent* pe ) ++{ ++ QWidget* vp = viewport(); ++ QRect r = pe->rect() & vp->rect(); ++ int ex = r.x() + contentsX(); ++ int ey = r.y() + contentsY(); ++ int ew = r.width(); ++ int eh = r.height(); ++ ++ if ( !d->backBuffer ) ++ d->backBuffer = new QPixmap(vp->size()); ++ if ( d->backBuffer->size() != vp->size() ) { ++ // Resize function (with hysteresis). Uses a good compromise between memory ++ // consumption and speed (number) of resizes. ++ float newWidth = (float)vp->width(); ++ float newHeight = (float)vp->height(); ++ if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) ++ { ++ newWidth *= 1.1892; ++ newHeight *= 1.1892; ++ d->backBuffer->resize( (int)newWidth, (int)newHeight ); ++ } else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) ++ d->backBuffer->resize( (int)newWidth, (int)newHeight ); ++ } ++ ++ QPainter p; ++ p.begin(d->backBuffer, vp); ++ drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); ++ p.end(); ++ bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); ++} ++ ++/*! + \reimp + */ + +@@ -5726,7 +5771,7 @@ bool QIconView::eventFilter( QObject * o, QEvent * e ) + if ( !d->rubber ) + drawDragShapes( d->oldDragPos ); + } +- viewportPaintEvent( (QPaintEvent*)e ); ++ bufferedPaintEvent( (QPaintEvent*)e ); + if ( d->dragging ) { + if ( !d->rubber ) + drawDragShapes( d->oldDragPos ); +diff --git a/src/iconview/qiconview.h b/src/iconview/qiconview.h +index 97780d8..109779f 100644 +--- a/src/iconview/qiconview.h ++++ b/src/iconview/qiconview.h +@@ -452,6 +452,7 @@ protected: + void contentsDropEvent( QDropEvent *e ); + #endif + ++ void bufferedPaintEvent( QPaintEvent* ); + void resizeEvent( QResizeEvent* e ); + void keyPressEvent( QKeyEvent *e ); + void focusInEvent( QFocusEvent *e ); diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-03-02_12_16_10-Fix-textbox-trails-introduced-with-GIT-commit-82b71e49-This-resolves-Bug-1408-a78eb9c.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-03-02_12_16_10-Fix-textbox-trails-introduced-with-GIT-commit-82b71e49-This-resolves-Bug-1408-a78eb9c.patch new file mode 100644 index 00000000..3a8768d0 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-03-02_12_16_10-Fix-textbox-trails-introduced-with-GIT-commit-82b71e49-This-resolves-Bug-1408-a78eb9c.patch @@ -0,0 +1,19 @@ +diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp +index 36b5da2..4387a19 100644 +--- a/src/iconview/qiconview.cpp ++++ b/src/iconview/qiconview.cpp +@@ -5770,11 +5770,11 @@ bool QIconView::eventFilter( QObject * o, QEvent * e ) + if ( d->dragging ) { + if ( !d->rubber ) + drawDragShapes( d->oldDragPos ); +- } +- bufferedPaintEvent( (QPaintEvent*)e ); +- if ( d->dragging ) { ++ viewportPaintEvent( (QPaintEvent*)e ); + if ( !d->rubber ) + drawDragShapes( d->oldDragPos ); ++ } else { ++ bufferedPaintEvent( (QPaintEvent*)e ); + } + } + return TRUE; diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-13_13_31_15-Properly-set-WM_CLASS-atom-even-if-Display-pointer-was-passed-to-TQApplication-This-relates-to-Bug-1443-045b2d9.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-13_13_31_15-Properly-set-WM_CLASS-atom-even-if-Display-pointer-was-passed-to-TQApplication-This-relates-to-Bug-1443-045b2d9.patch new file mode 100644 index 00000000..2daa09f7 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-13_13_31_15-Properly-set-WM_CLASS-atom-even-if-Display-pointer-was-passed-to-TQApplication-This-relates-to-Bug-1443-045b2d9.patch @@ -0,0 +1,46 @@ +diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp +index 7296f4c..0ec4904 100644 +--- a/src/kernel/qapplication.cpp ++++ b/src/kernel/qapplication.cpp +@@ -320,6 +320,7 @@ void qt_init( int *, char **, QApplication::Type ); + void qt_cleanup(); + #if defined(Q_WS_X11) + void qt_init( Display* dpy, Qt::HANDLE, Qt::HANDLE ); ++void qt_init( int *, char **, Display* dpy, Qt::HANDLE, Qt::HANDLE ); + #endif + Q_EXPORT bool qt_tryModalHelper( QWidget *widget, QWidget **rettop ); + +@@ -908,7 +909,7 @@ QApplication::QApplication(Display *dpy, int argc, char **argv, + + qt_init( &argc, argv, GuiClient ); + } else { +- qt_init(dpy, visual, colormap); ++ qt_init( &argc, argv, dpy, visual, colormap ); + } + + process_cmdline( &argc, argv ); +diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp +index 4a03d95..0f9d777 100644 +--- a/src/kernel/qapplication_x11.cpp ++++ b/src/kernel/qapplication_x11.cpp +@@ -1639,7 +1639,7 @@ void qt_init_internal( int *argcptr, char **argv, + } + #endif + +- if ( display ) { ++ if ( display && ((!argcptr) || (!argv)) ) { + // Qt part of other application + + appForeignDpy = TRUE; +@@ -2439,6 +2439,11 @@ void qt_init( Display *display, Qt::HANDLE visual, Qt::HANDLE colormap ) + qt_init_internal( 0, 0, display, visual, colormap ); + } + ++void qt_init( int *argcptr, char **argv, Display *display, Qt::HANDLE visual, Qt::HANDLE colormap ) ++{ ++ qt_init_internal( argcptr, argv, display, visual, colormap ); ++} ++ + + /***************************************************************************** + qt_cleanup() - cleans up when the application is finished diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-16_17_34_08-Fix-fatal-X11-errors-when-both-external-display-and-command-arguments-are-provided-to-QApplication-This-resolves-Bug-1456-e7d0f7d.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-16_17_34_08-Fix-fatal-X11-errors-when-both-external-display-and-command-arguments-are-provided-to-QApplication-This-resolves-Bug-1456-e7d0f7d.patch new file mode 100644 index 00000000..40426ef8 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-16_17_34_08-Fix-fatal-X11-errors-when-both-external-display-and-command-arguments-are-provided-to-QApplication-This-resolves-Bug-1456-e7d0f7d.patch @@ -0,0 +1,42 @@ +diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp +index 0f9d777..50a2bac 100644 +--- a/src/kernel/qapplication_x11.cpp ++++ b/src/kernel/qapplication_x11.cpp +@@ -1790,18 +1790,26 @@ void qt_init_internal( int *argcptr, char **argv, + } + } + #endif +- // Connect to X server +- +- if( qt_is_gui_used ) { +- if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) { +- qWarning( "%s: cannot connect to X server %s", appName, +- XDisplayName(appDpyName) ); +- qApp = 0; +- exit( 1 ); +- } ++ if ( display ) { ++ // Display connection already opened by another application + +- if ( appSync ) // if "-sync" argument +- XSynchronize( appDpy, TRUE ); ++ appForeignDpy = TRUE; ++ appDpy = display; ++ } ++ else { ++ // Connect to X server ++ ++ if( qt_is_gui_used ) { ++ if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) { ++ qWarning( "%s: cannot connect to X server %s", appName, ++ XDisplayName(appDpyName) ); ++ qApp = 0; ++ exit( 1 ); ++ } ++ ++ if ( appSync ) // if "-sync" argument ++ XSynchronize( appDpy, TRUE ); ++ } + } + } + // Common code, regardless of whether display is foreign. diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_58-Fix-Qt-input-method-failure-This-resolves-Bug-1019-c421de2.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_58-Fix-Qt-input-method-failure-This-resolves-Bug-1019-c421de2.patch new file mode 100644 index 00000000..3df8e73b --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_58-Fix-Qt-input-method-failure-This-resolves-Bug-1019-c421de2.patch @@ -0,0 +1,45 @@ +diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp +index 50a2bac..9236f3a 100644 +--- a/src/kernel/qapplication_x11.cpp ++++ b/src/kernel/qapplication_x11.cpp +@@ -195,7 +195,7 @@ static const char *appBTNCol = 0; // application btn color + static const char *mwGeometry = 0; // main widget geometry + static const char *mwTitle = 0; // main widget title + //Ming-Che 10/10 +-char *qt_ximServer = 0; // XIM Server will connect to ++Q_EXPORT char *qt_ximServer = 0; // XIM Server will connect to + static bool mwIconic = FALSE; // main widget iconified + //Ming-Che 10/10 + static Display *appDpy = 0; // X11 application display +@@ -415,13 +415,13 @@ static bool qt_x11EventFilter( XEvent* ev ) + + #if !defined(QT_NO_XIM) + //XIM qt_xim = 0; +-XIMStyle qt_xim_style = 0; +-XIMStyle qt_xim_preferred_style = 0; +-static XIMStyle xim_default_style = XIMPreeditCallbacks | XIMStatusNothing; ++Q_EXPORT XIMStyle qt_xim_style = 0; ++Q_EXPORT XIMStyle qt_xim_preferred_style = 0; ++Q_EXPORT static XIMStyle xim_default_style = XIMPreeditCallbacks | XIMStatusNothing; + #endif + +-int qt_ximComposingKeycode=0; +-QTextCodec * qt_input_mapper = 0; ++Q_EXPORT int qt_ximComposingKeycode=0; ++Q_EXPORT QTextCodec * qt_input_mapper = 0; + + Q_EXPORT Time qt_x_time = CurrentTime; + Q_EXPORT Time qt_x_user_time = CurrentTime; +diff --git a/src/kernel/qinputcontext.h b/src/kernel/qinputcontext.h +index 99e5d37..5b2650a 100644 +--- a/src/kernel/qinputcontext.h ++++ b/src/kernel/qinputcontext.h +@@ -69,7 +69,7 @@ struct QInputContextMenu { + }; + + +-class QInputContext : public QObject ++class Q_EXPORT QInputContext : public QObject + { + Q_OBJECT + public: diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Fix-qmake-library-search-path-on-64-bit-systems-This-resolves-Bug-1016-e374dac.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Fix-qmake-library-search-path-on-64-bit-systems-This-resolves-Bug-1016-e374dac.patch new file mode 100644 index 00000000..42d1ce7a --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Fix-qmake-library-search-path-on-64-bit-systems-This-resolves-Bug-1016-e374dac.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf +index 716e5c0..f891b3e 100644 +--- a/mkspecs/linux-g++-64/qmake.conf ++++ b/mkspecs/linux-g++-64/qmake.conf +@@ -45,7 +45,7 @@ QMAKE_LIBDIR = + QMAKE_INCDIR_X11 = /usr/X11R6/include + QMAKE_LIBDIR_X11 = /usr/X11R6/lib64 + QMAKE_INCDIR_QT = $(QTDIR)/include +-QMAKE_LIBDIR_QT = $(QTDIR)/lib ++QMAKE_LIBDIR_QT = $(QTDIR)/lib64 + QMAKE_INCDIR_OPENGL = /usr/X11R6/include + QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64 + diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Update-zh-tw-translations-c62cd50.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Update-zh-tw-translations-c62cd50.patch new file mode 100644 index 00000000..b0cd4d11 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_01_59-Update-zh-tw-translations-c62cd50.patch @@ -0,0 +1,253 @@ +diff --git a/translations/qt_zh-tw.ts b/translations/qt_zh-tw.ts +index 8260fe4..0f0eaa8 100644 +--- a/translations/qt_zh-tw.ts ++++ b/translations/qt_zh-tw.ts +@@ -115,7 +115,7 @@ + </message> + <message> + <source>Menu</source> +- <translation>Menu</translation> ++ <translation>選單</translation> + </message> + <message> + <source>Help</source> +@@ -337,7 +337,7 @@ + </message> + <message> + <source>A&lpha channel:</source> +- <translation>Alpha 色頻(&L):</translation> ++ <translation>透明色頻(&L):</translation> + </message> + <message> + <source>&Basic colors</source> +@@ -429,11 +429,11 @@ + </message> + <message> + <source>Read: %1</source> +- <translation>讀取: %1</translation> ++ <translation>讀取:%1</translation> + </message> + <message> + <source>Write: %1</source> +- <translation>寫入: %1</translation> ++ <translation>寫入:%1</translation> + </message> + <message> + <source>Cancel</source> +@@ -1194,7 +1194,7 @@ to + </message> + <message> + <source>Customize...</source> +- <translation>自訂...</translation> ++ <translation>自訂…</translation> + </message> + </context> + <context> +@@ -1264,7 +1264,7 @@ to + </message> + <message> + <source><h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for multiplatform GUI &amp; application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants.<br>Qt is also available for embedded devices.</p><p>Qt is a Trolltech product. See <tt>http://www.trolltech.com/qt/</tt> for more information.</p></source> +- <translation><h3>關於 Qt</h3><p>本程式使用 Qt 版本 %1。</p><p>Qt 是用於多平台 GUI 和應用程式開發的 C++ 工具套件。</p><p>Qt 為 MS&nbsp;Windows、Mac&nbsp;OS&nbsp;X、Linux 和所有主要的商用 Unix 變異版本,提供跨平台的單一原始碼可攜性。<br>Qt 也可用於內嵌裝置。</p><p>Qt 是 Trolltech 的產品。如需詳細資訊,請參閱 <tt>http://www.trolltech.com/qt/</tt>。</p></translation> ++ <translation><h3>關於 Qt</h3><p>本程式使用 Qt 版本 %1。</p><p>Qt 是用於多平臺 GUI 和應用程式開發的 C++ 工具套件。</p><p>Qt 為 MS&nbsp;Windows、Mac&nbsp;OS&nbsp;X、Linux 和所有主要的商用 Unix 變異版本,提供跨平臺的單一原始碼可攜性。<br>Qt 也可用於內嵌裝置。</p><p>Qt 是 Trolltech 的產品。如需詳細資訊,請參閱 <tt>http://www.trolltech.com/qt/</tt>。</p></translation> + </message> + </context> + <context> +@@ -1282,7 +1282,7 @@ to + </message> + <message> + <source>Aliases: %1</source> +- <translation>別名: %1</translation> ++ <translation>別名:%1</translation> + </message> + <message> + <source>unknown</source> +@@ -1338,7 +1338,7 @@ to + </message> + <message> + <source>Browse...</source> +- <translation>瀏覽...</translation> ++ <translation>瀏覽…</translation> + </message> + <message> + <source>Options</source> +@@ -1386,123 +1386,123 @@ to + </message> + <message> + <source>A0 (841 x 1189 mm)</source> +- <translation>A0 (841 x 1189 mm)</translation> ++ <translation>A0 (841 x 1189 公釐)</translation> + </message> + <message> + <source>A1 (594 x 841 mm)</source> +- <translation>A1 (594 x 841 mm)</translation> ++ <translation>A1 (594 x 841 公釐)</translation> + </message> + <message> + <source>A2 (420 x 594 mm)</source> +- <translation>A2 (420 x 594 mm)</translation> ++ <translation>A2 (420 x 594 公釐)</translation> + </message> + <message> + <source>A3 (297 x 420 mm)</source> +- <translation>A3 (297 x 420 mm)</translation> ++ <translation>A3 (297 x 420 公釐)</translation> + </message> + <message> + <source>A4 (210x297 mm, 8.26x11.7 inches)</source> +- <translation>A4 (210x297 mm,8.26x11.7 英吋)</translation> ++ <translation>A4 (210x297 公釐,8.26x11.7 英吋)</translation> + </message> + <message> + <source>A5 (148 x 210 mm)</source> +- <translation>A5 (148 x 210 mm)</translation> ++ <translation>A5 (148 x 210 公釐)</translation> + </message> + <message> + <source>A6 (105 x 148 mm)</source> +- <translation>A6 (105 x 148 mm)</translation> ++ <translation>A6 (105 x 148 公釐)</translation> + </message> + <message> + <source>A7 (74 x 105 mm)</source> +- <translation>A7 (74 x 105 mm)</translation> ++ <translation>A7 (74 x 105 公釐)</translation> + </message> + <message> + <source>A8 (52 x 74 mm)</source> +- <translation>A8 (52 x 74 mm)</translation> ++ <translation>A8 (52 x 74 公釐)</translation> + </message> + <message> + <source>A9 (37 x 52 mm)</source> +- <translation>A9 (37 x 52 mm)</translation> ++ <translation>A9 (37 x 52 公釐)</translation> + </message> + <message> + <source>B0 (1000 x 1414 mm)</source> +- <translation>B0 (1000 x 1414 mm)</translation> ++ <translation>B0 (1000 x 1414 公釐)</translation> + </message> + <message> + <source>B1 (707 x 1000 mm)</source> +- <translation>B1 (707 x 1000 mm)</translation> ++ <translation>B1 (707 x 1000 公釐)</translation> + </message> + <message> + <source>B2 (500 x 707 mm)</source> +- <translation>B2 (500 x 707 mm)</translation> ++ <translation>B2 (500 x 707 公釐)</translation> + </message> + <message> + <source>B3 (353 x 500 mm)</source> +- <translation>B3 (353 x 500 mm)</translation> ++ <translation>B3 (353 x 500 公釐)</translation> + </message> + <message> + <source>B4 (250 x 353 mm)</source> +- <translation>B4 (250 x 353 mm)</translation> ++ <translation>B4 (250 x 353 公釐)</translation> + </message> + <message> + <source>B5 (176 x 250 mm, 6.93x9.84 inches)</source> +- <translation>B5 (176 x 250 mm,6.93x9.84 英吋)</translation> ++ <translation>B5 (176 x 250 公釐,6.93x9.84 英吋)</translation> + </message> + <message> + <source>B6 (125 x 176 mm)</source> +- <translation>B6 (125 x 176 mm)</translation> ++ <translation>B6 (125 x 176 公釐)</translation> + </message> + <message> + <source>B7 (88 x 125 mm)</source> +- <translation>B7 (88 x 125 mm)</translation> ++ <translation>B7 (88 x 125 公釐)</translation> + </message> + <message> + <source>B8 (62 x 88 mm)</source> +- <translation>B8 (62 x 88 mm)</translation> ++ <translation>B8 (62 x 88 公釐)</translation> + </message> + <message> + <source>B9 (44 x 62 mm)</source> +- <translation>B9 (44 x 62 mm)</translation> ++ <translation>B9 (44 x 62 公釐)</translation> + </message> + <message> + <source>B10 (31 x 44 mm)</source> +- <translation>B10 (31 x 44 mm)</translation> ++ <translation>B10 (31 x 44 公釐)</translation> + </message> + <message> + <source>C5E (163 x 229 mm)</source> +- <translation>C5E (163 x 229 mm)</translation> ++ <translation>C5E (163 x 229 公釐)</translation> + </message> + <message> + <source>DLE (110 x 220 mm)</source> +- <translation>DLE (110 x 220 mm)</translation> ++ <translation>DLE (110 x 220 公釐)</translation> + </message> + <message> + <source>Executive (7.5x10 inches, 191x254 mm)</source> +- <translation>Executive (7.5x10 英吋,191x254 mm)</translation> ++ <translation>Executive (7.5x10 英吋,191x254 公釐)</translation> + </message> + <message> + <source>Folio (210 x 330 mm)</source> +- <translation>Folio (210 x 330 mm)</translation> ++ <translation>Folio (210 x 330 公釐)</translation> + </message> + <message> + <source>Ledger (432 x 279 mm)</source> +- <translation>Ledger (432 x 279 mm)</translation> ++ <translation>Ledger (432 x 279 公釐)</translation> + </message> + <message> + <source>Legal (8.5x14 inches, 216x356 mm)</source> +- <translation>Legal (8.5x14 英吋,216x356 mm)</translation> ++ <translation>Legal (8.5x14 英吋,216x356 公釐)</translation> + </message> + <message> + <source>Letter (8.5x11 inches, 216x279 mm)</source> +- <translation>Letter (8.5x11 英吋,216x279 mm)</translation> ++ <translation>Letter (8.5x11 英吋,216x279 公釐)</translation> + </message> + <message> + <source>Tabloid (279 x 432 mm)</source> +- <translation>Tabloid (279 x 432 mm)</translation> ++ <translation>Tabloid (279 x 432 公釐)</translation> + </message> + <message> + <source>US Common #10 Envelope (105 x 241 mm)</source> +- <translation>美國一般 10 號信封 (105 x 241 mm)</translation> ++ <translation>美國一般 10 號信封 (105 x 241 公釐)</translation> + </message> + <message> + <source>Setup Printer</source> +@@ -1691,7 +1691,7 @@ to + <name>QToolBar</name> + <message> + <source>More...</source> +- <translation>其他...</translation> ++ <translation>其他…</translation> + </message> + </context> + <context> +@@ -1811,7 +1811,7 @@ to + </message> + <message> + <source>&Help</source> +- <translation>說明(&H)</translation> ++ <translation>求助(&H)</translation> + </message> + </context> + <context> +@@ -1988,7 +1988,7 @@ to + </message> + <message> + <source>Paste special...</source> +- <translation>選擇性貼上...</translation> ++ <translation>選擇性貼上…</translation> + </message> + <message> + <source>Clear</source> diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Add-0084-compositing-patch-from-RedHat-909c3cb.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Add-0084-compositing-patch-from-RedHat-909c3cb.patch new file mode 100644 index 00000000..b9be973e --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Add-0084-compositing-patch-from-RedHat-909c3cb.patch @@ -0,0 +1,73 @@ +diff --git a/src/kernel/qwidget_x11.cpp b/src/kernel/qwidget_x11.cpp +index 02fdebf..a095025 100644 +--- a/src/kernel/qwidget_x11.cpp ++++ b/src/kernel/qwidget_x11.cpp +@@ -558,7 +558,10 @@ void QWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) + wsa.save_under = True; + XChangeWindowAttributes( dpy, id, CWOverrideRedirect | CWSaveUnder, + &wsa ); +- x11SetWindowType(); ++ XClassHint class_hint; ++ class_hint.res_name = (char *) qAppName(); // application name ++ class_hint.res_class = (char *) qAppClass(); // application class ++ XSetClassHint( dpy, id, &class_hint ); + } else if ( topLevel && !desktop ) { // top-level widget + QWidget *p = parentWidget(); // real parent + if (p) +@@ -621,8 +624,6 @@ void QWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) + else + XDeleteProperty(dpy, id, qt_xa_motif_wm_hints); + +- x11SetWindowType(); +- + // set _NET_WM_WINDOW_STATE + if (curr_winstate > 0) + XChangeProperty(dpy, id, qt_net_wm_state, XA_ATOM, 32, PropModeReplace, +@@ -630,11 +631,6 @@ void QWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) + else + XDeleteProperty(dpy, id, qt_net_wm_state); + +- // set _NET_WM_PID +- long curr_pid = getpid(); +- XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace, +- (unsigned char *) &curr_pid, 1); +- + #ifndef QT_NO_XSYNC + // set _NET_WM_SYNC_COUNTER + createSyncCounter(); +@@ -646,19 +642,31 @@ void QWidget::create( WId window, bool initializeWindow, bool destroyOldWindow) + // when we create a toplevel widget, the frame strut should be dirty + fstrut_dirty = 1; + ++ } else { ++ // non-toplevel widgets don't have a frame, so no need to ++ // update the strut ++ fstrut_dirty = 0; ++ } ++ ++ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows ++ x11SetWindowType(); ++ ++ // set _NET_WM_PID ++ long curr_pid = getpid(); ++ XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace, ++ (unsigned char *) &curr_pid, 1); ++ + // declare the widget's object name as window role + XChangeProperty( dpy, id, + qt_window_role, XA_STRING, 8, PropModeReplace, + (unsigned char *)name(), qstrlen( name() ) ); + + // set client leader property ++ if ( !qt_x11_wm_client_leader ) ++ qt_x11_create_wm_client_leader(); + XChangeProperty( dpy, id, qt_wm_client_leader, + XA_WINDOW, 32, PropModeReplace, + (unsigned char *)&qt_x11_wm_client_leader, 1 ); +- } else { +- // non-toplevel widgets don't have a frame, so no need to +- // update the strut +- fstrut_dirty = 0; + } + + if ( initializeWindow ) { diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Use-unixODBC-instead-of-obsolete-iODBC-This-closes-Bug-792-Thanks-to-L0ner-for-the-patch-3f779ee.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Use-unixODBC-instead-of-obsolete-iODBC-This-closes-Bug-792-Thanks-to-L0ner-for-the-patch-3f779ee.patch new file mode 100644 index 00000000..278aec43 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_00-Use-unixODBC-instead-of-obsolete-iODBC-This-closes-Bug-792-Thanks-to-L0ner-for-the-patch-3f779ee.patch @@ -0,0 +1,59 @@ +diff --git a/plugins/src/sqldrivers/odbc/odbc.pro b/plugins/src/sqldrivers/odbc/odbc.pro +index ac0cf3c..36d35b5 100644 +--- a/plugins/src/sqldrivers/odbc/odbc.pro ++++ b/plugins/src/sqldrivers/odbc/odbc.pro +@@ -17,7 +17,7 @@ mac { + unix { + OBJECTS_DIR = .obj + !contains( LIBS, .*odbc.* ) { +- LIBS *= -liodbc ++ LIBS *= -lodbc + } + } + +diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp +index b09afd2..8b0b58b 100644 +--- a/src/sql/drivers/odbc/qsql_odbc.cpp ++++ b/src/sql/drivers/odbc/qsql_odbc.cpp +@@ -61,19 +61,18 @@ + #endif + + // newer platform SDKs use SQLLEN instead of SQLINTEGER +-#ifdef SQLLEN ++#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX) + # define QSQLLEN SQLLEN + #else + # define QSQLLEN SQLINTEGER + #endif + +-#ifdef SQLULEN ++#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX) + # define QSQLULEN SQLULEN + #else + # define QSQLULEN SQLUINTEGER + #endif + +- + static const QSQLLEN COLNAMESIZE = 256; + //Map Qt parameter types to ODBC types + static const SQLSMALLINT qParamType[ 4 ] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT }; +diff --git a/src/sql/qt_sql.pri b/src/sql/qt_sql.pri +index 5533c6f..17a6d40 100644 +--- a/src/sql/qt_sql.pri ++++ b/src/sql/qt_sql.pri +@@ -110,13 +110,13 @@ sql { + + mac { + !contains( LIBS, .*odbc.* ) { +- LIBS *= -liodbc ++ LIBS *= -lodbc + } + } + + unix { + !contains( LIBS, .*odbc.* ) { +- LIBS *= -liodbc ++ LIBS *= -lodbc + } + } + diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_01-Make-basic-integer-QDataStream-reads-resistant-to-corruption-from-underlying-IO-device-failure-60621ef.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_01-Make-basic-integer-QDataStream-reads-resistant-to-corruption-from-underlying-IO-device-failure-60621ef.patch new file mode 100644 index 00000000..d8ca2cfc --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-20_19_02_01-Make-basic-integer-QDataStream-reads-resistant-to-corruption-from-underlying-IO-device-failure-60621ef.patch @@ -0,0 +1,133 @@ +diff --git a/src/tools/qdatastream.cpp b/src/tools/qdatastream.cpp +index dfdc20e..2cdd5f7 100644 +--- a/src/tools/qdatastream.cpp ++++ b/src/tools/qdatastream.cpp +@@ -544,7 +544,10 @@ QDataStream &QDataStream::operator>>( Q_INT8 &i ) + i = (buf[2] & 0x07)+((buf[1] & 0x07) << 3)+((buf[0] & 0x07) << 6); + } + } else { // data or text +- i = (Q_INT8)dev->getch(); ++ int ret = dev->getch(); ++ if (ret >= 0) { ++ i = (Q_INT8)ret; ++ } + } + return *this; + } +@@ -574,9 +577,10 @@ QDataStream &QDataStream::operator>>( Q_INT16 &i ) + } else { // swap bytes + register uchar *p = (uchar *)(&i); + char b[2]; +- dev->readBlock( b, 2 ); +- *p++ = b[1]; +- *p = b[0]; ++ if (dev->readBlock( b, 2 ) >= 2) { ++ *p++ = b[1]; ++ *p = b[0]; ++ } + } + return *this; + } +@@ -606,11 +610,12 @@ QDataStream &QDataStream::operator>>( Q_INT32 &i ) + } else { // swap bytes + uchar *p = (uchar *)(&i); + char b[4]; +- dev->readBlock( b, 4 ); +- *p++ = b[3]; +- *p++ = b[2]; +- *p++ = b[1]; +- *p = b[0]; ++ if (dev->readBlock( b, 4 ) >= 4) { ++ *p++ = b[3]; ++ *p++ = b[2]; ++ *p++ = b[1]; ++ *p = b[0]; ++ } + } + return *this; + } +@@ -643,15 +648,16 @@ QDataStream &QDataStream::operator>>( Q_INT64 &i ) + } else { // swap bytes + uchar *p = (uchar *)(&i); + char b[8]; +- dev->readBlock( b, 8 ); +- *p++ = b[7]; +- *p++ = b[6]; +- *p++ = b[5]; +- *p++ = b[4]; +- *p++ = b[3]; +- *p++ = b[2]; +- *p++ = b[1]; +- *p = b[0]; ++ if (dev->readBlock( b, 8 ) >= 8) { ++ *p++ = b[7]; ++ *p++ = b[6]; ++ *p++ = b[5]; ++ *p++ = b[4]; ++ *p++ = b[3]; ++ *p++ = b[2]; ++ *p++ = b[1]; ++ *p = b[0]; ++ } + } + return *this; + } +@@ -683,9 +689,11 @@ QDataStream &QDataStream::operator>>( Q_LONG &i ) + } else { // swap bytes + register uchar *p = (uchar *)(&i); + char b[sizeof(Q_LONG)]; +- dev->readBlock( b, sizeof(Q_LONG) ); +- for ( int j = sizeof(Q_LONG); j; ) +- *p++ = b[--j]; ++ if (dev->readBlock( b, sizeof(Q_LONG) ) >= (int)sizeof(Q_LONG)) { ++ for ( int j = sizeof(Q_LONG); j; ) { ++ *p++ = b[--j]; ++ } ++ } + } + return *this; + } +@@ -724,11 +732,12 @@ QDataStream &QDataStream::operator>>( float &f ) + } else { // swap bytes + uchar *p = (uchar *)(&f); + char b[4]; +- dev->readBlock( b, 4 ); +- *p++ = b[3]; +- *p++ = b[2]; +- *p++ = b[1]; +- *p = b[0]; ++ if (dev->readBlock( b, 4 ) >= 4) { ++ *p++ = b[3]; ++ *p++ = b[2]; ++ *p++ = b[1]; ++ *p = b[0]; ++ } + } + return *this; + } +@@ -752,15 +761,16 @@ QDataStream &QDataStream::operator>>( double &f ) + } else { // swap bytes + register uchar *p = (uchar *)(&f); + char b[8]; +- dev->readBlock( b, 8 ); +- *p++ = b[7]; +- *p++ = b[6]; +- *p++ = b[5]; +- *p++ = b[4]; +- *p++ = b[3]; +- *p++ = b[2]; +- *p++ = b[1]; +- *p = b[0]; ++ if (dev->readBlock( b, 8 ) >= 8) { ++ *p++ = b[7]; ++ *p++ = b[6]; ++ *p++ = b[5]; ++ *p++ = b[4]; ++ *p++ = b[3]; ++ *p++ = b[2]; ++ *p++ = b[1]; ++ *p = b[0]; ++ } + } + return *this; + } diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-25_03_21_44-Fix-a-number-of-threading-problems-and-crashes-This-partially-resolves-Bug-1467-part-of-the-original-commit-b8e4f24.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-25_03_21_44-Fix-a-number-of-threading-problems-and-crashes-This-partially-resolves-Bug-1467-part-of-the-original-commit-b8e4f24.patch new file mode 100644 index 00000000..c4720315 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-04-25_03_21_44-Fix-a-number-of-threading-problems-and-crashes-This-partially-resolves-Bug-1467-part-of-the-original-commit-b8e4f24.patch @@ -0,0 +1,1052 @@ +diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp +index 0ec4904..960db1e 100644 +--- a/src/kernel/qapplication.cpp ++++ b/src/kernel/qapplication.cpp +@@ -546,8 +546,9 @@ static QPostEventList *globalPostedEvents = 0; // list of posted events + + uint qGlobalPostedEventsCount() + { +- if (!globalPostedEvents) ++ if (!globalPostedEvents) { + return 0; ++ } + return globalPostedEvents->count(); + } + +@@ -2315,8 +2316,9 @@ void QApplication::aboutQt() + bool QApplication::notify( QObject *receiver, QEvent *e ) + { + // no events are delivered after ~QApplication() has started +- if ( is_app_closing ) ++ if ( is_app_closing ) { + return FALSE; ++ } + + if ( receiver == 0 ) { // serious error + #if defined(QT_CHECK_NULL) +@@ -2358,8 +2360,9 @@ bool QApplication::notify( QObject *receiver, QEvent *e ) + } + + bool res = FALSE; +- if ( !receiver->isWidgetType() ) ++ if ( !receiver->isWidgetType() ) { + res = internalNotify( receiver, e ); ++ } + else switch ( e->type() ) { + #ifndef QT_NO_ACCEL + case QEvent::Accel: +@@ -2367,13 +2370,15 @@ bool QApplication::notify( QObject *receiver, QEvent *e ) + QKeyEvent* key = (QKeyEvent*) e; + res = internalNotify( receiver, e ); + +- if ( !res && !key->isAccepted() ) ++ if ( !res && !key->isAccepted() ) { + res = qt_dispatchAccelEvent( (QWidget*)receiver, key ); ++ } + + // next lines are for compatibility with Qt <= 3.0.x: old + // QAccel was listening on toplevel widgets +- if ( !res && !key->isAccepted() && !((QWidget*)receiver)->isTopLevel() ) ++ if ( !res && !key->isAccepted() && !((QWidget*)receiver)->isTopLevel() ) { + res = internalNotify( ((QWidget*)receiver)->topLevelWidget(), e ); ++ } + } + break; + #endif //QT_NO_ACCEL +@@ -3116,8 +3121,9 @@ void QApplication::postEvent( QObject *receiver, QEvent *event ) + qapp_cleanup_events.set( &globalPostedEvents ); + } + +- if ( !receiver->postedEvents ) ++ if ( !receiver->postedEvents ) { + receiver->postedEvents = new QPostEventList; ++ } + QPostEventList * l = receiver->postedEvents; + + // if this is one of the compressible events, do compression +@@ -3232,22 +3238,25 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type ) + { + // Make sure the object hierarchy is stable before processing events + // to avoid endless loops +- if ( receiver == 0 && event_type == 0 ) ++ if ( receiver == 0 && event_type == 0 ) { + sendPostedEvents( 0, QEvent::ChildInserted ); +- +- if ( !globalPostedEvents || ( receiver && !receiver->postedEvents ) ) +- return; ++ } + + #ifdef QT_THREAD_SUPPORT + QMutexLocker locker( postevent_mutex ); + #endif + ++ if ( !globalPostedEvents || ( receiver && !receiver->postedEvents ) ) { ++ return; ++ } ++ + bool sent = TRUE; + while ( sent ) { + sent = FALSE; + +- if ( !globalPostedEvents || ( receiver && !receiver->postedEvents ) ) ++ if ( !globalPostedEvents || ( receiver && !receiver->postedEvents ) ) { + return; ++ } + + // if we have a receiver, use the local list. Otherwise, use the + // global list +@@ -3296,8 +3305,9 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type ) + if ( e->type() == QEvent::Paint && r->isWidgetType() ) { + QWidget * w = (QWidget*)r; + QPaintEvent * p = (QPaintEvent*)e; +- if ( w->isVisible() ) ++ if ( w->isVisible() ) { + w->repaint( p->reg, p->erase ); ++ } + } else { + sent = TRUE; + QApplication::sendEvent( r, e ); +@@ -3318,10 +3328,12 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type ) + if ( l == globalPostedEvents ) { + globalPostedEvents->first(); + while( (pe=globalPostedEvents->current()) != 0 ) { +- if ( pe->event ) ++ if ( pe->event ) { + globalPostedEvents->next(); +- else ++ } ++ else { + globalPostedEvents->remove(); ++ } + } + } + } +diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp +index 7790676..375e83b 100644 +--- a/src/kernel/qobject.cpp ++++ b/src/kernel/qobject.cpp +@@ -471,11 +471,13 @@ QObject::~QObject() + blockSig = 0; // unblock signals to keep QGuardedPtr happy + emit destroyed( this ); + emit destroyed(); +- if ( objname ) ++ if ( objname ) { + delete [] (char*)objname; ++ } + objname = 0; +- if ( pendTimer ) // might be pending timers ++ if ( pendTimer ) { // might be pending timers + qKillTimer( this ); ++ } + QApplication::removePostedEvents( this ); + if ( isTree ) { + remove_tree( this ); // remove from global root list +@@ -755,12 +757,17 @@ QObject* QObject::child( const char *objName, const char *inheritsClass, + bool QObject::event( QEvent *e ) + { + #if defined(QT_CHECK_NULL) +- if ( e == 0 ) ++ if ( e == 0 ) { + qWarning( "QObject::event: Null events are not permitted" ); ++ } + #endif ++ if ( wasDeleted ) { ++ return TRUE; ++ } + if ( eventFilters ) { // try filters +- if ( activate_filters(e) ) // stopped by a filter ++ if ( activate_filters(e) ) { // stopped by a filter + return TRUE; ++ } + } + + switch ( e->type() ) { +diff --git a/src/tools/qglist.cpp b/src/tools/qglist.cpp +index b04ac75..fb94427 100644 +--- a/src/tools/qglist.cpp ++++ b/src/tools/qglist.cpp +@@ -43,6 +43,10 @@ + #include "qdatastream.h" + #include "qvaluelist.h" + ++#if defined(QT_THREAD_SUPPORT) ++ #include "qmutex.h" ++#endif // defined(QT_THREAD_SUPPORT) ++ + /*! + \class QLNode qglist.h + \reentrant +@@ -221,6 +225,9 @@ QDataStream &QGList::write( QDataStream &s, QPtrCollection::Item ) const + + QGList::QGList() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex = new QMutex(true); ++#endif + firstNode = lastNode = curNode = 0; // initialize list + numNodes = 0; + curIndex = -1; +@@ -234,6 +241,9 @@ QGList::QGList() + QGList::QGList( const QGList & list ) + : QPtrCollection( list ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex = new QMutex(true); ++#endif + firstNode = lastNode = curNode = 0; // initialize list + numNodes = 0; + curIndex = -1; +@@ -258,6 +268,9 @@ QGList::~QGList() + // twice on the same address! This is insane but let's try not to crash + // here. + iterators = 0; ++#if defined(QT_THREAD_SUPPORT) ++ //delete mutex; ++#endif + } + + +@@ -290,11 +303,13 @@ QGList& QGList::operator=( const QGList &list ) + + bool QGList::operator==( const QGList &list ) const + { +- if ( count() != list.count() ) ++ if ( count() != list.count() ) { + return FALSE; ++ } + +- if ( count() == 0 ) ++ if ( count() == 0 ) { + return TRUE; ++ } + + QLNode *n1 = firstNode; + QLNode *n2 = list.firstNode; +@@ -322,8 +337,15 @@ bool QGList::operator==( const QGList &list ) const + + QLNode *QGList::locate( uint index ) + { +- if ( index == (uint)curIndex ) // current node ? ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif ++ if ( index == (uint)curIndex ) { // current node ? ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return curNode; ++ } + if ( !curNode && firstNode ) { // set current node + curNode = firstNode; + curIndex = 0; +@@ -332,13 +354,18 @@ QLNode *QGList::locate( uint index ) + int distance = index - curIndex; // node distance to cur node + bool forward; // direction to traverse + +- if ( index >= numNodes ) ++ if ( index >= numNodes ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return 0; ++ } + +- if ( distance < 0 ) ++ if ( distance < 0 ) { + distance = -distance; ++ } + if ( (uint)distance < index && (uint)distance < numNodes - index ) { +- node = curNode; // start from current node ++ node = curNode; // start from current node + forward = index > (uint)curIndex; + } else if ( index < numNodes - index ) { // start from first node + node = firstNode; +@@ -352,13 +379,18 @@ QLNode *QGList::locate( uint index ) + forward = FALSE; + } + if ( forward ) { // now run through nodes +- while ( distance-- ) ++ while ( distance-- ) { + node = node->next; ++ } + } else { +- while ( distance-- ) ++ while ( distance-- ) { + node = node->prev; ++ } + } + curIndex = index; // must update index ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return curNode = node; + } + +@@ -369,6 +401,9 @@ QLNode *QGList::locate( uint index ) + + void QGList::inSort( QPtrCollection::Item d ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + int index = 0; + register QLNode *n = firstNode; + while ( n && compareItems(n->data,d) < 0 ){ // find position in list +@@ -376,6 +411,9 @@ void QGList::inSort( QPtrCollection::Item d ) + index++; + } + insertAt( index, d ); ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + } + + +@@ -385,6 +423,9 @@ void QGList::inSort( QPtrCollection::Item d ) + + void QGList::prepend( QPtrCollection::Item d ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + register QLNode *n = new QLNode( newItem(d) ); + Q_CHECK_PTR( n ); + n->prev = 0; +@@ -395,6 +436,9 @@ void QGList::prepend( QPtrCollection::Item d ) + firstNode = curNode = n; // curNode affected + numNodes++; + curIndex = 0; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + } + + +@@ -404,16 +448,24 @@ void QGList::prepend( QPtrCollection::Item d ) + + void QGList::append( QPtrCollection::Item d ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + register QLNode *n = new QLNode( newItem(d) ); + Q_CHECK_PTR( n ); + n->next = 0; +- if ( (n->prev = lastNode) ) // list is not empty ++ if ( (n->prev = lastNode) ) { // list is not empty + lastNode->next = n; +- else // initialize list ++ } ++ else { // initialize list + firstNode = n; ++ } + lastNode = curNode = n; // curNode affected + curIndex = numNodes; + numNodes++; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + } + + +@@ -423,25 +475,43 @@ void QGList::append( QPtrCollection::Item d ) + + bool QGList::insertAt( uint index, QPtrCollection::Item d ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + if ( index == 0 ) { + prepend( d ); ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return TRUE; +- } else if ( index == numNodes ) { ++ } ++ else if ( index == numNodes ) { + append( d ); ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return TRUE; + } + QLNode *nextNode = locate( index ); +- if ( !nextNode ) ++ if ( !nextNode ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return FALSE; ++ } + QLNode *prevNode = nextNode->prev; + register QLNode *n = new QLNode( newItem(d) ); + Q_CHECK_PTR( n ); + nextNode->prev = n; ++ Q_ASSERT( (!((curIndex > 0) && (!prevNode))) ); + prevNode->next = n; + n->prev = prevNode; // link new node into list + n->next = nextNode; + curNode = n; // curIndex set by locate() + numNodes++; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return TRUE; + } + +@@ -452,18 +522,30 @@ bool QGList::insertAt( uint index, QPtrCollection::Item d ) + + void QGList::relinkNode( QLNode *n ) + { +- if ( n == firstNode ) // already first ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif ++ if ( n == firstNode ) { // already first ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return; ++ } + curNode = n; + unlink(); + n->prev = 0; +- if ( (n->next = firstNode) ) // list is not empty ++ if ( (n->next = firstNode) ) { // list is not empty + firstNode->prev = n; +- else // initialize list ++ } ++ else { // initialize list + lastNode = n; ++ } + firstNode = curNode = n; // curNode affected + numNodes++; + curIndex = 0; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + } + + +@@ -473,8 +555,15 @@ void QGList::relinkNode( QLNode *n ) + + QLNode *QGList::unlink() + { +- if ( curNode == 0 ) // null current node ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif ++ if ( curNode == 0 ) { // null current node ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return 0; ++ } + register QLNode *n = curNode; // unlink this node + if ( n == firstNode ) { // removing first node ? + if ( (firstNode = n->next) ) { +@@ -500,9 +589,13 @@ QLNode *QGList::unlink() + curIndex--; + } + +- if ( iterators ) ++ if ( iterators ) { + iterators->notifyRemove( n, curNode ); ++ } + numNodes--; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return n; + } + +@@ -513,6 +606,9 @@ QLNode *QGList::unlink() + + bool QGList::removeNode( QLNode *n ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + #if defined(QT_CHECK_NULL) + if ( n == 0 || (n->prev && n->prev->next != n) || + (n->next && n->next->prev != n) ) { +@@ -526,6 +622,9 @@ bool QGList::removeNode( QLNode *n ) + delete n; + curNode = firstNode; + curIndex = curNode ? 0 : -1; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return TRUE; + } + +@@ -537,13 +636,27 @@ bool QGList::removeNode( QLNode *n ) + + bool QGList::remove( QPtrCollection::Item d ) + { +- if ( d && find(d) == -1 ) ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif ++ if ( d && find(d) == -1 ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return FALSE; ++ } + QLNode *n = unlink(); +- if ( !n ) ++ if ( !n ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return FALSE; ++ } + deleteItem( n->data ); + delete n; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return TRUE; + } + +@@ -553,13 +666,27 @@ bool QGList::remove( QPtrCollection::Item d ) + + bool QGList::removeRef( QPtrCollection::Item d ) + { +- if ( findRef(d) == -1 ) ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif ++ if ( findRef(d) == -1 ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return FALSE; ++ } + QLNode *n = unlink(); +- if ( !n ) ++ if ( !n ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return FALSE; ++ } + deleteItem( n->data ); + delete n; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return TRUE; + } + +@@ -581,13 +708,27 @@ bool QGList::removeRef( QPtrCollection::Item d ) + + bool QGList::removeAt( uint index ) + { +- if ( !locate(index) ) ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif ++ if ( !locate(index) ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return FALSE; ++ } + QLNode *n = unlink(); +- if ( !n ) ++ if ( !n ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return FALSE; ++ } + deleteItem( n->data ); + delete n; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return TRUE; + } + +@@ -597,13 +738,23 @@ bool QGList::removeAt( uint index ) + */ + bool QGList::replaceAt( uint index, QPtrCollection::Item d ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + QLNode *n = locate( index ); +- if ( !n ) ++ if ( !n ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return FALSE; ++ } + if ( n->data != d ) { + deleteItem( n->data ); + n->data = newItem( d ); + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return TRUE; + } + +@@ -615,10 +766,16 @@ bool QGList::replaceAt( uint index, QPtrCollection::Item d ) + + QPtrCollection::Item QGList::takeNode( QLNode *n ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + #if defined(QT_CHECK_NULL) + if ( n == 0 || (n->prev && n->prev->next != n) || + (n->next && n->next->prev != n) ) { + qWarning( "QGList::takeNode: Corrupted node" ); ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return 0; + } + #endif +@@ -628,6 +785,9 @@ QPtrCollection::Item QGList::takeNode( QLNode *n ) + delete n; // delete the node, not data + curNode = firstNode; + curIndex = curNode ? 0 : -1; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return d; + } + +@@ -637,9 +797,15 @@ QPtrCollection::Item QGList::takeNode( QLNode *n ) + + QPtrCollection::Item QGList::take() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + QLNode *n = unlink(); // unlink node + Item d = n ? n->data : 0; + delete n; // delete node, keep contents ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return d; + } + +@@ -649,11 +815,21 @@ QPtrCollection::Item QGList::take() + + QPtrCollection::Item QGList::takeAt( uint index ) + { +- if ( !locate(index) ) ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif ++ if ( !locate(index) ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return 0; ++ } + QLNode *n = unlink(); // unlink node + Item d = n ? n->data : 0; + delete n; // delete node, keep contents ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return d; + } + +@@ -663,10 +839,16 @@ QPtrCollection::Item QGList::takeAt( uint index ) + + QPtrCollection::Item QGList::takeFirst() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + first(); + QLNode *n = unlink(); // unlink node + Item d = n ? n->data : 0; + delete n; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return d; + } + +@@ -676,10 +858,16 @@ QPtrCollection::Item QGList::takeFirst() + + QPtrCollection::Item QGList::takeLast() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + last(); + QLNode *n = unlink(); // unlink node + Item d = n ? n->data : 0; + delete n; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return d; + } + +@@ -690,14 +878,18 @@ QPtrCollection::Item QGList::takeLast() + + void QGList::clear() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + register QLNode *n = firstNode; + + firstNode = lastNode = curNode = 0; // initialize list + numNodes = 0; + curIndex = -1; + +- if ( iterators ) ++ if ( iterators ) { + iterators->notifyClear( FALSE ); ++ } + + QLNode *prevNode; + while ( n ) { // for all nodes ... +@@ -706,6 +898,9 @@ void QGList::clear() + n = n->next; + delete prevNode; // deallocate node + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + } + + +@@ -716,6 +911,9 @@ void QGList::clear() + + int QGList::findRef( QPtrCollection::Item d, bool fromStart ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + register QLNode *n; + int index; + if ( fromStart ) { // start from first node +@@ -731,6 +929,9 @@ int QGList::findRef( QPtrCollection::Item d, bool fromStart ) + } + curNode = n; + curIndex = n ? index : -1; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return curIndex; // return position of item + } + +@@ -742,6 +943,9 @@ int QGList::findRef( QPtrCollection::Item d, bool fromStart ) + + int QGList::find( QPtrCollection::Item d, bool fromStart ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + register QLNode *n; + int index; + if ( fromStart ) { // start from first node +@@ -757,6 +961,9 @@ int QGList::find( QPtrCollection::Item d, bool fromStart ) + } + curNode = n; + curIndex = n ? index : -1; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return curIndex; // return position of item + } + +@@ -767,6 +974,9 @@ int QGList::find( QPtrCollection::Item d, bool fromStart ) + + uint QGList::containsRef( QPtrCollection::Item d ) const + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + register QLNode *n = firstNode; + uint count = 0; + while ( n ) { // for all nodes... +@@ -774,6 +984,9 @@ uint QGList::containsRef( QPtrCollection::Item d ) const + count++; + n = n->next; + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return count; + } + +@@ -784,6 +997,9 @@ uint QGList::containsRef( QPtrCollection::Item d ) const + + uint QGList::contains( QPtrCollection::Item d ) const + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + register QLNode *n = firstNode; + uint count = 0; + QGList *that = (QGList*)this; // mutable for compareItems() +@@ -792,6 +1008,9 @@ uint QGList::contains( QPtrCollection::Item d ) const + count++; + n = n->next; + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return count; + } + +@@ -839,10 +1058,19 @@ uint QGList::contains( QPtrCollection::Item d ) const + + QPtrCollection::Item QGList::first() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + if ( firstNode ) { + curIndex = 0; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return (curNode=firstNode)->data; + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return 0; + } + +@@ -852,10 +1080,19 @@ QPtrCollection::Item QGList::first() + + QPtrCollection::Item QGList::last() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + if ( lastNode ) { + curIndex = numNodes-1; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return (curNode=lastNode)->data; + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return 0; + } + +@@ -865,15 +1102,24 @@ QPtrCollection::Item QGList::last() + + QPtrCollection::Item QGList::next() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + if ( curNode ) { + if ( curNode->next ) { + curIndex++; + curNode = curNode->next; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return curNode->data; + } + curIndex = -1; + curNode = 0; + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return 0; + } + +@@ -883,15 +1129,24 @@ QPtrCollection::Item QGList::next() + + QPtrCollection::Item QGList::prev() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + if ( curNode ) { + if ( curNode->prev ) { + curIndex--; + curNode = curNode->prev; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return curNode->data; + } + curIndex = -1; + curNode = 0; + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return 0; + } + +@@ -902,9 +1157,16 @@ QPtrCollection::Item QGList::prev() + + void QGList::toVector( QGVector *vector ) const + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + vector->clear(); +- if ( !vector->resize( count() ) ) ++ if ( !vector->resize( count() ) ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return; ++ } + register QLNode *n = firstNode; + uint i = 0; + while ( n ) { +@@ -912,10 +1174,16 @@ void QGList::toVector( QGVector *vector ) const + n = n->next; + i++; + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + } + + void QGList::heapSortPushDown( QPtrCollection::Item* heap, int first, int last ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + int r = first; + while( r <= last/2 ) { + // Node r has only one child ? +@@ -950,6 +1218,9 @@ void QGList::heapSortPushDown( QPtrCollection::Item* heap, int first, int last ) + } + } + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + } + + +@@ -962,9 +1233,16 @@ void QGList::heapSortPushDown( QPtrCollection::Item* heap, int first, int last ) + + void QGList::sort() + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + uint n = count(); +- if ( n < 2 ) ++ if ( n < 2 ) { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return; ++ } + + // Create the heap + QPtrCollection::Item* realheap = new QPtrCollection::Item[ n ]; +@@ -995,6 +1273,9 @@ void QGList::sort() + } + + delete [] realheap; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + } + + +@@ -1019,6 +1300,9 @@ QDataStream &operator<<( QDataStream &s, const QGList &list ) + + QDataStream &QGList::read( QDataStream &s ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + uint num; + s >> num; // read number of items + clear(); // clear list +@@ -1042,6 +1326,9 @@ QDataStream &QGList::read( QDataStream &s ) + } + curNode = firstNode; + curIndex = curNode ? 0 : -1; ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return s; + } + +@@ -1051,12 +1338,18 @@ QDataStream &QGList::read( QDataStream &s ) + + QDataStream &QGList::write( QDataStream &s ) const + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + s << count(); // write number of items + QLNode *n = firstNode; + while ( n ) { // write all items + write( s, n->data ); + n = n->next; + } ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return s; + } + +@@ -1068,9 +1361,15 @@ QDataStream &QGList::write( QDataStream &s ) const + */ + QLNode* QGList::erase( QLNode* it ) + { ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->lock(); ++#endif + QLNode* n = it; + it = it->next; + removeNode( n ); ++#if defined(QT_THREAD_SUPPORT) ++ //mutex->unlock(); ++#endif + return it; + } + +diff --git a/src/tools/qglist.h b/src/tools/qglist.h +index fadc46c..dfacf47 100644 +--- a/src/tools/qglist.h ++++ b/src/tools/qglist.h +@@ -59,6 +59,8 @@ private: + QLNode( QPtrCollection::Item d ) { data = d; } + }; + ++class QMutex; ++class QGListPrivate; + class QGListIteratorList; // internal helper class + + class Q_EXPORT QGList : public QPtrCollection // doubly linked generic list +@@ -147,6 +149,12 @@ private: + + QLNode *locate( uint ); // get node at i'th pos + QLNode *unlink(); // unlink node ++ ++#if defined(QT_THREAD_SUPPORT) ++// QMutex* mutex; ++#endif ++ ++// QGListPrivate* d; + }; + + diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-03_03_47_45-Fix-corrupted-titlebar-icons-in-subwindows-of-ARGB-applications-90f4a55.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-03_03_47_45-Fix-corrupted-titlebar-icons-in-subwindows-of-ARGB-applications-90f4a55.patch new file mode 100644 index 00000000..437dca94 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-03_03_47_45-Fix-corrupted-titlebar-icons-in-subwindows-of-ARGB-applications-90f4a55.patch @@ -0,0 +1,63 @@ +diff --git a/src/kernel/qwidget_x11.cpp b/src/kernel/qwidget_x11.cpp +index a095025..783034e 100644 +--- a/src/kernel/qwidget_x11.cpp ++++ b/src/kernel/qwidget_x11.cpp +@@ -44,6 +44,7 @@ + #include "qpaintdevicemetrics.h" + #include "qpainter.h" + #include "qbitmap.h" ++#include "qimage.h" + #include "qobjectlist.h" + #include "qlayout.h" + #include "qtextcodec.h" +@@ -1231,14 +1232,47 @@ void QWidget::setIcon( const QPixmap &pixmap ) + } + Pixmap icon_pixmap = 0; + Pixmap mask_pixmap = 0; ++ QPixmap* pm = NULL; + if ( !pixmap.isNull() ) { +- QPixmap* pm = new QPixmap( pixmap ); ++ if (pixmap.depth() == 24) { ++ pm = new QPixmap( pixmap ); ++ } ++ else { ++ // With most window managers, only 24-bit icon pixmaps are allowed in the WM hints, otherwise corrupt icons will be displayed ++ // Convert provided pixmaps to 24-bit here ++ int w = pixmap.width(); ++ int h = pixmap.height(); ++ pm = new QPixmap( pixmap.width(), pixmap.height(), 24 ); ++ QImage iconImage = pixmap.convertToImage(); ++ ++ // Load the new 24-bit RGB pixmap with data ++ GC gc; ++ pm->detach(); ++ Qt::HANDLE pmHandle = pm->handle(); ++ gc = XCreateGC(x11Display(), pmHandle, 0, 0); ++ for (int y = 0; y < h; ++y) { ++ QRgb *ls = (QRgb *)iconImage.scanLine( y ); ++ for (int x = 0; x < w; ++x) { ++ QRgb l = ls[x]; ++ int r = int( qRed( l ) ); ++ int g = int( qGreen( l ) ); ++ int b = int( qBlue( l ) ); ++ ls[x] = qRgb( r, g, b ); ++ XSetForeground(x11Display(), gc, (r << 16) | (g << 8) | b ); ++ XDrawPoint(x11Display(), pmHandle, gc, x, y); ++ } ++ } ++ XFreeGC(x11Display(), gc); ++ } ++ + extra->topextra->icon = pm; +- if ( !pm->mask() ) ++ if ( !pm->mask() ) { + pm->setMask( pm->createHeuristicMask() ); // may do detach() ++ } + icon_pixmap = pm->handle(); +- if ( pm->mask() ) ++ if ( pm->mask() ) { + mask_pixmap = pm->mask()->handle(); ++ } + } + XWMHints *h = XGetWMHints( x11Display(), winId() ); + XWMHints wm_hints; diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-04_17_28_30-Fix-ARGB-mode-stippled-focus-rectangle-showing-underlying-window-contents-Fix-TQColor-not-processing-alpha-channel-in-ARGB-mode-d2240de.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-04_17_28_30-Fix-ARGB-mode-stippled-focus-rectangle-showing-underlying-window-contents-Fix-TQColor-not-processing-alpha-channel-in-ARGB-mode-d2240de.patch new file mode 100644 index 00000000..cb9e29c8 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-04_17_28_30-Fix-ARGB-mode-stippled-focus-rectangle-showing-underlying-window-contents-Fix-TQColor-not-processing-alpha-channel-in-ARGB-mode-d2240de.patch @@ -0,0 +1,62 @@ +diff --git a/src/kernel/qcolor_x11.cpp b/src/kernel/qcolor_x11.cpp +index eeaee5e..dbd039e 100644 +--- a/src/kernel/qcolor_x11.cpp ++++ b/src/kernel/qcolor_x11.cpp +@@ -407,8 +407,14 @@ uint QColor::alloc( int screen ) + b = sd->blue_shift > 0 ? b << sd->blue_shift : b >> -sd->blue_shift; + pix = (b & sd->blue_mask) | (g & sd->green_mask) | (r & sd->red_mask) + | ~(sd->blue_mask | sd->green_mask | sd->red_mask); +- if ( screen == QPaintDevice::x11AppScreen() ) ++ if (QPaintDevice::x11AppDepth(screen) == 32) { ++ int a = qAlpha(d.argb); ++ pix = pix & 0x00ffffff; ++ pix = pix | (a << 24); ++ } ++ if ( screen == QPaintDevice::x11AppScreen() ) { + d.d32.pix = pix; ++ } + return pix; + } + QColorData *c = sd->colorDict->find( (long)(d.argb) ); +diff --git a/src/kernel/qpainter_x11.cpp b/src/kernel/qpainter_x11.cpp +index 126c0d6..267887e 100644 +--- a/src/kernel/qpainter_x11.cpp ++++ b/src/kernel/qpainter_x11.cpp +@@ -1842,16 +1842,24 @@ void QPainter::drawWinFocusRect( int x, int y, int w, int h, + RasterOp old_rop = (RasterOp)rop; + + if ( xorPaint ) { +- if ( QColor::numBitPlanes() <= 8 ) ++ if ( QColor::numBitPlanes() <= 8 ) { + setPen( QPen(color1, 0, Qt::FineDotLine) ); +- else ++ } ++ else if ( QColor::numBitPlanes() <= 8 ) { + setPen( QPen(white, 0, Qt::FineDotLine) ); ++ } ++ else { ++ setPen( QPen(QColor(qRgba(255,255,255,0)), 0, Qt::FineDotLine) ); ++ } + setRasterOp( XorROP ); +- } else { +- if ( qGray( bgColor.rgb() ) < 128 ) ++ } ++ else { ++ if ( qGray( bgColor.rgb() ) < 128 ) { + setPen( QPen(white, 0, Qt::FineDotLine) ); +- else ++ } ++ else { + setPen( QPen(black, 0, Qt::FineDotLine) ); ++ } + } + + if ( testf(ExtDev|VxF|WxF) ) { +@@ -1876,6 +1884,7 @@ void QPainter::drawWinFocusRect( int x, int y, int w, int h, + XSetLineAttributes( dpy, gc, 1, LineOnOffDash, CapButt, JoinMiter ); + + XDrawRectangle( dpy, hd, gc, x, y, w-1, h-1 ); ++ + XSetLineAttributes( dpy, gc, 0, LineSolid, CapButt, JoinMiter ); + setRasterOp( old_rop ); + setPen( old_pen ); diff --git a/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-08_01_43_38-Fix-spelling-mistakes-169c39a.patch b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-08_01_43_38-Fix-spelling-mistakes-169c39a.patch new file mode 100644 index 00000000..11f9dfb2 --- /dev/null +++ b/dev-qt/qt/files/trinity-3.5.13.1..3.5.13.2/qt3-2013-05-08_01_43_38-Fix-spelling-mistakes-169c39a.patch @@ -0,0 +1,52 @@ +diff --git a/doc/html/qsqlcursor.html b/doc/html/qsqlcursor.html +index 3111cc5..1caaaa7 100644 +--- a/doc/html/qsqlcursor.html ++++ b/doc/html/qsqlcursor.html +@@ -386,7 +386,7 @@ record. + <a name="x2446"></a> cur.<a href="#insert">insert</a>(); + </pre> + <p> In the above example, a cursor is created on the 'prices' table +-and a pointer to the insert buffer is aquired using <a href="#primeInsert">primeInsert</a>(). ++and a pointer to the insert buffer is acquired using <a href="#primeInsert">primeInsert</a>(). + Each field's value is set to the desired value and then <a href="#insert">insert</a>() + is called to insert the data into the database. Remember: all edit + operations (insert(), <a href="#update">update</a>() and delete()) operate on the +diff --git a/doc/man/man3/qsqlcursor.3qt b/doc/man/man3/qsqlcursor.3qt +index c7067de..0a97aec 100644 +--- a/doc/man/man3/qsqlcursor.3qt ++++ b/doc/man/man3/qsqlcursor.3qt +@@ -376,7 +376,7 @@ If \fIinvalidate\fR is TRUE (the default), the cursor will no longer be position + cur.insert(); + .fi + .PP +-In the above example, a cursor is created on the 'prices' table and a pointer to the insert buffer is aquired using primeInsert(). Each field's value is set to the desired value and then insert() is called to insert the data into the database. Remember: all edit operations (insert(), update() and delete()) operate on the contents of the cursor edit buffer and not on the contents of the cursor itself. ++In the above example, a cursor is created on the 'prices' table and a pointer to the insert buffer is acquired using primeInsert(). Each field's value is set to the desired value and then insert() is called to insert the data into the database. Remember: all edit operations (insert(), update() and delete()) operate on the contents of the cursor edit buffer and not on the contents of the cursor itself. + .PP + See also setMode() and lastError(). + .SH "bool QSqlCursor::isCalculated ( const QString & name ) const" +diff --git a/src/kernel/qinternal.cpp b/src/kernel/qinternal.cpp +index cf1e037..dfb2abc 100644 +--- a/src/kernel/qinternal.cpp ++++ b/src/kernel/qinternal.cpp +@@ -497,7 +497,7 @@ void QSharedDoubleBuffer::flush() + } + + /* \internal +- Aquire ownership of the shared double buffer pixmap, subject to the ++ Acquire ownership of the shared double buffer pixmap, subject to the + following conditions: + + \list 1 +diff --git a/src/sql/qsqlcursor.cpp b/src/sql/qsqlcursor.cpp +index a1be1f8..2ed963c 100644 +--- a/src/sql/qsqlcursor.cpp ++++ b/src/sql/qsqlcursor.cpp +@@ -1007,7 +1007,7 @@ QString QSqlCursor::toString( const QSqlIndex& i, QSqlRecord* rec, const QString + \printuntil insert + + In the above example, a cursor is created on the 'prices' table +- and a pointer to the insert buffer is aquired using primeInsert(). ++ and a pointer to the insert buffer is acquired using primeInsert(). + Each field's value is set to the desired value and then insert() + is called to insert the data into the database. Remember: all edit + operations (insert(), update() and delete()) operate on the |