diff options
author | Liang Qi <liang.qi@qt.io> | 2017-09-06 13:26:31 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-09-06 13:26:31 +0200 |
commit | 19dd2ca93b8b95a5e2792b29ed62ea23800fb53e (patch) | |
tree | 17685d2a9628ec5936155e09da3edd74c9244b0e /src/widgets/widgets/qmainwindow.cpp | |
parent | 942922652481347659a0dae78758c334778a58d2 (diff) | |
parent | d332a2d3ccb485c9decd6c47fa5a5fc02b59d27e (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
examples/opengl/qopenglwidget/main.cpp
src/3rdparty/pcre2/src/pcre2_printint.c
src/plugins/platforms/cocoa/qnsview.mm
src/widgets/widgets/qcombobox.cpp
Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
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 e1841bbc55..15480e527e 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 @@ -491,7 +494,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. @@ -578,7 +581,7 @@ void QMainWindow::setMenuWidget(QWidget *menuBar) } d->layout->setMenuBar(menuBar); } -#endif // QT_NO_MENUBAR +#endif // QT_CONFIG(menubar) #if QT_CONFIG(statusbar) /*! @@ -1412,7 +1415,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; |