summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-09-23 18:30:21 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-09-23 18:33:48 (GMT)
commitb3f3ab74f07cbadb568a5e8ad4363f1e042ea40c (patch)
tree42657c61c4dd50c0508089913c7da56020a594e9 /src/corelib/kernel/qcoreapplication.cpp
parentd2180e2fc3c56d56cd073a896d8449181ca28136 (diff)
downloadQt-b3f3ab74f07cbadb568a5e8ad4363f1e042ea40c.zip
Qt-b3f3ab74f07cbadb568a5e8ad4363f1e042ea40c.tar.gz
Qt-b3f3ab74f07cbadb568a5e8ad4363f1e042ea40c.tar.bz2
Fix 3.1 build - move unimplemented RFs API to the S60 plugin
RFs::GetSystemDrive doesn't exist in 3.1 (even though it is in the symbian documentation). Moved it to a new function in the S60 plugins. For 3.1, it returns EDriveC, for all other versions the RFs API is used Task-number: QT-805 Reviewed-by: Iain
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 9a93685..61b9ee7 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -111,6 +111,11 @@ private:
QMutex *mtx;
};
+#ifdef Q_OS_SYMBIAN
+typedef TDriveNumber (*SystemDriveFunc)(RFs&);
+static SystemDriveFunc PtrGetSystemDrive=0;
+#endif
+
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
extern QString qAppFileName();
#endif
@@ -1820,8 +1825,11 @@ QString QCoreApplication::applicationDirPath()
}
if (err != KErrNone || (driveInfo.iDriveAtt & KDriveAttRom) || (driveInfo.iMediaAtt
& KMediaAttWriteProtected)) {
- driveChar = fs.GetSystemDriveChar();
- drive = fs.GetSystemDrive();
+ if(!PtrGetSystemDrive)
+ PtrGetSystemDrive = reinterpret_cast<SystemDriveFunc>(qt_resolveS60PluginFunc(S60Plugin_GetSystemDrive));
+ Q_ASSERT(PtrGetSystemDrive);
+ drive = PtrGetSystemDrive(fs);
+ fs.DriveToChar(drive, driveChar);
}
qDriveChar = QChar(QLatin1Char(driveChar)).toUpper();