blob: bdb629dc465d6baace74cc3f88b551ea17d9aa00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
qt-bugs@ issue : N218280
Trolltech task ID : 218280
bugs.kde.org number : none
applied: yes
author: TT
QMainWindow::restoreState doesn't layout toolbars properly, regression
from Qt-4.4
--- a/src/gui/widgets/qtoolbararealayout.cpp
+++ b/src/gui/widgets/qtoolbararealayout.cpp
@@ -1323,7 +1323,8 @@
toolBar->setVisible(shown);
toolBar->d_func()->setWindowState(floating, true, rect);
- item.extraSpace = item.size - pick(line.o, item.sizeHint());
+ //if it is -1, it means we should use the default size
+ item.extraSpace = (item.size == -1) ? 0 : item.size - pick(line.o, item.sizeHint());
line.toolBarItems.append(item);
|