summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2010-04-08 12:44:18 (GMT)
committerFrans Englich <frans.englich@nokia.com>2010-04-08 13:06:02 (GMT)
commit0ef1365a07ca63b8243d8c051ebc7a8b7a7b5d5e (patch)
tree687d3cb608e56a0410f6c3ae379ad9aa69b3646b
parent383c336be79c9757a51427f06aa68df0b4849e31 (diff)
downloadQt-0ef1365a07ca63b8243d8c051ebc7a8b7a7b5d5e.zip
Qt-0ef1365a07ca63b8243d8c051ebc7a8b7a7b5d5e.tar.gz
Qt-0ef1365a07ca63b8243d8c051ebc7a8b7a7b5d5e.tar.bz2
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
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp22
1 files changed, 22 insertions, 0 deletions
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 <exception>
# include <f32file.h>
+# include <e32ldr.h>
# 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();
}