557 { |
557 { |
558 QString dbIdentifier = "_system"; |
558 QString dbIdentifier = "_system"; |
559 ServiceDatabase *db = iDb; |
559 ServiceDatabase *db = iDb; |
560 #ifdef __WINS__ |
560 #ifdef __WINS__ |
561 // In emulator use commmon place for service database |
561 // In emulator use commmon place for service database |
562 // instead of server's private directory (on emulator server is in thread so it |
562 // instead of server's private directory (on emulator the server runs in the application's |
563 // doesn't get its own private directory). |
563 // process - using private dir would mean that each application has its own storage, which others |
|
564 // can't see. |
564 QDir dir(QDir::toNativeSeparators("C:\\Data\\temp\\QtServiceFW")); |
565 QDir dir(QDir::toNativeSeparators("C:\\Data\\temp\\QtServiceFW")); |
565 #else |
566 #else |
566 // On hardware, use this DB server's private directory (C:/Private/<UID3>) |
567 // On hardware, use this DB server's private directory (C:/Private/<UID3>) |
567 QDir dir(QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "\\Nokia")); |
568 QDir dir(QDir::toNativeSeparators(QCoreApplication::applicationDirPath())); |
568 #endif |
569 #endif |
569 QString qtVersion(qVersion()); |
570 QString qtVersion(qVersion()); |
570 qtVersion = qtVersion.left(qtVersion.size() -2); //strip off patch version |
571 qtVersion = qtVersion.left(qtVersion.size() -2); //strip off patch version |
571 QString dbName = QString("QtServiceFramework_") + qtVersion + dbIdentifier + QLatin1String(".db"); |
572 QString dbName = QString("QtServiceFramework_") + qtVersion + dbIdentifier + QLatin1String(".db"); |
572 db->setDatabasePath(dir.path() + QDir::separator() + dbName); |
573 db->setDatabasePath(dir.path() + QDir::separator() + dbName); |