mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +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
@@ -218,7 +218,9 @@ namespace BlackCore
|
||||
|
||||
this->logNetworkReplyReceived(nwReplyPtr);
|
||||
QStringList illegalEquipmentCodes;
|
||||
const QString urlString = nwReply->url().toString();
|
||||
const QUrl url = nwReply->url();
|
||||
const QString urlString = url.toString();
|
||||
|
||||
if (nwReply->error() == QNetworkReply::NoError)
|
||||
{
|
||||
const QString dataFileData = nwReply->readAll();
|
||||
@@ -439,14 +441,14 @@ namespace BlackCore
|
||||
|
||||
// data read finished
|
||||
emit this->dataFileRead(lines.count());
|
||||
emit this->dataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFinished, lines.count());
|
||||
emit this->dataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFinished, lines.count(), url);
|
||||
}
|
||||
else
|
||||
{
|
||||
// network error
|
||||
CLogMessage(this).warning(u"Reading VATSIM data file failed '%1' '%2'") << nwReply->errorString() << urlString;
|
||||
nwReply->abort();
|
||||
emit this->dataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFailed, 0);
|
||||
emit this->dataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFailed, 0, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user