From 364bd6ca74b059ffe8ae367e1562645a3ed0855e Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Sun, 27 Aug 2017 19:07:31 +0200 Subject: 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 Reviewed-by: Oswald Buddenhagen --- src/widgets/widgets/qmainwindow.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/widgets/widgets/qmainwindow.cpp') 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 #include @@ -61,7 +63,9 @@ #include #include +#if QT_CONFIG(toolbar) #include "qtoolbar_p.h" +#endif #include "qwidgetanimator_p.h" #ifdef Q_OS_OSX #include @@ -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(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 toolbars = findChildren(); if (toolbars.size()) { if (!menu) -- cgit v1.2.3