qt5base-lts/mkspecs
Gabriel de Dietrich 1e14762b8d Make QGuiApplication::exec() run within NSApplicationMain()
We follow the same pattern as for iOS and Windows ports, making
sure the user's main() runs in a platform friendly environment. In
this particular case, it means calling the user's main() during the
call of NSApplicationMain(), and calling the user's main() function
(renamed to qMain() as in Windows) after receiving
NSApplicationDidFinishLaunchingNotification. In practice, this means
that NSApp is running when qMain() is called, and therefore when
QCoreApplication::exec() is called.

For those command-line utilities running on QGuiApplication, or any
deriving class, and that do not provide a bundle, we override the main
bundle's dictionary and get NSApplicationMain() to run as usual.

Added cocoa/cocoamain "subdir" to build libqtcocoamain.a (together with
cocoa/cocoaplugin -- plugins/platforms/cocoa is made a subdirs project).
This library is linked against all GUI Qt apps and provides the actual
main() function. It also catches the launching NSApplication notifications,
and calls the user's qMain() function. Note that this will happen in the
same cases when the user's application will run with the Cocoa QPA plugin.

Launch related code in QCocoaApplicationDelegate is moved to libqtcocoamain,
QNSApplication is removed (but sendEvent: redirection still there), and
code in QCocoaEventDispatcher dealing with calling [NSApp run] and related
has been removed since it's become unreachable.

ChangeLog: [Qt for Mac] Make QGuiApplication::exec() run within NSApplicationMain()
Change-Id: I790e5138c29aac2e0215a9147d0148fece40ca22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-08-29 12:44:07 +02:00
..
aix-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
aix-g++-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
aix-xlc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
aix-xlc-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
android-g++ Fix SONAME handling on android 2013-08-13 19:48:15 +02:00
blackberry-armv7le-qcc Revert "Add the same flags for the c++ compiler as they are already defined for the c compiler" 2013-08-28 01:57:25 +02:00
blackberry-x86-qcc BlackBerry mkspecs: optimize linker flags 2012-11-26 15:11:59 +01:00
common Merge "Merge branch 'stable' into dev" into refs/staging/dev 2013-07-12 14:03:21 +02:00
cygwin-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
darwin-g++ Add osx and darwin scopes to qmake. 2013-07-11 18:26:45 +02:00
devices Merge remote-tracking branch 'origin/stable' into dev 2013-08-14 09:06:31 +02:00
features Make QGuiApplication::exec() run within NSApplicationMain() 2013-08-29 12:44:07 +02:00
freebsd-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
freebsd-g++46 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
freebsd-icc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hpux-acc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hpux-acc-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hpux-acc-o64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hpux-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hpux-g++-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hpuxi-acc-32 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hpuxi-acc-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hpuxi-g++-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
hurd-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
irix-cc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
irix-cc-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
irix-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
irix-g++-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
linux-arm-gnueabi-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
linux-clang Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
linux-cxx Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
linux-g++ Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
linux-g++-32 Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
linux-g++-64 Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
linux-g++-maemo Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
linux-icc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
linux-icc-32 Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
linux-icc-64 Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
linux-kcc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
linux-llvm Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
linux-lsb-g++ Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
linux-pgcc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
lynxos-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
macx-clang Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
macx-clang-32 Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
macx-g++ Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
macx-g++40 Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
macx-g++42 Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
macx-g++-32 Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
macx-icc Add Info.plist templates for the macx-icc makespec 2013-08-05 17:11:15 +02:00
macx-llvm Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
macx-xcode Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
modules update readme to current reality 2012-01-27 13:55:27 +01:00
netbsd-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
openbsd-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
qnx-armv7le-qcc Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qnx-x86-qcc Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
sco-cc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
sco-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
solaris-cc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
solaris-cc-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
solaris-cc-64-stlport Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
solaris-cc-stlport Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
solaris-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
solaris-g++-64 Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
tru64-cxx Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
tru64-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
unixware-cc Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
unixware-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
unsupported Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
win32-g++ Add QMAKE_NM to the mkspecs 2013-06-10 16:46:06 +02:00
win32-icc Replace win32-icc/qplatformdefs.h with the MSVC one 2013-06-26 12:37:53 +02:00
win32-msvc2005 qmake/vcxproj: add WIN64 macro for x86_46 builds 2013-05-07 15:02:59 +02:00
win32-msvc2008 qmake/vcxproj: add WIN64 macro for x86_46 builds 2013-05-07 15:02:59 +02:00
win32-msvc2010 qmake/vcxproj: add WIN64 macro for x86_46 builds 2013-05-07 15:02:59 +02:00
win32-msvc2012 set QMAKE_PLATFORM in win32-msvc2012 2013-05-07 15:03:03 +02:00
win32-msvc2013 add support for Visual Studio 2013 2013-07-04 12:54:58 +02:00
wince60standard-armv4i-msvc2005 Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
wince60standard-x86-msvc2005 Fix '=' alignment and replace tabs in *.conf (whitespace only change) 2013-03-27 17:16:37 +01:00
wince70embedded-armv4i-msvc2008 Remove not supported mkspecs for Windows CE. 2013-08-15 11:37:27 +02:00
wince70embedded-x86-msvc2008 Remove not supported mkspecs for Windows CE. 2013-08-15 11:37:27 +02:00