diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-08-27 19:06:42 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-09-04 06:40:14 +0000 |
commit | 314a591461c58addd2805e0b4dc2cdb4308d5d31 (patch) | |
tree | db353751ef969c00d9649c7c424c14d06ca83472 /src/widgets/widgets/qmainwindow.cpp | |
parent | b649717784368f04e61f5bc240c052c5c4744a2c (diff) |
Convert features.menubar to QT_[REQUIRE_]CONFIG
Change-Id: Idbd4978852fa280dd18a5684469d499da3892126
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmainwindow.cpp')
-rw-r--r-- | src/widgets/widgets/qmainwindow.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index c76d3cb445..9337595ead 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -50,7 +50,10 @@ #include "qtoolbar.h" #include <qapplication.h> +#include <qmenu.h> +#if QT_CONFIG(menubar) #include <qmenubar.h> +#endif #if QT_CONFIG(statusbar) #include <qstatusbar.h> #endif @@ -520,7 +523,7 @@ void QMainWindow::setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle) emit toolButtonStyleChanged(d->toolButtonStyle); } -#ifndef QT_NO_MENUBAR +#if QT_CONFIG(menubar) /*! Returns the menu bar for the main window. This function creates and returns an empty menu bar if the menu bar does not exist. @@ -607,7 +610,7 @@ void QMainWindow::setMenuWidget(QWidget *menuBar) } d->layout->setMenuBar(menuBar); } -#endif // QT_NO_MENUBAR +#endif // QT_CONFIG(menubar) #if QT_CONFIG(statusbar) /*! @@ -1663,7 +1666,7 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event) // children and for the menu bar as well QWidget *child = childAt(event->pos()); while (child && child != this) { -#ifndef QT_NO_MENUBAR +#if QT_CONFIG(menubar) if (QMenuBar *mb = qobject_cast<QMenuBar *>(child)) { if (mb->parentWidget() != this) return; |