diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-08-27 19:07:31 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2018-05-02 09:07:03 +0000 |
commit | 364bd6ca74b059ffe8ae367e1562645a3ed0855e (patch) | |
tree | de86fa29ad2835030603e39c5fac2b0f186ad8c9 /src/widgets/widgets/qmainwindow.cpp | |
parent | 3761d99512244ae167a66e6894c75eb2ef1cca48 (diff) |
Convert features.toolbar to QT_[REQUIRE_]CONFIG
Move declaration of pick/perp helpers up the dependency chain
Change-Id: I7084ed829a057a0c45d60445c416fb07f2cb5624
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmainwindow.cpp')
-rw-r--r-- | src/widgets/widgets/qmainwindow.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index bf0a88e7fb..2014bdabf3 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -45,7 +45,9 @@ #if QT_CONFIG(dockwidget) #include "qdockwidget.h" #endif +#if QT_CONFIG(toolbar) #include "qtoolbar.h" +#endif #include <qapplication.h> #include <qmenu.h> @@ -61,7 +63,9 @@ #include <qpainter.h> #include <private/qwidget_p.h> +#if QT_CONFIG(toolbar) #include "qtoolbar_p.h" +#endif #include "qwidgetanimator_p.h" #ifdef Q_OS_OSX #include <qpa/qplatformnativeinterface.h> @@ -706,7 +710,7 @@ Qt::DockWidgetArea QMainWindow::corner(Qt::Corner corner) const { return d_func()->layout->corner(corner); } #endif -#ifndef QT_NO_TOOLBAR +#if QT_CONFIG(toolbar) static bool checkToolBarArea(Qt::ToolBarArea area, const char *where) { @@ -874,7 +878,7 @@ bool QMainWindow::toolBarBreak(QToolBar *toolbar) const return d_func()->layout->toolBarBreak(toolbar); } -#endif // QT_NO_TOOLBAR +#endif // QT_CONFIG(toolbar) #if QT_CONFIG(dockwidget) @@ -1312,7 +1316,7 @@ bool QMainWindow::event(QEvent *event) return true; switch (event->type()) { -#ifndef QT_NO_TOOLBAR +#if QT_CONFIG(toolbar) case QEvent::ToolBarChange: { d->layout->toggleToolBarsVisible(); return true; @@ -1344,7 +1348,7 @@ bool QMainWindow::event(QEvent *event) return QWidget::event(event); } -#ifndef QT_NO_TOOLBAR +#if QT_CONFIG(toolbar) /*! \property QMainWindow::unifiedTitleAndToolBarOnMac @@ -1389,7 +1393,7 @@ bool QMainWindow::unifiedTitleAndToolBarOnMac() const return false; } -#endif // QT_NO_TOOLBAR +#endif // QT_CONFIG(toolbar) /*! \internal @@ -1435,7 +1439,7 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event) break; } #endif // QT_CONFIG(dockwidget) -#ifndef QT_NO_TOOLBAR +#if QT_CONFIG(toolbar) if (QToolBar *tb = qobject_cast<QToolBar *>(child)) { if (tb->parentWidget() != this) return; @@ -1506,7 +1510,7 @@ QMenu *QMainWindow::createPopupMenu() menu->addSeparator(); } #endif // QT_CONFIG(dockwidget) -#ifndef QT_NO_TOOLBAR +#if QT_CONFIG(toolbar) QList<QToolBar *> toolbars = findChildren<QToolBar *>(); if (toolbars.size()) { if (!menu) |