mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 09:15:34 +08:00
refs #526, finetuning in 2 components
This commit is contained in:
@@ -75,8 +75,12 @@ namespace BlackGui
|
||||
|
||||
CAircraftIcaoCode CDbAircraftIcaoSelectorComponent::getAircraftIcao() const
|
||||
{
|
||||
int key = CDatastoreUtility::extractIntegerKey(this->ui->le_Aircraft->text());
|
||||
if (key < 0) { return CAircraftIcaoCode(); }
|
||||
QString text(this->ui->le_Aircraft->text().trimmed().toUpper());
|
||||
int key = CDatastoreUtility::extractIntegerKey(text);
|
||||
if (key < 0)
|
||||
{
|
||||
return CAircraftIcaoCode(text);
|
||||
}
|
||||
CAircraftIcaoCode icao(getAircraftIcaoCodeForDbKey(key));
|
||||
return icao;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,16 @@ namespace BlackGui
|
||||
ui(new Ui::CDbDebugDatabaseSetup)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setEnabled(CProject::isRunningInDeveloperEnvironment());
|
||||
connect(ui->cb_EnableServerDebugging, &QCheckBox::toggled, this, &CDbDebugDatabaseSetup::ps_debugChanged);
|
||||
bool enabled = CProject::isRunningInDeveloperEnvironment();
|
||||
this->setEnabled(enabled);
|
||||
if (!enabled)
|
||||
{
|
||||
this->setToolTip("Disabled, cannot be set!");
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(ui->cb_EnableServerDebugging, &QCheckBox::toggled, this, &CDbDebugDatabaseSetup::ps_debugChanged);
|
||||
}
|
||||
}
|
||||
|
||||
CDbDebugDatabaseSetup::~CDbDebugDatabaseSetup()
|
||||
|
||||
Reference in New Issue
Block a user