Allow multiple Datafolder instances based on branch & release status

This commit is contained in:
Mark Watkins 2018-06-06 09:01:22 +10:00
parent 0e1df59cd3
commit ad0905db07
2 changed files with 9 additions and 4 deletions

View File

@ -11,6 +11,7 @@
#include <QThread>
#include <zlib.h>
#include "version.h"
#include "profiles.h"
// Used by internal settings
@ -23,6 +24,11 @@ const QString getDeveloperName()
const QString getAppName()
{
QString name = STR_AppName;
#ifdef GIT_BRANCH
if ((QString(GIT_BRANCH) != "master") || (!((ReleaseStatus.compare("r", Qt::CaseInsensitive)==0) || (ReleaseStatus.compare("rc", Qt::CaseInsensitive)==0) || (ReleaseStatus.compare("beta", Qt::CaseInsensitive)==0)))) {
name += "-"+QString(GIT_BRANCH);
}
#endif
return name;
}

View File

@ -55,7 +55,7 @@ void sDelay(int s)
int compareVersion(QString version);
void MigrateSettings()
/*void MigrateSettings()
{
QSettings settings(getDeveloperName(), getAppName());
if (settings.contains("Version")) { return; } // done, we are new
@ -76,7 +76,7 @@ void MigrateSettings()
qDebug() << keys;
}
} */
int main(int argc, char *argv[])
@ -93,8 +93,7 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
QStringList args = QCoreApplication::arguments();
// Ok, first things first... Migrate the -Testing QSettings over
MigrateSettings();
// MigrateSettings();
QSettings settings(getDeveloperName(), getAppName());