mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Added "url" to signature "dataRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState state, int number, const QUrl &url)"
Allows to write log. messages with URL
This commit is contained in:
committed by
Mat Sutcliffe
parent
f840244bdb
commit
5b3c011a15
@@ -54,7 +54,7 @@ namespace BlackGui
|
||||
connect(ui->le_Livery, &QLineEdit::returnPressed, this, &CDbLiverySelectorComponent::onDataChanged);
|
||||
|
||||
connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbLiverySelectorComponent::onLiveriesRead, Qt::QueuedConnection);
|
||||
this->onLiveriesRead(CEntityFlags::LiveryEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getLiveriesCount());
|
||||
this->onLiveriesRead(CEntityFlags::LiveryEntity, CEntityFlags::ReadFinished, sGui->getWebDataServices()->getLiveriesCount(), {});
|
||||
}
|
||||
|
||||
CDbLiverySelectorComponent::~CDbLiverySelectorComponent()
|
||||
@@ -183,14 +183,16 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CDbLiverySelectorComponent::onLiveriesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
void CDbLiverySelectorComponent::onLiveriesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count, const QUrl &url)
|
||||
{
|
||||
Q_UNUSED(url)
|
||||
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->hasWebDataServices()) { return; }
|
||||
if (entity.testFlag(CEntityFlags::LiveryEntity) && CEntityFlags::isFinishedReadState(readState))
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
QStringList codes(sApp->getWebDataServices()->getLiveries().getCombinedCodesPlusInfo(true));
|
||||
const QStringList codes(sApp->getWebDataServices()->getLiveries().getCombinedCodesPlusInfo(true));
|
||||
QCompleter *c = new QCompleter(codes, this);
|
||||
c->setCaseSensitivity(Qt::CaseInsensitive);
|
||||
c->setCompletionMode(QCompleter::PopupCompletion);
|
||||
|
||||
Reference in New Issue
Block a user