diff options
Diffstat (limited to 'src/s60main')
-rw-r--r-- | src/s60main/qts60main_mcrt0.cpp | 9 | ||||
-rw-r--r-- | src/s60main/qts60mainappui.cpp | 7 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/s60main/qts60main_mcrt0.cpp b/src/s60main/qts60main_mcrt0.cpp index 49a47bd..8631989 100644 --- a/src/s60main/qts60main_mcrt0.cpp +++ b/src/s60main/qts60main_mcrt0.cpp @@ -80,14 +80,7 @@ GLDEF_C TInt QtMainWrapper() CleanupArrayDelete<char*>::PushL(envp); //Call user(application)'s main int ret = 0; - try - { - ret = CALLMAIN(argc, argv, envp); - } - catch (...) - { - User::Leave(KErrGeneral); - } + QT_TRYCATCH_LEAVING( ret = CALLMAIN(argc, argv, envp); ); CleanupStack::PopAndDestroy(2,argv); return ret; } diff --git a/src/s60main/qts60mainappui.cpp b/src/s60main/qts60mainappui.cpp index 85badcc..ef54417 100644 --- a/src/s60main/qts60mainappui.cpp +++ b/src/s60main/qts60mainappui.cpp @@ -63,6 +63,11 @@ // void CQtS60MainAppUi::ConstructL() { + // Cone's heap and handle checks on app destruction are not suitable for Qt apps, as many + // objects can still exist in static data at that point. Instead we will print relevant information + // so that comparative checks may be made for memory leaks, using ~SPrintExitInfo in corelib. + iEikonEnv->DisableExitChecks(ETrue); + // Initialise app UI with standard value. // ENoAppResourceFile and ENonStandardResourceFile makes UI to work without // resource files in most SDKs. S60 3rd FP1 public seems to require resource file @@ -127,7 +132,7 @@ void CQtS60MainAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl *contro { int result = 0; if (qApp) - QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE( + QT_TRYCATCH_LEAVING( result = qApp->s60ProcessEvent(const_cast<TWsEvent*>(&aEvent)) ); |