diff -r 6fbed849b4f4 -r 1f895d8a5b2b qtmobility/tests/auto/qsfwtestutil.cpp --- a/qtmobility/tests/auto/qsfwtestutil.cpp Wed Jun 23 19:08:38 2010 +0300 +++ b/qtmobility/tests/auto/qsfwtestutil.cpp Tue Jul 06 15:12:50 2010 +0300 @@ -89,19 +89,12 @@ QString QSfwTestUtil::tempSettingsPath(const char *path) { -#if defined(Q_OS_SYMBIAN) && defined(__WINS__) - // On emulator, use hardcoded path instead of private directories to - // enable a shared database. - Q_UNUSED(path); - return QDir::toNativeSeparators("C:/Data/temp/QtServiceFW"); -#else // Temporary path for files that are specified explictly in the constructor. //QString tempPath = QDir::tempPath(); QString tempPath = QCoreApplication::applicationDirPath(); if (tempPath.endsWith("/")) tempPath.truncate(tempPath.size() - 1); return QDir::toNativeSeparators(tempPath + "/QtServiceFramework_tests/" + QLatin1String(path)); -#endif } void QSfwTestUtil::removeDirectory(const QString &path) @@ -122,11 +115,13 @@ dir.rmpath(path); } -#if defined(Q_OS_SYMBIAN) && !defined(__WINS__) +#if defined(Q_OS_SYMBIAN) #include -#include -void QSfwTestUtil::removeDatabases() +void QSfwTestUtil::removeDatabases_symbian() { +#if defined(__WINS__) && !defined(SYMBIAN_EMULATOR_SUPPORTS_PERPROCESS_WSD) + QDir dir("C:/Data/temp/QtServiceFW"); +#else TFindServer findServer(_L("!qsfwdatabasemanagerserver")); TFullName name; if (findServer.Next(name) == KErrNone) @@ -139,12 +134,13 @@ } } - RFs fs; - fs.Connect(); - CleanupClosePushL(fs); - CFileMan* fileMan=CFileMan::NewL(fs); - CleanupStack::PushL(fileMan); - fileMan->Delete(_L("c:\\private\\2002AC7F\\QtServiceFramework_4.6_system.db")); //Server's fixed UID3 - CleanupStack::PopAndDestroy(2, &fs); + QDir dir("c:/private/2002AC7F"); +#endif + + QString qtVersion(qVersion()); + qtVersion = qtVersion.left(qtVersion.size() - 2); //strip off patch version + QString dbIdentifier = "_system"; + QString dbName = QString("QtServiceFramework_") + qtVersion + dbIdentifier + QLatin1String(".db"); + QFile::remove(QDir::toNativeSeparators(dir.path() + QDir::separator() + dbName)); } #endif