[Companion] Centralize download URLs; URLs now based on build major.minor version macros; Remove AVR fw download URL; Make some QStrings cheaper.
This commit is contained in:
@@ -24,12 +24,6 @@
|
||||
#include "helpers.h"
|
||||
#include "appdata.h"
|
||||
|
||||
const char * const OPENTX_SDCARD_DOWNLOAD_URL[] = {
|
||||
"https://downloads.open-tx.org/2.2/release/sdcard/",
|
||||
"https://downloads.open-tx.org/2.2/rc/sdcard/",
|
||||
"https://downloads.open-tx.org/2.2/nightlies/sdcard/"
|
||||
};
|
||||
|
||||
FirmwarePreferencesDialog::FirmwarePreferencesDialog(QWidget * parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::FirmwarePreferencesDialog)
|
||||
@@ -69,7 +63,7 @@ void FirmwarePreferencesDialog::on_fw_dnld_clicked()
|
||||
|
||||
void FirmwarePreferencesDialog::on_sd_dnld_clicked()
|
||||
{
|
||||
QString url = OPENTX_SDCARD_DOWNLOAD_URL[g.boundedOpenTxBranch()];
|
||||
QString url = g.openTxCurrentDownloadBranchUrl() % QStringLiteral("sdcard/");
|
||||
QString fwType = g.profile[g.id()].fwType();
|
||||
QStringList list = fwType.split("-");
|
||||
QString firmware = QString("%1-%2").arg(list[0]).arg(list[1]);
|
||||
|
||||
Reference in New Issue
Block a user