]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - qt/patches/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch
Move all packages to root.
[people/amarx/ipfire-3.x.git] / qt / patches / 0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch
CommitLineData
378d39c4
SS
1From 733d1afd03908d695aa8a6518f453b9ff0e5b8a2 Mon Sep 17 00:00:00 2001
2From: Robert Knight <robertknight@gmail.com>
3Date: Sun, 20 Apr 2008 16:28:31 +0200
4Subject: [PATCH 05/13] When tabs are inserted or removed in a QTabBar,
5 QTabBarPrivate::refresh() is called to update the layout. If the
6 tabbar widget is hidden, this just sets a boolean variable
7 (layoutDirty) and returns, so the parent widget's layout is not
8 notified about the possible geometry change.
9
10Prior to Qt 4.4 this was not a problem because the geometry was
11recalculated in QTabBar::sizeHint() if the layoutDirty variable was
12set. In Qt 4.4 however the layout caches size hint information in
13QWidgetItemV2. Since the cache information is not invalidated, the
14layout may end up using out-of-date size hint information to compute
15the widget size.
16
17If the QTabBar is empty when QTabBar::sizeHint() is called, it will
18return a size with a height of 0, which will be kept in the cache and
19so the tab bar will never be shown.
20
21This patch fixes the problem by calling updateGeometry() whenever the
22tab bar's layout is refreshed.
23
24qt-bugs@ issue : 208185
25Trolltech task ID : 208349
26bugs.kde.org number : 159014
27---
28 src/gui/widgets/qtabbar.cpp | 2 +-
29 1 files changed, 1 insertions(+), 1 deletions(-)
30
31diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
32index 419d456..41107a0 100644
33--- a/src/gui/widgets/qtabbar.cpp
34+++ b/src/gui/widgets/qtabbar.cpp
35@@ -678,8 +678,8 @@ void QTabBarPrivate::refresh()
36 layoutTabs();
37 makeVisible(currentIndex);
38 q->update();
39- q->updateGeometry();
40 }
41+ q->updateGeometry();
42 }
43
44 /*!
45--
461.6.5.1
47