One settings to rule them all ! (#5449)
This commit is contained in:
@@ -589,9 +589,8 @@ void AppData::init()
|
||||
getset( _snapshotDir, "snapshotpath" ,"" );
|
||||
getset( _updatesDir, "lastUpdatesDir" ,"" );
|
||||
|
||||
getset( _firmwareBranch, "firmwareBranch", BRANCH_RELEASE_STABLE);
|
||||
getset( _companionBranch, "companionBranch", BRANCH_RELEASE_STABLE);
|
||||
|
||||
getset( _OpenTxBranch, "OpenTxBranch", BRANCH_RELEASE_STABLE);
|
||||
|
||||
appLogsDir_init();
|
||||
enableBackup_init();
|
||||
backupOnFlash_init();
|
||||
@@ -698,7 +697,7 @@ bool AppData::findPreviousVersionSettings(QString * version)
|
||||
if (!fromSettings)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AppData::importSettings(QString fromVersion)
|
||||
@@ -707,7 +706,7 @@ bool AppData::importSettings(QString fromVersion)
|
||||
|
||||
QString fromCompany;
|
||||
QString fromProduct;
|
||||
|
||||
|
||||
upgradeFromVersion = "";
|
||||
|
||||
if (fromVersion == "2.1") {
|
||||
@@ -724,7 +723,7 @@ bool AppData::importSettings(QString fromVersion)
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
|
||||
upgradeFromVersion = fromVersion;
|
||||
|
||||
QSettings fromSettings(fromCompany, fromProduct);
|
||||
|
||||
@@ -253,8 +253,7 @@ class AppData: protected CompStoreObj
|
||||
PROPERTY(bool, appDebugLog, false)
|
||||
PROPERTY(bool, fwTraceLog, false)
|
||||
|
||||
PROPERTY(unsigned, firmwareBranch, BRANCH_RELEASE_STABLE);
|
||||
PROPERTY(unsigned, companionBranch, BRANCH_RELEASE_STABLE);
|
||||
PROPERTY(unsigned, OpenTxBranch, BRANCH_RELEASE_STABLE);
|
||||
|
||||
PROPERTY4(bool, jsSupport, js_support ,false)
|
||||
PROPERTY4(bool, showSplash, show_splash ,true)
|
||||
@@ -426,19 +425,11 @@ class AppData: protected CompStoreObj
|
||||
bool findPreviousVersionSettings(QString * version);
|
||||
bool importSettings(QString fromVersion);
|
||||
|
||||
inline DownloadBranchType boundedFirmwareBranch() {
|
||||
inline DownloadBranchType boundedOpenTxBranch() {
|
||||
#if defined(ALLOW_NIGHTLY_BUILDS)
|
||||
return qBound(BRANCH_RELEASE_STABLE, DownloadBranchType(firmwareBranch()), BRANCH_NIGHTLY_UNSTABLE);
|
||||
return qBound(BRANCH_RELEASE_STABLE, DownloadBranchType(OpenTxBranch()), BRANCH_NIGHTLY_UNSTABLE);
|
||||
#else
|
||||
return qBound(BRANCH_RELEASE_STABLE, DownloadBranchType(firmwareBranch()), BRANCH_RC_TESTING);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline DownloadBranchType boundedCompanionBranch() {
|
||||
#if defined(ALLOW_NIGHTLY_BUILDS)
|
||||
return qBound(BRANCH_RELEASE_STABLE, DownloadBranchType(companionBranch()), BRANCH_NIGHTLY_UNSTABLE);
|
||||
#else
|
||||
return qBound(BRANCH_RELEASE_STABLE, DownloadBranchType(companionBranch()), BRANCH_RC_TESTING);
|
||||
return qBound(BRANCH_RELEASE_STABLE, DownloadBranchType(OpenTxBranch()), BRANCH_RC_TESTING);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user