mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Utility function to directly log warning when network not accessible
This commit is contained in:
committed by
Mathew Sutcliffe
parent
8aed8f598e
commit
76b3b6c0b6
@@ -179,11 +179,7 @@ namespace BlackCore
|
||||
|
||||
// ps_read is implemented in the derived classes
|
||||
if (entities == CEntityFlags::NoEntity) { return; }
|
||||
if (!this->isNetworkAccessible())
|
||||
{
|
||||
CLogMessage(this).warning("No network, will not read %1") << CEntityFlags::flagToString(entities);
|
||||
return;
|
||||
}
|
||||
if (!this->isNetworkAccessible(QString("No network, will not read %1").arg(CEntityFlags::flagToString(entities)))) { return; }
|
||||
|
||||
const bool s = QMetaObject::invokeMethod(this, "ps_read",
|
||||
Q_ARG(BlackMisc::Network::CEntityFlags::Entity, entities),
|
||||
@@ -355,11 +351,7 @@ namespace BlackCore
|
||||
|
||||
bool CDatabaseReader::requestHeadersOfSharedFiles(CEntityFlags::Entity entities)
|
||||
{
|
||||
if (!this->isNetworkAccessible())
|
||||
{
|
||||
CLogMessage(this).warning("No network, will not read shared file headers for %1") << CEntityFlags::flagToString(entities);
|
||||
return false;
|
||||
}
|
||||
if (!this->isNetworkAccessible(QString("No network, will not read shared file headers for %1").arg(CEntityFlags::flagToString(entities)))) { return false; }
|
||||
|
||||
CEntityFlags::Entity allEntities(this->maskBySupportedEntities(entities));
|
||||
CEntityFlags::Entity currentEntity = CEntityFlags::iterateDbEntities(allEntities);
|
||||
|
||||
Reference in New Issue
Block a user