mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Add URL info for reading
This commit is contained in:
committed by
Mat Sutcliffe
parent
153602d99e
commit
b43ab76007
@@ -218,6 +218,7 @@ namespace BlackCore
|
||||
|
||||
this->logNetworkReplyReceived(nwReplyPtr);
|
||||
QStringList illegalEquipmentCodes;
|
||||
const QString urlString = nwReply->url().toString();
|
||||
if (nwReply->error() == QNetworkReply::NoError)
|
||||
{
|
||||
const QString dataFileData = nwReply->readAll();
|
||||
@@ -226,7 +227,7 @@ namespace BlackCore
|
||||
if (dataFileData.isEmpty()) { return; }
|
||||
if (!this->didContentChange(dataFileData)) // Quick check by hash
|
||||
{
|
||||
CLogMessage(this).info(u"VATSIM file has same content, skipped");
|
||||
CLogMessage(this).info(u"VATSIM file '%1' has same content, skipped") << urlString;
|
||||
return;
|
||||
}
|
||||
const QList<QStringRef> lines = splitLinesRefs(dataFileData);
|
||||
@@ -443,7 +444,7 @@ namespace BlackCore
|
||||
else
|
||||
{
|
||||
// network error
|
||||
CLogMessage(this).warning(u"Reading VATSIM data file failed '%1' '%2'") << nwReply->errorString() << nwReply->url().toString();
|
||||
CLogMessage(this).warning(u"Reading VATSIM data file failed '%1' '%2'") << nwReply->errorString() << urlString;
|
||||
nwReply->abort();
|
||||
emit this->dataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFailed, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user