mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-11 06:25:33 +08:00
Guarding by "hasWebDataServices"
This commit is contained in:
committed by
Mat Sutcliffe
parent
70e08fdf8b
commit
14ab60cb73
@@ -38,7 +38,7 @@ namespace BlackGui
|
||||
connect(ui->pb_SendToDB, &QPushButton::released, this, &CAutoPublishComponent::sendToDb, Qt::QueuedConnection);
|
||||
connect(ui->pb_DeleteFiles, &QPushButton::released, this, &CAutoPublishComponent::deleteAllFiles, Qt::QueuedConnection);
|
||||
|
||||
if (sGui && sGui->getWebDataServices() && sGui->getWebDataServices()->getDatabaseWriter())
|
||||
if (sGui && sGui->hasWebDataServices() && sGui->getWebDataServices()->getDatabaseWriter())
|
||||
{
|
||||
CDatabaseWriter *w = sGui->getWebDataServices()->getDatabaseWriter();
|
||||
connect(w, &CDatabaseWriter::autoPublished, this, &CAutoPublishComponent::onAutoPublished, Qt::QueuedConnection);
|
||||
@@ -77,7 +77,7 @@ namespace BlackGui
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sGui->getWebDataServices())
|
||||
if (!sGui->hasWebDataServices())
|
||||
{
|
||||
this->showOverlayHTMLMessage("No publishing web service!", 5000);
|
||||
return;
|
||||
|
||||
@@ -49,8 +49,13 @@ namespace BlackGui
|
||||
this->setAcceptDrops(true);
|
||||
this->setAcceptedMetaTypeIds({qMetaTypeId<CAircraftIcaoCode>(), qMetaTypeId<CAircraftIcaoCodeList>()});
|
||||
ui->le_Aircraft->setValidator(new CUpperCaseValidator(this));
|
||||
|
||||
connect(ui->le_Aircraft, &QLineEdit::editingFinished, this, &CDbAircraftIcaoSelectorComponent::onDataChanged);
|
||||
connect(sApp->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbAircraftIcaoSelectorComponent::onCodesRead, Qt::QueuedConnection);
|
||||
if (sApp && sApp->hasWebDataServices())
|
||||
{
|
||||
connect(sApp->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbAircraftIcaoSelectorComponent::onCodesRead, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
this->onCodesRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFinished, sApp->getWebDataServices()->getAircraftIcaoCodesCount());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user