diff options
author | Harald Fernengel <harald.fernengel@nokia.com> | 2010-09-10 13:13:00 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2010-09-10 13:13:00 (GMT) |
commit | 0b78630df897864feb3e3ec5f1da0b21dd13f7b0 (patch) | |
tree | 5ef3efdf11b827208f2ccb3f8ff6731d44db647b /src/gui/widgets/qtoolbarlayout.cpp | |
parent | 7e05bf257d589e97e54b36cb112f96ae17cbd6f2 (diff) | |
download | Qt-0b78630df897864feb3e3ec5f1da0b21dd13f7b0.zip Qt-0b78630df897864feb3e3ec5f1da0b21dd13f7b0.tar.gz Qt-0b78630df897864feb3e3ec5f1da0b21dd13f7b0.tar.bz2 |
Implement a private API for setting title widgets
Meego and Orbit use client side decorations, so implement a top-level
layout in QMainWindow that allows us to set title widgets. To prevent
regressions on other platforms, the API is disabled by default.
Rev-By: Robert Griebl
Rev-By: Thierry Bastian
Diffstat (limited to 'src/gui/widgets/qtoolbarlayout.cpp')
-rw-r--r-- | src/gui/widgets/qtoolbarlayout.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp index f87510f..59b027e 100644 --- a/src/gui/widgets/qtoolbarlayout.cpp +++ b/src/gui/widgets/qtoolbarlayout.cpp @@ -57,6 +57,9 @@ QT_BEGIN_NAMESPACE +// qmainwindow.cpp +extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window); + /****************************************************************************** ** QToolBarItem */ @@ -404,7 +407,7 @@ void QToolBarLayout::setGeometry(const QRect &rect) if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) { Qt::ToolBarArea area = win->toolBarArea(tb); if (win->unifiedTitleAndToolBarOnMac() && area == Qt::TopToolBarArea) { - static_cast<QMainWindowLayout *>(win->layout())->fixSizeInUnifiedToolbar(tb); + qt_mainwindow_layout(win)->fixSizeInUnifiedToolbar(tb); } } # endif @@ -659,7 +662,7 @@ void QToolBarLayout::setExpanded(bool exp) #else animating = !tb->isWindow() && win->isAnimated(); #endif - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(win); if (expanded) { tb->raise(); } else { |