A 3rd branch for RC compilation (#5441)

A 3rd branch for RC compilation
This commit is contained in:
Bertrand Songis
2017-11-30 11:51:22 +01:00
committed by GitHub
parent e74349e36c
commit 0faee13bc3
8 changed files with 120 additions and 88 deletions
+21 -2
View File
@@ -25,12 +25,14 @@
#ifndef _APPDATA_H_
#define _APPDATA_H_
#include <QByteArray>
#include <QStringList>
#include <QString>
#include <QSettings>
#include <QStandardPaths>
#include "constants.h"
#include "simulator.h"
#define COMPANY "OpenTX"
@@ -244,8 +246,6 @@ class AppData: protected CompStoreObj
PROPERTY(bool, backupOnFlash, true)
PROPERTY(bool, outputDisplayDetails, false)
PROPERTY(bool, checkHardwareCompatibility, true)
PROPERTY(bool, useCompanionNightlyBuilds, false)
PROPERTY(bool, useFirmwareNightlyBuilds, false)
PROPERTY(bool, removeModelSlots, true)
PROPERTY(bool, maximized, false)
PROPERTY(bool, simuSW, false)
@@ -253,6 +253,9 @@ class AppData: protected CompStoreObj
PROPERTY(bool, appDebugLog, false)
PROPERTY(bool, fwTraceLog, false)
PROPERTY(unsigned, firmwareBranch, BRANCH_RELEASE_STABLE);
PROPERTY(unsigned, companionBranch, BRANCH_RELEASE_STABLE);
PROPERTY4(bool, jsSupport, js_support ,false)
PROPERTY4(bool, showSplash, show_splash ,true)
PROPERTY4(bool, snapToClpbrd, snapshot_to_clipboard ,false)
@@ -423,6 +426,22 @@ class AppData: protected CompStoreObj
bool findPreviousVersionSettings(QString * version);
bool importSettings(QString fromVersion);
inline DownloadBranchType boundedFirmwareBranch() {
#if defined(ALLOW_NIGHTLY_BUILDS)
return qBound(BRANCH_RELEASE_STABLE, DownloadBranchType(firmwareBranch()), 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);
#endif
}
protected:
void convertSettings(QSettings & settings);