Adjust SD card download folder for firmware nightlies
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
#include <QDesktopServices>
|
||||
#include <QtGui>
|
||||
|
||||
#define OPENTX_SDCARD_DOWNLOADS "http://downloads.open-tx.org/2.2/sdcard/"
|
||||
#define OPENTX_NIGHT_SDCARD_DOWNLOADS "http://downloads.open-tx.org/2.2/nightlies/sdcard/"
|
||||
|
||||
FirmwarePreferencesDialog::FirmwarePreferencesDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::FirmwarePreferencesDialog)
|
||||
@@ -66,11 +69,13 @@ void FirmwarePreferencesDialog::on_fw_dnld_clicked()
|
||||
|
||||
void FirmwarePreferencesDialog::on_sd_dnld_clicked()
|
||||
{
|
||||
QString url = "http://downloads.open-tx.org/2.2/sdcard/";
|
||||
QString url = g.useFirmwareNightlyBuilds() ? OPENTX_NIGHT_SDCARD_DOWNLOADS : OPENTX_SDCARD_DOWNLOADS;
|
||||
QString fwType = g.profile[g.id()].fwType();
|
||||
QStringList list = fwType.split("-");
|
||||
QString firmware = QString("%1-%2").arg(list[0]).arg(list[1]);
|
||||
url.append(QString("%1/").arg(firmware));
|
||||
if (!g.useFirmwareNightlyBuilds()) {
|
||||
url.append(QString("%1/").arg(firmware));
|
||||
}
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user