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