summaryrefslogtreecommitdiffstats
path: root/src/s60main
diff options
context:
space:
mode:
authorHarald Fernengel <harald@trolltech.com>2009-08-03 13:12:46 (GMT)
committerHarald Fernengel <harald@trolltech.com>2009-08-03 13:12:46 (GMT)
commit41a83e1ff19ad1396e6001e6b0ac003c701ba55a (patch)
tree609e40eda10418bbf925002c36552074796b96b6 /src/s60main
parentd1f3b9df2bc5c57d414da73a7d4f9ed7b25df3db (diff)
downloadQt-41a83e1ff19ad1396e6001e6b0ac003c701ba55a.zip
Qt-41a83e1ff19ad1396e6001e6b0ac003c701ba55a.tar.gz
Qt-41a83e1ff19ad1396e6001e6b0ac003c701ba55a.tar.bz2
Squashed commit of the topic/exceptions branch.
Contains some smaller fixes and renaming of macros. Looks big, but isn't scary at all ;)
Diffstat (limited to 'src/s60main')
-rw-r--r--src/s60main/qts60main_mcrt0.cpp9
-rw-r--r--src/s60main/qts60mainappui.cpp7
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))
);