From ddf09adeeb165117f3802c64cb355f2e03c2bf5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 4 Mar 2015 12:43:03 +0100 Subject: iOS: Use qFatal when detecting QApplication before UIApplicationMain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gives a stack-trace at the point the error was caused, making it easier to debug what's going on. Change-Id: I0d65bb5061e9a97c142d41f6c99a1a1803cbe82d Reviewed-by: Richard Moe Gustavsen Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosintegration.mm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index 33328e0490..9d29b4edf7 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -69,12 +69,10 @@ QIOSIntegration::QIOSIntegration() , m_accessibility(0) { if (![UIApplication sharedApplication]) { - qWarning() - << "Error: You are creating QApplication before calling UIApplicationMain.\n" - << "If you are writing a native iOS application, and only want to use Qt for\n" - << "parts of the application, a good place to create QApplication is from within\n" - << "'applicationDidFinishLaunching' inside your UIApplication delegate.\n"; - exit(-1); + qFatal("Error: You are creating QApplication before calling UIApplicationMain.\n" \ + "If you are writing a native iOS application, and only want to use Qt for\n" \ + "parts of the application, a good place to create QApplication is from within\n" \ + "'applicationDidFinishLaunching' inside your UIApplication delegate.\n"); } // Set current directory to app bundle folder -- cgit v1.2.3