mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
Ref T201, formatting
This commit is contained in:
@@ -83,15 +83,13 @@ namespace BlackCore
|
|||||||
|
|
||||||
CEntityFlags::Entity CInfoDataReader::getEntitiesWithCacheCount() const
|
CEntityFlags::Entity CInfoDataReader::getEntitiesWithCacheCount() const
|
||||||
{
|
{
|
||||||
CEntityFlags::Entity entities = CEntityFlags::NoEntity;
|
return CEntityFlags::NoEntity;
|
||||||
return entities;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntityFlags::Entity CInfoDataReader::getEntitiesWithCacheTimestampNewerThan(const QDateTime &threshold) const
|
CEntityFlags::Entity CInfoDataReader::getEntitiesWithCacheTimestampNewerThan(const QDateTime &threshold) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(threshold);
|
Q_UNUSED(threshold);
|
||||||
CEntityFlags::Entity entities = CEntityFlags::NoEntity;
|
return CEntityFlags::NoEntity;
|
||||||
return entities;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CInfoDataReader::hasChangedUrl(CEntityFlags::Entity entity, CUrl &oldUrlInfo, CUrl &newUrlInfo) const
|
bool CInfoDataReader::hasChangedUrl(CEntityFlags::Entity entity, CUrl &oldUrlInfo, CUrl &newUrlInfo) const
|
||||||
@@ -144,7 +142,7 @@ namespace BlackCore
|
|||||||
if (res.hasErrorMessage())
|
if (res.hasErrorMessage())
|
||||||
{
|
{
|
||||||
CLogMessage::preformatted(res.lastWarningOrAbove());
|
CLogMessage::preformatted(res.lastWarningOrAbove());
|
||||||
emit dataRead(this->getEntityForMode(), CEntityFlags::ReadFailed, 0);
|
emit this->dataRead(this->getEntityForMode(), CEntityFlags::ReadFailed, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,8 +152,8 @@ namespace BlackCore
|
|||||||
|
|
||||||
// this part needs to be synchronized
|
// this part needs to be synchronized
|
||||||
{
|
{
|
||||||
QWriteLocker wl(&this->m_lockInfoObjects);
|
QWriteLocker wl(&m_lockInfoObjects);
|
||||||
this->m_infoObjects = infoObjects;
|
m_infoObjects = infoObjects;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->emitAndLogDataRead(this->getEntityForMode(), n, res);
|
this->emitAndLogDataRead(this->getEntityForMode(), n, res);
|
||||||
@@ -173,8 +171,8 @@ namespace BlackCore
|
|||||||
|
|
||||||
CEntityFlags::EntityFlag CInfoDataReader::getEntityForMode() const
|
CEntityFlags::EntityFlag CInfoDataReader::getEntityForMode() const
|
||||||
{
|
{
|
||||||
if (this->m_mode == CDbFlags::DbReading) return CEntityFlags::DbInfoObjectEntity;
|
if (m_mode == CDbFlags::DbReading) return CEntityFlags::DbInfoObjectEntity;
|
||||||
if (this->m_mode == CDbFlags::Shared) return CEntityFlags::SharedInfoObjectEntity;
|
if (m_mode == CDbFlags::Shared) return CEntityFlags::SharedInfoObjectEntity;
|
||||||
qFatal("Wrong mode");
|
qFatal("Wrong mode");
|
||||||
return CEntityFlags::NoEntity;
|
return CEntityFlags::NoEntity;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ namespace BlackMisc
|
|||||||
|
|
||||||
void CAircraftIcaoCode::setMilitary(bool military)
|
void CAircraftIcaoCode::setMilitary(bool military)
|
||||||
{
|
{
|
||||||
m_military = military;
|
m_military = military;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAircraftIcaoCode::setRealWorld(bool realWorld)
|
void CAircraftIcaoCode::setRealWorld(bool realWorld)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace BlackMisc
|
|||||||
if (mode.testFlag(DbReading)) list << "Direct DB access";
|
if (mode.testFlag(DbReading)) list << "Direct DB access";
|
||||||
if (mode.testFlag(Shared)) list << "Shared data";
|
if (mode.testFlag(Shared)) list << "Shared data";
|
||||||
if (mode.testFlag(Cached)) list << "Cached data";
|
if (mode.testFlag(Cached)) list << "Cached data";
|
||||||
return list.join(',');
|
return list.join(", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
CDbFlags::DataRetrievalModeFlag CDbFlags::modeToModeFlag(DataRetrievalMode mode)
|
CDbFlags::DataRetrievalModeFlag CDbFlags::modeToModeFlag(DataRetrievalMode mode)
|
||||||
|
|||||||
@@ -909,9 +909,9 @@ namespace BlackMisc
|
|||||||
QJsonArray array = value.toArray();
|
QJsonArray array = value.toArray();
|
||||||
|
|
||||||
CAircraftModel::MemoHelper::CUnmemoizer helper;
|
CAircraftModel::MemoHelper::CUnmemoizer helper;
|
||||||
QJsonValue aircraftIcaos = json.value("aircraftIcaos");
|
const QJsonValue aircraftIcaos = json.value("aircraftIcaos");
|
||||||
QJsonValue liveries = json.value("liveries");
|
const QJsonValue liveries = json.value("liveries");
|
||||||
QJsonValue distributors = json.value("distributors");
|
const QJsonValue distributors = json.value("distributors");
|
||||||
if (aircraftIcaos.isUndefined()) { throw CJsonException("Missing 'aircraftIcaos'"); }
|
if (aircraftIcaos.isUndefined()) { throw CJsonException("Missing 'aircraftIcaos'"); }
|
||||||
if (liveries.isUndefined()) { throw CJsonException("Missing 'liveries'"); }
|
if (liveries.isUndefined()) { throw CJsonException("Missing 'liveries'"); }
|
||||||
if (distributors.isUndefined()) { throw CJsonException("Missing 'distributors'"); }
|
if (distributors.isUndefined()) { throw CJsonException("Missing 'distributors'"); }
|
||||||
|
|||||||
Reference in New Issue
Block a user