path: root/src/widgets/widgets/qmenubar_p.h
diff options
authorDmitry Shachnev <>2016-09-07 17:37:50 +0300
committerShawn Rutledge <>2016-09-15 14:15:21 +0000
commit835d7cf54328bdd93d58bb64ed96a9c322580aea (patch)
tree225458b3616e5b8ed9976d71bcb46b2666c0ebb1 /src/widgets/widgets/qmenubar_p.h
parentf4eefce86364112ab215975e0a79755143c20491 (diff)
QMenuBar: Get rid of QMenuBarPrivate::nativeMenuBar
Instead of trying to keep that variable in sync with platformMenuBar state, just check whether platformMenuBar exists instead. Now QMenuBar::isNativeMenuBar() is more reliable, and will not return true if the QPA plugin provides no platform menu bar. Also, remove useless restrictions for code using isNativeMenuBar(). That method is available on all platforms for a long time, not only on macOS or WinCE. This makes sure local menus do not appear if global menus are available, and setVisible(true) is called. Change-Id: I7a5944c64376b4714a38ad981089df8a151c3403 Task-number: QTBUG-54793 Reviewed-by: J-P Nurmi <> Reviewed-by: Shawn Rutledge <>
Diffstat (limited to 'src/widgets/widgets/qmenubar_p.h')
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index 7ef696f50e..1b1915843f 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -59,7 +59,7 @@ class QMenuBarPrivate : public QWidgetPrivate
QMenuBarPrivate() : itemsDirty(0), currentAction(0), mouseDown(0),
closePopupMode(0), defaultPopDown(1), popupState(0), keyboardState(0), altPressed(0),
- nativeMenuBar(-1), doChildEffects(false), platformMenuBar(0)
+ doChildEffects(false), platformMenuBar(0)
#ifdef Q_OS_WINCE
, wce_menubar(0), wceClassicMenu(false)
@@ -102,8 +102,6 @@ public:
uint keyboardState : 1, altPressed : 1;
QPointer<QWidget> keyboardFocusWidget;
- int nativeMenuBar : 3; // Only has values -1, 0, and 1
//firing of events
void activateAction(QAction *, QAction::ActionEvent);