summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtoolbararealayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qtoolbararealayout.cpp')
-rw-r--r--src/gui/widgets/qtoolbararealayout.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/qtoolbararealayout.cpp b/src/gui/widgets/qtoolbararealayout.cpp
index 8327af5..b312751 100644
--- a/src/gui/widgets/qtoolbararealayout.cpp
+++ b/src/gui/widgets/qtoolbararealayout.cpp
@@ -59,6 +59,9 @@
QT_BEGIN_NAMESPACE
+// qmainwindow.cpp
+extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *mainWindow);
+
QSize QToolBarAreaLayoutItem::minimumSize() const
{
if (skip())
@@ -872,7 +875,7 @@ void QToolBarAreaLayout::insertItem(QToolBar *before, QLayoutItem *item)
void QToolBarAreaLayout::apply(bool animate)
{
- QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(mainWindow->layout());
+ QMainWindowLayout *layout = qt_mainwindow_layout(mainWindow);
Q_ASSERT(layout != 0);
Qt::LayoutDirection dir = mainWindow->layoutDirection();