diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-08-20 16:09:00 +0200 |
---|---|---|
committer | Shane Kearns <shane.kearns@sosco.com> | 2009-08-20 16:09:00 +0200 |
commit | d4c0be3b5758b37ef9da6fcbce4c5a6d84f3a52b (patch) | |
tree | 9557e933bc640009f587c7b58062d57f8ada9f34 /src/corelib/io/qfilesystemwatcher_symbian.cpp | |
parent | 06524f769fec76fa7ebcc39ac88ac9e08c720677 (diff) |
performance: refactored use of RFs so corelib and gui share one session
Opening and closing sessions has a performance impact on Symbian,
so all users of RFs now share a single session.
If a native file engine is written for Symbian (instead of the posix
one currently in use) then that could own the global data instead of
QCoreApplication.
Task-number: 247617
Reviewed-by: jbarron
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_symbian.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_symbian.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp index 412372a0e4..3320e1843c 100644 --- a/src/corelib/io/qfilesystemwatcher_symbian.cpp +++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp @@ -44,6 +44,7 @@ #include "qfileinfo.h" #include "qdebug.h" #include "private/qcore_symbian_p.h" +#include "private/qcoreapplication_p.h" #include <QDir> #ifndef QT_NO_FILESYSTEMWATCHER @@ -248,8 +249,6 @@ void QSymbianFileSystemWatcherEngine::run() { // Initialize file session - errorCode = fsSession.Connect(); - mutex.lock(); syncCondition.wakeOne(); mutex.unlock(); @@ -263,7 +262,6 @@ void QSymbianFileSystemWatcherEngine::run() } activeObjectToPath.clear(); - fsSession.Close(); watcherStarted = false; } } @@ -273,7 +271,7 @@ void QSymbianFileSystemWatcherEngine::addNativeListener(const QString &directory QMutexLocker locker(&mutex); QString nativeDir(QDir::toNativeSeparators(directoryPath)); TPtrC ptr(qt_QString2TPtrC(nativeDir)); - currentEvent = CNotifyChangeEvent::New(fsSession, ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive)); + currentEvent = CNotifyChangeEvent::New(QCoreApplicationPrivate::fsSession(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive)); syncCondition.wakeOne(); } |