diff options
-rw-r--r-- | src/corelib/io/io.pri | 1 | ||||
-rw-r--r-- | src/corelib/io/qdir.cpp | 3 | ||||
-rw-r--r-- | src/corelib/io/qfile.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_symbian.cpp | 84 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_symbian_p.h | 30 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine.h | 3 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 104 | ||||
-rw-r--r-- | src/corelib/io/qprocess.cpp | 5 | ||||
-rw-r--r-- | src/corelib/io/qprocess_symbian.cpp | 340 | ||||
-rw-r--r-- | src/corelib/io/qtemporaryfile.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_symbian_p.cpp | 31 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_symbian_p.h | 3 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 23 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication_p.h | 7 | ||||
-rw-r--r-- | src/gui/effects/qgraphicseffect.h | 6 | ||||
-rw-r--r-- | src/gui/kernel/qclipboard_s60.cpp | 6 | ||||
-rw-r--r-- | src/multimedia/audio/qaudio.h | 6 | ||||
-rw-r--r-- | src/multimedia/audio/qaudiodeviceid.h | 2 | ||||
-rw-r--r-- | src/s60installs/eabi/QtCoreu.def | 41 | ||||
-rw-r--r-- | src/s60installs/eabi/QtGuiu.def | 220 | ||||
-rw-r--r-- | tests/auto/qdir/tst_qdir.cpp | 4 |
21 files changed, 585 insertions, 340 deletions
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index b49554e..e58e4ad 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -89,5 +89,6 @@ win32 { symbian { SOURCES += io/qfilesystemwatcher_symbian.cpp HEADERS += io/qfilesystemwatcher_symbian_p.h + contains(QT_CONFIG, s60): LIBS += -lplatformenv } } diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index f9a1aca..2ab3022 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1930,8 +1930,7 @@ QString QDir::currentPath() Under non-Windows operating systems the \c HOME environment variable is used if it exists, otherwise the path returned by the - rootPath() function is used, except in Symbian, where c:\\data is - returned. + rootPath(). \sa home(), currentPath(), rootPath(), tempPath() */ diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 026c1fd..93152da 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -739,7 +739,7 @@ QFile::rename(const QString &newName) if (error) { out.remove(); } else { - fileEngine()->setFileName(newName); + fileEngine()->setFileName(newName); setPermissions(permissions()); unsetError(); setFileName(newName); diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp index b920952..1d60752 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 @@ -52,22 +51,17 @@ QT_BEGIN_NAMESPACE -CNotifyChangeEvent* CNotifyChangeEvent::New(RFs &fs, const TDesC& file, - QSymbianFileSystemWatcherEngine* e, bool aIsDir) -{ - CNotifyChangeEvent* self = new CNotifyChangeEvent(fs, file, e, aIsDir); - return self; -} - -CNotifyChangeEvent::CNotifyChangeEvent(RFs &fs, const TDesC& file, - QSymbianFileSystemWatcherEngine* e, bool aIsDir, TInt aPriority) : +QNotifyChangeEvent::QNotifyChangeEvent(RFs &fs, const TDesC &file, + QSymbianFileSystemWatcherEngine *e, bool aIsDir, + TInt aPriority) : CActive(aPriority), isDir(aIsDir), fsSession(fs), watchedPath(file), - engine(e) + engine(e), + failureCount(0) { - if(isDir) { + if (isDir) { fsSession.NotifyChange(ENotifyEntry, iStatus, file); } else { fsSession.NotifyChange(ENotifyAll, iStatus, file); @@ -76,33 +70,43 @@ CNotifyChangeEvent::CNotifyChangeEvent(RFs &fs, const TDesC& file, SetActive(); } -CNotifyChangeEvent::~CNotifyChangeEvent() +QNotifyChangeEvent::~QNotifyChangeEvent() { Cancel(); } -void CNotifyChangeEvent::RunL() +void QNotifyChangeEvent::RunL() { - if (iStatus.Int() == KErrNone) { - if(isDir) { + if(iStatus.Int() == KErrNone) { + failureCount = 0; + } else { + qWarning("QNotifyChangeEvent::RunL() - Failed to order change notifications: %d", iStatus.Int()); + failureCount++; + } + + // Re-request failed notification once, but if it won't start working, + // we can't do much besides just not request any more notifications. + if (failureCount < 2) { + if (isDir) { fsSession.NotifyChange(ENotifyEntry, iStatus, watchedPath); } else { fsSession.NotifyChange(ENotifyAll, iStatus, watchedPath); } SetActive(); - QT_TRYCATCH_LEAVING(engine->emitPathChanged(this)); - } else { - qWarning("CNotifyChangeEvent::RunL() - Failed to order change notifications: %d", iStatus.Int()); + + if (!failureCount) { + QT_TRYCATCH_LEAVING(engine->emitPathChanged(this)); + } } } -void CNotifyChangeEvent::DoCancel() +void QNotifyChangeEvent::DoCancel() { fsSession.NotifyChangeCancel(iStatus); } QSymbianFileSystemWatcherEngine::QSymbianFileSystemWatcherEngine() : - watcherStarted(false) + watcherStarted(false) { moveToThread(this); } @@ -112,8 +116,8 @@ QSymbianFileSystemWatcherEngine::~QSymbianFileSystemWatcherEngine() stop(); } -QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths, - QStringList *files, QStringList *directories) +QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths, QStringList *files, + QStringList *directories) { QMutexLocker locker(&mutex); QStringList p = paths; @@ -142,15 +146,15 @@ QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths, // Use absolute filepath as relative paths seem to have some issues. QString filePath = fi.absoluteFilePath(); - if(isDir && filePath.at(filePath.size()-1) != QChar(L'/')) { + if (isDir && filePath.at(filePath.size() - 1) != QChar(L'/')) { filePath += QChar(L'/'); } currentEvent = NULL; QMetaObject::invokeMethod(this, - "addNativeListener", - Qt::QueuedConnection, - Q_ARG(QString, filePath)); + "addNativeListener", + Qt::QueuedConnection, + Q_ARG(QString, filePath)); syncCondition.wait(&mutex); @@ -161,9 +165,9 @@ QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths, it.remove(); if (isDir) - directories->append(path); - else - files->append(path); + directories->append(path); + else + files->append(path); } } @@ -171,7 +175,8 @@ QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths, } QStringList QSymbianFileSystemWatcherEngine::removePaths(const QStringList &paths, - QStringList *files, QStringList *directories) + QStringList *files, + QStringList *directories) { QMutexLocker locker(&mutex); @@ -186,8 +191,8 @@ QStringList QSymbianFileSystemWatcherEngine::removePaths(const QStringList &path activeObjectToPath.remove(currentEvent); QMetaObject::invokeMethod(this, - "removeNativeListener", - Qt::QueuedConnection); + "removeNativeListener", + Qt::QueuedConnection); syncCondition.wait(&mutex); @@ -203,18 +208,17 @@ QStringList QSymbianFileSystemWatcherEngine::removePaths(const QStringList &path return p; } -void QSymbianFileSystemWatcherEngine::emitPathChanged(CNotifyChangeEvent *e) +void QSymbianFileSystemWatcherEngine::emitPathChanged(QNotifyChangeEvent *e) { QMutexLocker locker(&mutex); QString path = activeObjectToPath.value(e); QFileInfo fi(path); - if (e->isDir) { + if (e->isDir) emit directoryChanged(path, !fi.exists()); - } else { + else emit fileChanged(path, !fi.exists()); - } } void QSymbianFileSystemWatcherEngine::stop() @@ -229,9 +233,7 @@ bool QSymbianFileSystemWatcherEngine::startWatcher() bool retval = true; if (!watcherStarted) { -#if defined(Q_OS_SYMBIAN) setStackSize(0x5000); -#endif start(); syncCondition.wait(&mutex); @@ -256,7 +258,7 @@ void QSymbianFileSystemWatcherEngine::run() if (errorCode == KErrNone) { exec(); - foreach(CNotifyChangeEvent* e, activeObjectToPath.keys()) { + foreach(QNotifyChangeEvent *e, activeObjectToPath.keys()) { e->Cancel(); delete e; } @@ -271,7 +273,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 = new QNotifyChangeEvent(qt_s60GetRFs(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive)); syncCondition.wakeOne(); } diff --git a/src/corelib/io/qfilesystemwatcher_symbian_p.h b/src/corelib/io/qfilesystemwatcher_symbian_p.h index 23aa086..f187f50 100644 --- a/src/corelib/io/qfilesystemwatcher_symbian_p.h +++ b/src/corelib/io/qfilesystemwatcher_symbian_p.h @@ -54,12 +54,13 @@ // #include "qfilesystemwatcher_p.h" + +#ifndef QT_NO_FILESYSTEMWATCHER + #include "qhash.h" #include "qmutex.h" #include "qwaitcondition.h" -#ifndef QT_NO_FILESYSTEMWATCHER - #include <e32base.h> #include <f32file.h> @@ -67,14 +68,12 @@ QT_BEGIN_NAMESPACE class QSymbianFileSystemWatcherEngine; -class CNotifyChangeEvent : public CActive +class QNotifyChangeEvent : public CActive { public: - CNotifyChangeEvent(RFs &fsSession, const TDesC& file, QSymbianFileSystemWatcherEngine* engine, - bool aIsDir, TInt aPriority = EPriorityStandard); - ~CNotifyChangeEvent(); - static CNotifyChangeEvent* New(RFs &fsSession, const TDesC& file, - QSymbianFileSystemWatcherEngine* engine, bool aIsDir); + QNotifyChangeEvent(RFs &fsSession, const TDesC &file, QSymbianFileSystemWatcherEngine *engine, + bool aIsDir, TInt aPriority = EPriorityStandard); + ~QNotifyChangeEvent(); bool isDir; @@ -85,6 +84,8 @@ private: RFs &fsSession; TPath watchedPath; QSymbianFileSystemWatcherEngine *engine; + + int failureCount; }; class QSymbianFileSystemWatcherEngine : public QFileSystemWatcherEngine @@ -95,10 +96,9 @@ public: QSymbianFileSystemWatcherEngine(); ~QSymbianFileSystemWatcherEngine(); - QStringList addPaths(const QStringList &paths, QStringList *files, - QStringList *directories); + QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories); QStringList removePaths(const QStringList &paths, QStringList *files, - QStringList *directories); + QStringList *directories); void stop(); @@ -110,17 +110,17 @@ public Q_SLOTS: void removeNativeListener(); private: - friend class CNotifyChangeEvent; - void emitPathChanged(CNotifyChangeEvent *e); + friend class QNotifyChangeEvent; + void emitPathChanged(QNotifyChangeEvent *e); bool startWatcher(); - QHash<CNotifyChangeEvent*, QString> activeObjectToPath; + QHash<QNotifyChangeEvent*, QString> activeObjectToPath; QMutex mutex; QWaitCondition syncCondition; int errorCode; bool watcherStarted; - CNotifyChangeEvent *currentEvent; + QNotifyChangeEvent *currentEvent; }; #endif // QT_NO_FILESYSTEMWATCHER diff --git a/src/corelib/io/qfsfileengine.h b/src/corelib/io/qfsfileengine.h index f6db91c..9be8a4c 100644 --- a/src/corelib/io/qfsfileengine.h +++ b/src/corelib/io/qfsfileengine.h @@ -83,9 +83,6 @@ public: FileFlags fileFlags(FileFlags type) const; bool setPermissions(uint perms); QString fileName(FileName file) const; -#ifdef Q_OS_SYMBIAN - QString fileNameSymbian(FileName file) const; -#endif uint ownerId(FileOwner) const; QString owner(FileOwner) const; QDateTime fileTime(FileTime time) const; diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 7a815fe..a7919d3 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -60,8 +60,8 @@ #if defined(Q_OS_SYMBIAN) # include <syslimits.h> # include <f32file.h> +# include <pathinfo.h> # include "private/qcore_symbian_p.h" -# include "private/qcoreapplication_p.h" #endif #include <errno.h> #if !defined(QWS) && defined(Q_OS_MAC) @@ -80,9 +80,9 @@ QT_BEGIN_NAMESPACE static bool isRelativePathSymbian(const QString& fileName) { return !(fileName.startsWith(QLatin1Char('/')) - || (fileName.length() >= 2 - && ((fileName.at(0).isLetter() && fileName.at(1) == QLatin1Char(':')) - || (fileName.at(0) == QLatin1Char('/') && fileName.at(1) == QLatin1Char('/'))))); + || (fileName.length() >= 2 + && ((fileName.at(0).isLetter() && fileName.at(1) == QLatin1Char(':')) + || (fileName.at(0) == QLatin1Char('/') && fileName.at(1) == QLatin1Char('/'))))); } #endif @@ -404,7 +404,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)); @@ -580,11 +580,10 @@ QString QFSFileEngine::currentPath(const QString &) QString QFSFileEngine::homePath() { - QString home = QFile::decodeName(qgetenv("HOME")); #if defined(Q_OS_SYMBIAN) - if (home.isEmpty()) - home = QLatin1String("C:/Data"); + QString home = rootPath(); #else + QString home = QFile::decodeName(qgetenv("HOME")); if (home.isNull()) home = rootPath(); #endif @@ -594,7 +593,13 @@ QString QFSFileEngine::homePath() QString QFSFileEngine::rootPath() { #if defined(Q_OS_SYMBIAN) - return QLatin1String("C:/"); +# ifdef Q_WS_S60 + TFileName symbianPath = PathInfo::PhoneMemoryRootPath(); + return QDir::cleanPath(QDir::fromNativeSeparators(qt_TDesC2QString(symbianPath))); +# else +# warning No fallback implementation of QFSFileEngine::rootPath() + return QLatin1String(); +# endif #else return QLatin1String("/"); #endif @@ -603,8 +608,14 @@ QString QFSFileEngine::rootPath() QString QFSFileEngine::tempPath() { #ifdef Q_OS_SYMBIAN - QString temp = QDir::currentPath().left(2); - temp += QLatin1String("/system/temp/"); +# ifdef Q_WS_S60 + TFileName symbianPath = PathInfo::PhoneMemoryRootPath(); + QString temp = QDir::fromNativeSeparators(qt_TDesC2QString(symbianPath)); + temp += QLatin1String( "temp/"); +# else +# warning No fallback implementation of QFSFileEngine::tempPath() + return QString(); +# endif #else QString temp = QFile::decodeName(qgetenv("TMPDIR")); if (temp.isEmpty()) @@ -618,7 +629,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++) { @@ -670,7 +681,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('/')) { @@ -794,7 +805,8 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const ret |= ExistsFlag; #if defined(Q_OS_SYMBIAN) if (d->filePath == QLatin1String("/") - || (d->filePath.at(0).isLetter() && d->filePath.mid(1,d->filePath.length()) == QLatin1String(":/"))) + || (d->filePath.at(0).isLetter() + && d->filePath.mid(1,d->filePath.length()) == QLatin1String(":/"))) ret |= RootFlag; // In Symbian, all symlinks have hidden attribute for some reason; @@ -823,11 +835,12 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const } #ifdef Q_OS_SYMBIAN -QString QFSFileEngine::fileNameSymbian(FileName file) const +static QString symbianFileName(QAbstractFileEngine::FileName file, const QFSFileEngine *engine, + const QFSFileEnginePrivate * const d) { - Q_D(const QFSFileEngine); - if(file == BaseName) { - int slash = d->filePath.lastIndexOf(QLatin1Char('/')); + const QLatin1Char slashChar('/'); + if(file == QAbstractFileEngine::BaseName) { + int slash = d->filePath.lastIndexOf(slashChar); if(slash == -1) { int colon = d->filePath.lastIndexOf(QLatin1Char(':')); if(colon != -1) @@ -835,42 +848,42 @@ QString QFSFileEngine::fileNameSymbian(FileName file) const return d->filePath; } return d->filePath.mid(slash + 1); - } else if(file == PathName) { + } else if(file == QAbstractFileEngine::PathName) { if(!d->filePath.size()) return d->filePath; - int slash = d->filePath.lastIndexOf(QLatin1Char('/')); + int slash = d->filePath.lastIndexOf(slashChar); if(slash == -1) { if(d->filePath.length() >= 2 && d->filePath.at(1) == QLatin1Char(':')) return d->filePath.left(2); - return QString::fromLatin1("."); + return QLatin1String("."); } else { if(!slash) - return QString::fromLatin1("/"); + return QLatin1String("/"); if(slash == 2 && d->filePath.length() >= 2 && d->filePath.at(1) == QLatin1Char(':')) slash++; return d->filePath.left(slash); } - } else if(file == AbsoluteName || file == AbsolutePathName) { + } else if(file == QAbstractFileEngine::AbsoluteName || file == QAbstractFileEngine::AbsolutePathName) { QString ret; - if (!isRelativePath()) { + if (!isRelativePathSymbian(d->filePath)) { if (d->filePath.size() > 2 && d->filePath.at(1) == QLatin1Char(':') - && d->filePath.at(2) != QLatin1Char('/') || // It's a drive-relative path, so Z:a.txt -> Z:\currentpath\a.txt - d->filePath.startsWith(QLatin1Char('/')) // It's a absolute path to the current drive, so \a.txt -> Z:\a.txt + && d->filePath.at(2) != slashChar || // It's a drive-relative path, so Z:a.txt -> Z:\currentpath\a.txt + d->filePath.startsWith(slashChar) // It's a absolute path to the current drive, so \a.txt -> Z:\a.txt ) { ret = QString(QDir::currentPath().left(2) + QDir::fromNativeSeparators(d->filePath)); } else { ret = d->filePath; } } else { - ret = QDir::cleanPath(QDir::currentPath() + QLatin1Char('/') + d->filePath); + ret = QDir::cleanPath(QDir::currentPath() + slashChar + d->filePath); } // The path should be absolute at this point. // From the docs : // Absolute paths begin with the directory separator "/" // (optionally preceded by a drive specification under Windows). - if (ret.at(0) != QLatin1Char('/')) { + if (ret.at(0) != slashChar) { Q_ASSERT(ret.length() >= 2); Q_ASSERT(ret.at(0).isLetter()); Q_ASSERT(ret.at(1) == QLatin1Char(':')); @@ -879,23 +892,23 @@ QString QFSFileEngine::fileNameSymbian(FileName file) const ret[0] = ret.at(0).toUpper(); } - if (file == AbsolutePathName) { - int slash = ret.lastIndexOf(QLatin1Char('/')); + if (file == QAbstractFileEngine::AbsolutePathName) { + int slash = ret.lastIndexOf(slashChar); if (slash < 0) return ret; - else if (ret.at(0) != QLatin1Char('/') && slash == 2) + else if (ret.at(0) != slashChar && slash == 2) return ret.left(3); // include the slash else return ret.left(slash > 0 ? slash : 1); } return ret; - } else if(file == CanonicalName || file == CanonicalPathName) { - if (!(fileFlags(ExistsFlag) & ExistsFlag)) + } else if(file == QAbstractFileEngine::CanonicalName || file == QAbstractFileEngine::CanonicalPathName) { + if (!(engine->fileFlags(QAbstractFileEngine::ExistsFlag) & QAbstractFileEngine::ExistsFlag)) return QString(); - QString ret = QFSFileEnginePrivate::canonicalized(fileName(AbsoluteName)); - if (!ret.isEmpty() && file == CanonicalPathName) { - int slash = ret.lastIndexOf(QLatin1Char('/')); + QString ret = QFSFileEnginePrivate::canonicalized(symbianFileName(QAbstractFileEngine::AbsoluteName, engine, d)); + if (!ret.isEmpty() && file == QAbstractFileEngine::CanonicalPathName) { + int slash = ret.lastIndexOf(slashChar); if (slash == -1) ret = QDir::fromNativeSeparators(QDir::currentPath()); else if (slash == 0) @@ -903,7 +916,7 @@ QString QFSFileEngine::fileNameSymbian(FileName file) const ret = ret.left(slash); } return ret; - } else if(file == LinkName) { + } else if(file == QAbstractFileEngine::LinkName) { if (d->isSymlink()) { char s[PATH_MAX+1]; int len = readlink(d->nativeFilePath.constData(), s, PATH_MAX); @@ -913,20 +926,20 @@ QString QFSFileEngine::fileNameSymbian(FileName file) const if (isRelativePathSymbian(ret)) { if (!isRelativePathSymbian(d->filePath)) { - ret.prepend(d->filePath.left(d->filePath.lastIndexOf(QLatin1Char('/'))) - + QLatin1Char('/')); + ret.prepend(d->filePath.left(d->filePath.lastIndexOf(slashChar)) + + slashChar); } else { - ret.prepend(QDir::currentPath() + QLatin1Char('/')); + ret.prepend(QDir::currentPath() + slashChar); } } ret = QDir::cleanPath(ret); - if (ret.size() > 1 && ret.endsWith(QLatin1Char('/'))) + if (ret.size() > 1 && ret.endsWith(slashChar)) ret.chop(1); return ret; } } return QString(); - } else if(file == BundleName) { + } else if(file == QAbstractFileEngine::BundleName) { return QString(); } return d->filePath; @@ -935,10 +948,10 @@ QString QFSFileEngine::fileNameSymbian(FileName file) const QString QFSFileEngine::fileName(FileName file) const { -#ifdef Q_OS_SYMBIAN - return fileNameSymbian(file); -#endif Q_D(const QFSFileEngine); +#ifdef Q_OS_SYMBIAN + return symbianFileName(file, this, d); +#else if (file == BundleName) { #if !defined(QWS) && defined(Q_OS_MAC) QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(d->filePath), @@ -1072,6 +1085,7 @@ QString QFSFileEngine::fileName(FileName file) const return QString(); } return d->filePath; +#endif // Q_OS_SYMBIAN } bool QFSFileEngine::isRelativePath() const diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 057492d..764304d 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -532,7 +532,7 @@ void QProcessPrivate::Channel::clear() \snippet doc/src/snippets/process/process.cpp 0 - \section1 Notes for Windows Users + \section1 Notes for Windows Users Some Windows commands (for example, \c dir) are not provided by separate applications, but by the command interpreter itself. @@ -2012,9 +2012,6 @@ void QProcess::terminate() On Windows, kill() uses TerminateProcess, and on Unix and Mac OS X, the SIGKILL signal is sent to the process. - \note Killing running processes from other processes will typically - cause a panic in Symbian due to platform security. - \sa terminate() */ void QProcess::kill() diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp index a8c72d3..5b00ed0 100644 --- a/src/corelib/io/qprocess_symbian.cpp +++ b/src/corelib/io/qprocess_symbian.cpp @@ -100,15 +100,15 @@ class QProcessManager; // Active object to listen for child process death -class CProcessActive : public CActive +class QProcessActive : public CActive { public: - static CProcessActive* construct(QProcess* process, - RProcess** proc, - int serial, - int deathPipe); + static QProcessActive *construct(QProcess *process, + RProcess **proc, + int serial, + int deathPipe); - virtual ~CProcessActive(); + virtual ~QProcessActive(); void start(); void stop(); @@ -117,32 +117,32 @@ public: protected: - // From CActive + // Inherited from CActive void RunL(); TInt RunError(TInt aError); void DoCancel(); - CProcessActive(); + QProcessActive(); private: - QProcess* process; - RProcess** pproc; + QProcess *process; + RProcess **pproc; int serial; int deathPipe; bool errorValue; }; // Active object to communicate synchronously with process manager thread -class CProcessManagerMediator : public CActive +class QProcessManagerMediator : public CActive { public: - static CProcessManagerMediator* construct(); + static QProcessManagerMediator *construct(); - virtual ~CProcessManagerMediator(); + virtual ~QProcessManagerMediator(); - bool add(CProcessActive* processObserver); - void remove(CProcessActive* processObserver); + bool add(QProcessActive *processObserver); + void remove(QProcessActive *processObserver); void terminate(); protected: @@ -154,23 +154,28 @@ protected: ETerminate }; - // From CActive + // Inherited from CActive void RunL(); TInt RunError(TInt aError); void DoCancel(); - CProcessManagerMediator(); + QProcessManagerMediator(); - bool notify(CProcessActive* processObserver, Commands command); + bool notify(QProcessActive *processObserver, Commands command); private: - CProcessActive* currentObserver; + QProcessActive *currentObserver; Commands currentCommand; RThread processManagerThread; }; -// Process manager manages child process death listeners +// Process manager manages child process death listeners. +// +// Note: Because QProcess can be used outside event loop, we cannot be guaranteed +// an active scheduler exists for us to add our process death listener objects. +// We can't just install active scheduler on the calling thread, as that would block it +// if we want to actually use it, so a separate manager thread is required. class QProcessManager { public: @@ -179,50 +184,55 @@ public: void startThread(); - TInt run(void* param); + TInt run(void *param); bool add(QProcess *process); void remove(QProcess *process); - inline void setMediator(CProcessManagerMediator* newMediator) {mediator = newMediator;}; + inline void setMediator(QProcessManagerMediator *newMediator) { + mediator = newMediator; + }; private: - inline void lock() {managerMutex.Wait();}; - inline void unlock() {managerMutex.Signal();}; + inline void lock() { + managerMutex.Wait(); + }; + inline void unlock() { + managerMutex.Signal(); + }; - QMap<int, CProcessActive *> children; - CProcessManagerMediator* mediator; + QMap<int, QProcessActive *> children; + QProcessManagerMediator *mediator; RMutex managerMutex; bool threadStarted; RThread managerThread; }; -static bool qt_rprocess_running(RProcess* proc) +static bool qt_rprocess_running(RProcess *proc) { - if(proc && proc->Handle()) { + if (proc && proc->Handle()) { TExitType et = proc->ExitType(); - if (et == EExitPending) { + if (et == EExitPending) return true; - } } return false; } -static void qt_create_symbian_commandline(const QStringList &arguments, QString& commandLine) +static void qt_create_symbian_commandline(const QStringList &arguments, QString &commandLine) { - for (int i=0; i<arguments.size(); ++i) { + for (int i = 0; i < arguments.size(); ++i) { QString tmp = arguments.at(i); // in the case of \" already being in the string the \ must also be escaped - tmp.replace( QLatin1String("\\\""), QLatin1String("\\\\\"") ); + tmp.replace(QLatin1String("\\\""), QLatin1String("\\\\\"")); // escape a single " because the arguments will be parsed - tmp.replace( QLatin1String("\""), QLatin1String("\\\"") ); + tmp.replace(QLatin1String("\""), QLatin1String("\\\"")); if (tmp.isEmpty() || tmp.contains(QLatin1Char(' ')) || tmp.contains(QLatin1Char('\t'))) { // The argument must not end with a \ since this would be interpreted // as escaping the quote -- rather put the \ behind the quote: e.g. // rather use "foo"\ than "foo\" QString endQuote(QLatin1String("\"")); int i = tmp.length(); - while (i>0 && tmp.at(i-1) == QLatin1Char('\\')) { + while (i > 0 && tmp.at(i - 1) == QLatin1Char('\\')) { --i; endQuote += QLatin1String("\\"); } @@ -235,12 +245,11 @@ static void qt_create_symbian_commandline(const QStringList &arguments, QString& static TInt qt_create_symbian_process(RProcess **proc, const QString &programName, const QStringList &arguments) { - RProcess* newProc = NULL; + RProcess *newProc = NULL; newProc = new RProcess(); - if (!newProc) { + if (!newProc) return KErrNoMemory; - } QString commandLine; qt_create_symbian_commandline(arguments, commandLine); @@ -250,31 +259,32 @@ static TInt qt_create_symbian_process(RProcess **proc, const QString &programNam TInt err = newProc->Create(program_ptr, cmdline_ptr); - if (err == KErrNotFound){ + if (err == KErrNotFound) { // Strip path from program name and try again (i.e. try from default location "\sys\bin") int index = programName.lastIndexOf(QChar('\\')); int index2 = programName.lastIndexOf(QChar('/')); index = qMax(index, index2); - if(index != -1 && programName.length() >= index){ + if (index != -1 && programName.length() >= index) { QString strippedName; - strippedName = programName.mid(index+1); - QPROCESS_DEBUG_PRINT("qt_create_symbian_process() Process '%s' not found, try stripped version '%s'", qPrintable(programName), qPrintable(strippedName)); + strippedName = programName.mid(index + 1); + QPROCESS_DEBUG_PRINT("qt_create_symbian_process() Executable '%s' not found, trying stripped version '%s'", + qPrintable(programName), qPrintable(strippedName)); TPtrC stripped_ptr(reinterpret_cast<const TText*>(strippedName.constData())); err = newProc->Create(stripped_ptr, cmdline_ptr); if (err != KErrNone) { - QPROCESS_DEBUG_PRINT("qt_create_symbian_process() Unable to create process '%s': %d", qPrintable(strippedName), err); + QPROCESS_DEBUG_PRINT("qt_create_symbian_process() Unable to create process '%s': %d", + qPrintable(strippedName), err); } } } - if (err == KErrNone) { + if (err == KErrNone) *proc = newProc; - } else { + else delete newProc; - } return err; } @@ -326,19 +336,19 @@ static void qt_create_pipe(int *pipe) } // Called from ProcessManagerThread -CProcessActive* CProcessActive::construct(QProcess* process, - RProcess** proc, +QProcessActive *QProcessActive::construct(QProcess *process, + RProcess **proc, int serial, int deathPipe) { QPROCESS_ASSERT((process || proc || *proc), - EProcessActiveNullParameter, - "CProcessActive::construct(): process (0x%x), proc (0x%x) or *proc == NULL, not creating an instance", process, proc) + EProcessActiveNullParameter, + "QProcessActive::construct(): process (0x%x), proc (0x%x) or *proc == NULL, not creating an instance", process, proc) - CProcessActive* newInstance = new CProcessActive(); + QProcessActive *newInstance = new QProcessActive(); if (!newInstance) { - QPROCESS_DEBUG_PRINT("CProcessActive::construct(): Failed to create new instance"); + QPROCESS_DEBUG_PRINT("QProcessActive::construct(): Failed to create new instance"); } else { newInstance->process = process; newInstance->pproc = proc; @@ -351,29 +361,29 @@ CProcessActive* CProcessActive::construct(QProcess* process, } // Called from ProcessManagerThread -CProcessActive::CProcessActive() - : CActive(CActive::EPriorityStandard) +QProcessActive::QProcessActive() + : CActive(CActive::EPriorityStandard) { // Nothing to do } // Called from ProcessManagerThread -CProcessActive::~CProcessActive() +QProcessActive::~QProcessActive() { process = NULL; pproc = NULL; } // Called from ProcessManagerThread -void CProcessActive::start() +void QProcessActive::start() { if (qt_rprocess_running(*pproc)) { CActiveScheduler::Add(this); (*pproc)->Logon(iStatus); SetActive(); - QPROCESS_DEBUG_PRINT("CProcessActive::start(): Started monitoring for process exit."); + QPROCESS_DEBUG_PRINT("QProcessActive::start(): Started monitoring for process exit."); } else { - QPROCESS_DEBUG_PRINT("CProcessActive::start(): Process doesn't exist or is already dead"); + QPROCESS_DEBUG_PRINT("QProcessActive::start(): Process doesn't exist or is already dead"); // Assume process has already died qt_native_write(deathPipe, "", 1); errorValue = true; @@ -381,56 +391,56 @@ void CProcessActive::start() } // Called from ProcessManagerThread -void CProcessActive::stop() +void QProcessActive::stop() { - QPROCESS_DEBUG_PRINT("CProcessActive::stop()"); + QPROCESS_DEBUG_PRINT("QProcessActive::stop()"); // Remove this from scheduler (also cancels the request) Deque(); } -bool CProcessActive::error() +bool QProcessActive::error() { return errorValue; } // Called from ProcessManagerThread -void CProcessActive::RunL() +void QProcessActive::RunL() { // If this method gets executed, the monitored process has died // Notify main thread qt_native_write(deathPipe, "", 1); - QPROCESS_DEBUG_PRINT("CProcessActive::RunL() sending death notice to %d", deathPipe); + QPROCESS_DEBUG_PRINT("QProcessActive::RunL() sending death notice to %d", deathPipe); } // Called from ProcessManagerThread -TInt CProcessActive::RunError(TInt aError) +TInt QProcessActive::RunError(TInt aError) { Q_UNUSED(aError); // Handle RunL leave (should never happen) - QPROCESS_ASSERT(0, EProcessActiveRunError, "CProcessActive::RunError(): Should never get here!") + QPROCESS_ASSERT(0, EProcessActiveRunError, "QProcessActive::RunError(): Should never get here!") return 0; } // Called from ProcessManagerThread -void CProcessActive::DoCancel() +void QProcessActive::DoCancel() { - QPROCESS_DEBUG_PRINT("CProcessActive::DoCancel()"); + QPROCESS_DEBUG_PRINT("QProcessActive::DoCancel()"); if (qt_rprocess_running(*pproc)) { (*pproc)->LogonCancel(iStatus); - QPROCESS_DEBUG_PRINT("CProcessActive::DoCancel(): Stopped monitoring for process exit."); + QPROCESS_DEBUG_PRINT("QProcessActive::DoCancel(): Stopped monitoring for process exit."); } else { - QPROCESS_DEBUG_PRINT("CProcessActive::DoCancel(): Process doesn't exist"); + QPROCESS_DEBUG_PRINT("QProcessActive::DoCancel(): Process doesn't exist"); } } // Called from ProcessManagerThread -CProcessManagerMediator* CProcessManagerMediator::construct() +QProcessManagerMediator *QProcessManagerMediator::construct() { - CProcessManagerMediator* newInstance = new CProcessManagerMediator; + QProcessManagerMediator *newInstance = new QProcessManagerMediator; TInt err(KErrNone); newInstance->currentCommand = ENoCommand; @@ -439,77 +449,77 @@ CProcessManagerMediator* CProcessManagerMediator::construct() if (newInstance) { err = newInstance->processManagerThread.Open(newInstance->processManagerThread.Id()); QPROCESS_ASSERT((err == KErrNone), - EProcessManagerMediatorThreadOpenFailed, - "CProcessManagerMediator::construct(): Failed to open processManagerThread (err:%d)", err) + EProcessManagerMediatorThreadOpenFailed, + "QProcessManagerMediator::construct(): Failed to open processManagerThread (err:%d)", err) } else { QPROCESS_ASSERT(0, - EProcessManagerMediatorCreationFailed, - "CProcessManagerMediator::construct(): Failed to open construct mediator") + EProcessManagerMediatorCreationFailed, + "QProcessManagerMediator::construct(): Failed to open construct mediator") } // Activate mediator CActiveScheduler::Add(newInstance); newInstance->iStatus = KRequestPending; newInstance->SetActive(); - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::construct(): new instance successfully created and activated"); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::construct(): new instance successfully created and activated"); return newInstance; } // Called from ProcessManagerThread -CProcessManagerMediator::CProcessManagerMediator() - : CActive(CActive::EPriorityStandard) +QProcessManagerMediator::QProcessManagerMediator() + : CActive(CActive::EPriorityStandard) { // Nothing to do } // Called from ProcessManagerThread -CProcessManagerMediator::~CProcessManagerMediator() +QProcessManagerMediator::~QProcessManagerMediator() { processManagerThread.Close(); - currentCommand = ENoCommand; + currentCommand = ENoCommand; currentObserver = NULL; } // Called from main thread -bool CProcessManagerMediator::add(CProcessActive* processObserver) +bool QProcessManagerMediator::add(QProcessActive *processObserver) { - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::add()"); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::add()"); return notify(processObserver, EAdd); } // Called from main thread -void CProcessManagerMediator::remove(CProcessActive* processObserver) +void QProcessManagerMediator::remove(QProcessActive *processObserver) { - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::remove()"); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::remove()"); notify(processObserver, ERemove); } // Called from main thread -void CProcessManagerMediator::terminate() +void QProcessManagerMediator::terminate() { - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::terminate()"); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::terminate()"); notify(NULL, ETerminate); } // Called from main thread -bool CProcessManagerMediator::notify(CProcessActive* processObserver, Commands command) +bool QProcessManagerMediator::notify(QProcessActive *processObserver, Commands command) { bool success(true); - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::Notify(): Command: %d, processObserver: 0x%x", command, processObserver); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::Notify(): Command: %d, processObserver: 0x%x", command, processObserver); QPROCESS_ASSERT((command == ETerminate || processObserver), - EProcessManagerMediatorNullObserver, - "CProcessManagerMediator::Notify(): NULL processObserver not allowed for command: %d", command) + EProcessManagerMediatorNullObserver, + "QProcessManagerMediator::Notify(): NULL processObserver not allowed for command: %d", command) QPROCESS_ASSERT(IsActive(), - EProcessManagerMediatorInactive, - "CProcessManagerMediator::Notify(): Mediator is not active!") + EProcessManagerMediatorInactive, + "QProcessManagerMediator::Notify(): Mediator is not active!") - QPROCESS_ASSERT(iStatus==KRequestPending, - EProcessManagerMediatorNotPending, - "CProcessManagerMediator::Notify(): Mediator request not pending!") + QPROCESS_ASSERT(iStatus == KRequestPending, + EProcessManagerMediatorNotPending, + "QProcessManagerMediator::Notify(): Mediator request not pending!") currentObserver = processObserver; currentCommand = command; @@ -519,16 +529,16 @@ bool CProcessManagerMediator::notify(CProcessActive* processObserver, Commands c processManagerThread.Rendezvous(pmStatus); // Complete request -> RunL will run in the process manager thread - TRequestStatus* status = &iStatus; + TRequestStatus *status = &iStatus; processManagerThread.RequestComplete(status, command); - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::Notify(): Waiting process manager to complete..."); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::Notify(): Waiting process manager to complete..."); User::WaitForRequest(pmStatus); - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::Notify(): Wait over"); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::Notify(): Wait over"); if (currentObserver) { success = !(currentObserver->error()); - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::Notify(): success = %d", success); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::Notify(): success = %d", success); } currentObserver = NULL; @@ -538,25 +548,25 @@ bool CProcessManagerMediator::notify(CProcessActive* processObserver, Commands c } // Called from ProcessManagerThread -void CProcessManagerMediator::RunL() +void QProcessManagerMediator::RunL() { - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::RunL(): currentCommand: %d, iStatus: %d", currentCommand, iStatus.Int()); + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::RunL(): currentCommand: %d, iStatus: %d", currentCommand, iStatus.Int()); switch (currentCommand) { - case EAdd: - currentObserver->start(); - break; - case ERemove: - currentObserver->stop(); - break; - case ETerminate: - Deque(); - CActiveScheduler::Stop(); - return; - default: - QPROCESS_ASSERT(0, - EProcessManagerMediatorInvalidCmd, - "CProcessManagerMediator::RunL(): Invalid command!") - break; + case EAdd: + currentObserver->start(); + break; + case ERemove: + currentObserver->stop(); + break; + case ETerminate: + Deque(); + CActiveScheduler::Stop(); + return; + default: + QPROCESS_ASSERT(0, + EProcessManagerMediatorInvalidCmd, + "QProcessManagerMediator::RunL(): Invalid command!") + break; } iStatus = KRequestPending; @@ -567,44 +577,44 @@ void CProcessManagerMediator::RunL() } // Called from ProcessManagerThread -TInt CProcessManagerMediator::RunError(TInt aError) +TInt QProcessManagerMediator::RunError(TInt aError) { Q_UNUSED(aError); // Handle RunL leave (should never happen) QPROCESS_ASSERT(0, - EProcessManagerMediatorRunError, - "CProcessManagerMediator::RunError(): Should never get here!") + EProcessManagerMediatorRunError, + "QProcessManagerMediator::RunError(): Should never get here!") return 0; } // Called from ProcessManagerThread -void CProcessManagerMediator::DoCancel() +void QProcessManagerMediator::DoCancel() { - QPROCESS_DEBUG_PRINT("CProcessManagerMediator::DoCancel()"); - TRequestStatus* status = &iStatus; + QPROCESS_DEBUG_PRINT("QProcessManagerMediator::DoCancel()"); + TRequestStatus *status = &iStatus; processManagerThread.RequestComplete(status, KErrCancel); } Q_GLOBAL_STATIC(QProcessManager, processManager) -TInt processManagerThreadFunction(TAny* param) +TInt processManagerThreadFunction(TAny *param) { QPROCESS_ASSERT(param, - EProcessManagerNullParam, - "processManagerThreadFunction(): NULL param") + EProcessManagerNullParam, + "processManagerThreadFunction(): NULL param") - QProcessManager* manager = reinterpret_cast<QProcessManager*>(param); + QProcessManager *manager = reinterpret_cast<QProcessManager*>(param); - CActiveScheduler* scheduler = new CQtActiveScheduler(); + CActiveScheduler *scheduler = new CQtActiveScheduler(); QPROCESS_ASSERT(scheduler, - EProcessManagerSchedulerCreationFail, - "processManagerThreadFunction(): Scheduler creation failed") + EProcessManagerSchedulerCreationFail, + "processManagerThreadFunction(): Scheduler creation failed") CActiveScheduler::Install(scheduler); //Creating mediator also adds it to scheduler and activates it. Failure will panic. - manager->setMediator(CProcessManagerMediator::construct()); + manager->setMediator(QProcessManagerMediator::construct()); RThread::Rendezvous(KErrNone); CActiveScheduler::Start(); @@ -616,13 +626,13 @@ TInt processManagerThreadFunction(TAny* param) } QProcessManager::QProcessManager() - : mediator(NULL), threadStarted(false) + : mediator(NULL), threadStarted(false) { TInt err = managerMutex.CreateLocal(); QPROCESS_ASSERT(err == KErrNone, - EProcessManagerMutexCreationFail, - "QProcessManager::QProcessManager(): Failed to create new managerMutex (err: %d)", err) + EProcessManagerMutexCreationFail, + "QProcessManager::QProcessManager(): Failed to create new managerMutex (err: %d)", err) } QProcessManager::~QProcessManager() @@ -630,10 +640,10 @@ QProcessManager::~QProcessManager() QPROCESS_DEBUG_PRINT("QProcessManager::~QProcessManager()"); // Cancel death listening for all child processes if (mediator) { - QMap<int, CProcessActive *>::Iterator it = children.begin(); + QMap<int, QProcessActive *>::Iterator it = children.begin(); while (it != children.end()) { // Remove all monitors - CProcessActive *active = it.value(); + QProcessActive *active = it.value(); mediator->remove(active); QPROCESS_DEBUG_PRINT("QProcessManager::~QProcessManager() removed listening for a process"); @@ -647,7 +657,7 @@ QProcessManager::~QProcessManager() qDeleteAll(children.values()); children.clear(); - managerThread.Close(); + managerThread.Close(); managerMutex.Close(); } @@ -664,8 +674,8 @@ void QProcessManager::startThread() EOwnerProcess); QPROCESS_ASSERT(err == KErrNone, - EProcessManagerThreadCreationFail, - "QProcessManager::startThread(): Failed to create new managerThread (err:%d)", err) + EProcessManagerThreadCreationFail, + "QProcessManager::startThread(): Failed to create new managerThread (err:%d)", err) threadStarted = true; @@ -684,8 +694,8 @@ static QBasicAtomicInt idCounter = Q_BASIC_ATOMIC_INITIALIZER(1); bool QProcessManager::add(QProcess *process) { QPROCESS_ASSERT(process, - EProcessManagerNullParam, - "QProcessManager::add(): Failed to add CProcessActive to ProcessManager - NULL process") + EProcessManagerNullParam, + "QProcessManager::add(): Failed to add QProcessActive to ProcessManager - NULL process") lock(); @@ -694,19 +704,19 @@ bool QProcessManager::add(QProcess *process) QPROCESS_DEBUG_PRINT("QProcessManager::add(): serial: %d, deathPipe: %d - %d, symbianProcess: 0x%x", serial, process->d_func()->deathPipe[0], process->d_func()->deathPipe[1], process->d_func()->symbianProcess); - CProcessActive* newActive = - CProcessActive::construct(process, + QProcessActive *newActive = + QProcessActive::construct(process, &(process->d_func()->symbianProcess), serial, process->d_func()->deathPipe[1]); - if (newActive){ + if (newActive) { if (mediator->add(newActive)) { children.insert(serial, newActive); unlock(); return true; } else { - QPROCESS_DEBUG_PRINT("QProcessManager::add(): Failed to add CProcessActive to ProcessManager"); + QPROCESS_DEBUG_PRINT("QProcessManager::add(): Failed to add QProcessActive to ProcessManager"); delete newActive; } } @@ -719,13 +729,13 @@ bool QProcessManager::add(QProcess *process) void QProcessManager::remove(QProcess *process) { QPROCESS_ASSERT(process, - EProcessManagerNullParam, - "QProcessManager::remove(): Failed to remove CProcessActive from ProcessManager - NULL process") + EProcessManagerNullParam, + "QProcessManager::remove(): Failed to remove QProcessActive from ProcessManager - NULL process") lock(); int serial = process->d_func()->serial; - CProcessActive *active = children.value(serial); + QProcessActive *active = children.value(serial); if (!active) { unlock(); return; @@ -825,13 +835,13 @@ bool QProcessPrivate::processStarted() qint64 QProcessPrivate::bytesAvailableFromStdout() const { - // In Symbian, zero bytes are always available + // In Symbian, stdout is not supported return 0; } qint64 QProcessPrivate::bytesAvailableFromStderr() const { - // In Symbian, zero bytes are always available + // In Symbian, stderr is not supported return 0; } @@ -839,7 +849,7 @@ qint64 QProcessPrivate::readFromStdout(char *data, qint64 maxlen) { Q_UNUSED(data); Q_UNUSED(maxlen); - // In Symbian, zero bytes are always read + // In Symbian, stdout is not supported return 0; } @@ -847,7 +857,7 @@ qint64 QProcessPrivate::readFromStderr(char *data, qint64 maxlen) { Q_UNUSED(data); Q_UNUSED(maxlen); - // In Symbian, zero bytes are always read + // In Symbian, stderr is not supported return 0; } @@ -855,14 +865,14 @@ qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen) { Q_UNUSED(data); Q_UNUSED(maxlen); - // In Symbian, zero bytes are always written + // In Symbian, stdin is not supported return 0; } void QProcessPrivate::terminateProcess() { - // Not allowed by platform security - will panic kern-exec 46 if process has been started. - // Works if process is not yet started. + // Needs PowerMgmt capability if process has been started; will panic kern-exec 46 otherwise. + // Always works if process is not yet started. if (qt_rprocess_running(symbianProcess)) { symbianProcess->Terminate(0); } else { @@ -872,8 +882,8 @@ void QProcessPrivate::terminateProcess() void QProcessPrivate::killProcess() { - // Not allowed by platform security - will panic kern-exec 46 if process has been started. - // Works if process is not yet started. + // Needs PowerMgmt capability if process has been started; will panic kern-exec 46 otherwise. + // Always works if process is not yet started. if (qt_rprocess_running(symbianProcess)) { symbianProcess->Kill(0); } else { @@ -926,9 +936,8 @@ bool QProcessPrivate::waitForFinished(int msecs) User::WaitForRequest(logonStatus, timerStatus); QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed"); - if (timerStatus == KErrNone) { + if (timerStatus == KErrNone) timeoutOccurred = true; - } timer.Cancel(); timer.Close(); @@ -941,11 +950,11 @@ bool QProcessPrivate::waitForFinished(int msecs) QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished(), qt_rprocess_running returned false"); } - if (timeoutOccurred) { - processError = QProcess::Timedout; - q->setErrorString(QLatin1String(QT_TRANSLATE_NOOP(QProcess, "Process operation timed out"))); - return false; - } + if (timeoutOccurred) { + processError = QProcess::Timedout; + q->setErrorString(QLatin1String(QT_TRANSLATE_NOOP(QProcess, "Process operation timed out"))); + return false; + } _q_processDied(); @@ -1007,14 +1016,13 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a QPROCESS_DEBUG_PRINT("QProcessPrivate::startDetached()"); Q_UNUSED(workingDirectory); - RProcess* newProc = NULL; + RProcess *newProc = NULL; TInt err = qt_create_symbian_process(&newProc, program, arguments); if (err == KErrNone) { - if (pid) { + if (pid) *pid = (qint64)newProc->Id(); - } newProc->Resume(); newProc->Close(); diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index d76e99b..3db0564 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -515,8 +515,8 @@ QTemporaryFile::QTemporaryFile() Q_D(QTemporaryFile); d->templateName = QDir::tempPath() + QLatin1String("/qt_temp.XXXXXX"); #ifdef Q_OS_SYMBIAN - //Just for verify that folder really exist on hardware - fileEngine()->mkdir( QDir::tempPath(), true ); + //Just to verify that folder really exist on hardware + fileEngine()->mkdir(QDir::tempPath(), true); #endif } diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp index a7d2694..957b92c 100644 --- a/src/corelib/kernel/qcore_symbian_p.cpp +++ b/src/corelib/kernel/qcore_symbian_p.cpp @@ -175,5 +175,36 @@ Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal) return qt_s60_plugin_resolver()->resolve(ordinal); } +/*! +\internal +Provides global access to a shared RFs. +*/ +class QS60RFsSession +{ +public: + QS60RFsSession() { + qt_symbian_throwIfError(iFs.Connect()); + qt_symbian_throwIfError(iFs.ShareProtected()); + } + + ~QS60RFsSession() { + iFs.Close(); + } + + RFs& GetRFs() { + return iFs; + } + +private: + + RFs iFs; +}; + +Q_GLOBAL_STATIC(QS60RFsSession, qt_s60_RFsSession); + +Q_CORE_EXPORT RFs& qt_s60GetRFs() +{ + return qt_s60_RFsSession()->GetRFs(); +} QT_END_NAMESPACE diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h index fab7254..6d3616f 100644 --- a/src/corelib/kernel/qcore_symbian_p.h +++ b/src/corelib/kernel/qcore_symbian_p.h @@ -58,6 +58,7 @@ #include <qstring.h> #include <qrect.h> #include <qhash.h> +#include <f32file.h> QT_BEGIN_HEADER @@ -142,6 +143,8 @@ enum S60PluginFuncOrdinals Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal); +Q_CORE_EXPORT RFs& qt_s60GetRFs(); + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index ead363c..6d88d92 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. @@ -2192,7 +2171,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); diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index 1adb837..6c30ce8 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -90,10 +90,6 @@ public: static QString macMenuBarName(); #endif -#ifdef Q_OS_SYMBIAN - static RFs& fsSession(); -#endif - static QThread *theMainThread; static QThread *mainThread(); static bool checkInstance(const char *method); @@ -126,9 +122,6 @@ public: static uint attribs; static inline bool testAttribute(uint flag) { return attribs & (1 << flag); } -#ifdef Q_OS_SYMBIAN - static RFs fileServerSession; //this should be moved into a symbian file engine if/when one is written -#endif }; QT_END_NAMESPACE diff --git a/src/gui/effects/qgraphicseffect.h b/src/gui/effects/qgraphicseffect.h index 56bdef7..a50ee29 100644 --- a/src/gui/effects/qgraphicseffect.h +++ b/src/gui/effects/qgraphicseffect.h @@ -80,8 +80,8 @@ protected: QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent = 0); private: - Q_DECLARE_PRIVATE(QGraphicsEffectSource); - Q_DISABLE_COPY(QGraphicsEffectSource); + Q_DECLARE_PRIVATE(QGraphicsEffectSource) + Q_DISABLE_COPY(QGraphicsEffectSource) friend class QGraphicsEffect; friend class QGraphicsEffectPrivate; friend class QGraphicsScenePrivate; @@ -103,7 +103,7 @@ public: SourceBoundingRectChanged = 0x4, SourceInvalidated = 0x8 }; - Q_DECLARE_FLAGS(ChangeFlags, ChangeFlag); + Q_DECLARE_FLAGS(ChangeFlags, ChangeFlag) QGraphicsEffect(QObject *parent = 0); virtual ~QGraphicsEffect(); diff --git a/src/gui/kernel/qclipboard_s60.cpp b/src/gui/kernel/qclipboard_s60.cpp index 26ea844..9a2629c 100644 --- a/src/gui/kernel/qclipboard_s60.cpp +++ b/src/gui/kernel/qclipboard_s60.cpp @@ -49,7 +49,7 @@ #include "qbuffer.h" #include "qwidget.h" #include "qevent.h" -#include "private/qapplication_p.h" +#include "private/qcore_symbian_p.h" #include <QtDebug> // Symbian's clipboard @@ -194,7 +194,7 @@ const QMimeData* QClipboard::mimeData(Mode mode) const if (d) { TRAPD(err,{ - RFs& fs = QCoreApplicationPrivate::fsSession(); + RFs fs = qt_s60GetRFs(); CClipboard* cb = CClipboard::NewForReadingLC(fs); Q_ASSERT(cb); RStoreReadStream stream; @@ -220,7 +220,7 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode) if (d) { TRAPD(err,{ - RFs& fs = QCoreApplicationPrivate::fsSession(); + RFs fs = qt_s60GetRFs(); CClipboard* cb = CClipboard::NewForWritingLC(fs); RStoreWriteStream stream; TStreamId stid = stream.CreateLC(cb->Store()); diff --git a/src/multimedia/audio/qaudio.h b/src/multimedia/audio/qaudio.h index bf5495c..5b7ca3b 100644 --- a/src/multimedia/audio/qaudio.h +++ b/src/multimedia/audio/qaudio.h @@ -64,8 +64,8 @@ QT_END_NAMESPACE QT_END_HEADER -Q_DECLARE_METATYPE(QAudio::Error); -Q_DECLARE_METATYPE(QAudio::State); -Q_DECLARE_METATYPE(QAudio::Mode); +Q_DECLARE_METATYPE(QAudio::Error) +Q_DECLARE_METATYPE(QAudio::State) +Q_DECLARE_METATYPE(QAudio::Mode) #endif // QAUDIO_H diff --git a/src/multimedia/audio/qaudiodeviceid.h b/src/multimedia/audio/qaudiodeviceid.h index 984283f..5d842fe 100644 --- a/src/multimedia/audio/qaudiodeviceid.h +++ b/src/multimedia/audio/qaudiodeviceid.h @@ -88,7 +88,7 @@ QT_END_NAMESPACE QT_END_HEADER -Q_DECLARE_METATYPE(QAudioDeviceId); +Q_DECLARE_METATYPE(QAudioDeviceId) #endif // QAUDIODEVICEID_H diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 21ed411..0ef2f8c 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -3191,7 +3191,7 @@ EXPORTS _ZN11QFinalStateD0Ev @ 3190 NONAME _ZN11QFinalStateD1Ev @ 3191 NONAME _ZN11QFinalStateD2Ev @ 3192 NONAME - _ZN11QMetaObject11isConnectedEP7QObjecti @ 3193 NONAME + _ZN11QMetaObject11isConnectedEP7QObjecti @ 3193 NONAME ABSENT _ZN11QMetaObject8metacallEP7QObjectNS_4CallEiPPv @ 3194 NONAME _ZN12QEasingCurve12setAmplitudeEf @ 3195 NONAME _ZN12QEasingCurve12setOvershootEf @ 3196 NONAME @@ -3320,7 +3320,7 @@ EXPORTS _ZN16QEventTransition11qt_metacastEPKc @ 3319 NONAME _ZN16QEventTransition12onTransitionEP6QEvent @ 3320 NONAME _ZN16QEventTransition12setEventTypeEN6QEvent4TypeE @ 3321 NONAME - _ZN16QEventTransition14setEventObjectEP7QObject @ 3322 NONAME + _ZN16QEventTransition14setEventObjectEP7QObject @ 3322 NONAME ABSENT _ZN16QEventTransition16staticMetaObjectE @ 3323 NONAME DATA 16 _ZN16QEventTransition5eventEP6QEvent @ 3324 NONAME _ZN16QEventTransition9eventTestEP6QEvent @ 3325 NONAME @@ -3547,8 +3547,8 @@ EXPORTS _ZN6QStateD2Ev @ 3546 NONAME _ZN7QStringC1EiN2Qt14InitializationE @ 3547 NONAME _ZN7QStringC2EiN2Qt14InitializationE @ 3548 NONAME - _ZN8QProcess18setEnvironmentHashERK5QHashI7QStringS1_E @ 3549 NONAME - _ZN8QProcess21systemEnvironmentHashEv @ 3550 NONAME + _ZN8QProcess18setEnvironmentHashERK5QHashI7QStringS1_E @ 3549 NONAME ABSENT + _ZN8QProcess21systemEnvironmentHashEv @ 3550 NONAME ABSENT _ZN9QConfFileD1Ev @ 3551 NONAME _ZN9QConfFileD2Ev @ 3552 NONAME _ZN9QTimeLine14setEasingCurveERK12QEasingCurve @ 3553 NONAME @@ -3588,7 +3588,7 @@ EXPORTS _ZNK15QPauseAnimation10metaObjectEv @ 3587 NONAME _ZNK15QPauseAnimation8durationEv @ 3588 NONAME _ZNK16QEventTransition10metaObjectEv @ 3589 NONAME - _ZNK16QEventTransition11eventObjectEv @ 3590 NONAME + _ZNK16QEventTransition11eventObjectEv @ 3590 NONAME ABSENT _ZNK16QEventTransition9eventTypeEv @ 3591 NONAME _ZNK17QSignalTransition10metaObjectEv @ 3592 NONAME _ZNK17QSignalTransition12senderObjectEv @ 3593 NONAME @@ -3643,7 +3643,7 @@ EXPORTS _ZNK6QState12initialStateEv @ 3642 NONAME _ZNK6QState9childModeEv @ 3643 NONAME _ZNK7QPointF15manhattanLengthEv @ 3644 NONAME - _ZNK8QProcess15environmentHashEv @ 3645 NONAME + _ZNK8QProcess15environmentHashEv @ 3645 NONAME ABSENT _ZNK8QVariant6toRealEPb @ 3646 NONAME _ZNK8QVariant7toFloatEPb @ 3647 NONAME _ZNK9QTimeLine11easingCurveEv @ 3648 NONAME @@ -3694,4 +3694,33 @@ EXPORTS _ZTV26QAbstractTransitionPrivate @ 3693 NONAME _ZTV6QState @ 3694 NONAME _Zls6QDebugRK12QEasingCurve @ 3695 NONAME + _Z12qt_s60GetRFsv @ 3696 NONAME + _Z21qt_regexp_toCanonicalRK7QStringN7QRegExp13PatternSyntaxE @ 3697 NONAME + _ZN16QEventTransition14setEventSourceEP7QObject @ 3698 NONAME + _ZN16QXmlStreamReader15readElementTextENS_24ReadElementTextBehaviourE @ 3699 NONAME + _ZN16QXmlStreamReader18skipCurrentElementEv @ 3700 NONAME + _ZN16QXmlStreamReader20readNextStartElementEv @ 3701 NONAME + _ZN19QProcessEnvironment17systemEnvironmentEv @ 3702 NONAME + _ZN19QProcessEnvironment5clearEv @ 3703 NONAME + _ZN19QProcessEnvironment6insertERK7QStringS2_ @ 3704 NONAME + _ZN19QProcessEnvironment6removeERK7QString @ 3705 NONAME + _ZN19QProcessEnvironmentC1ERKS_ @ 3706 NONAME + _ZN19QProcessEnvironmentC1Ev @ 3707 NONAME + _ZN19QProcessEnvironmentC2ERKS_ @ 3708 NONAME + _ZN19QProcessEnvironmentC2Ev @ 3709 NONAME + _ZN19QProcessEnvironmentD1Ev @ 3710 NONAME + _ZN19QProcessEnvironmentD2Ev @ 3711 NONAME + _ZN19QProcessEnvironmentaSERKS_ @ 3712 NONAME + _ZN8QProcess21setProcessEnvironmentERK19QProcessEnvironment @ 3713 NONAME + _ZN8QVariantC1EiPKvj @ 3714 NONAME + _ZN8QVariantC2EiPKvj @ 3715 NONAME + _ZNK14QObjectPrivate11signalIndexEPKc @ 3716 NONAME + _ZNK14QObjectPrivate17isSignalConnectedEi @ 3717 NONAME + _ZNK16QEventTransition11eventSourceEv @ 3718 NONAME + _ZNK19QProcessEnvironment12toStringListEv @ 3719 NONAME + _ZNK19QProcessEnvironment5valueERK7QStringS2_ @ 3720 NONAME + _ZNK19QProcessEnvironment7isEmptyEv @ 3721 NONAME + _ZNK19QProcessEnvironment8containsERK7QString @ 3722 NONAME + _ZNK19QProcessEnvironmenteqERKS_ @ 3723 NONAME + _ZNK8QProcess18processEnvironmentEv @ 3724 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index c8ccec3..0019187 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -4532,7 +4532,7 @@ EXPORTS _ZN20QGraphicsEllipseItemD1Ev @ 4531 NONAME _ZN20QGraphicsEllipseItemD2Ev @ 4532 NONAME _ZN20QGraphicsItemPrivate12remapItemPosEP6QEventP13QGraphicsItem @ 4533 NONAME - _ZN20QGraphicsItemPrivate12resolveDepthEi @ 4534 NONAME + _ZN20QGraphicsItemPrivate12resolveDepthEi @ 4534 NONAME ABSENT _ZN20QGraphicsItemPrivate12setPosHelperERK7QPointF @ 4535 NONAME _ZN20QGraphicsItemPrivate12updateHelperERK6QRectFbb @ 4536 NONAME ABSENT _ZN20QGraphicsItemPrivate16fullUpdateHelperEbbb @ 4537 NONAME ABSENT @@ -4991,7 +4991,7 @@ EXPORTS _ZN23QImageTextureGlyphCache17resizeTextureDataEii @ 4990 NONAME ABSENT _ZN23QPixmapDropShadowFilter11qt_metacallEN11QMetaObject4CallEiPPv @ 4991 NONAME _ZN23QPixmapDropShadowFilter11qt_metacastEPKc @ 4992 NONAME - _ZN23QPixmapDropShadowFilter13setBlurRadiusEf @ 4993 NONAME + _ZN23QPixmapDropShadowFilter13setBlurRadiusEf @ 4993 NONAME ABSENT _ZN23QPixmapDropShadowFilter16staticMetaObjectE @ 4994 NONAME DATA 16 _ZN23QPixmapDropShadowFilter8setColorERK6QColor @ 4995 NONAME _ZN23QPixmapDropShadowFilter9setOffsetERK7QPointF @ 4996 NONAME @@ -11671,8 +11671,8 @@ EXPORTS _ZN11QPanGesture16staticMetaObjectE @ 11670 NONAME DATA 16 _ZN11QPanGesture5eventEP6QEvent @ 11671 NONAME _ZN11QPanGesture5resetEv @ 11672 NONAME - _ZN11QPanGestureC1EP7QWidget @ 11673 NONAME - _ZN11QPanGestureC2EP7QWidget @ 11674 NONAME + _ZN11QPanGestureC1EP7QWidget @ 11673 NONAME ABSENT + _ZN11QPanGestureC2EP7QWidget @ 11674 NONAME ABSENT _ZN11QPixmapData6scrollEiiRK5QRect @ 11675 NONAME _ZN11QProxyStyle11qt_metacallEN11QMetaObject4CallEiPPv @ 11676 NONAME _ZN11QProxyStyle11qt_metacastEPKc @ 11677 NONAME @@ -11802,15 +11802,15 @@ EXPORTS _ZN13QPinchGesture16staticMetaObjectE @ 11801 NONAME DATA 16 _ZN13QPinchGesture5eventEP6QEvent @ 11802 NONAME _ZN13QPinchGesture5resetEv @ 11803 NONAME - _ZN13QPinchGestureC1EP7QWidget @ 11804 NONAME - _ZN13QPinchGestureC2EP7QWidget @ 11805 NONAME + _ZN13QPinchGestureC1EP7QWidget @ 11804 NONAME ABSENT + _ZN13QPinchGestureC2EP7QWidget @ 11805 NONAME ABSENT _ZN14QDesktopWidget18screenCountChangedEi @ 11806 NONAME _ZN14QGraphicsScale11qt_metacallEN11QMetaObject4CallEiPPv @ 11807 NONAME _ZN14QGraphicsScale11qt_metacastEPKc @ 11808 NONAME _ZN14QGraphicsScale12scaleChangedEv @ 11809 NONAME _ZN14QGraphicsScale13originChangedEv @ 11810 NONAME _ZN14QGraphicsScale16staticMetaObjectE @ 11811 NONAME DATA 16 - _ZN14QGraphicsScale9setOriginERK7QPointF @ 11812 NONAME + _ZN14QGraphicsScale9setOriginERK7QPointF @ 11812 NONAME ABSENT _ZN14QGraphicsScale9setXScaleEf @ 11813 NONAME _ZN14QGraphicsScale9setYScaleEf @ 11814 NONAME _ZN14QGraphicsScaleC1EP7QObject @ 11815 NONAME @@ -11856,7 +11856,7 @@ EXPORTS _ZN17QGraphicsRotation7setAxisEN2Qt4AxisE @ 11855 NONAME _ZN17QGraphicsRotation7setAxisERK9QVector3D @ 11856 NONAME _ZN17QGraphicsRotation8setAngleEf @ 11857 NONAME - _ZN17QGraphicsRotation9setOriginERK7QPointF @ 11858 NONAME + _ZN17QGraphicsRotation9setOriginERK7QPointF @ 11858 NONAME ABSENT _ZN17QGraphicsRotationC1EP7QObject @ 11859 NONAME _ZN17QGraphicsRotationC2EP7QObject @ 11860 NONAME _ZN17QGraphicsRotationD0Ev @ 11861 NONAME @@ -12048,8 +12048,8 @@ EXPORTS _ZN8QGesture8finishedEv @ 12047 NONAME _ZN8QGesture9cancelledEv @ 12048 NONAME _ZN8QGesture9triggeredEv @ 12049 NONAME - _ZN8QGestureC2EP7QObject @ 12050 NONAME - _ZN8QGestureC2ER15QGesturePrivateP7QObject @ 12051 NONAME + _ZN8QGestureC2EP7QObject @ 12050 NONAME ABSENT + _ZN8QGestureC2ER15QGesturePrivateP7QObject @ 12051 NONAME ABSENT _ZN8QGestureD0Ev @ 12052 NONAME _ZN8QGestureD1Ev @ 12053 NONAME _ZN8QGestureD2Ev @ 12054 NONAME @@ -12084,7 +12084,7 @@ EXPORTS _ZNK10QCompleter15maxVisibleItemsEv @ 12083 NONAME _ZNK10QMatrix4x410transposedEv @ 12084 NONAME _ZNK10QMatrix4x411determinantEv @ 12085 NONAME - _ZNK10QMatrix4x411toTransformEv @ 12086 NONAME + _ZNK10QMatrix4x411toTransformEv @ 12086 NONAME ABSENT _ZNK10QMatrix4x412normalMatrixEv @ 12087 NONAME _ZNK10QMatrix4x412toValueArrayEPf @ 12088 NONAME _ZNK10QMatrix4x418extractTranslationEv @ 12089 NONAME @@ -12177,7 +12177,7 @@ EXPORTS _ZNK14QGraphicsScale6originEv @ 12176 NONAME _ZNK14QGraphicsScale6xScaleEv @ 12177 NONAME _ZNK14QGraphicsScale6yScaleEv @ 12178 NONAME - _ZNK14QGraphicsScale7applyToEP10QTransform @ 12179 NONAME + _ZNK14QGraphicsScale7applyToEP10QTransform @ 12179 NONAME ABSENT _ZNK14QGraphicsScene5itemsEN2Qt9SortOrderE @ 12180 NONAME _ZNK14QGraphicsScene5itemsERK12QPainterPathN2Qt17ItemSelectionModeENS3_9SortOrderERK10QTransform @ 12181 NONAME _ZNK14QGraphicsScene5itemsERK6QRectFN2Qt17ItemSelectionModeENS3_9SortOrderERK10QTransform @ 12182 NONAME @@ -12194,9 +12194,9 @@ EXPORTS _ZNK17QGraphicsRotation4axisEv @ 12193 NONAME _ZNK17QGraphicsRotation5angleEv @ 12194 NONAME _ZNK17QGraphicsRotation6originEv @ 12195 NONAME - _ZNK17QGraphicsRotation7applyToEP10QTransform @ 12196 NONAME + _ZNK17QGraphicsRotation7applyToEP10QTransform @ 12196 NONAME ABSENT _ZNK18QGraphicsTransform10metaObjectEv @ 12197 NONAME - _ZNK18QGraphicsTransform9transformEv @ 12198 NONAME + _ZNK18QGraphicsTransform9transformEv @ 12198 NONAME ABSENT _ZNK18QTextureGlyphCache18textureMapForGlyphEj @ 12199 NONAME _ZNK19QDockAreaLayoutInfo12hasFixedSizeEv @ 12200 NONAME _ZNK19QDockAreaLayoutInfo13separatorRectERK5QListIiE @ 12201 NONAME @@ -12318,4 +12318,196 @@ EXPORTS _ZrsR11QDataStreamR9QVector2D @ 12317 NONAME _ZrsR11QDataStreamR9QVector3D @ 12318 NONAME _ZrsR11QDataStreamR9QVector4D @ 12319 NONAME + _ZN11QPanGestureC1EP7QWidgetP7QObject @ 12320 NONAME + _ZN11QPanGestureC2EP7QWidgetP7QObject @ 12321 NONAME + _ZN13QGraphicsItem17setGraphicsEffectEP15QGraphicsEffect @ 12322 NONAME + _ZN13QPinchGestureC1EP7QWidgetP7QObject @ 12323 NONAME + _ZN13QPinchGestureC2EP7QWidgetP7QObject @ 12324 NONAME + _ZN14QGraphicsScale9setOriginERK9QVector3D @ 12325 NONAME + _ZN14QGraphicsScale9setZScaleEf @ 12326 NONAME + _ZN15QGraphicsEffect10setEnabledEb @ 12327 NONAME + _ZN15QGraphicsEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 12328 NONAME + _ZN15QGraphicsEffect11qt_metacastEPKc @ 12329 NONAME + _ZN15QGraphicsEffect13sourceChangedE6QFlagsINS_10ChangeFlagEE @ 12330 NONAME + _ZN15QGraphicsEffect14enabledChangedEb @ 12331 NONAME + _ZN15QGraphicsEffect16staticMetaObjectE @ 12332 NONAME DATA 16 + _ZN15QGraphicsEffect18updateBoundingRectEv @ 12333 NONAME + _ZN15QGraphicsEffectC2EP7QObject @ 12334 NONAME + _ZN15QGraphicsEffectC2ER22QGraphicsEffectPrivateP7QObject @ 12335 NONAME + _ZN15QGraphicsEffectD0Ev @ 12336 NONAME + _ZN15QGraphicsEffectD1Ev @ 12337 NONAME + _ZN15QGraphicsEffectD2Ev @ 12338 NONAME + _ZN17QGraphicsRotation9setOriginERK9QVector3D @ 12339 NONAME + _ZN17QPixmapBlurFilter10setQualityEN2Qt18TransformationModeE @ 12340 NONAME + _ZN17QPixmapBlurFilter11qt_metacallEN11QMetaObject4CallEiPPv @ 12341 NONAME + _ZN17QPixmapBlurFilter11qt_metacastEPKc @ 12342 NONAME + _ZN17QPixmapBlurFilter16staticMetaObjectE @ 12343 NONAME DATA 16 + _ZN17QPixmapBlurFilter9setRadiusEi @ 12344 NONAME + _ZN17QPixmapBlurFilterC1EP7QObject @ 12345 NONAME + _ZN17QPixmapBlurFilterC2EP7QObject @ 12346 NONAME + _ZN17QPixmapBlurFilterD0Ev @ 12347 NONAME + _ZN17QPixmapBlurFilterD1Ev @ 12348 NONAME + _ZN17QPixmapBlurFilterD2Ev @ 12349 NONAME + _ZN19QGraphicsBlurEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 12350 NONAME + _ZN19QGraphicsBlurEffect11qt_metacastEPKc @ 12351 NONAME + _ZN19QGraphicsBlurEffect13setBlurRadiusEi @ 12352 NONAME + _ZN19QGraphicsBlurEffect16staticMetaObjectE @ 12353 NONAME DATA 16 + _ZN19QGraphicsBlurEffect17blurRadiusChangedEi @ 12354 NONAME + _ZN19QGraphicsBlurEffect4drawEP8QPainterP21QGraphicsEffectSource @ 12355 NONAME + _ZN19QGraphicsBlurEffectC1EP7QObject @ 12356 NONAME + _ZN19QGraphicsBlurEffectC2EP7QObject @ 12357 NONAME + _ZN19QGraphicsBlurEffectD0Ev @ 12358 NONAME + _ZN19QGraphicsBlurEffectD1Ev @ 12359 NONAME + _ZN19QGraphicsBlurEffectD2Ev @ 12360 NONAME + _ZN20QGraphicsItemPrivate12resolveDepthEv @ 12361 NONAME + _ZN20QGraphicsItemPrivate26invalidateDepthRecursivelyEv @ 12362 NONAME + _ZN21QGraphicsAnchorLayout10invalidateEv @ 12363 NONAME + _ZN21QGraphicsAnchorLayout10setSpacingEf @ 12364 NONAME + _ZN21QGraphicsAnchorLayout11setGeometryERK6QRectF @ 12365 NONAME + _ZN21QGraphicsAnchorLayout12removeAnchorEP19QGraphicsLayoutItemN2Qt11AnchorPointES1_S3_ @ 12366 NONAME + _ZN21QGraphicsAnchorLayout16addCornerAnchorsEP19QGraphicsLayoutItemN2Qt6CornerES1_S3_ @ 12367 NONAME + _ZN21QGraphicsAnchorLayout16setAnchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_f @ 12368 NONAME + _ZN21QGraphicsAnchorLayout18setVerticalSpacingEf @ 12369 NONAME + _ZN21QGraphicsAnchorLayout18unsetAnchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_ @ 12370 NONAME + _ZN21QGraphicsAnchorLayout20setHorizontalSpacingEf @ 12371 NONAME + _ZN21QGraphicsAnchorLayout8removeAtEi @ 12372 NONAME + _ZN21QGraphicsAnchorLayout9addAnchorEP19QGraphicsLayoutItemN2Qt11AnchorPointES1_S3_ @ 12373 NONAME + _ZN21QGraphicsAnchorLayoutC1EP19QGraphicsLayoutItem @ 12374 NONAME + _ZN21QGraphicsAnchorLayoutC2EP19QGraphicsLayoutItem @ 12375 NONAME + _ZN21QGraphicsAnchorLayoutD0Ev @ 12376 NONAME + _ZN21QGraphicsAnchorLayoutD1Ev @ 12377 NONAME + _ZN21QGraphicsAnchorLayoutD2Ev @ 12378 NONAME + _ZN21QGraphicsEffectSource11qt_metacallEN11QMetaObject4CallEiPPv @ 12379 NONAME + _ZN21QGraphicsEffectSource11qt_metacastEPKc @ 12380 NONAME + _ZN21QGraphicsEffectSource16staticMetaObjectE @ 12381 NONAME DATA 16 + _ZN21QGraphicsEffectSource4drawEP8QPainter @ 12382 NONAME + _ZN21QGraphicsEffectSource6updateEv @ 12383 NONAME + _ZN21QGraphicsEffectSourceC1ER28QGraphicsEffectSourcePrivateP7QObject @ 12384 NONAME + _ZN21QGraphicsEffectSourceC2ER28QGraphicsEffectSourcePrivateP7QObject @ 12385 NONAME + _ZN21QGraphicsEffectSourceD0Ev @ 12386 NONAME + _ZN21QGraphicsEffectSourceD1Ev @ 12387 NONAME + _ZN21QGraphicsEffectSourceD2Ev @ 12388 NONAME + _ZN23QGraphicsColorizeEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 12389 NONAME + _ZN23QGraphicsColorizeEffect11qt_metacastEPKc @ 12390 NONAME + _ZN23QGraphicsColorizeEffect12colorChangedERK6QColor @ 12391 NONAME + _ZN23QGraphicsColorizeEffect16staticMetaObjectE @ 12392 NONAME DATA 16 + _ZN23QGraphicsColorizeEffect4drawEP8QPainterP21QGraphicsEffectSource @ 12393 NONAME + _ZN23QGraphicsColorizeEffect8setColorERK6QColor @ 12394 NONAME + _ZN23QGraphicsColorizeEffectC1EP7QObject @ 12395 NONAME + _ZN23QGraphicsColorizeEffectC2EP7QObject @ 12396 NONAME + _ZN23QGraphicsColorizeEffectD0Ev @ 12397 NONAME + _ZN23QGraphicsColorizeEffectD1Ev @ 12398 NONAME + _ZN23QGraphicsColorizeEffectD2Ev @ 12399 NONAME + _ZN23QGraphicsPixelizeEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 12400 NONAME + _ZN23QGraphicsPixelizeEffect11qt_metacastEPKc @ 12401 NONAME + _ZN23QGraphicsPixelizeEffect12setPixelSizeEi @ 12402 NONAME + _ZN23QGraphicsPixelizeEffect16pixelSizeChangedEi @ 12403 NONAME + _ZN23QGraphicsPixelizeEffect16staticMetaObjectE @ 12404 NONAME DATA 16 + _ZN23QGraphicsPixelizeEffect4drawEP8QPainterP21QGraphicsEffectSource @ 12405 NONAME + _ZN23QGraphicsPixelizeEffectC1EP7QObject @ 12406 NONAME + _ZN23QGraphicsPixelizeEffectC2EP7QObject @ 12407 NONAME + _ZN23QGraphicsPixelizeEffectD0Ev @ 12408 NONAME + _ZN23QGraphicsPixelizeEffectD1Ev @ 12409 NONAME + _ZN23QGraphicsPixelizeEffectD2Ev @ 12410 NONAME + _ZN23QPixmapDropShadowFilter13setBlurRadiusEi @ 12411 NONAME + _ZN24QGraphicsGrayscaleEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 12412 NONAME + _ZN24QGraphicsGrayscaleEffect11qt_metacastEPKc @ 12413 NONAME + _ZN24QGraphicsGrayscaleEffect16staticMetaObjectE @ 12414 NONAME DATA 16 + _ZN24QGraphicsGrayscaleEffect4drawEP8QPainterP21QGraphicsEffectSource @ 12415 NONAME + _ZN24QGraphicsGrayscaleEffectC1EP7QObject @ 12416 NONAME + _ZN24QGraphicsGrayscaleEffectC2EP7QObject @ 12417 NONAME + _ZN24QGraphicsGrayscaleEffectD0Ev @ 12418 NONAME + _ZN24QGraphicsGrayscaleEffectD1Ev @ 12419 NONAME + _ZN24QGraphicsGrayscaleEffectD2Ev @ 12420 NONAME + _ZN25QGraphicsDropShadowEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 12421 NONAME + _ZN25QGraphicsDropShadowEffect11qt_metacastEPKc @ 12422 NONAME + _ZN25QGraphicsDropShadowEffect12colorChangedERK6QColor @ 12423 NONAME + _ZN25QGraphicsDropShadowEffect13offsetChangedERK7QPointF @ 12424 NONAME + _ZN25QGraphicsDropShadowEffect13setBlurRadiusEi @ 12425 NONAME + _ZN25QGraphicsDropShadowEffect16staticMetaObjectE @ 12426 NONAME DATA 16 + _ZN25QGraphicsDropShadowEffect17blurRadiusChangedEi @ 12427 NONAME + _ZN25QGraphicsDropShadowEffect4drawEP8QPainterP21QGraphicsEffectSource @ 12428 NONAME + _ZN25QGraphicsDropShadowEffect8setColorERK6QColor @ 12429 NONAME + _ZN25QGraphicsDropShadowEffect9setOffsetERK7QPointF @ 12430 NONAME + _ZN25QGraphicsDropShadowEffectC1EP7QObject @ 12431 NONAME + _ZN25QGraphicsDropShadowEffectC2EP7QObject @ 12432 NONAME + _ZN25QGraphicsDropShadowEffectD0Ev @ 12433 NONAME + _ZN25QGraphicsDropShadowEffectD1Ev @ 12434 NONAME + _ZN25QGraphicsDropShadowEffectD2Ev @ 12435 NONAME + _ZN7QWidget17setGraphicsEffectEP15QGraphicsEffect @ 12436 NONAME + _ZN8QGesture16setGestureTargetEP7QObject @ 12437 NONAME + _ZN8QGestureC2EP7QObjectS1_ @ 12438 NONAME + _ZN8QGestureC2ER15QGesturePrivateP7QObjectS3_ @ 12439 NONAME + _ZNK10QMatrix4x411toTransformEf @ 12440 NONAME + _ZNK10QMatrix4x4cv8QVariantEv @ 12441 NONAME + _ZNK11QQuaternioncv8QVariantEv @ 12442 NONAME + _ZNK13QGraphicsItem14graphicsEffectEv @ 12443 NONAME + _ZNK14QGraphicsScale6zScaleEv @ 12444 NONAME + _ZNK14QGraphicsScale7applyToEP10QMatrix4x4 @ 12445 NONAME + _ZNK15QGraphicsEffect10metaObjectEv @ 12446 NONAME + _ZNK15QGraphicsEffect12boundingRectEv @ 12447 NONAME + _ZNK15QGraphicsEffect15boundingRectForERK6QRectF @ 12448 NONAME + _ZNK15QGraphicsEffect6sourceEv @ 12449 NONAME + _ZNK15QGraphicsEffect9isEnabledEv @ 12450 NONAME + _ZNK17QGraphicsRotation7applyToEP10QMatrix4x4 @ 12451 NONAME + _ZNK17QPixmapBlurFilter10metaObjectEv @ 12452 NONAME + _ZNK17QPixmapBlurFilter15boundingRectForERK6QRectF @ 12453 NONAME + _ZNK17QPixmapBlurFilter4drawEP8QPainterRK7QPointFRK7QPixmapRK6QRectF @ 12454 NONAME + _ZNK17QPixmapBlurFilter6radiusEv @ 12455 NONAME + _ZNK17QPixmapBlurFilter7qualityEv @ 12456 NONAME + _ZNK19QGraphicsBlurEffect10blurRadiusEv @ 12457 NONAME + _ZNK19QGraphicsBlurEffect10metaObjectEv @ 12458 NONAME + _ZNK19QGraphicsBlurEffect15boundingRectForERK6QRectF @ 12459 NONAME + _ZNK20QGraphicsItemPrivate21effectiveBoundingRectEv @ 12460 NONAME + _ZNK20QGraphicsItemPrivate26sceneEffectiveBoundingRectEv @ 12461 NONAME + _ZNK20QGraphicsItemPrivate5depthEv @ 12462 NONAME + _ZNK21QGraphicsAnchorLayout13anchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_ @ 12463 NONAME + _ZNK21QGraphicsAnchorLayout15verticalSpacingEv @ 12464 NONAME + _ZNK21QGraphicsAnchorLayout17horizontalSpacingEv @ 12465 NONAME + _ZNK21QGraphicsAnchorLayout5countEv @ 12466 NONAME + _ZNK21QGraphicsAnchorLayout6itemAtEi @ 12467 NONAME + _ZNK21QGraphicsAnchorLayout8sizeHintEN2Qt8SizeHintERK6QSizeF @ 12468 NONAME + _ZNK21QGraphicsEffectSource10deviceRectEv @ 12469 NONAME + _ZNK21QGraphicsEffectSource10metaObjectEv @ 12470 NONAME + _ZNK21QGraphicsEffectSource11styleOptionEv @ 12471 NONAME + _ZNK21QGraphicsEffectSource12boundingRectEN2Qt16CoordinateSystemE @ 12472 NONAME + _ZNK21QGraphicsEffectSource12graphicsItemEv @ 12473 NONAME + _ZNK21QGraphicsEffectSource6pixmapEN2Qt16CoordinateSystemEP6QPoint @ 12474 NONAME + _ZNK21QGraphicsEffectSource6widgetEv @ 12475 NONAME + _ZNK21QGraphicsEffectSource8isPixmapEv @ 12476 NONAME + _ZNK23QGraphicsColorizeEffect10metaObjectEv @ 12477 NONAME + _ZNK23QGraphicsColorizeEffect5colorEv @ 12478 NONAME + _ZNK23QGraphicsPixelizeEffect10metaObjectEv @ 12479 NONAME + _ZNK23QGraphicsPixelizeEffect9pixelSizeEv @ 12480 NONAME + _ZNK24QGraphicsGrayscaleEffect10metaObjectEv @ 12481 NONAME + _ZNK25QGraphicsDropShadowEffect10blurRadiusEv @ 12482 NONAME + _ZNK25QGraphicsDropShadowEffect10metaObjectEv @ 12483 NONAME + _ZNK25QGraphicsDropShadowEffect15boundingRectForERK6QRectF @ 12484 NONAME + _ZNK25QGraphicsDropShadowEffect5colorEv @ 12485 NONAME + _ZNK25QGraphicsDropShadowEffect6offsetEv @ 12486 NONAME + _ZNK7QWidget14graphicsEffectEv @ 12487 NONAME + _ZNK8QGesture13gestureTargetEv @ 12488 NONAME + _ZNK9QVector2Dcv8QVariantEv @ 12489 NONAME + _ZNK9QVector3Dcv8QVariantEv @ 12490 NONAME + _ZNK9QVector4Dcv8QVariantEv @ 12491 NONAME + _ZTI15QGraphicsEffect @ 12492 NONAME + _ZTI17QPixmapBlurFilter @ 12493 NONAME + _ZTI19QGraphicsBlurEffect @ 12494 NONAME + _ZTI21QGraphicsAnchorLayout @ 12495 NONAME + _ZTI21QGraphicsEffectSource @ 12496 NONAME + _ZTI22QGraphicsEffectPrivate @ 12497 NONAME + _ZTI23QGraphicsColorizeEffect @ 12498 NONAME + _ZTI23QGraphicsPixelizeEffect @ 12499 NONAME + _ZTI24QGraphicsGrayscaleEffect @ 12500 NONAME + _ZTI25QGraphicsDropShadowEffect @ 12501 NONAME + _ZTV15QGraphicsEffect @ 12502 NONAME + _ZTV17QPixmapBlurFilter @ 12503 NONAME + _ZTV19QGraphicsBlurEffect @ 12504 NONAME + _ZTV21QGraphicsAnchorLayout @ 12505 NONAME + _ZTV21QGraphicsEffectSource @ 12506 NONAME + _ZTV22QGraphicsEffectPrivate @ 12507 NONAME + _ZTV23QGraphicsColorizeEffect @ 12508 NONAME + _ZTV23QGraphicsPixelizeEffect @ 12509 NONAME + _ZTV24QGraphicsGrayscaleEffect @ 12510 NONAME + _ZTV25QGraphicsDropShadowEffect @ 12511 NONAME diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp index 13e8c95..c00ca7a 100644 --- a/tests/auto/qdir/tst_qdir.cpp +++ b/tests/auto/qdir/tst_qdir.cpp @@ -1262,7 +1262,7 @@ void tst_QDir::homePath() #ifdef Q_OS_UNIX if (strHome.length() > 1) // root dir = "/" QVERIFY(!strHome.endsWith('/')); -#elif defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#elif defined(Q_OS_WIN) if (strHome.length() > 3) // root dir = "c:/"; "//" is not really valid... QVERIFY(!strHome.endsWith('/')); #endif @@ -1286,7 +1286,7 @@ void tst_QDir::tempPath() #ifdef Q_OS_UNIX if (path.length() > 1) // root dir = "/" QVERIFY(!path.endsWith('/')); -#elif defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +#elif defined(Q_OS_WIN) if (path.length() > 3) // root dir = "c:/"; "//" is not really valid... QVERIFY(!path.endsWith('/')); #endif |