summaryrefslogtreecommitdiff
path: root/debian/patches/0225-invalidate-tabbar-geometry-on-refresh.patch
diff options
context:
space:
mode:
authorAna Beatriz Guerrero Lopez <ana@debian.org>2009-02-18 00:02:37 +0000
committerAna Beatriz Guerrero Lopez <ana@debian.org>2009-02-18 00:02:37 +0000
commit9f72af579a1d31c2ac9572b9b1fb94345ce5043a (patch)
treeb084fb0ff03bac29430b5f2213dd19b06614d2f2 /debian/patches/0225-invalidate-tabbar-geometry-on-refresh.patch
parent9a2df626010f7cbccdc812aec07172e0ebd2d128 (diff)
parent27f5b1f4b636b2efd947f3535f056714d32daa02 (diff)
downloadqt4-x11-9f72af579a1d31c2ac9572b9b1fb94345ce5043a.tar.gz
moved stuff from trunk/
Diffstat (limited to 'debian/patches/0225-invalidate-tabbar-geometry-on-refresh.patch')
-rw-r--r--debian/patches/0225-invalidate-tabbar-geometry-on-refresh.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0225-invalidate-tabbar-geometry-on-refresh.patch b/debian/patches/0225-invalidate-tabbar-geometry-on-refresh.patch
new file mode 100644
index 0000000..a02361c
--- /dev/null
+++ b/debian/patches/0225-invalidate-tabbar-geometry-on-refresh.patch
@@ -0,0 +1,33 @@
+qt-bugs@ issue : None
+Trolltech task ID : None
+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.
+
+--- 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();
+ }
+
+ /*!