X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;h=9c92faf105ee60d429e91ff48e1ca23cd29135b2;hp=bf0395edee4ebbeb2b21ee5812188c59828f9f13;hb=54b63529caa0c113da1bee150e574f9857499326;hpb=63cd73c7a036ce3c4f6ca7428a7c0939c1640a1e diff --git a/src/core/core.cpp b/src/core/core.cpp index bf0395ed..9c92faf1 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -57,16 +57,21 @@ Core::Core() : storage(0) { // FIXME: MIGRATION 0.3 -> 0.4: Move database and core config to new location // Move settings, note this does not delete the old files -#ifdef Q_WS_WIN - QSettings::Format format = QSettings::IniFormat; +#ifdef Q_WS_MAC + QSettings newSettings("quassel-irc.org", "quasselcore"); #else - QSettings::Format format = QSettings::NativeFormat; -#endif - QString newFilePath = Quassel::configDirPath() + "quasselcore" - + ((format == QSettings::NativeFormat) ? QLatin1String(".conf") : QLatin1String(".ini")); - QSettings newSettings(newFilePath, format); - if(newSettings.value("General/Version").toUInt() != 1) { +# ifdef Q_WS_WIN + QSettings::Format format = QSettings::IniFormat; +# else + QSettings::Format format = QSettings::NativeFormat; +# endif + QString newFilePath = Quassel::configDirPath() + "quasselcore" + + ((format == QSettings::NativeFormat) ? QLatin1String(".conf") : QLatin1String(".ini")); + QSettings newSettings(newFilePath, format); +#endif /* Q_WS_MAC */ + + if(newSettings.value("Config/Version").toUInt() != 1) { qWarning() << "\n\n*** IMPORTANT: Config and data file locations have changed. Attempting to auto-migrate your core settings..."; # ifdef Q_WS_MAC QString org = "quassel-irc.org"; @@ -80,6 +85,7 @@ Core::Core() : storage(0) { newSettings.setValue("Config/Version", 1); qWarning() << "* Your core settings have been migrated to" << newFilePath; +#ifndef Q_WS_MAC /* we don't need to move the db and cert for mac */ #ifdef Q_OS_WIN32 QString quasselDir = qgetenv("APPDATA") + "/quassel/"; #elif defined Q_WS_MAC @@ -113,7 +119,7 @@ Core::Core() : storage(0) { qWarning() << "*** Migration completed.\n\n"; } } - +#endif /* !Q_WS_MAC */ // MIGRATION end // Register storage backends here!