diff options
author | Heinz Wiesinger <pprkut@liwjatan.at> | 2010-05-12 17:42:09 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-12 17:42:09 +0200 |
commit | e6840b4ba85dae992ad1eb29ce02071f5da7360d (patch) | |
tree | da4a679ceb26d67ba177d5fcf46990e545544f4f /libraries/qt4/patches | |
parent | 2bd62a324d63c5169b8b9528f818ac6cef72a8cf (diff) | |
download | slackbuilds-e6840b4ba85dae992ad1eb29ce02071f5da7360d.tar.gz |
libraries/qt4: Updated for version 4.5.1
Diffstat (limited to 'libraries/qt4/patches')
10 files changed, 463 insertions, 0 deletions
diff --git a/libraries/qt4/patches/0180-window-role.diff b/libraries/qt4/patches/0180-window-role.diff new file mode 100644 index 0000000000..687e11cb11 --- /dev/null +++ b/libraries/qt4/patches/0180-window-role.diff @@ -0,0 +1,101 @@ +qt-bugs@ issue : 167704 +Trolltech task ID : 168283 (status: "fixed" for Qt 4.4.0, but effectively refused) +bugs.kde.org number : none +applied: no +author: Lubos Lunak <l.lunak@kde.org> + +NOTE: It is suggested to apply patch #0209 as well when this patch is used. + +This patch uses object name as a fallback for window role if no window role +is set explicitly using setWindowRole(). Since Qt3 always used the object +name as the window role and most Qt3/KDE3 code is ported to call setObjectName(), +this makes the window role set in many cases (which KWin uses for window identifying). + + +--- src/corelib/kernel/qobject.cpp.sav 2008-02-22 09:03:40.000000000 +0100 ++++ src/corelib/kernel/qobject.cpp 2008-02-23 16:15:51.000000000 +0100 +@@ -1016,9 +1016,18 @@ void QObject::setObjectName(const QStrin + { + Q_D(QObject); + d->objectName = name; ++#if defined(Q_WS_X11) ++ d->checkWindowRole(); ++#endif + } + + ++#if defined(Q_WS_X11) ++void QObjectPrivate::checkWindowRole() ++{ ++} ++#endif ++ + #ifdef QT3_SUPPORT + /*! \internal + QObject::child is compat but needs to call itself recursively, +--- src/corelib/kernel/qobject_p.h.sav 2008-02-22 09:23:44.000000000 +0100 ++++ src/corelib/kernel/qobject_p.h 2008-02-23 16:16:46.000000000 +0100 +@@ -148,6 +148,9 @@ public: + mutable quint32 connectedSignals; + + QString objectName; ++#if defined(Q_WS_X11) ++ virtual void checkWindowRole(); ++#endif + + // Note: you must hold the signalSlotLock() before accessing the lists below or calling the functions + struct Connection +--- src/gui/kernel/qwidget_p.h.sav 2008-02-22 09:04:04.000000000 +0100 ++++ src/gui/kernel/qwidget_p.h 2008-02-23 16:17:07.000000000 +0100 +@@ -324,6 +324,7 @@ public: + + #if defined(Q_WS_X11) + void setWindowRole(); ++ virtual void checkWindowRole(); + void sendStartupMessage(const char *message) const; + void setNetWmWindowTypes(); + #endif +--- src/gui/kernel/qwidget_x11.cpp.sav 2008-02-23 15:28:47.000000000 +0100 ++++ src/gui/kernel/qwidget_x11.cpp 2008-02-23 16:31:47.000000000 +0100 +@@ -710,13 +710,17 @@ void QWidgetPrivate::create_sys(WId wind + + + // declare the widget's window role ++ QByteArray windowRole; + if (QTLWExtra *topData = maybeTopData()) { +- if (!topData->role.isEmpty()) { +- QByteArray windowRole = topData->role.toUtf8(); +- XChangeProperty(dpy, id, +- ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, +- (unsigned char *)windowRole.constData(), windowRole.length()); +- } ++ if (!topData->role.isEmpty()) ++ windowRole = topData->role.toUtf8(); ++ } ++ if (windowRole.isEmpty()) // use object name as a fallback ++ windowRole = objectName.toUtf8(); ++ if (!windowRole.isEmpty()) { ++ XChangeProperty(dpy, id, ++ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, ++ (unsigned char *)windowRole.constData(), windowRole.length()); + } + + // set client leader property +@@ -2852,6 +2856,17 @@ void QWidgetPrivate::setWindowRole() + (unsigned char *)windowRole.constData(), windowRole.length()); + } + ++void QWidgetPrivate::checkWindowRole() ++{ ++ Q_Q(QWidget); ++ if( !q->windowRole().isEmpty() || !q->internalWinId()) ++ return; ++ QByteArray windowRole = objectName.toUtf8(); // use as a fallback ++ XChangeProperty(X11->display, q->internalWinId(), ++ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, ++ (unsigned char *)windowRole.constData(), windowRole.length()); ++} ++ + Q_GLOBAL_STATIC(QX11PaintEngine, qt_widget_paintengine) + QPaintEngine *QWidget::paintEngine() const + { diff --git a/libraries/qt4/patches/0195-compositing-properties.diff b/libraries/qt4/patches/0195-compositing-properties.diff new file mode 100644 index 0000000000..979df94366 --- /dev/null +++ b/libraries/qt4/patches/0195-compositing-properties.diff @@ -0,0 +1,58 @@ +qt-bugs@ issue : none +bugs.kde.org number : none +applied: no +author: Lubos Lunak <l.lunak@kde.org> + +This patch makes override-redirect windows (popup menu, dropdown menu, +tooltip, combobox, etc.) also have more window properties like WM_CLASS, +so they can be used when compositing. + +--- src/gui/kernel/qwidget_x11.cpp ++++ src/gui/kernel/qwidget_x11.cpp +@@ -637,6 +637,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + Q_ASSERT(id); + XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder, + &wsa); ++ XClassHint class_hint; ++ QByteArray appName = qAppName().toLatin1(); ++ class_hint.res_name = appName.data(); // application name ++ class_hint.res_class = const_cast<char *>(QX11Info::appClass()); // application class ++ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint); + } else if (topLevel && !desktop) { // top-level widget + if (!X11->wm_client_leader) + create_wm_client_leader(); +@@ -685,13 +690,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + // set EWMH window types + setNetWmWindowTypes(); + ++ // when we create a toplevel widget, the frame strut should be dirty ++ data.fstrut_dirty = 1; ++ ++ } else { ++ // non-toplevel widgets don't have a frame, so no need to ++ // update the strut ++ data.fstrut_dirty = 0; ++ } ++ ++ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows + // set _NET_WM_PID + long curr_pid = getpid(); + XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace, + (unsigned char *) &curr_pid, 1); + +- // when we create a toplevel widget, the frame strut should be dirty +- data.fstrut_dirty = 1; + + // declare the widget's window role + if (QTLWExtra *topData = maybeTopData()) { +@@ -707,10 +720,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER), + XA_WINDOW, 32, PropModeReplace, + (unsigned char *)&X11->wm_client_leader, 1); +- } else { +- // non-toplevel widgets don't have a frame, so no need to +- // update the strut +- data.fstrut_dirty = 0; + } + + if (initializeWindow && q->internalWinId()) { diff --git a/libraries/qt4/patches/0225-invalidate-tabbar-geometry-on-refresh.patch b/libraries/qt4/patches/0225-invalidate-tabbar-geometry-on-refresh.patch new file mode 100644 index 0000000000..49daca322f --- /dev/null +++ b/libraries/qt4/patches/0225-invalidate-tabbar-geometry-on-refresh.patch @@ -0,0 +1,35 @@ +qt-bugs@ issue : 208185 +Trolltech task ID : 208349 +bugs.kde.org number : 159014 +applied: no +author: Robert Knight <robertknight@gmail.com> + +When tabs are inserted or removed in a QTabBar, QTabBarPrivate::refresh() +is called to update the layout. If the tabbar widget is hidden, this +just sets a boolean variable (layoutDirty) and returns, so the parent widget's layout +is not notified about the possible geometry change. + +Prior to Qt 4.4 this was not a problem because the geometry was recalculated +in QTabBar::sizeHint() if the layoutDirty variable was set. In Qt 4.4 however the layout +caches size hint information in QWidgetItemV2. Since the cache information is not invalidated, +the layout may end up using out-of-date size hint information to compute the widget size. + +If the QTabBar is empty when QTabBar::sizeHint() is called, it will return a size with a height +of 0, which will be kept in the cache and so the tab bar will never be shown. + +This patch fixes the problem by calling updateGeometry() whenever the tab bar's layout is refreshed. + +Index: src/gui/widgets/qtabbar.cpp +=================================================================== +--- src/gui/widgets/qtabbar.cpp (revision 796858) ++++ src/gui/widgets/qtabbar.cpp (working copy) +@@ -533,8 +533,8 @@ + layoutTabs(); + makeVisible(currentIndex); + q->update(); +- q->updateGeometry(); + } ++ q->updateGeometry(); + } + + /*! diff --git a/libraries/qt4/patches/0234-fix-mysql-threaded.diff b/libraries/qt4/patches/0234-fix-mysql-threaded.diff new file mode 100644 index 0000000000..4c5b6136b8 --- /dev/null +++ b/libraries/qt4/patches/0234-fix-mysql-threaded.diff @@ -0,0 +1,32 @@ +qt-bugs@ issue : N217716 +Trolltech task ID : 217788 +bugs.kde.org number : no report +applied: no +author: Tobias Koenig <tokoe@kde.org> + +This patch will fix the handling of connections to +mysql server in a multithreaded environment + +--- src/sql/drivers/mysql/qsql_mysql.cpp (revision 804421) ++++ src/sql/drivers/mysql/qsql_mysql.cpp (working copy) +@@ -1215,6 +1215,10 @@ + d->preparedQuerysEnabled = false; + #endif + ++#ifndef QT_NO_THREAD ++ mysql_thread_init(); ++#endif ++ + setOpen(true); + setOpenError(false); + return true; +@@ -1223,6 +1227,9 @@ + void QMYSQLDriver::close() + { + if (isOpen()) { ++#ifndef QT_NO_THREAD ++ mysql_thread_end(); ++#endif + mysql_close(d->mysql); + setOpen(false); + setOpenError(false); diff --git a/libraries/qt4/patches/0255-qtreeview-selection-columns-hidden.diff b/libraries/qt4/patches/0255-qtreeview-selection-columns-hidden.diff new file mode 100644 index 0000000000..08677af633 --- /dev/null +++ b/libraries/qt4/patches/0255-qtreeview-selection-columns-hidden.diff @@ -0,0 +1,44 @@ +qt-bugs@ issue : N232819 +Trolltech task ID : 232831 +applied: no +author: Rafael Fernández López <ereslibre@kde.org> + +In a treeview with columns like this: + +Column 1 | Column 2 | ... | Column k | ... | Column n + +When selecting with rubberband (by clicking on the blank part of the viewport) while Column k is +hidden, you get double items on the selection model, when asking for selection(). This is becase +ranges are incorrectly calculated when there are hidden columns. A way to reproduce: + +Column 1 | Column 2 | Column 4 (Column 3 is hidden) + item + item + item + x <- press button here and move it up to select items (on this same column) + +If you do like this: + +Column 1 | Column 2 | Column 4 (Column 3 is hidden) + item + item + item + x <- press button here and move it up + +you won't be able to reproduce, since you need the hidden column to be between the one you click and +the last one. The reason is that columnRanges returns two ranges when there is supposed to return 1 +range (even when there are hidden columns). + +diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp +index d5ca633..b7975be 100644 +--- src/gui/itemviews/qtreeview.cpp ++++ src/gui/itemviews/qtreeview.cpp +@@ -3494,7 +3494,7 @@ + current.first = -2; // -1 is not enough because -1+1 = 0 + current.second = -2; + foreach (int logicalColumn, logicalIndexes) { +- if (current.second + 1 != logicalColumn) { ++ if (current.second + 1 != logicalColumn && !header->isSectionHidden(current.second + 1)) { + if (current.first != -2) { + //let's save the current one + ret += current; diff --git a/libraries/qt4/patches/0274-shm-native-image-fix.diff b/libraries/qt4/patches/0274-shm-native-image-fix.diff new file mode 100644 index 0000000000..0ea21467a4 --- /dev/null +++ b/libraries/qt4/patches/0274-shm-native-image-fix.diff @@ -0,0 +1,97 @@ +qt-bugs@ issue : none +Qt Software task ID : none +bugs.kde.org number : none +applied: no +author: Fredrik Höglund <fredrik@kde.org> + +This patch makes the raster graphics system use shared images instead +of shared pixmaps. + +Shared memory pixmaps are deprecated since they are slower than shared +images with modern graphics hardware. They are also not supported by EXA +drivers and can be disabled in the latest version of the NVidia driver. + +Index: src/gui/kernel/qapplication_x11.cpp +=================================================================== +--- src/gui/kernel/qapplication_x11.cpp (revision 934506) ++++ src/gui/kernel/qapplication_x11.cpp (working copy) +@@ -1943,7 +1943,7 @@ void qt_init(QApplicationPrivate *priv, + // to determine whether the display is local or not (not 100 % accurate) + bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0; + if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) +- X11->use_mitshm = mitshm_pixmaps; ++ X11->use_mitshm = true; + } + #endif // QT_NO_MITSHM + +Index: src/gui/image/qnativeimage_p.h +=================================================================== +--- src/gui/image/qnativeimage_p.h (revision 930645) ++++ src/gui/image/qnativeimage_p.h (working copy) +@@ -85,7 +85,6 @@ + + #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) + XImage *xshmimg; +- Pixmap xshmpm; + XShmSegmentInfo xshminfo; + + #elif defined(Q_WS_MAC) +Index: src/gui/image/qnativeimage.cpp +=================================================================== +--- src/gui/image/qnativeimage.cpp (revision 930645) ++++ src/gui/image/qnativeimage.cpp (working copy) +@@ -140,7 +140,6 @@ + { + if (!X11->use_mitshm) { + xshmimg = 0; +- xshmpm = 0; + image = QImage(width, height, format); + return; + } +@@ -184,11 +183,6 @@ + shmctl(xshminfo.shmid, IPC_RMID, 0); + return; + } +- xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data, +- &xshminfo, width, height, dd); +- if (!xshmpm) { +- qWarning() << "QNativeImage: Unable to create shared Pixmap."; +- } + } + + +@@ -197,10 +191,6 @@ + if (!xshmimg) + return; + +- if (xshmpm) { +- XFreePixmap(X11->display, xshmpm); +- xshmpm = 0; +- } + XShmDetach(X11->display, &xshminfo); + xshmimg->data = 0; + XDestroyImage(xshmimg); +Index: src/gui/painting/qwindowsurface_raster.cpp +=================================================================== +--- src/gui/painting/qwindowsurface_raster.cpp (revision 930645) ++++ src/gui/painting/qwindowsurface_raster.cpp (working copy) +@@ -228,9 +228,16 @@ + + QRect br = rgn.boundingRect().translated(offset); + #ifndef QT_NO_MITSHM +- if (d_ptr->image->xshmpm) { +- XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc, +- br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y()); ++ if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) { ++ const QImage &src = d->image->image; ++ br = br.intersected(src.rect()); ++ // Hack to make sure we satisify the PutImage() constraints in the X server, ++ // since the doShmPutImage() route currently forces a migration to system ram. ++ wbr.setX(wbr.x() - br.x()); ++ br.setX(0); ++ br.setWidth(src.width()); ++ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg, ++ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False); + XSync(X11->display, False); + } else + #endif diff --git a/libraries/qt4/patches/0279-svg-rendering-regression.diff b/libraries/qt4/patches/0279-svg-rendering-regression.diff new file mode 100644 index 0000000000..0ce074eb32 --- /dev/null +++ b/libraries/qt4/patches/0279-svg-rendering-regression.diff @@ -0,0 +1,26 @@ +qt-bugs@ issue : none (not yet) +Qt Software task ID : none (not yet) +bugs.kde.org number : 190485 (at least) +applied: no +author: Alexis Menard <alexis.menard@nokia.com> + +This patch fix the regression introduced in 4.5.1 with SVG rendering. +The problem appear when a gradient reference an another gradient which is after +in the svg. + +Please clear your plasma cache as well. + +This patch is already in 4.5 branch so it will be in 4.5.2. + +Index: src/svg/qsvgstyle.cpp +=================================================================== +--- src/svg/qsvgstyle.cpp (revision 958572) ++++ src/svg/qsvgstyle.cpp (working copy) +@@ -808,6 +808,7 @@ + static_cast<QSvgGradientStyle*>(prop); + st->resolveStops(); + m_gradient->setStops(st->qgradient()->stops()); ++ m_gradientStopsSet = st->gradientStopsSet(); + } + } + m_link = QString(); diff --git a/libraries/qt4/patches/0280-deserialization-custom-dbus-properties.diff b/libraries/qt4/patches/0280-deserialization-custom-dbus-properties.diff new file mode 100644 index 0000000000..7de633d1e2 --- /dev/null +++ b/libraries/qt4/patches/0280-deserialization-custom-dbus-properties.diff @@ -0,0 +1,47 @@ +qt-bugs@ issue : N240326 +Qt Software task ID : 240608 +bugs.kde.org number : none +applied: no +author: George Goldberg <grundleborg@googlemail.com> + +This patch fixes deserialization of values with custom types when setting +properties on dbus adaptors. It is needed, in particular by telepathy/Qt +programs and libraries. The bug was reported to Nokia on 2009-01-07 along +with the patch supplied here. The summary of the issue from the Qt +Software task tracker follows: + +When calling the setter for a DBus property, if that property has a custom type +(e.g. a struct with dbus type (uss)), QtDBus fails to demarshall the +QDBusArgument before attempting to set the property on the adaptor. The result +is that it attempts to call adaptor->setProperty() with a QDBusArgument of type +"uss" instead of with the type of the custom struct. + +Index: src/dbus/qdbusinternalfilters.cpp +=================================================================== +--- src/dbus/qdbusinternalfilters.cpp (revision 960506) ++++ src/dbus/qdbusinternalfilters.cpp (working copy) +@@ -274,9 +274,23 @@ + QDBusAdaptorConnector::AdaptorMap::ConstIterator it; + it = qLowerBound(connector->adaptors.constBegin(), connector->adaptors.constEnd(), + interface_name); +- if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) ++ if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) { ++ if (value.userType() == qMetaTypeId<QDBusArgument>()) { ++ QDBusArgument valueArg = qvariant_cast<QDBusArgument>(value); ++ if (valueArg.currentType() != -1) { ++ int mid = it->adaptor->metaObject()->property(it->adaptor->metaObject()->indexOfProperty(property_name)).userType(); ++ void *null = 0; ++ QVariant valueStore(mid, null); ++ QDBusMetaType::demarshall(valueArg, mid, valueStore.data()); ++ ++ if (it->adaptor->setProperty(property_name, valueStore)) ++ return msg.createReply(); ++ } ++ } ++ + if (it->adaptor->setProperty(property_name, value)) + return msg.createReply(); ++ } + } + } + diff --git a/libraries/qt4/patches/qt.mysql.h.diff b/libraries/qt4/patches/qt.mysql.h.diff new file mode 100644 index 0000000000..7a41be5911 --- /dev/null +++ b/libraries/qt4/patches/qt.mysql.h.diff @@ -0,0 +1,12 @@ +diff -Nur qt-x11-opensource-src-4.3.4.orig/src/sql/drivers/mysql/qsql_mysql.h qt-x11-opensource-src-4.3.4/src/sql/drivers/mysql/qsql_mysql.h +--- qt-x11-opensource-src-4.3.4.orig/src/sql/drivers/mysql/qsql_mysql.h 2008-04-02 20:52:11.739343004 -0500 ++++ qt-x11-opensource-src-4.3.4/src/sql/drivers/mysql/qsql_mysql.h 2008-04-02 20:52:05.970610574 -0500 +@@ -51,7 +51,7 @@ + #include <QtCore/qt_windows.h> + #endif + +-#include <mysql.h> ++#include <mysql/mysql.h> + + #ifdef QT_PLUGIN + #define Q_EXPORT_SQLDRIVER_MYSQL diff --git a/libraries/qt4/patches/qt.x86.cflags.diff b/libraries/qt4/patches/qt.x86.cflags.diff new file mode 100644 index 0000000000..a9e65fbb84 --- /dev/null +++ b/libraries/qt4/patches/qt.x86.cflags.diff @@ -0,0 +1,11 @@ +--- qt.orig/mkspecs/common/g++.conf 2007-12-22 00:22:18.295453075 -0600 ++++ qt/mkspecs/common/g++.conf 2007-12-22 00:23:07.514257895 -0600 +@@ -7,7 +7,7 @@ + QMAKE_CFLAGS_DEPS += -M + QMAKE_CFLAGS_WARN_ON += -Wall -W + QMAKE_CFLAGS_WARN_OFF += -w +-QMAKE_CFLAGS_RELEASE += -O2 ++QMAKE_CFLAGS_RELEASE += -O2 -march=i486 -mtune=i686 + QMAKE_CFLAGS_DEBUG += -g + QMAKE_CFLAGS_SHLIB += -fPIC + QMAKE_CFLAGS_STATIC_LIB += -fPIC |