summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qcore_symbian_p.h3
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp12
-rw-r--r--src/plugins/s60/3_1/3_1.pro3
-rw-r--r--src/plugins/s60/3_2/3_2.pro8
-rw-r--r--src/plugins/s60/5_0/5_0.pro8
-rw-r--r--src/plugins/s60/bwins/qts60pluginu.def2
-rw-r--r--src/plugins/s60/eabi/qts60pluginu.def2
-rw-r--r--src/plugins/s60/src/qcoreapplication_3_1.cpp48
-rw-r--r--src/plugins/s60/src/qcoreapplication_3_2.cpp48
9 files changed, 124 insertions, 10 deletions
diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h
index 5b243dc..56097bc 100644
--- a/src/corelib/kernel/qcore_symbian_p.h
+++ b/src/corelib/kernel/qcore_symbian_p.h
@@ -138,7 +138,8 @@ enum S60PluginFuncOrdinals
S60Plugin_GetTimeFormatSpec = 2,
S60Plugin_GetLongDateFormatSpec = 3,
S60Plugin_GetShortDateFormatSpec = 4,
- S60Plugin_LocalizedDirectoryName = 5
+ S60Plugin_LocalizedDirectoryName = 5,
+ S60Plugin_GetSystemDrive = 6
};
Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal);
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();
diff --git a/src/plugins/s60/3_1/3_1.pro b/src/plugins/s60/3_1/3_1.pro
index 568a33c..58ff5ce 100644
--- a/src/plugins/s60/3_1/3_1.pro
+++ b/src/plugins/s60/3_1/3_1.pro
@@ -3,6 +3,7 @@ include(../s60pluginbase.pri)
TARGET = qts60plugin_3_1
SOURCES += ../src/qlocale_3_1.cpp \
- ../src/qdesktopservices_3_1.cpp
+ ../src/qdesktopservices_3_1.cpp \
+ ../src/qcoreapplication_3_1.cpp
TARGET.UID3=0x2001E620
diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro
index 97409d3..4b28eb9 100644
--- a/src/plugins/s60/3_2/3_2.pro
+++ b/src/plugins/s60/3_2/3_2.pro
@@ -4,11 +4,13 @@ TARGET = qts60plugin_3_2
contains(S60_VERSION, 3.1) {
SOURCES += ../src/qlocale_3_1.cpp \
- ../src/qdesktopservices_3_1.cpp
+ ../src/qdesktopservices_3_1.cpp \
+ ../src/qcoreapplication_3_1.cpp
} else {
SOURCES += ../src/qlocale_3_2.cpp \
- ../src/qdesktopservices_3_2.cpp
- LIBS += -ldirectorylocalizer
+ ../src/qdesktopservices_3_2.cpp \
+ ../src/qcoreapplication_3_2.cpp
+ LIBS += -ldirectorylocalizer -lefsrv
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
}
diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro
index d7c3cb2..4cdce12 100644
--- a/src/plugins/s60/5_0/5_0.pro
+++ b/src/plugins/s60/5_0/5_0.pro
@@ -4,11 +4,13 @@ TARGET = qts60plugin_5_0
contains(S60_VERSION, 3.1) {
SOURCES += ../src/qlocale_3_1.cpp \
- ../src/qdesktopservices_3_1.cpp
+ ../src/qdesktopservices_3_1.cpp \
+ ../src/qcoreapplication_3_1.cpp
} else {
SOURCES += ../src/qlocale_3_2.cpp \
- ../src/qdesktopservices_3_2.cpp
- LIBS += -ldirectorylocalizer
+ ../src/qdesktopservices_3_2.cpp \
+ ../src/qcoreapplication_3_2.cpp
+ LIBS += -ldirectorylocalizer -lefsrv
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
}
diff --git a/src/plugins/s60/bwins/qts60pluginu.def b/src/plugins/s60/bwins/qts60pluginu.def
index a082262..b4110a9 100644
--- a/src/plugins/s60/bwins/qts60pluginu.def
+++ b/src/plugins/s60/bwins/qts60pluginu.def
@@ -4,3 +4,5 @@ EXPORTS
?defaultGetLongDateFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 3 NONAME ; class TPtrC16 defaultGetLongDateFormatSpec(class TExtendedLocale &)
?defaultGetShortDateFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 4 NONAME ; class TPtrC16 defaultGetShortDateFormatSpec(class TExtendedLocale &)
?localizedDirectoryName@@YA?AVQString@@AAV1@@Z @ 5 NONAME ; class QString localizedDirectoryName(class QString &)
+ ?systemDrive@@YA?AW4TDriveNumber@@AAVRFs@@@Z @ 6 NONAME ; enum TDriveNumber systemDrive(class RFs &)
+
diff --git a/src/plugins/s60/eabi/qts60pluginu.def b/src/plugins/s60/eabi/qts60pluginu.def
index d768436..df7895c 100644
--- a/src/plugins/s60/eabi/qts60pluginu.def
+++ b/src/plugins/s60/eabi/qts60pluginu.def
@@ -4,3 +4,5 @@ EXPORTS
_Z28defaultGetLongDateFormatSpecR15TExtendedLocale @ 3 NONAME
_Z29defaultGetShortDateFormatSpecR15TExtendedLocale @ 4 NONAME
_Z22localizedDirectoryNameR7QString @ 5 NONAME
+ _Z11systemDriveR3RFs @ 6 NONAME
+
diff --git a/src/plugins/s60/src/qcoreapplication_3_1.cpp b/src/plugins/s60/src/qcoreapplication_3_1.cpp
new file mode 100644
index 0000000..c7627ce
--- /dev/null
+++ b/src/plugins/s60/src/qcoreapplication_3_1.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qglobal.h>
+#include <f32file.h>
+
+EXPORT_C TDriveNumber systemDrive(RFs&)
+{
+ return EDriveC;
+}
diff --git a/src/plugins/s60/src/qcoreapplication_3_2.cpp b/src/plugins/s60/src/qcoreapplication_3_2.cpp
new file mode 100644
index 0000000..8d2794e
--- /dev/null
+++ b/src/plugins/s60/src/qcoreapplication_3_2.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qglobal.h>
+#include <f32file.h>
+
+EXPORT_C TDriveNumber systemDrive(RFs& fs)
+{
+ return fs.GetSystemDrive();
+}