rev 12813 - trunk/packages/qt4-x11/debian/patches

Armin Berres trigger-guest at alioth.debian.org
Mon Dec 1 23:18:58 UTC 2008


Author: trigger-guest
Date: 2008-12-01 23:18:58 +0000 (Mon, 01 Dec 2008)
New Revision: 12813

Added:
   trunk/packages/qt4-x11/debian/patches/0255-qtreeview-selection-columns-hidden.diff
   trunk/packages/qt4-x11/debian/patches/0256-fix-recursive-backingstore-sync-crash.diff
   trunk/packages/qt4-x11/debian/patches/0257-qurl-validate-speedup.diff
   trunk/packages/qt4-x11/debian/patches/0260-fix-qgraphicswidget-deletionclearFocus.diff
   trunk/packages/qt4-x11/debian/patches/0261-sync-before-reset-errorhandler.patch
   trunk/packages/qt4-x11/debian/patches/0262-fix-treeview-animation-crash.diff
Modified:
   trunk/packages/qt4-x11/debian/patches/series
Log:
add qt-copy patches, but don't uncomment them in the series file for the moment. i couldn't test qt with this patches yet. it fails to build for whatever reason

Added: trunk/packages/qt4-x11/debian/patches/0255-qtreeview-selection-columns-hidden.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0255-qtreeview-selection-columns-hidden.diff	                        (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0255-qtreeview-selection-columns-hidden.diff	2008-12-01 23:18:58 UTC (rev 12813)
@@ -0,0 +1,42 @@
+qt-bugs@ issue : N232819
+Trolltech task ID : 232831
+applied: no
+author: Rafael Fernández López <ereslibre at 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).
+
+--- a/src/gui/itemviews/qtreeview.cpp
++++ b/src/gui/itemviews/qtreeview.cpp
+@@ -3530,7 +3530,7 @@ QList<QPair<int, int> > QTreeViewPrivate
+     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;

Added: trunk/packages/qt4-x11/debian/patches/0256-fix-recursive-backingstore-sync-crash.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0256-fix-recursive-backingstore-sync-crash.diff	                        (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0256-fix-recursive-backingstore-sync-crash.diff	2008-12-01 23:18:58 UTC (rev 12813)
@@ -0,0 +1,38 @@
+qt-bugs@ issue : N227209
+Trolltech task ID : none yet
+bugs.kde.org number : 174065
+applied: yes
+author: Szymon Tomasz Stefanek <s.stefanek at gmail.com>
+
+This patch fixes a crash deep inside the qt painting engine.
+
+The toplevel shared painter is instantiated by the topmost window
+which "owns" the backingstore buffer. The topmost window then recursively
+asks the children to paint themselves with the shared painter.
+With certain widget hierarchies it turns out that the topmost window
+may be asked to paint itself deep inside the recursive painting stack:
+a sort of "hierarchy-looping recursion".
+The window will do the job and then happily destroy the shared
+painter leaving the outer stack frames with a dangling pointer.
+
+This patch stops the "looping recursion" when it's triggered
+with a shared painter already active. The bug doesn't seem to
+be present in qt 4.5 snapshots, but in the meantime we need this fix.
+
+
+--- a/src/gui/painting/qbackingstore.cpp
++++ b/src/gui/painting/qbackingstore.cpp
+@@ -988,8 +988,12 @@ void QWidgetBackingStore::cleanRegion(co
+             return;
+         }
+ 
+-        if (tlw->updatesEnabled()) {
++        // With certain widget hierarchies we may end up being called recursively
++        // on the same toplevel. This is likely to explode once the painter is released
++        // in the code below (since there is no reference counting). Avoid it.
++        bool alreadyPainting = tlwExtra->sharedPainter && tlwExtra->sharedPainter->isActive();
+ 
++        if (tlw->updatesEnabled() && !alreadyPainting) {
+             // hw: XXX the toClean region is not correct if !dirtyWidgets.isEmpty()
+ 
+             // Pre render config

Added: trunk/packages/qt4-x11/debian/patches/0257-qurl-validate-speedup.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0257-qurl-validate-speedup.diff	                        (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0257-qurl-validate-speedup.diff	2008-12-01 23:18:58 UTC (rev 12813)
@@ -0,0 +1,21 @@
+qt-bugs@ issue : N234179
+Trolltech task ID : none
+bugs.kde.org number : 174144
+applied: no
+author: David Faure <faure at kde.org> (and Qt Software, independently)
+
+QUrl is supposed to have flags for parsing and validating a given URL only once.
+However it only sets the Validated flag on error, not after successful validation.
+So a valid url will be validated over and over again, every time e.g. port() or isValid() is called.
+
+--- a/src/corelib/io/qurl.cpp
++++ b/src/corelib/io/qurl.cpp
+@@ -3440,6 +3440,8 @@ void QUrlPrivate::validate() const
+     that->encodedOriginal = that->toEncoded(); // may detach
+     parse(ParseOnly);
+ 
++    QURL_SETFLAG(that->stateFlags, Validated);
++
+     if (!isValid)
+         return;
+ 

Added: trunk/packages/qt4-x11/debian/patches/0260-fix-qgraphicswidget-deletionclearFocus.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0260-fix-qgraphicswidget-deletionclearFocus.diff	                        (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0260-fix-qgraphicswidget-deletionclearFocus.diff	2008-12-01 23:18:58 UTC (rev 12813)
@@ -0,0 +1,20 @@
+qt-bugs@ issue : none
+Trolltech task ID : None
+applied: no
+author: Alexis Menard <alexis.menard at trolltech.com>
+
+Fix deletion of a qgraphicswidget on clear focus even if it doesn't have the focus.
+
+Will be included in 4.4.4
+
+--- a/src/gui/graphicsview/qgraphicsitem.cpp
++++ b/src/gui/graphicsview/qgraphicsitem.cpp
+@@ -1951,7 +1951,7 @@ void QGraphicsItem::setFocus(Qt::FocusRe
+ */
+ void QGraphicsItem::clearFocus()
+ {
+-    if (!d_ptr->scene || !hasFocus())
++    if (!d_ptr->scene)
+         return;
+     if (d_ptr->isWidget) {
+         // Invisible widget items with focus must explicitly clear subfocus.

Added: trunk/packages/qt4-x11/debian/patches/0261-sync-before-reset-errorhandler.patch
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0261-sync-before-reset-errorhandler.patch	                        (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0261-sync-before-reset-errorhandler.patch	2008-12-01 23:18:58 UTC (rev 12813)
@@ -0,0 +1,22 @@
+qt-bugs@ issue : 236401
+Trolltech task ID : none
+bugs.kde.org number : none
+applied: no
+author: Lubos Lunak <l.lunak at kde.org>
+
+Sync X connection before resetting X error handler to the one provided
+by Xlib (which just aborts), in case there are still queued requests
+that may result in an error.
+
+
+--- a/src/gui/kernel/qapplication_x11.cpp
++++ b/src/gui/kernel/qapplication_x11.cpp
+@@ -2312,6 +2312,8 @@ void qt_cleanup()
+ #endif
+ 
+     // Reset the error handlers
++    if (qt_is_gui_used)
++        XSync(X11->display, False); // sync first to process all possible errors
+     XSetErrorHandler(original_x_errhandler);
+     XSetIOErrorHandler(original_xio_errhandler);
+ 

Added: trunk/packages/qt4-x11/debian/patches/0262-fix-treeview-animation-crash.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0262-fix-treeview-animation-crash.diff	                        (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0262-fix-treeview-animation-crash.diff	2008-12-01 23:18:58 UTC (rev 12813)
@@ -0,0 +1,44 @@
+Trolltech task ID : 236454
+bugs.kde.org number : 176045
+applied: no
+author: Olivier Goffart
+
+This patch makes sure no deleted items are being accessed during an animation of the treeview
+It will also be contained in the upcoming Qt snapshots
+--- a/src/gui/itemviews/qtreeview.cpp
++++ b/src/gui/itemviews/qtreeview.cpp
+@@ -2815,10 +2815,9 @@ void QTreeViewPrivate::expand(int item, 
+     q->setState(oldState);
+ 
+     if (emitSignal) {
++        emit q->expanded(index);
+         if (animationsEnabled)
+             beginAnimatedOperation();
+-        else
+-            emit q->expanded(index);
+     }
+     if (model->canFetchMore(index))
+         model->fetchMore(index);
+@@ -2858,10 +2857,9 @@ void QTreeViewPrivate::collapse(int item
+     q->setState(oldState);
+ 
+     if (emitSignal) {
++        emit q->collapsed(modelIndex);
+         if (animationsEnabled)
+             beginAnimatedOperation();
+-        else
+-            emit q->collapsed(modelIndex);
+     }
+ 
+     _q_forceColumnResizeToFitContents();
+@@ -2918,10 +2916,6 @@ void QTreeViewPrivate::_q_endAnimatedOpe
+     animatedOperation.before = QPixmap();
+     animatedOperation.after = QPixmap();
+     q->setState(QAbstractItemView::NoState);
+-    if (animatedOperation.type == AnimatedOperation::Expand)
+-        emit q->expanded(viewItems.at(animatedOperation.item).index);
+-    else // operation == AnimatedOperation::Collapse
+-        emit q->collapsed(viewItems.at(animatedOperation.item).index);
+     q->updateGeometries();
+     viewport->update();
+ }

Modified: trunk/packages/qt4-x11/debian/patches/series
===================================================================
--- trunk/packages/qt4-x11/debian/patches/series	2008-12-01 22:12:41 UTC (rev 12812)
+++ trunk/packages/qt4-x11/debian/patches/series	2008-12-01 23:18:58 UTC (rev 12813)
@@ -14,12 +14,12 @@
 0248-fix-qwidget-scroll-slowness.diff
 0249-webkit-stale-frame-pointer.diff
 0254-fix-qgraphicsproxywidget-deletion-crash.diff
-0255-qtreeview-selection-columns-hidden.diff
-0256-fix-recursive-backingstore-sync-crash.diff
-0257-qurl-validate-speedup.diff
-0260-fix-qgraphicswidget-deletionclearFocus.diff
-0261-sync-before-reset-errorhandler.patch
-0262-fix-treeview-animation-crash.diff
+#0255-qtreeview-selection-columns-hidden.diff
+#0256-fix-recursive-backingstore-sync-crash.diff
+#0257-qurl-validate-speedup.diff
+#0260-fix-qgraphicswidget-deletionclearFocus.diff
+#0261-sync-before-reset-errorhandler.patch
+#0262-fix-treeview-animation-crash.diff
 
 # debian patches
 01_qmake_for_debian.diff




More information about the pkg-kde-commits mailing list