1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

Uncrustify

This commit is contained in:
m_thread 2015-03-29 10:51:03 +02:00
parent 62bd0115fe
commit 81050f557c
2 changed files with 9 additions and 3 deletions

View File

@ -274,8 +274,9 @@ QString VehicleTemplateExportDialog::fixFilenameString(QString input, int trunca
void VehicleTemplateExportDialog::exportTemplate() void VehicleTemplateExportDialog::exportTemplate()
{ {
QString path = QString("%1%2%3%4").arg(Utils::PathUtils().InsertStoragePath("%%STOREPATH%%cloudconfig")) QString path = QString("%1%2%3%4").arg(Utils::PathUtils().InsertStoragePath("%%STOREPATH%%cloudconfig"))
.arg(QDir::separator()).arg(getTypeDirectory()).arg(QDir::separator()); .arg(QDir::separator()).arg(getTypeDirectory()).arg(QDir::separator());
QDir dir; QDir dir;
dir.mkpath(path); dir.mkpath(path);
saveTemplate(path); saveTemplate(path);
} }
@ -362,8 +363,9 @@ QString VehicleTemplateExportDialog::getTypeDirectory()
void VehicleTemplateExportDialog::updateStatus() void VehicleTemplateExportDialog::updateStatus()
{ {
bool enabled = m_autopilotConnected && ui->Name->text().length() > 3 && ui->Owner->text().length() > 2 && bool enabled = m_autopilotConnected && ui->Name->text().length() > 3 && ui->Owner->text().length() > 2 &&
ui->ForumNick->text().length() > 2 && ui->Size->text().length() > 0 && ui->ForumNick->text().length() > 2 && ui->Size->text().length() > 0 &&
ui->Weight->text().length() > 0; ui->Weight->text().length() > 0;
ui->exportBtn->setEnabled(enabled); ui->exportBtn->setEnabled(enabled);
ui->saveAsBtn->setEnabled(enabled); ui->saveAsBtn->setEnabled(enabled);
} }

View File

@ -146,12 +146,16 @@ QString VehicleTemplateSelectorWidget::getTemplatePath()
switch (m_vehicleType) { switch (m_vehicleType) {
case VehicleConfigurationSource::VEHICLE_FIXEDWING: case VehicleConfigurationSource::VEHICLE_FIXEDWING:
return VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME; return VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME;
case VehicleConfigurationSource::VEHICLE_MULTI: case VehicleConfigurationSource::VEHICLE_MULTI:
return VehicleTemplateExportDialog::EXPORT_MULTI_NAME; return VehicleTemplateExportDialog::EXPORT_MULTI_NAME;
case VehicleConfigurationSource::VEHICLE_HELI: case VehicleConfigurationSource::VEHICLE_HELI:
return VehicleTemplateExportDialog::EXPORT_HELI_NAME; return VehicleTemplateExportDialog::EXPORT_HELI_NAME;
case VehicleConfigurationSource::VEHICLE_SURFACE: case VehicleConfigurationSource::VEHICLE_SURFACE:
return VehicleTemplateExportDialog::EXPORT_SURFACE_NAME; return VehicleTemplateExportDialog::EXPORT_SURFACE_NAME;
default: default:
return NULL; return NULL;
} }