MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / afterQuitProcessingCallback

Method afterQuitProcessingCallback

Engine/AppManager.cpp:512–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510typedef std::shared_ptr<QuitInstanceArgs> QuitInstanceArgsPtr;
511
512void
513AppManager::afterQuitProcessingCallback(const GenericWatcherCallerArgsPtr& args)
514{
515 QuitInstanceArgs* inArgs = dynamic_cast<QuitInstanceArgs*>( args.get() );
516
517 if (!inArgs) {
518 return;
519 }
520
521 AppInstancePtr instance = inArgs->instance.lock();
522
523 instance->aboutToQuit();
524
525 appPTR->removeInstance( instance->getAppID() );
526
527 int nbApps = getNumInstances();
528 ///if we exited the last instance, exit the event loop, this will make
529 /// the exec() function return.
530 if (nbApps == 0) {
531 assert(qApp);
532 qApp->quit();
533 }
534
535 // This should kill the AppInstance
536 instance.reset();
537}
538
539void
540AppManager::quitNow(const AppInstancePtr& instance)

Callers

nothing calls this directly

Calls 7

removeInstanceMethod · 0.80
getMethod · 0.45
lockMethod · 0.45
aboutToQuitMethod · 0.45
getAppIDMethod · 0.45
quitMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected