summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fabo@debian.org>2008-04-20 16:24:36 +0000
committerFathi Boudra <fabo@debian.org>2008-04-20 16:24:36 +0000
commitbfaeb1ab60958d9bce8b85437d9b3b4b39436d7b (patch)
tree9d7c5a920e93d48641f24cc8d8d997ce1d04e269
parent0c3e819d065c38e87bfaee5957b6ade41468c96d (diff)
downloadqt4-x11-bfaeb1ab60958d9bce8b85437d9b3b4b39436d7b.tar.gz
* Sync qt-copy patches:
* Remove 0191-listview-alternate-row-colors.diff * Remove 0192-itemdelegate-palette-state.diff * Add 0222-statusbar-recursion.diff * Add 0223-fix-qpixmap-hasalpha.diff * Add 0224-fast-qpixmap-fill.diff * Add 0225-invalidate-tabbar-geometry-on-refresh.diff
-rw-r--r--debian/changelog15
-rw-r--r--debian/patches/0191-listview-alternate-row-colors.diff22
-rw-r--r--debian/patches/0192-itemdelegate-palette-state.diff25
-rw-r--r--debian/patches/0222-statusbar-recursion.diff20
-rw-r--r--debian/patches/0223-fix-qpixmap-hasalpha.diff26
-rw-r--r--debian/patches/0224-fast-qpixmap-fill.diff46
-rw-r--r--debian/patches/0225-invalidate-tabbar-geometry-on-refresh.diff33
-rw-r--r--debian/patches/series6
8 files changed, 144 insertions, 49 deletions
diff --git a/debian/changelog b/debian/changelog
index 7fa41d8..534d1f0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,21 @@ qt4-x11 (4.4.0~rc1-5) UNRELEASED; urgency=low
* Add libqt4-sql-sqlite dependency to qt4-dev-tools. Qt Assistant and
qhelpgenerator use the sqlite plugin. (Closes: #476986)
+ * Remove qt-copy patches 0191 and 0192. The relevant code has changed
+ such that neither patch seems to have any effect (although listviews
+ still do not use active/inactive roles correctly).
+ * Add qt-copy patches:
+ * 0222-statusbar-recursion
+ This patch fixes random crashes due to paintevent
+ recursion and in once case a 100% startup crash (lyx).
+ * 0223-fix-qpixmap-hasalpha
+ Fix a performance regression in QPixmap::hasAlpha() in Qt 4.4.
+ * 0224-fast-qpixmap-fill
+ This patch avoids the expensive image->pixmap conversion by discarding
+ the old pixmap, creating a new one with the correct format, and doing
+ the fill server side.
+ * 0225-invalidate-tabbar-geometry-on-refresh
+ Fix problem where Konsole's tab bar is not shown immediately on startup.
+++ Changes by Modestas Vainius:
diff --git a/debian/patches/0191-listview-alternate-row-colors.diff b/debian/patches/0191-listview-alternate-row-colors.diff
deleted file mode 100644
index 051066a..0000000
--- a/debian/patches/0191-listview-alternate-row-colors.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-qt-bugs@ issue : 178507
-Trolltech task ID : 179170 (status: fixed for Qt 4.4.0)
-applied: no
-author: Matthew Woehlke <mw_triad@users.sourceforge.net>
-
-This patch fixes incorrect setting of the palette color group in
-QListView that resulted in alternate rows being drawn with the Active
-AlternateBase color even for inactive widgets (while the rest of the
-widget is drawn correctly). Please let me know if QListView is not
-the only culprit. (QTreeView was fixed by TT already.)
-
---- a/src/gui/itemviews/qlistview.cpp
-+++ b/src/gui/itemviews/qlistview.cpp
-@@ -1097,7 +1097,7 @@
- option.state &= ~QStyle::State_Enabled;
- cg = QPalette::Disabled;
- } else {
-- cg = QPalette::Normal;
-+ cg = window()->isActiveWindow() ? QPalette::Active : QPalette::Inactive;
- }
- option.palette.setCurrentColorGroup(cg);
- }
diff --git a/debian/patches/0192-itemdelegate-palette-state.diff b/debian/patches/0192-itemdelegate-palette-state.diff
deleted file mode 100644
index 79bf079..0000000
--- a/debian/patches/0192-itemdelegate-palette-state.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-qt-bugs@ issue : 178507
-Trolltech task ID : 179170 (status: fixed for Qt 4.4.0)
-applied: no
-author: Matthew Woehlke <mw_triad@users.sourceforge.net>
-
-This patch fixes incorrect setting of the palette color group in
-QItemDelegate that resulted in inactive colors being used for widgets
-in active windows.
-
---- a/src/gui/itemviews/qitemdelegate.cpp
-+++ b/src/gui/itemviews/qitemdelegate.cpp
-@@ -653,10 +653,10 @@
-
- QPen pen = painter->pen();
- QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
-- ? QPalette::Normal : QPalette::Disabled;
-- if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
-- cg = QPalette::Inactive;
-+ ? option.palette.currentColorGroup() : QPalette::Disabled;
- if (option.state & QStyle::State_Selected) {
-+ if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
-+ cg = QPalette::Inactive;
- painter->fillRect(rect, option.palette.brush(cg, QPalette::Highlight));
- painter->setPen(option.palette.color(cg, QPalette::HighlightedText));
- } else {
diff --git a/debian/patches/0222-statusbar-recursion.diff b/debian/patches/0222-statusbar-recursion.diff
new file mode 100644
index 0000000..6b1812f
--- /dev/null
+++ b/debian/patches/0222-statusbar-recursion.diff
@@ -0,0 +1,20 @@
+qt-bugs@ issue : N207415
+Trolltech task ID : 207597
+bugs.kde.org number : none
+applied: no
+author: Dirk Mueller <mueller@kde.org>
+
+This patch fixes random crashes due to paintevent
+recursion and in once case a 100% startup crash (lyx).
+
+--- a/src/gui/widgets/qstatusbar.cpp
++++ b/src/gui/widgets/qstatusbar.cpp
+@@ -643,7 +643,7 @@
+ }
+
+ emit messageChanged(d->tempItem);
+- repaint();
++ update();
+ }
+
+ /*!
diff --git a/debian/patches/0223-fix-qpixmap-hasalpha.diff b/debian/patches/0223-fix-qpixmap-hasalpha.diff
new file mode 100644
index 0000000..063660e
--- /dev/null
+++ b/debian/patches/0223-fix-qpixmap-hasalpha.diff
@@ -0,0 +1,26 @@
+qt-bugs@ issue : N206173
+Trolltech task ID : 206174
+bugs.kde.org number : none
+applied: yes
+author: Fredrik Höglund <fredrik@kde.org>
+
+Calling data->mask() in a pixmap that has an alpha channel causes
+the mask to be generated from the alpha channel. This is a very
+expensive operation, and completely unecessary in this case since
+the generated bitmap is immediately discarded.
+
+Fix the issue by reversing the order of the tests in the return
+statement, so the function returns true if the pixmap has an alpha
+channel, without generating the mask.
+
+--- a/src/gui/image/qpixmap.cpp
++++ b/src/gui/image/qpixmap.cpp
+@@ -1661,7 +1661,7 @@
+ */
+ bool QPixmap::hasAlpha() const
+ {
+- return (!data->mask().isNull() || data->hasAlphaChannel());
++ return (data->hasAlphaChannel() || !data->mask().isNull());
+ }
+
+ /*!
diff --git a/debian/patches/0224-fast-qpixmap-fill.diff b/debian/patches/0224-fast-qpixmap-fill.diff
new file mode 100644
index 0000000..832b31d
--- /dev/null
+++ b/debian/patches/0224-fast-qpixmap-fill.diff
@@ -0,0 +1,46 @@
+qt-bugs@ issue : None
+Trolltech task ID : None
+bugs.kde.org number : None
+applied: yes
+author: Fredrik Höglund <fredrik@kde.org>
+
+Since there's no way to specify that a QPixmap should have an alpha channel
+when it's created, it's quite common to call pixmap.fill(Qt::transparent)
+immediately after creating it, to force Qt to recreate it with an alpha
+channel. Unfortunately QPixmap::fill() does this by creating a QImage,
+filling it with the specified color, and then converting it to a QPixmap.
+
+This patch avoids the expensive image->pixmap conversion by simply discarding
+the old pixmap, creating a new one with the correct format, and doing the
+fill server side.
+
+--- a/src/gui/image/qpixmap_x11.cpp
++++ b/src/gui/image/qpixmap_x11.cpp
+@@ -1107,7 +1107,26 @@
+ {
+ if (fillColor.alpha() != 255) {
+ #ifndef QT_NO_XRENDER
+- if (picture && d == 32) {
++ if (X11->use_xrender) {
++ if (!picture || d != 32) {
++ if (picture)
++ XRenderFreePicture(X11->display, picture);
++ if (mask_picture)
++ XRenderFreePicture(X11->display, mask_picture);
++ if (x11_mask)
++ XFreePixmap(X11->display, x11_mask);
++ if (hd)
++ XFreePixmap(X11->display, hd);
++ if (hd2)
++ XFreePixmap(X11->display, hd2);
++ XRenderPictFormat *format = XRenderFindStandardFormat(X11->display, PictStandardARGB32);
++ hd = XCreatePixmap(X11->display, RootWindow(X11->display, xinfo.screen()), width(), height(), 32);
++ picture = XRenderCreatePicture(X11->display, hd, format, 0, 0);
++ mask_picture = 0;
++ x11_mask = 0;
++ hd2 = 0;
++ d = 32;
++ }
+ ::Picture src = X11->getSolidFill(xinfo.screen(), fillColor);
+ XRenderComposite(X11->display, PictOpSrc, src, 0, picture,
+ 0, 0, width(), height(),
diff --git a/debian/patches/0225-invalidate-tabbar-geometry-on-refresh.diff b/debian/patches/0225-invalidate-tabbar-geometry-on-refresh.diff
new file mode 100644
index 0000000..8cdaeb3
--- /dev/null
+++ b/debian/patches/0225-invalidate-tabbar-geometry-on-refresh.diff
@@ -0,0 +1,33 @@
+qt-bugs@ issue : None
+Trolltech task ID : None
+bugs.kde.org number : 159014
+applied: yes
+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.
+
+--- a/src/gui/widgets/qtabbar.cpp
++++ b/src/gui/widgets/qtabbar.cpp
+@@ -533,8 +533,8 @@
+ layoutTabs();
+ makeVisible(currentIndex);
+ q->update();
+- q->updateGeometry();
+ }
++ q->updateGeometry();
+ }
+
+ /*!
diff --git a/debian/patches/series b/debian/patches/series
index 5fafeb3..d4db67b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,6 @@
# qt-copy patches
0167-fix-group-reading.diff
0180-window-role.diff
-0191-listview-alternate-row-colors.diff
-0192-itemdelegate-palette-state.diff
0195-compositing-properties.diff
0203-qtexthtmlparser-link-color.diff
0209-prevent-qt-mixing.diff
@@ -10,6 +8,10 @@
0214-fix-qgraphicsproxywidget-tab-crash.diff
0216-allow-isystem-for-headers.diff
0220-no-x-recursion-in-xerrhandler.diff
+0222-statusbar-recursion.diff
+0223-fix-qpixmap-hasalpha.diff
+0224-fast-qpixmap-fill.diff
+0225-invalidate-tabbar-geometry-on-refresh.diff
# debian patches
01_qmake_for_debian.diff