Go to file
Gabriel de Dietrich 8ea51f8aaa Make QCocoaMenuLoader a singleton
In some auto-tests, we create several instances of
QGuiApplication (though seldom, if ever, simultaneously).
However, the QCocoaMenuLoader instance was never properly
deallocated, resulting in NSApplication.servicesMenu
to still be assigned. This resulted in an exception being
raised (NSInternalInconsistencyException) the second time
we would construct a QCocoaMenuLoader.

The CPU cycles saving solution is to make QCocoaMenuLoader
a singleton. This approach is also safe since this class'
initialization doesn't depend on any state in QGuiApplication
(even the application name is fetched from either the main
bundle or the app's args).

This also allows us to clean up some code in QCocoaApplication
and QCocoaApplicationDelegate who have suffered from lack of
attention over the years.

Change-Id: Ic4c859d628ab8abd9b469b99c64293582f8e363d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-07-22 20:07:58 +00:00
bin Merge remote-tracking branch 'origin/5.6.0' into 5.7 2016-03-07 17:08:56 +01:00
config.tests Reimplement compiler default detection 2016-07-15 10:11:01 +00:00
dist Add Qt 5.7.0 changelog 2016-06-10 06:48:56 +00:00
doc Merge remote-tracking branch 'origin/5.6' into 5.7 2016-07-04 15:58:39 +02:00
examples Merge remote-tracking branch 'origin/5.7' into dev 2016-07-19 20:14:40 +02:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs Change test's entry point only when actually building it for winrt 2016-07-22 17:07:50 +00:00
qmake Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-07-22 10:15:48 +00:00
src Make QCocoaMenuLoader a singleton 2016-07-22 20:07:58 +00:00
tests QMetaType: Add a benchmark covering creation of QVariant from an enum 2016-07-22 12:47:05 +00:00
tools don't clear the rest of the command line when -redo is used 2016-07-22 10:28:29 +00:00
util Fix compilation on qt css lexer generator 2016-07-19 18:40:53 +00:00
.gitattributes
.gitignore Ignore more build artifacts from in-source builds. 2016-06-16 07:06:37 +00:00
.qmake.conf Merge remote-tracking branch 'origin/5.7' into dev 2016-05-23 21:09:46 +02:00
.tag
config_help.txt Remove -fw and -l command line arguments 2016-07-13 19:51:17 +00:00
configure Revert "Save the pkg-config settings in config.status" 2016-07-22 10:28:18 +00:00
configure.bat Ensure that configure.exe is built in C++11 mode with ICC 2016-06-17 16:28:11 +00:00
configure.json make use_new_dtags a linux-only feature 2016-07-22 10:28:11 +00:00
configure.pri Replace EXTRA_LIBS with EXTRA_LIBDIR and EXTRA_FRAMEWORKPATH 2016-07-13 19:51:34 +00:00
header.BSD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.BSD-OLD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.COMM Add header template for commercial only modules 2015-10-19 10:37:18 +00:00
header.FDL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.FDL-OLD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.GPL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.GPL-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-NOGPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPLv21 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.PREVIEW.COMMERCIAL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
qtbase.pro Remove the -qconfig command line argument 2016-04-19 14:01:40 +00:00
sync.profile Add qtdbusglobal.h and qtdbusglobal_p.h 2016-07-14 06:06:43 +00:00