From 0ef1365a07ca63b8243d8c051ebc7a8b7a7b5d5e Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Thu, 8 Apr 2010 14:44:18 +0200 Subject: Symbian emulator: unload file server so apps can be recompiled. Mentioned in the Qt S60 team developer journal, 23.05.2008. Code & investigation by Janne Anttila. Reviewed-by: Janne Koskinen --- src/corelib/kernel/qcoreapplication.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 2da5a7d..102c41e 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -67,6 +67,7 @@ #ifdef Q_OS_SYMBIAN # include # include +# include # include "qeventdispatcher_symbian_p.h" # include "private/qcore_symbian_p.h" #elif defined(Q_OS_UNIX) @@ -579,6 +580,27 @@ void QCoreApplication::init() qt_core_eval_init(d->application_type); #endif +#if defined(Q_OS_SYMBIAN) \ + && defined(Q_CC_NOKIAX86) \ + && defined(QT_DEBUG) + /** + * Prevent the executable from being locked in the Symbian emulator. The + * code dramatically simplifies debugging on Symbian, but beyond that has + * no impact. + * + * Force the ZLazyUnloadTimer to fire and therefore unload code segments + * immediately. The code affects Symbian's file server and on the other + * hand needs only to be run once in each emulator run. + */ + { + RLoader loader; + CleanupClosePushL(loader); + User::LeaveIfError(loader.Connect()); + User::LeaveIfError(loader.CancelLazyDllUnload()); + CleanupStack::PopAndDestroy(&loader); + } +#endif + qt_startup_hook(); } -- cgit v0.12