summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-10-19 11:36:13 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2010-10-19 11:36:13 (GMT)
commitea614c822c0075b939cc8a56bbc53aaf9c68228d (patch)
tree4d23f2baffccea594662c5569351eda3ad93b6a7 /src/gui/widgets
parent7be892eaeff8aad62b5e7ae2300322c9c1a5420e (diff)
downloadQt-ea614c822c0075b939cc8a56bbc53aaf9c68228d.zip
Qt-ea614c822c0075b939cc8a56bbc53aaf9c68228d.tar.gz
Qt-ea614c822c0075b939cc8a56bbc53aaf9c68228d.tar.bz2
Enable the unified toolbar with the raster
engine only in the Cocoa port. Reviewed-by: Tor Arne Vestbø
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qmainwindow.cpp2
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 861cfaa..d4118bd 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -1524,10 +1524,12 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
d->useHIToolBar = set;
createWinId(); // We need the hiview for down below.
+#ifdef QT_MAC_USE_COCOA
// Activate the unified toolbar with the raster engine.
if (windowSurface()) {
d->layout->unifiedSurface = new QUnifiedToolbarSurface(this);
}
+#endif // QT_MAC_USE_COCOA
d->layout->updateHIToolBarStatus();
// Enabling the unified toolbar clears the opaque size grip setting, update it.
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index 21f6067..126cc4a 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -452,7 +452,9 @@ void QMainWindowLayout::insertIntoMacToolbar(QToolBar *before, QToolBar *toolbar
for (int i = 0; i < beforeIndex; ++i) {
offset.setX(offset.x() + qtoolbarsInUnifiedToolbarList.at(i)->size().width());
}
+#ifdef QT_MAC_USE_COCOA
unifiedSurface->insertToolbar(toolbar, offset);
+#endif // QT_MAC_USE_COCOA
}
#ifndef QT_MAC_USE_COCOA