summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-08-18 12:54:14 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-18 17:27:42 +0000
commit6caa4e3aa00f8c362d1c920a75d611b9bfdd9753 (patch)
treefce2efb7f832c44e49dceec01349010b82a6b6a5
parent4d942551492378adaddca55cb1a48c11e7ec6a3a (diff)
QTabBar: don't overwrite data, fix refactoring error for vertical tabs
Amends 359616066e64eed947c6c91cb8902285ed79dd0d, which incorrectly changed - tabList[i].minRect = QRect(0, miny, sz.width(), sz.height()); + tab->data = QRect(0, miny, sz.width(), sz.height()); in the code laying out verticals tabs (correct done for the horizontal case). Since QDockWidget uses the user data for tabs to maintain the mapping between tabs and dock widget, this broke the layout logic. Fixes: QTBUG-95841 Change-Id: Ie785e1205b426bbc4954b965f619f4c603490f76 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 7188e650775ffd2bf4f2574094b6472c86468fba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/widgets/widgets/qtabbar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index f1cfbfe005..26debb7ead 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -523,7 +523,7 @@ void QTabBarPrivate::layoutTabs()
y += sz.height();
maxWidth = qMax(maxWidth, sz.width());
sz = q->minimumTabSizeHint(i);
- tab->data = QRect(0, miny, sz.width(), sz.height());
+ tab->minRect = QRect(0, miny, sz.width(), sz.height());
miny += sz.height();
tabChain[tabChainIndex].init();
tabChain[tabChainIndex].sizeHint = tab->maxRect.height();