diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-12-02 13:31:07 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-12-02 13:31:07 (GMT) |
commit | f29f1bb287c6b39bd1270802d1579f1c1d53f905 (patch) | |
tree | f903e18b163591c3590473e4a117a3c8958d8847 /src/gui/widgets/qtoolbararealayout.cpp | |
parent | 271936b063fb261293e3f77f7a2273e3a4dbb5d6 (diff) | |
parent | 25023911295c201758faaa2c800b2388ddf1e0b0 (diff) | |
download | Qt-f29f1bb287c6b39bd1270802d1579f1c1d53f905.zip Qt-f29f1bb287c6b39bd1270802d1579f1c1d53f905.tar.gz Qt-f29f1bb287c6b39bd1270802d1579f1c1d53f905.tar.bz2 |
Merge commit 'upstream/4.6' into 4.6
Diffstat (limited to 'src/gui/widgets/qtoolbararealayout.cpp')
-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); } } |