A 3rd branch for RC compilation (#5441)
A 3rd branch for RC compilation
This commit is contained in:
@@ -21,16 +21,16 @@
|
||||
#include "fwpreferencesdialog.h"
|
||||
#include "ui_fwpreferencesdialog.h"
|
||||
#include "mainwindow.h"
|
||||
#include "eeprominterface.h"
|
||||
#include "helpers.h"
|
||||
#include "appdata.h"
|
||||
#include <QDesktopServices>
|
||||
#include <QtGui>
|
||||
|
||||
#define OPENTX_SDCARD_DOWNLOADS "https://downloads.open-tx.org/2.2/sdcard/"
|
||||
#define OPENTX_NIGHT_SDCARD_DOWNLOADS "https://downloads.open-tx.org/2.2/nightlies/sdcard/"
|
||||
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) :
|
||||
FirmwarePreferencesDialog::FirmwarePreferencesDialog(QWidget * parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::FirmwarePreferencesDialog)
|
||||
{
|
||||
@@ -55,25 +55,25 @@ void FirmwarePreferencesDialog::initSettings()
|
||||
|
||||
void FirmwarePreferencesDialog::on_checkFWUpdates_clicked()
|
||||
{
|
||||
MainWindow * mw = (MainWindow *)this->parent();
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(this->parent());
|
||||
mw->checkForFirmwareUpdate();
|
||||
initSettings();
|
||||
}
|
||||
|
||||
void FirmwarePreferencesDialog::on_fw_dnld_clicked()
|
||||
{
|
||||
MainWindow * mw = (MainWindow *)this->parent();
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(this->parent());
|
||||
mw->dowloadLastFirmwareUpdate();
|
||||
initSettings();
|
||||
}
|
||||
|
||||
void FirmwarePreferencesDialog::on_sd_dnld_clicked()
|
||||
{
|
||||
QString url = g.useFirmwareNightlyBuilds() ? OPENTX_NIGHT_SDCARD_DOWNLOADS : OPENTX_SDCARD_DOWNLOADS;
|
||||
QString url = OPENTX_SDCARD_DOWNLOAD_URL[g.boundedFirmwareBranch()];
|
||||
QString fwType = g.profile[g.id()].fwType();
|
||||
QStringList list = fwType.split("-");
|
||||
QString firmware = QString("%1-%2").arg(list[0]).arg(list[1]);
|
||||
if (!g.useFirmwareNightlyBuilds()) {
|
||||
if (g.boundedFirmwareBranch() != BRANCH_NIGHTLY_UNSTABLE) {
|
||||
url.append(QString("%1/").arg(firmware));
|
||||
}
|
||||
QDesktopServices::openUrl(url);
|
||||
|
||||
Reference in New Issue
Block a user