diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-08-24 09:25:46 +0200 |
---|---|---|
committer | Shane Kearns <shane.kearns@sosco.com> | 2009-08-24 09:32:10 +0200 |
commit | 6dade01b24f3fd314cb6ec9c2979348e78740a52 (patch) | |
tree | 881a70495578a70deb1f4684e16340403015fc70 /src/corelib/kernel/qcoreapplication.cpp | |
parent | 0f42290719ebe6d930ba28fdf256e64d9c97be37 (diff) |
Make the singleton file server session independent of QCoreApplication
After review comments, changed the file server session
from a member of QCoreApplication to a Q_GLOBAL_STATIC, because some
applications will want to access files before constructing the
QApplication.
Reviewed-By: Janne Anttila
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 74b5140fc..dd3027b55 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -271,12 +271,6 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv) qt_application_thread_id = QThread::currentThreadId(); #endif -#ifdef Q_OS_SYMBIAN - if(KErrNone != fileServerSession.Connect()) - qFatal("FATAL: QCoreApplicationPrivate can't connect to file server"); - fileServerSession.ShareProtected(); //makes the handle ok for multithreading and IPC -#endif - // note: this call to QThread::currentThread() may end up setting theMainThread! if (QThread::currentThread() != theMainThread) qWarning("WARNING: QApplication was not created in the main() thread."); @@ -284,9 +278,6 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv) QCoreApplicationPrivate::~QCoreApplicationPrivate() { -#ifdef Q_OS_SYMBIAN - fileServerSession.Close(); -#endif if (threadData) { #ifndef QT_NO_THREAD void *data = &threadData->tls; @@ -825,18 +816,6 @@ bool QCoreApplicationPrivate::notify_helper(QObject *receiver, QEvent * event) return receiver->event(event); } -#ifdef Q_OS_SYMBIAN -/*!\internal - - Accessor for shared global file server session - */ -RFs QCoreApplicationPrivate::fileServerSession; -RFs& QCoreApplicationPrivate::fsSession() -{ - return fileServerSession; -} -#endif - /*! Returns true if an application object has not been created yet; otherwise returns false. @@ -2193,7 +2172,7 @@ QStringList QCoreApplication::libraryPaths() if (tempPath.at(tempPath.length() - 1) != QChar('\\')) { tempPath += QChar('\\'); } - RFs& fs = QCoreApplicationPrivate::fsSession(); + RFs& fs = qt_s60GetRFs(); TPtrC tempPathPtr(reinterpret_cast<const TText*> (tempPath.constData())); TFindFile finder(fs); TInt err = finder.FindByDir(tempPathPtr, tempPathPtr); |