summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaintegration.mm
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-09-15 14:07:07 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-09-26 14:13:20 +0000
commit8cd28ea8850c5365c47dd65de16f528e2e223835 (patch)
treeb0156559fe7e6740a94dcd040d6bd7119aa8f4c3 /src/plugins/platforms/cocoa/qcocoaintegration.mm
parent680dd3313cd15ab4d9d6b8b3bde77aabbd8de0b0 (diff)
QGuiApplication, platform plugins: don't modify AA_DontUseNativeMenuBar
The default should be false, meaning the application will prefer to use a native menubar if the platform supports it. The application author can set it to true if he wants to always use a Qt-rendered menubar instead; or, he can call QMenuBar::setNativeMenuBar(). Qt and its plugins should not override the author's wishes. Instead, if the platform plugin cannot create a native menubar for whatever reason, createPlatformMenuBar() will return null, and QMenuBar will fall back to using a Qt menubar instead. The application can check the result via QMenuBar::isNativeMenuBar(). QMdiArea when maximized inside a QMainWindow with an empty title does not replace the main window's title if we are using native menus. This behavior turned out to be the same on Unity as it is on macOS, so the autotest needed adjustment to expect that behavior whenever the menubar is native, not only on certain platforms. tst_QMenuBar::allowActiveAndDisabled() tests a standalone QMenuBar. In f92f78094 it was disabled on macOS, but on Ubuntu it passes as long as we force it to be a non-native menubar, so it should pass that way on macOS too. Removed unused variable RESET to fix warning. Task-number: QTBUG-54793 Change-Id: I716e40da709f96331cbbf25213bd7bc153e4dbe2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index f02dad675e..e481cede17 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -300,8 +300,6 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
initResources();
QMacAutoReleasePool pool;
- qApp->setAttribute(Qt::AA_DontUseNativeMenuBar, false);
-
NSApplication *cocoaApplication = [QNSApplication sharedApplication];
qt_redirectNSApplicationSendEvent();