From 832145fd5be35c4b9e6e0c4f67a1419eb271579f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 26 Jun 2009 18:15:23 +0000 Subject: [PATCH] - up to 4.5.2 Changed files: 0234-fix-mysql-threaded.diff -> 1.2 0274-shm-native-image-fix.diff -> 1.2 0279-svg-rendering-regression.diff -> 1.2 0283-do-not-deduce-scrollbar-extent-twice.diff -> 1.1 0285-qgv-dontshowchildren.diff -> 1.1 qt4.spec -> 1.218 --- 0234-fix-mysql-threaded.diff | 32 ------ 0274-shm-native-image-fix.diff | 97 ------------------- 0279-svg-rendering-regression.diff | 26 ----- ...-do-not-deduce-scrollbar-extent-twice.diff | 35 +++++++ 0285-qgv-dontshowchildren.diff | 24 +++++ qt4.spec | 25 +++-- 6 files changed, 71 insertions(+), 168 deletions(-) delete mode 100644 0234-fix-mysql-threaded.diff delete mode 100644 0274-shm-native-image-fix.diff delete mode 100644 0279-svg-rendering-regression.diff create mode 100644 0283-do-not-deduce-scrollbar-extent-twice.diff create mode 100644 0285-qgv-dontshowchildren.diff diff --git a/0234-fix-mysql-threaded.diff b/0234-fix-mysql-threaded.diff deleted file mode 100644 index 4c5b613..0000000 --- a/0234-fix-mysql-threaded.diff +++ /dev/null @@ -1,32 +0,0 @@ -qt-bugs@ issue : N217716 -Trolltech task ID : 217788 -bugs.kde.org number : no report -applied: no -author: Tobias Koenig - -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/0274-shm-native-image-fix.diff b/0274-shm-native-image-fix.diff deleted file mode 100644 index 0ea2146..0000000 --- a/0274-shm-native-image-fix.diff +++ /dev/null @@ -1,97 +0,0 @@ -qt-bugs@ issue : none -Qt Software task ID : none -bugs.kde.org number : none -applied: no -author: Fredrik Höglund - -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/0279-svg-rendering-regression.diff b/0279-svg-rendering-regression.diff deleted file mode 100644 index 5517a19..0000000 --- a/0279-svg-rendering-regression.diff +++ /dev/null @@ -1,26 +0,0 @@ -qt-bugs@ issue : none (not yet) -Qt Software task ID : none (not yet) -bugs.kde.org number : 190485 (at least) -applied: yes -author: Alexis Menard - -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(prop); - st->resolveStops(); - m_gradient->setStops(st->qgradient()->stops()); -+ m_gradientStopsSet = st->gradientStopsSet(); - } - } - m_link = QString(); diff --git a/0283-do-not-deduce-scrollbar-extent-twice.diff b/0283-do-not-deduce-scrollbar-extent-twice.diff new file mode 100644 index 0000000..53ec85e --- /dev/null +++ b/0283-do-not-deduce-scrollbar-extent-twice.diff @@ -0,0 +1,35 @@ +qt-bugs@ issue : none +Qt Software task ID : none +bugs.kde.org number : none +applied: no +author: Aurélien Gâteau + +Do not deduce scrollbar extent twice if scrollbar policy is +Qt::ScrollBarAlwaysOn. + +This patch has been merged in master but won't be in 4.5. +http://qt.gitorious.org/qt/qt/merge_requests/432 + +--- src/gui/itemviews/qlistview.cpp ++++ src/gui/itemviews/qlistview.cpp +@@ -1969,10 +1969,16 @@ void QListViewPrivate::prepareItemsLayout() + int frameAroundContents = 0; + if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents)) + frameAroundContents = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth) * 2; +- int verticalMargin = vbarpolicy==Qt::ScrollBarAlwaysOff ? 0 : +- q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents; +- int horizontalMargin = hbarpolicy==Qt::ScrollBarAlwaysOff ? 0 : +- q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents; ++ ++ // maximumViewportSize() already takes scrollbar into account if policy is ++ // Qt::ScrollBarAlwaysOn but scrollbar extent must be deduced if policy ++ // is Qt::ScrollBarAsNeeded ++ int verticalMargin = vbarpolicy==Qt::ScrollBarAsNeeded ++ ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents ++ : 0; ++ int horizontalMargin = hbarpolicy==Qt::ScrollBarAsNeeded ++ ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents ++ : 0; + + layoutBounds.adjust(0, 0, -verticalMargin, -horizontalMargin); + diff --git a/0285-qgv-dontshowchildren.diff b/0285-qgv-dontshowchildren.diff new file mode 100644 index 0000000..52fb798 --- /dev/null +++ b/0285-qgv-dontshowchildren.diff @@ -0,0 +1,24 @@ +qt-bugs@ issue : unknows +Qt Software task ID : 197802 +bugs.kde.org number : bugs on the issue not reported yed +applied: no +author: Marco Martin + +This patch makes children items of an hidden qgraphicsitem not be shown if show() is called on them. fixes several issues like the opensocial plasma widget and the Plasma desktop toolbox behaviour. + +Index: src/gui/graphicsview/qgraphicsitem.cpp +=================================================================== +--- src/gui/graphicsview/qgraphicsitem.cpp (revision 958522) ++++ src/gui/graphicsview/qgraphicsitem.cpp (working copy) +@@ -1522,6 +1522,11 @@ + if (visible == quint32(newVisible)) + return; + ++ QGraphicsItem *parent(q_ptr->parentItem()); ++ if (parent && newVisible && !parent->d_ptr->visible) { ++ return; ++ } ++ + // Modify the property. + const QVariant newVisibleVariant(q_ptr->itemChange(QGraphicsItem::ItemVisibleChange, + quint32(newVisible))); diff --git a/qt4.spec b/qt4.spec index 230a78f..8ebc2f4 100644 --- a/qt4.spec +++ b/qt4.spec @@ -75,12 +75,12 @@ Summary(es.UTF-8): Biblioteca para ejecutar aplicaciones GUI Qt Summary(pl.UTF-8): Biblioteka Qt do tworzenia GUI Summary(pt_BR.UTF-8): Estrutura para rodar aplicações GUI Qt Name: qt4 -Version: 4.5.1 -Release: 7 +Version: 4.5.2 +Release: 1 License: LGPL v2.1 or GPL v3.0 Group: X11/Libraries Source0: http://download.qtsoftware.com/qt/source/qt-x11-opensource-src-%{version}.tar.gz -# Source0-md5: f81a94e2ab7713b2d375d4e5cfc8e051 +# Source0-md5: d8bcc070a58db25c228b7729ffad4550 Source2: %{name}-qtconfig.desktop Source3: %{name}-designer.desktop Source4: %{name}-assistant.desktop @@ -92,15 +92,12 @@ Patch102: 0195-compositing-properties.diff Patch103: 0209-prevent-qt-mixing.diff Patch104: 0216-allow-isystem-for-headers.diff Patch105: 0225-invalidate-tabbar-geometry-on-refresh.patch -Patch106: 0279-svg-rendering-regression.diff -Patch107: 0234-fix-mysql-threaded.diff Patch108: 0280-deserialization-custom-dbus-properties.diff Patch109: 0253-qmake_correct_path_separators.diff Patch110: 0255-qtreeview-selection-columns-hidden.diff Patch111: 0269-msvc-webkit-compile.diff -Patch112: 0273-odbc-64bit-compile.diff -Patch113: 0274-shm-native-image-fix.diff -Patch114: 0281-syncqt-create-phonon-global.diff +Patch115: 0283-do-not-deduce-scrollbar-extent-twice.diff +Patch116: 0285-qgv-dontshowchildren.diff Patch0: %{name}-tools.patch Patch1: %{name}-qt_copy.patch @@ -1326,15 +1323,12 @@ Programas exemplo para o Qt versão. %patch103 -p0 %patch104 -p0 %patch105 -p0 -%patch106 -p0 -%patch107 -p0 %patch108 -p0 %patch109 -p0 %patch110 -p0 %patch111 -p0 -%patch112 -p0 -%patch113 -p0 -%patch114 -p0 +%patch115 -p0 +%patch116 -p0 %patch0 -p1 %patch1 -p0 @@ -1561,6 +1555,11 @@ done rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*.qm for file in translations/*.qm tools/assistant/*.qm tools/designer/designer/*.qm tools/linguist/linguist/*.qm; do [ ! -f $file ] && continue + case "$file" in + *untranslated*) + continue; + ;; + esac eval "`echo $file | sed -r 's:.*/([a-zA-Z]+(_[a-zA-Z]{3,}){0,1})_(((ja)_jp)|([a-z]{2}_[A-Z]{2,})|([a-z]{2}))\.qm$:MOD=\1 ; lang=\5\6\7:'`" [ "$lang" == "iw" ] && lang=he MOD=qt4-$MOD -- 2.44.0