summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-08-24 07:25:46 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-08-24 07:32:10 (GMT)
commit6dade01b24f3fd314cb6ec9c2979348e78740a52 (patch)
tree881a70495578a70deb1f4684e16340403015fc70 /src/corelib/io
parent0f42290719ebe6d930ba28fdf256e64d9c97be37 (diff)
downloadQt-6dade01b24f3fd314cb6ec9c2979348e78740a52.zip
Qt-6dade01b24f3fd314cb6ec9c2979348e78740a52.tar.gz
Qt-6dade01b24f3fd314cb6ec9c2979348e78740a52.tar.bz2
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/io')
-rw-r--r--src/corelib/io/qfilesystemwatcher_symbian.cpp3
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp7
2 files changed, 4 insertions, 6 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp
index b920952..730786f 100644
--- a/src/corelib/io/qfilesystemwatcher_symbian.cpp
+++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp
@@ -44,7 +44,6 @@
#include "qfileinfo.h"
#include "qdebug.h"
#include "private/qcore_symbian_p.h"
-#include "private/qcoreapplication_p.h"
#include <QDir>
#ifndef QT_NO_FILESYSTEMWATCHER
@@ -271,7 +270,7 @@ void QSymbianFileSystemWatcherEngine::addNativeListener(const QString &directory
QMutexLocker locker(&mutex);
QString nativeDir(QDir::toNativeSeparators(directoryPath));
TPtrC ptr(qt_QString2TPtrC(nativeDir));
- currentEvent = CNotifyChangeEvent::New(QCoreApplicationPrivate::fsSession(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive));
+ currentEvent = CNotifyChangeEvent::New(qt_s60GetRFs(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive));
syncCondition.wakeOne();
}
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 4ee5c68..62edb0e 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -61,7 +61,6 @@
# include <syslimits.h>
# include <f32file.h>
# include "private/qcore_symbian_p.h"
-# include "private/qcoreapplication_p.h"
#endif
#include <errno.h>
#if !defined(QWS) && defined(Q_OS_MAC)
@@ -401,7 +400,7 @@ bool QFSFileEngine::copy(const QString &newName)
{
#if defined(Q_OS_SYMBIAN)
Q_D(QFSFileEngine);
- RFs& rfs = QCoreApplicationPrivate::fsSession();
+ RFs rfs = qt_s60GetRFs();
CFileMan* fm = NULL;
QString oldNative(QDir::toNativeSeparators(d->filePath));
TPtrC oldPtr(qt_QString2TPtrC(oldNative));
@@ -608,7 +607,7 @@ QFileInfoList QFSFileEngine::drives()
QFileInfoList ret;
#if defined(Q_OS_SYMBIAN)
TDriveList driveList;
- RFs &rfs = QCoreApplicationPrivate::fsSession();
+ RFs rfs = qt_s60GetRFs();
TInt err = rfs.DriveList(driveList);
if (err == KErrNone) {
for (char i = 0; i < KMaxDrives; i++) {
@@ -660,7 +659,7 @@ bool QFSFileEnginePrivate::isSymlink() const
static bool _q_isSymbianHidden(const QString &path, bool isDir)
{
bool retval = false;
- RFs rfs = QCoreApplicationPrivate::fsSession();
+ RFs rfs = qt_s60GetRFs();
QFileInfo fi(path);
QString absPath = fi.absoluteFilePath();
if (isDir && absPath.at(absPath.size()-1) != QChar('/')) {