mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-04-10 02:02:21 +02:00
Merge branch 'rel-14.10' into laurent/rel-14.10_Translations_updates
This commit is contained in:
commit
2ccc5165d3
@ -173,7 +173,7 @@ void AirframeInitialTuningPage::loadValidFiles()
|
|||||||
QJsonParseError error;
|
QJsonParseError error;
|
||||||
QJsonDocument templateDoc = QJsonDocument::fromJson(jsonData, &error);
|
QJsonDocument templateDoc = QJsonDocument::fromJson(jsonData, &error);
|
||||||
if (error.error == QJsonParseError::NoError) {
|
if (error.error == QJsonParseError::NoError) {
|
||||||
QJsonObject json = templateDoc.object();
|
QJsonObject json = templateDoc.object();
|
||||||
if (json["type"].toInt() == getWizard()->getVehicleType() &&
|
if (json["type"].toInt() == getWizard()->getVehicleType() &&
|
||||||
json["subtype"].toInt() == getWizard()->getVehicleSubType()) {
|
json["subtype"].toInt() == getWizard()->getVehicleSubType()) {
|
||||||
QString uuid = json["uuid"].toString();
|
QString uuid = json["uuid"].toString();
|
||||||
|
@ -160,8 +160,8 @@ void EscCalibrationPage::stopButtonClicked()
|
|||||||
void EscCalibrationPage::securityCheckBoxesToggled()
|
void EscCalibrationPage::securityCheckBoxesToggled()
|
||||||
{
|
{
|
||||||
ui->startButton->setEnabled(ui->securityCheckBox1->isChecked() &&
|
ui->startButton->setEnabled(ui->securityCheckBox1->isChecked() &&
|
||||||
ui->securityCheckBox2->isChecked() &&
|
ui->securityCheckBox2->isChecked() &&
|
||||||
ui->securityCheckBox3->isChecked());
|
ui->securityCheckBox3->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,18 +214,18 @@ void VehicleTemplateExportDialog::accept()
|
|||||||
|
|
||||||
const char *fileType = ".optmpl";
|
const char *fileType = ".optmpl";
|
||||||
|
|
||||||
QString fileName = QString("%1-%2-%3%4")
|
QString fileName = QString("%1-%2-%3%4")
|
||||||
.arg(fixFilenameString(ui->Name->text(), 20))
|
.arg(fixFilenameString(ui->Name->text(), 20))
|
||||||
.arg(fixFilenameString(ui->Type->text(), 30))
|
.arg(fixFilenameString(ui->Type->text(), 30))
|
||||||
.arg(fixFilenameString(uuid.toString().right(12)))
|
.arg(fixFilenameString(uuid.toString().right(12)))
|
||||||
.arg(fileType);
|
.arg(fileType);
|
||||||
|
|
||||||
QString fullPath = QString("%1%2%3%4%5")
|
QString fullPath = QString("%1%2%3%4%5")
|
||||||
.arg(EXPORT_BASE_NAME)
|
.arg(EXPORT_BASE_NAME)
|
||||||
.arg(QDir::separator())
|
.arg(QDir::separator())
|
||||||
.arg(getTypeDirectory())
|
.arg(getTypeDirectory())
|
||||||
.arg(QDir::separator())
|
.arg(QDir::separator())
|
||||||
.arg(fileName);
|
.arg(fileName);
|
||||||
|
|
||||||
QDir dir = QFileInfo(fullPath).absoluteDir();
|
QDir dir = QFileInfo(fullPath).absoluteDir();
|
||||||
if (!dir.exists()) {
|
if (!dir.exists()) {
|
||||||
@ -243,7 +243,7 @@ void VehicleTemplateExportDialog::accept()
|
|||||||
saveFile.write(saveDoc.toJson());
|
saveFile.write(saveDoc.toJson());
|
||||||
saveFile.close();
|
saveFile.close();
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::information(this, "Export", tr("Settings could not be exported to \n%1(%2).\nPlease try again.")
|
QMessageBox::information(this, "Export", tr("Settings could not be exported to \n%1(%2).\nPlease try again.")
|
||||||
.arg(QFileInfo(saveFile).absoluteFilePath(), saveFile.error()), QMessageBox::Ok);
|
.arg(QFileInfo(saveFile).absoluteFilePath(), saveFile.error()), QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
|
@ -55,11 +55,11 @@ WelcomePlugin::~WelcomePlugin()
|
|||||||
// The below code is commented out to avoid having the application
|
// The below code is commented out to avoid having the application
|
||||||
// crash when it is terminated. TODO: Fix a real solution.
|
// crash when it is terminated. TODO: Fix a real solution.
|
||||||
/*
|
/*
|
||||||
if (m_welcomeMode) {
|
if (m_welcomeMode) {
|
||||||
removeObject(m_welcomeMode);
|
removeObject(m_welcomeMode);
|
||||||
delete m_welcomeMode;
|
delete m_welcomeMode;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Initializes the plugin. Returns true on success.
|
/*! Initializes the plugin. Returns true on success.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user