mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Minor reader formatting/comments
This commit is contained in:
committed by
Mat Sutcliffe
parent
a8187bbc0c
commit
1b7f1b1662
@@ -719,6 +719,7 @@ namespace BlackCore
|
||||
const QFileInfo fi(saveAsFileName);
|
||||
if (!fi.dir().exists()) { return nullptr; }
|
||||
|
||||
// function called with reply when done
|
||||
CallbackSlot callbackSlot([ = ](QNetworkReply * reply)
|
||||
{
|
||||
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> nwReply(reply);
|
||||
@@ -731,7 +732,7 @@ namespace BlackCore
|
||||
{
|
||||
const bool ok = CFileUtils::writeByteArrayToFile(reply->readAll(), saveAsFileName);
|
||||
msg = ok ?
|
||||
CStatusMessage(this, CStatusMessage::SeverityInfo, u"Saved file '%1' downloaded from '%2'") << saveAsFileName << url.getFullUrl() :
|
||||
CStatusMessage(this, CStatusMessage::SeverityInfo, u"Saved file '%1' downloaded from '%2'") << saveAsFileName << url.getFullUrl() :
|
||||
CStatusMessage(this, CStatusMessage::SeverityError, u"Saving file '%1' downloaded from '%2' failed") << saveAsFileName << url.getFullUrl();
|
||||
}
|
||||
nwReply->close();
|
||||
@@ -1803,7 +1804,7 @@ namespace BlackCore
|
||||
// called when there are no more callbacks
|
||||
callback(reply);
|
||||
|
||||
}, Qt::QueuedConnection);
|
||||
}, Qt::QueuedConnection); // called in callback thread
|
||||
}
|
||||
return reply;
|
||||
}
|
||||
|
||||
@@ -205,8 +205,8 @@ namespace BlackCore
|
||||
|
||||
CEntityFlags::EntityFlag CInfoDataReader::getEntityForMode() const
|
||||
{
|
||||
if (m_mode == CDbFlags::DbReading) return CEntityFlags::DbInfoObjectEntity;
|
||||
if (m_mode == CDbFlags::Shared) return CEntityFlags::SharedInfoObjectEntity;
|
||||
if (m_mode == CDbFlags::DbReading) { return CEntityFlags::DbInfoObjectEntity; }
|
||||
if (m_mode == CDbFlags::Shared) { return CEntityFlags::SharedInfoObjectEntity; }
|
||||
qFatal("Wrong mode");
|
||||
return CEntityFlags::NoEntity;
|
||||
}
|
||||
|
||||
@@ -16,8 +16,9 @@ namespace BlackCore
|
||||
CWebReaderFlags::WebReader CWebReaderFlags::entitiesToReaders(CEntityFlags::Entity entities)
|
||||
{
|
||||
WebReader f = None;
|
||||
if (entities.testFlag(CEntityFlags::AircraftIcaoEntity) || entities.testFlag(CEntityFlags::AirlineIcaoEntity) ||
|
||||
entities.testFlag(CEntityFlags::CountryEntity) || entities.testFlag(CEntityFlags::AircraftCategoryEntity))
|
||||
if (
|
||||
entities.testFlag(CEntityFlags::AircraftIcaoEntity) || entities.testFlag(CEntityFlags::AirlineIcaoEntity) ||
|
||||
entities.testFlag(CEntityFlags::CountryEntity) || entities.testFlag(CEntityFlags::AircraftCategoryEntity))
|
||||
{
|
||||
f |= IcaoDataReader;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user