summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorXizhi Zhu <xizhi.zhu@gmail.com>2012-01-23 21:21:40 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-30 16:50:21 +0100
commitd3fdc132fe67806fe4a5ab73c43effa281c6d8a2 (patch)
tree611578b8cf49dd00f69e68ab7e4d445c1080b479 /src/corelib/kernel
parent0c29259fd7c6f6283d17b598ec61347fc214b869 (diff)
Remove Symbian specific code from QtCore.
Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcore_unix_p.h6
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp212
-rw-r--r--src/corelib/kernel/qcoreapplication.h2
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h19
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h6
-rw-r--r--src/corelib/kernel/qmetatype.h2
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp14
-rw-r--r--src/corelib/kernel/qsharedmemory_p.h9
-rw-r--r--src/corelib/kernel/qsystemerror.cpp64
-rw-r--r--src/corelib/kernel/qsystemsemaphore.cpp12
-rw-r--r--src/corelib/kernel/qsystemsemaphore_p.h9
-rw-r--r--src/corelib/kernel/qtranslator.cpp4
12 files changed, 17 insertions, 342 deletions
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
index d2e16918f8..6ec8e269f8 100644
--- a/src/corelib/kernel/qcore_unix_p.h
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -274,9 +274,8 @@ static inline int qt_safe_close(int fd)
#undef QT_CLOSE
#define QT_CLOSE qt_safe_close
-// - Open C does not (yet?) implement these on Symbian OS
// - VxWorks doesn't have processes
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_VXWORKS)
+#if !defined(Q_OS_VXWORKS)
static inline int qt_safe_execve(const char *filename, char *const argv[],
char *const envp[])
{
@@ -298,16 +297,13 @@ static inline int qt_safe_execvp(const char *file, char *const argv[])
EINTR_LOOP(ret, ::execvp(file, argv));
return ret;
}
-#endif
-#ifndef Q_OS_VXWORKS // no processes on VxWorks
static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options)
{
register int ret;
EINTR_LOOP(ret, ::waitpid(pid, status, options));
return ret;
}
-
#endif // Q_OS_VXWORKS
#if !defined(_POSIX_MONOTONIC_CLOCK)
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 223d78653b..58cccfa3b6 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -66,15 +66,7 @@
#include <private/qfunctions_p.h>
#include <private/qlocale_p.h>
-#ifdef Q_OS_SYMBIAN
-# include <exception>
-# include <f32file.h>
-# include <e32ldr.h>
-# include "qeventdispatcher_symbian_p.h"
-# include "private/qcore_symbian_p.h"
-# include "private/qfilesystemengine_p.h"
-# include <apacmdln.h>
-#elif defined(Q_OS_UNIX)
+#if defined(Q_OS_UNIX)
# if !defined(QT_NO_GLIB)
# include "qeventdispatcher_glib_p.h"
# endif
@@ -116,62 +108,6 @@ private:
QMutex *mtx;
};
-#ifdef Q_OS_SYMBIAN
-typedef TDriveNumber (*SystemDriveFunc)(RFs&);
-static SystemDriveFunc PtrGetSystemDrive = 0;
-static CApaCommandLine* apaCommandLine = 0;
-static char *apaTail = 0;
-static QVector<char *> *apaArgv = 0;
-
-static void qt_cleanup_apa_cmd_line()
-{
- delete apaCommandLine;
- apaCommandLine = 0;
- delete apaArgv;
- apaArgv = 0;
- delete apaTail;
- apaTail = 0;
-}
-
-static inline void qt_init_symbian_apa_arguments(int &argc, char **&argv)
-{
- // If app is launched via CApaCommandLine::StartApp(), normal arguments only contain
- // application name.
- if (argc == 1) {
- CApaCommandLine* commandLine = QCoreApplicationPrivate::symbianCommandLine();
- if(commandLine) {
- TPtrC8 apaCmdLine = commandLine->TailEnd();
- int tailLen = apaCmdLine.Length();
- if (tailLen) {
- apaTail = reinterpret_cast<char *>(malloc(tailLen + 1));
- qMemCopy(apaTail, reinterpret_cast<const char *>(apaCmdLine.Ptr()), tailLen);
- apaTail[tailLen] = '\0';
- apaArgv = new QVector<char *>(8);
- // Reuse windows command line parsing
- *apaArgv = qWinCmdLine<char>(apaTail, tailLen, argc);
- apaArgv->insert(0, argv[0]);
- argc++;
- argv = apaArgv->data();
- }
- }
- }
-}
-
-CApaCommandLine* QCoreApplicationPrivate::symbianCommandLine()
-{
- // Getting of Apa command line needs to be static as it can only be called successfully
- // once per process.
- if (!apaCommandLine) {
- TInt err = CApaCommandLine::GetCommandLineFromProcessEnvironment(apaCommandLine);
- if (err == KErrNone) {
- qAddPostRoutine(qt_cleanup_apa_cmd_line);
- }
- }
- return apaCommandLine;
-}
-
-#endif
-
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
extern QString qAppFileName();
#endif
@@ -347,10 +283,6 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
}
QCoreApplicationPrivate::is_app_closing = false;
-#ifdef Q_OS_SYMBIAN
- qt_init_symbian_apa_arguments(argc, argv);
-#endif
-
#ifdef Q_OS_UNIX
qt_application_thread_id = QThread::currentThreadId();
#endif
@@ -393,9 +325,7 @@ void QCoreApplicationPrivate::cleanupThreadData()
void QCoreApplicationPrivate::createEventDispatcher()
{
Q_Q(QCoreApplication);
-#if defined(Q_OS_SYMBIAN)
- eventDispatcher = new QEventDispatcherSymbian(q);
-#elif defined(Q_OS_UNIX)
+#if defined(Q_OS_UNIX)
# if !defined(QT_NO_GLIB)
if (qgetenv("QT_NO_GLIB").isEmpty() && QEventDispatcherGlib::versionSupported())
eventDispatcher = new QEventDispatcherGlib(q);
@@ -443,11 +373,6 @@ void QCoreApplicationPrivate::checkReceiverThread(QObject *receiver)
Q_UNUSED(currentThread);
Q_UNUSED(thr);
}
-#elif defined(Q_OS_SYMBIAN) && defined (QT_NO_DEBUG)
-// no implementation in release builds, but keep the symbol present
-void QCoreApplicationPrivate::checkReceiverThread(QObject * /* receiver */)
-{
-}
#endif
void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()
@@ -455,17 +380,10 @@ void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()
#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QStringList *app_libpaths = coreappdata()->app_libpaths;
Q_ASSERT(app_libpaths);
-# if defined(Q_OS_SYMBIAN)
- QString app_location( QCoreApplication::applicationDirPath() );
- // File existence check for application's private dir requires additional '\' or
- // platform security will not allow it.
- if (app_location != QLibraryInfo::location(QLibraryInfo::PluginsPath) && QFile::exists(app_location + QLatin1Char('\\')) && !app_libpaths->contains(app_location))
-# else
QString app_location( QCoreApplication::applicationFilePath() );
app_location.truncate(app_location.lastIndexOf(QLatin1Char('/')));
app_location = QDir(app_location).canonicalPath();
if (QFile::exists(app_location) && !app_libpaths->contains(app_location))
-# endif
app_libpaths->append(app_location);
#endif
}
@@ -607,17 +525,6 @@ QCoreApplication::QCoreApplication(int &argc, char **argv, int _internal)
{
init();
QCoreApplicationPrivate::eventDispatcher->startingUp();
-#if defined(Q_OS_SYMBIAN)
-#ifndef QT_NO_LIBRARY
- // Refresh factoryloader, as text codecs are requested during lib path
- // resolving process and won't be therefore properly loaded.
- // Unknown if this is symbian specific issue.
- QFactoryLoader::refreshAll();
-#endif
-#ifndef QT_NO_SYSTEMLOCALE
- d_func()->symbianInit();
-#endif
-#endif //Q_OS_SYMBIAN
}
@@ -634,12 +541,6 @@ void QCoreApplication::init()
Q_ASSERT_X(!self, "QCoreApplication", "there should be only one application object");
QCoreApplication::self = this;
-#ifdef Q_OS_SYMBIAN
- //ensure temp and working directories exist
- QFileSystemEngine::createDirectory(QFileSystemEntry(QFileSystemEngine::tempPath()), true);
- QFileSystemEngine::createDirectory(QFileSystemEntry(QFileSystemEngine::currentPath()), true);
-#endif
-
#ifndef QT_NO_THREAD
QThread::initialize();
#endif
@@ -678,15 +579,6 @@ void QCoreApplication::init()
qt_startup_hook();
}
-#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
-void QCoreApplicationPrivate::symbianInit()
-{
- if (!environmentChangeNotifier)
- environmentChangeNotifier.reset(new QEnvironmentChangeNotifier);
-}
-#endif
-
-
/*!
Destroys the QCoreApplication object.
*/
@@ -1819,11 +1711,6 @@ bool QCoreApplicationPrivate::isTranslatorInstalled(QTranslator *translator)
function also assumes that the current directory has not been
changed by the application.
- In Symbian this function will return the application private directory,
- not the path to executable itself, as those are always in \c {/sys/bin}.
- If the application is in a read only drive, i.e. ROM, then the private path
- on the system drive will be returned.
-
\sa applicationFilePath()
*/
QString QCoreApplication::applicationDirPath()
@@ -1835,49 +1722,7 @@ QString QCoreApplication::applicationDirPath()
QCoreApplicationPrivate *d = self->d_func();
if (d->cachedApplicationDirPath.isNull())
-#if defined(Q_OS_SYMBIAN)
- {
- QString appPath;
- RFs& fs = qt_s60GetRFs();
- TChar driveChar;
- QChar qDriveChar;
- driveChar = (RProcess().FileName())[0];
-
- //Check if the process is installed in a read only drive (typically ROM),
- //and use the system drive (typically C:) if so.
- TInt drive;
- TDriveInfo driveInfo;
- TInt err = fs.CharToDrive(driveChar, drive);
- if (err == KErrNone) {
- err = fs.Drive(driveInfo, drive);
- }
- if (err != KErrNone || (driveInfo.iDriveAtt & KDriveAttRom) || (driveInfo.iMediaAtt
- & KMediaAttWriteProtected)) {
- 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();
-
- TFileName privatePath;
- fs.PrivatePath(privatePath);
- appPath = qt_TDesC2QString(privatePath);
- appPath.prepend(QLatin1Char(':')).prepend(qDriveChar);
-
- // Create the appPath if it doesn't exist. Non-existing appPath will cause
- // Platform Security violations later on if the app doesn't have AllFiles capability.
- err = fs.CreatePrivatePath(drive);
- if (err != KErrNone)
- qWarning("QCoreApplication::applicationDirPath: Failed to create private path.");
-
- d->cachedApplicationDirPath = QFileInfo(appPath).path();
- }
-#else
d->cachedApplicationDirPath = QFileInfo(applicationFilePath()).path();
-#endif
return d->cachedApplicationDirPath;
}
@@ -1918,20 +1763,7 @@ QString QCoreApplication::applicationFilePath()
return d->cachedApplicationFilePath;
}
#endif
-#if defined(Q_OS_SYMBIAN)
- QString appPath;
- RProcess proc;
- TInt err = proc.Open(proc.Id());
- if (err == KErrNone) {
- TFileName procName = proc.FileName();
- appPath.append(QString(reinterpret_cast<const QChar*>(procName.Ptr()), procName.Length()));
- proc.Close();
- }
-
- d->cachedApplicationFilePath = appPath;
- return d->cachedApplicationFilePath;
-
-#elif defined( Q_OS_UNIX )
+#if defined( Q_OS_UNIX )
# ifdef Q_OS_LINUX
// Try looking for a /proc/<pid>/exe symlink first which points to
// the absolute path of the executable
@@ -2045,12 +1877,6 @@ char **QCoreApplication::argv()
As a result of this, the string given by arguments().at(0) might not be
the program name on Windows, depending on how the application was started.
- For Symbian applications started with \c RApaLsSession::StartApp one can specify
- arguments using \c CApaCommandLine::SetTailEndL function. Such arguments are only
- available via this method; they will not be passed to \c main function. Also note
- that only 8-bit string data set with \c CApaCommandLine::SetTailEndL is supported
- by this function.
-
\sa applicationFilePath()
*/
@@ -2229,34 +2055,12 @@ QStringList QCoreApplication::libraryPaths()
if (!coreappdata()->app_libpaths) {
QStringList *app_libpaths = coreappdata()->app_libpaths = new QStringList;
QString installPathPlugins = QLibraryInfo::location(QLibraryInfo::PluginsPath);
-#if defined(Q_OS_SYMBIAN)
- // Add existing path on all drives for relative PluginsPath in Symbian
- if (installPathPlugins.at(1) != QChar(QLatin1Char(':'))) {
- QString tempPath = installPathPlugins;
- if (tempPath.at(tempPath.length() - 1) != QDir::separator()) {
- tempPath += QDir::separator();
- }
- RFs& fs = qt_s60GetRFs();
- TPtrC tempPathPtr(reinterpret_cast<const TText*> (tempPath.constData()));
- TFindFile finder(fs);
- TInt err = finder.FindByDir(tempPathPtr, tempPathPtr);
- while (err == KErrNone) {
- QString foundDir(reinterpret_cast<const QChar *>(finder.File().Ptr()),
- finder.File().Length());
- foundDir = QDir(foundDir).canonicalPath();
- if (!app_libpaths->contains(foundDir))
- app_libpaths->append(foundDir);
- err = finder.Find();
- }
- }
-#else
if (QFile::exists(installPathPlugins)) {
// Make sure we convert from backslashes to slashes.
installPathPlugins = QDir(installPathPlugins).canonicalPath();
if (!app_libpaths->contains(installPathPlugins))
app_libpaths->append(installPathPlugins);
}
-#endif
// If QCoreApplication is not yet instantiated,
// make sure we add the application path when we construct the QCoreApplication
@@ -2264,7 +2068,7 @@ QStringList QCoreApplication::libraryPaths()
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
if (!libPathEnv.isEmpty()) {
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
QLatin1Char pathSep(';');
#else
QLatin1Char pathSep(':');
@@ -2290,10 +2094,6 @@ QStringList QCoreApplication::libraryPaths()
\a paths. All existing paths will be deleted and the path list
will consist of the paths given in \a paths.
- In Symbian this function is only useful for setting paths for
- finding Qt extension plugin stubs, since the OS can only
- load libraries from the \c{/sys/bin} directory.
-
\sa libraryPaths(), addLibraryPath(), removeLibraryPath(), QLibrary
*/
void QCoreApplication::setLibraryPaths(const QStringList &paths)
@@ -2316,10 +2116,6 @@ void QCoreApplication::setLibraryPaths(const QStringList &paths)
is \c INSTALL/plugins, where \c INSTALL is the directory where Qt was
installed.
- In Symbian this function is only useful for adding paths for
- finding Qt extension plugin stubs, since the OS can only
- load libraries from the \c{/sys/bin} directory.
-
\sa removeLibraryPath(), libraryPaths(), setLibraryPaths()
*/
void QCoreApplication::addLibraryPath(const QString &path)
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index b4e407a742..75120285a2 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -156,7 +156,7 @@ public:
virtual bool winEventFilter(MSG *message, long *result);
#endif
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_UNIX)
static void watchUnixSignal(int signal, bool watch);
#endif
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index 48a1ac6bc9..b5b6c0d5f2 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -58,20 +58,10 @@
#include "QtCore/qsettings.h"
#include "private/qobject_p.h"
-#ifdef Q_OS_SYMBIAN
-#include <f32file.h>
-#endif
-
QT_BEGIN_NAMESPACE
typedef QList<QTranslator*> QTranslatorList;
-#if defined(Q_OS_SYMBIAN)
-# if !defined(QT_NO_SYSTEMLOCALE)
-class QEnvironmentChangeNotifier;
-# endif
-class CApaCommandLine;
-#endif
class QAbstractEventDispatcher;
class Q_CORE_EXPORT QCoreApplicationPrivate : public QObjectPrivate
@@ -104,7 +94,7 @@ public:
static bool checkInstance(const char *method);
static void sendPostedEvents(QObject *receiver, int event_type, QThreadData *data);
-#if !defined (QT_NO_DEBUG) || defined (QT_MAC_FRAMEWORK_BUILD) || defined (Q_OS_SYMBIAN)
+#if !defined (QT_NO_DEBUG) || defined (QT_MAC_FRAMEWORK_BUILD)
void checkReceiverThread(QObject *receiver);
#endif
int &argc;
@@ -124,13 +114,6 @@ public:
bool threadData_clean;
QString cachedApplicationDirPath;
QString cachedApplicationFilePath;
-#if defined(Q_OS_SYMBIAN)
-# if !defined(QT_NO_SYSTEMLOCALE)
- QScopedPointer<QEnvironmentChangeNotifier> environmentChangeNotifier;
- void symbianInit();
-# endif
- static CApaCommandLine* symbianCommandLine();
-#endif
static bool isTranslatorInstalled(QTranslator *translator);
diff --git a/src/corelib/kernel/qcorecmdlineargs_p.h b/src/corelib/kernel/qcorecmdlineargs_p.h
index d8727788a2..70e41ac52a 100644
--- a/src/corelib/kernel/qcorecmdlineargs_p.h
+++ b/src/corelib/kernel/qcorecmdlineargs_p.h
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
QT_BEGIN_INCLUDE_NAMESPACE
#include "QtCore/qvector.h"
@@ -154,7 +154,7 @@ static inline QStringList qCmdLineArgs(int argc, char *argv[])
return qWinCmdArgs(cmdLine);
}
#endif
-#else // !Q_OS_WIN || !Q_OS_SYMBIAN
+#else // !Q_OS_WIN
static inline QStringList qCmdLineArgs(int argc, char *argv[])
{
@@ -164,7 +164,7 @@ static inline QStringList qCmdLineArgs(int argc, char *argv[])
return args;
}
-#endif // Q_OS_WIN || Q_OS_SYMBIAN
+#endif // Q_OS_WIN
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index ceaf9ebd58..fd5c5f30dd 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -194,7 +194,7 @@ public:
// This logic must match the one in qglobal.h
#if defined(QT_COORD_TYPE)
QReal = 0,
-#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
+#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
QReal = Float,
#else
QReal = Double,
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index e294151a14..9ffa3506ac 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -44,9 +44,6 @@
#include "qsystemsemaphore.h"
#include <qdir.h>
#include <qcryptographichash.h>
-#ifdef Q_OS_SYMBIAN
-#include <e32const.h>
-#endif
#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -59,7 +56,6 @@ QT_BEGIN_NAMESPACE
the subset that the win/unix kernel allows.
On Unix this will be a file name
- On Symbian key will be truncated to 80 characters
*/
QString
QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
@@ -78,8 +74,6 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
result.append(QLatin1String(hex));
#ifdef Q_OS_WIN
return result;
-#elif defined(Q_OS_SYMBIAN)
- return result.left(KMaxKernelName);
#else
return QDir::tempPath() + QLatin1Char('/') + result;
#endif
@@ -121,14 +115,6 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
process. This means that QSharedMemory should not be used across
multiple threads in the same process in HP-UX.
- \o Symbian: QSharedMemory does not "own" the shared memory segment.
- When all threads or processes that have an instance of QSharedMemory
- attached to a particular shared memory segment have either destroyed
- their instance of QSharedMemory or exited, the Symbian kernel
- releases the shared memory segment automatically.
- Also, access to a shared memory segment cannot be limited to read-only
- in Symbian.
-
\endlist
Remember to lock the shared memory with lock() before reading from
diff --git a/src/corelib/kernel/qsharedmemory_p.h b/src/corelib/kernel/qsharedmemory_p.h
index b063309a07..4fd83fcae6 100644
--- a/src/corelib/kernel/qsharedmemory_p.h
+++ b/src/corelib/kernel/qsharedmemory_p.h
@@ -71,9 +71,6 @@ namespace QSharedMemoryPrivate
#ifdef Q_OS_WIN
#include <qt_windows.h>
-#elif defined(Q_OS_SYMBIAN)
-#include <e32std.h>
-#include <sys/types.h>
#else
#include <sys/sem.h>
#endif
@@ -144,11 +141,7 @@ public:
bool attach(QSharedMemory::AccessMode mode);
bool detach();
-#ifdef Q_OS_SYMBIAN
- void setErrorString(const QString &function, TInt errorCode);
-#else
void setErrorString(const QString &function);
-#endif
#ifndef QT_NO_SYSTEMSEMAPHORE
bool tryLocker(QSharedMemoryLocker *locker, const QString function) {
@@ -164,8 +157,6 @@ public:
private:
#ifdef Q_OS_WIN
HANDLE hand;
-#elif defined(Q_OS_SYMBIAN)
- RChunk chunk;
#else
key_t unix_key;
#endif
diff --git a/src/corelib/kernel/qsystemerror.cpp b/src/corelib/kernel/qsystemerror.cpp
index 11f7389134..774c9b975d 100644
--- a/src/corelib/kernel/qsystemerror.cpp
+++ b/src/corelib/kernel/qsystemerror.cpp
@@ -141,76 +141,12 @@ static QString standardLibraryErrorString(int errorCode)
return ret.trimmed();
}
-#ifdef Q_OS_SYMBIAN
-static QString symbianErrorString(int errorCode)
-{
- switch (errorCode) {
- case KErrNotFound:
- return QLatin1String("not found");
- case KErrCancel:
- return QLatin1String("cancelled");
- case KErrNoMemory:
- return QLatin1String("out of memory");
- case KErrNotSupported:
- return QLatin1String("not supported");
- case KErrBadHandle:
- return QLatin1String("bad handle"); //KERN-EXEC 0 panic is more likely
- case KErrAlreadyExists:
- return QLatin1String("already exists");
- case KErrPathNotFound:
- return QLatin1String("path not found");
- case KErrInUse:
- return QLatin1String("in use");
- case KErrNotReady:
- return QLatin1String("not ready (e.g. FS dismounted, network down)");
- case KErrCorrupt:
- return QLatin1String("corrupt");
- case KErrAccessDenied:
- return QLatin1String("access denied");
- case KErrLocked:
- return QLatin1String("locked");
- case KErrWrite:
- return QLatin1String("incomplete write error");
- case KErrDisMounted:
- return QLatin1String("file system dismounted during operation"); //i.e. a forcible dismount was done while we had files open
- case KErrEof:
- return QLatin1String("end of file");
- case KErrDiskFull:
- return QLatin1String("no space in file system");
- case KErrBadName:
- return QLatin1String("invalid filename");
- case KErrTimedOut:
- return QLatin1String("timed out");
- case KErrBadDescriptor:
- return QLatin1String("bad descriptor (passed address on stack to async call?)");
- case KErrAbort:
- return QLatin1String("aborted");
- case KErrTooBig:
- return QLatin1String("too big"); //e.g. trying to open a >2GB file with 32 bit API
- case KErrBadPower:
- return QLatin1String("insufficient power");
- case KErrDirFull:
- return QLatin1String("no space in directory table");
- case KErrHardwareNotAvailable:
- return QLatin1String("hardware not available");
- case KErrSessionClosed:
- return QLatin1String("session closed");
- case KErrPermissionDenied:
- return QLatin1String("permission denied");
- default:
- return QString(QLatin1String("symbian error %1")).arg(errorCode);
- }
-}
-#endif
-
QString QSystemError::toString()
{
switch(errorScope) {
case NativeError:
#if defined (Q_OS_WIN)
return windowsErrorString(errorCode);
-#elif defined (Q_OS_SYMBIAN)
- return symbianErrorString(errorCode);
#else
//unix: fall through as native and standard library are the same
#endif
diff --git a/src/corelib/kernel/qsystemsemaphore.cpp b/src/corelib/kernel/qsystemsemaphore.cpp
index eab0c32725..d0a67834dd 100644
--- a/src/corelib/kernel/qsystemsemaphore.cpp
+++ b/src/corelib/kernel/qsystemsemaphore.cpp
@@ -123,10 +123,6 @@ QT_BEGIN_NAMESPACE
resource and then exits without releasing it, Unix will release that
resource.
- \o Symbian: QSystemSemaphore behaves the same as Windows semaphores.
- In other words, the operating system owns the semaphore and ignores
- QSystemSemaphore::AccessMode.
-
\endlist
\sa QSharedMemory, QSemaphore
@@ -151,7 +147,7 @@ QT_BEGIN_NAMESPACE
creates a new semaphore for that key and sets its resource count to
\a initialValue.
- In Windows and in Symbian, \a mode is ignored, and the system always tries to
+ In Windows, \a mode is ignored, and the system always tries to
create a semaphore for the specified \a key. If the system does not
already have a semaphore identified as \a key, it creates the
semaphore and sets its resource count to \a initialValue. But if the
@@ -201,7 +197,7 @@ QSystemSemaphore::~QSystemSemaphore()
enable handling the problem in Unix implementations of semaphores
that survive a crash. In Unix, when a semaphore survives a crash, we
need a way to force it to reset its resource count, when the system
- reuses the semaphore. In Windows and in Symbian, where semaphores can't survive a
+ reuses the semaphore. In Windows, where semaphores can't survive a
crash, this enum has no effect.
\value Open If the semaphore already exists, its initial resource
@@ -214,7 +210,7 @@ QSystemSemaphore::~QSystemSemaphore()
This value should be passed to the constructor, when the first
semaphore for a particular key is constructed and you know that if
the semaphore already exists it could only be because of a crash. In
- Windows and in Symbian, where a semaphore can't survive a crash, Create and Open
+ Windows, where a semaphore can't survive a crash, Create and Open
have the same behavior.
*/
@@ -234,7 +230,7 @@ void QSystemSemaphore::setKey(const QString &key, int initialValue, AccessMode m
return;
d->error = NoError;
d->errorString = QString();
-#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_OS_WIN)
// optimization to not destroy/create the file & semaphore
if (key == d->key && mode == Create && d->createdSemaphore && d->createdFile) {
d->initialValue = initialValue;
diff --git a/src/corelib/kernel/qsystemsemaphore_p.h b/src/corelib/kernel/qsystemsemaphore_p.h
index 88e19642a2..10665228ea 100644
--- a/src/corelib/kernel/qsystemsemaphore_p.h
+++ b/src/corelib/kernel/qsystemsemaphore_p.h
@@ -62,10 +62,6 @@
# include <sys/types.h>
#endif
-#ifdef Q_OS_SYMBIAN
-class RSemaphore;
-#endif
-
QT_BEGIN_NAMESPACE
class QSystemSemaphorePrivate
@@ -82,9 +78,6 @@ public:
#ifdef Q_OS_WIN
HANDLE handle(QSystemSemaphore::AccessMode mode = QSystemSemaphore::Open);
void setErrorString(const QString &function);
-#elif defined(Q_OS_SYMBIAN)
- int handle(QSystemSemaphore::AccessMode mode = QSystemSemaphore::Open);
- void setErrorString(const QString &function,int err = 0);
#else
key_t handle(QSystemSemaphore::AccessMode mode = QSystemSemaphore::Open);
void setErrorString(const QString &function);
@@ -98,8 +91,6 @@ public:
#ifdef Q_OS_WIN
HANDLE semaphore;
HANDLE semaphoreLock;
-#elif defined(Q_OS_SYMBIAN)
- RSemaphore semaphore;
#else
int semaphore;
bool createdFile;
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 6fa7407555..a11bcb26c9 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -58,7 +58,7 @@
#include "qtranslator_p.h"
#include "qlocale.h"
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_INTEGRITY)
#define QT_USE_MMAP
#include "private/qcore_unix_p.h"
#endif
@@ -518,7 +518,7 @@ static QString find_translation(const QLocale & locale,
// see http://www.unicode.org/reports/tr35/#LanguageMatching for inspiration
QStringList languages = locale.uiLanguages();
-#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_UNIX)
for (int i = languages.size()-1; i >= 0; --i) {
QString lang = languages.at(i);
QString lowerLang = lang.toLower();