diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-11-27 13:04:38 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-11-27 13:06:45 (GMT) |
commit | 1355eb52ce21a0bbdb1899ef283fb6e58d389213 (patch) | |
tree | f25902ba3c31cabddd9e09962a9ab1fad13e7900 /src/gui/widgets | |
parent | d6b91331fe9a96c0abab72fccbcc6b5fa425a459 (diff) | |
download | Qt-1355eb52ce21a0bbdb1899ef283fb6e58d389213.zip Qt-1355eb52ce21a0bbdb1899ef283fb6e58d389213.tar.gz Qt-1355eb52ce21a0bbdb1899ef283fb6e58d389213.tar.bz2 |
state wasn't being correctly reloaded on mac with unified toolbar
Task-number: QTBUG-5932
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qtoolbararealayout.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/qtoolbararealayout.cpp b/src/gui/widgets/qtoolbararealayout.cpp index b7e985c..c329305 100644 --- a/src/gui/widgets/qtoolbararealayout.cpp +++ b/src/gui/widgets/qtoolbararealayout.cpp @@ -1296,6 +1296,8 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar* QList<QToolBar*> toolBars = _toolBars; int lines; stream >> lines; + if (!testing) + testing = mainWindow->unifiedTitleAndToolBarOnMac(); for (int j = 0; j < lines; ++j) { int pos; @@ -1306,6 +1308,7 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar* stream >> cnt; QToolBarAreaLayoutInfo &dock = docks[pos]; + const bool applyingLayout = !testing && !(pos == QInternal::TopDock && mainWindow->unifiedTitleAndToolBarOnMac()); QToolBarAreaLayoutLine line(dock.o); for (int k = 0; k < cnt; ++k) { @@ -1346,7 +1349,7 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar* continue; } - if (!testing) { + if (applyingLayout) { item.widgetItem = new QWidgetItemV2(toolBar); toolBar->setOrientation(floating ? ((shown & 2) ? Qt::Vertical : Qt::Horizontal) : dock.o); toolBar->setVisible(shown & 1); @@ -1357,7 +1360,7 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar* } } - if (!testing) { + if (applyingLayout) { dock.lines.append(line); } } |