Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37767879
en ru br
Репозитории ALT
S:4.8.7-alt25
5.1: 4.6.3-alt1.M51.1
4.1: 4.4.3-alt1.M41.1
4.0: 4.3.4-alt5.M40.1
3.0: 4.0.1-alt1
+updates:4.0.1-alt2
+backports:4.2.3-alt7.1.M30
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: qt4

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0225-invalidate-tabbar-geometry-on-refresh.patch
Скачать


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.
Index: src/gui/widgets/qtabbar.cpp
===================================================================
--- src/gui/widgets/qtabbar.cpp.orig
+++ src/gui/widgets/qtabbar.cpp
@@ -723,8 +723,8 @@ void QTabBarPrivate::refresh()
         layoutTabs();
         makeVisible(currentIndex);
         q->update();
-        q->updateGeometry();
     }
+    q->updateGeometry();
 }
 
 /*!
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin