iOS: Improve logging during application startup
Change-Id: I15c1980d7c532c94b34e612bb781c8ed5bf096a0 Reviewed-by: Jake Petroules <jake.petroules@qt.io>bb10
parent
813fa3f50f
commit
85eef0e5e0
|
|
@ -294,7 +294,7 @@ static bool rootLevelRunLoopIntegration()
|
|||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(applicationDidFinishLaunching)
|
||||
selector:@selector(applicationDidFinishLaunching:)
|
||||
name:UIApplicationDidFinishLaunchingNotification
|
||||
object:nil];
|
||||
|
||||
|
|
@ -320,8 +320,10 @@ static bool rootLevelRunLoopIntegration()
|
|||
# error "Unknown processor family"
|
||||
#endif
|
||||
|
||||
+ (void)applicationDidFinishLaunching
|
||||
+ (void)applicationDidFinishLaunching:(NSNotification *)notification
|
||||
{
|
||||
qCDebug(lcQpaApplication) << "Application launched with options" << notification.userInfo;
|
||||
|
||||
if (!isQtApplication())
|
||||
return;
|
||||
|
||||
|
|
@ -329,7 +331,7 @@ static bool rootLevelRunLoopIntegration()
|
|||
// We schedule the main-redirection for the next run-loop pass, so that we
|
||||
// can return from this function and let UIApplicationMain finish its job.
|
||||
// This results in running Qt's application eventloop as a nested runloop.
|
||||
qEventDispatcherDebug() << "Scheduling main() on next run-loop pass";
|
||||
qCDebug(lcQpaApplication) << "Scheduling main() on next run-loop pass";
|
||||
CFRunLoopTimerRef userMainTimer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault,
|
||||
CFAbsoluteTimeGetCurrent(), 0, 0, 0, ^(CFRunLoopTimerRef) { user_main_trampoline(); });
|
||||
CFRunLoopAddTimer(CFRunLoopGetMain(), userMainTimer, kCFRunLoopCommonModes);
|
||||
|
|
@ -339,7 +341,7 @@ static bool rootLevelRunLoopIntegration()
|
|||
|
||||
switch (setjmp(processEventEnterJumpPoint)) {
|
||||
case kJumpPointSetSuccessfully:
|
||||
qEventDispatcherDebug() << "Running main() on separate stack"; qIndent();
|
||||
qCDebug(lcQpaApplication) << "Running main() on separate stack"; qIndent();
|
||||
|
||||
// Redirect the stack pointer to the start of the reserved stack. This ensures
|
||||
// that when we longjmp out of the event dispatcher and continue execution, the
|
||||
|
|
@ -358,7 +360,7 @@ static bool rootLevelRunLoopIntegration()
|
|||
case kJumpedFromEventDispatcherProcessEvents:
|
||||
// We've returned from the longjmp in the event dispatcher,
|
||||
// and the stack has been restored to its old self.
|
||||
qUnIndent(); qEventDispatcherDebug() << "Returned from processEvents";
|
||||
qUnIndent(); qCDebug(lcQpaApplication) << "Returned from processEvents";
|
||||
|
||||
if (Q_UNLIKELY(debugStackUsage))
|
||||
userMainStack.printUsage();
|
||||
|
|
|
|||
Loading…
Reference in New Issue