refs #485, changed to static preformatted as discussed (MS/KB) on slack

This commit is contained in:
Klaus Basan
2016-03-01 00:15:04 +01:00
committed by Mathew Sutcliffe
parent 55a0ab7b48
commit 30b5e5dade
8 changed files with 14 additions and 14 deletions

View File

@@ -76,7 +76,7 @@ namespace BlackCore
if (!m.isEmpty()) if (!m.isEmpty())
{ {
m.setCategories(getLogCategories()); m.setCategories(getLogCategories());
CLogMessage(this).preformatted(m); CLogMessage::preformatted(m);
} }
// global setup // global setup
@@ -541,7 +541,7 @@ namespace BlackCore
void CApplication::severeStartupProblem(const CStatusMessage &message) void CApplication::severeStartupProblem(const CStatusMessage &message)
{ {
CLogMessage(this).preformatted(message); CLogMessage::preformatted(message);
this->cmdLineErrorMessage(message.getMessage()); this->cmdLineErrorMessage(message.getMessage());
this->exit(EXIT_FAILURE); this->exit(EXIT_FAILURE);

View File

@@ -190,7 +190,7 @@ namespace BlackCore
CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data()); CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data());
if (res.hasErrorMessage()) if (res.hasErrorMessage())
{ {
CLogMessage(this).preformatted(res.lastWarningOrAbove()); CLogMessage::preformatted(res.lastWarningOrAbove());
emit dataRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFailed, 0); emit dataRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFailed, 0);
return; return;
} }
@@ -213,7 +213,7 @@ namespace BlackCore
CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data()); CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data());
if (res.hasErrorMessage()) if (res.hasErrorMessage())
{ {
CLogMessage(this).preformatted(res.lastWarningOrAbove()); CLogMessage::preformatted(res.lastWarningOrAbove());
emit dataRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFailed, 0); emit dataRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFailed, 0);
return; return;
} }
@@ -236,7 +236,7 @@ namespace BlackCore
CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data()); CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data());
if (res.hasErrorMessage()) if (res.hasErrorMessage())
{ {
CLogMessage(this).preformatted(res.lastWarningOrAbove()); CLogMessage::preformatted(res.lastWarningOrAbove());
emit dataRead(CEntityFlags::CountryEntity, CEntityFlags::ReadFailed, 0); emit dataRead(CEntityFlags::CountryEntity, CEntityFlags::ReadFailed, 0);
return; return;
} }

View File

@@ -213,7 +213,7 @@ namespace BlackCore
CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data()); CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data());
if (res.hasErrorMessage()) if (res.hasErrorMessage())
{ {
CLogMessage(this).preformatted(res.lastWarningOrAbove()); CLogMessage::preformatted(res.lastWarningOrAbove());
emit dataRead(CEntityFlags::LiveryEntity, CEntityFlags::ReadFailed, 0); emit dataRead(CEntityFlags::LiveryEntity, CEntityFlags::ReadFailed, 0);
return; return;
} }
@@ -251,7 +251,7 @@ namespace BlackCore
CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data()); CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data());
if (res.hasErrorMessage()) if (res.hasErrorMessage())
{ {
CLogMessage(this).preformatted(res.lastWarningOrAbove()); CLogMessage::preformatted(res.lastWarningOrAbove());
emit dataRead(CEntityFlags::DistributorEntity, CEntityFlags::ReadFailed, 0); emit dataRead(CEntityFlags::DistributorEntity, CEntityFlags::ReadFailed, 0);
return; return;
} }
@@ -287,7 +287,7 @@ namespace BlackCore
CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data()); CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data());
if (res.hasErrorMessage()) if (res.hasErrorMessage())
{ {
CLogMessage(this).preformatted(res.lastWarningOrAbove()); CLogMessage::preformatted(res.lastWarningOrAbove());
emit dataRead(CEntityFlags::ModelEntity, CEntityFlags::ReadFailed, 0); emit dataRead(CEntityFlags::ModelEntity, CEntityFlags::ReadFailed, 0);
return; return;
} }

View File

@@ -279,7 +279,7 @@ namespace BlackCore
if (m.isWarningOrAbove()) if (m.isWarningOrAbove())
{ {
m.setCategories(getLogCategories()); m.setCategories(getLogCategories());
CLogMessage(this).preformatted(m); CLogMessage::preformatted(m);
emit setupSynchronized(false); emit setupSynchronized(false);
return; // issue with cache return; // issue with cache
} }
@@ -361,7 +361,7 @@ namespace BlackCore
if (!m.isEmpty()) if (!m.isEmpty())
{ {
m.setCategories(getLogCategories()); m.setCategories(getLogCategories());
CLogMessage(this).preformatted(m); CLogMessage::preformatted(m);
emit updateInfoSynchronized(false); emit updateInfoSynchronized(false);
return; // issue with cache return; // issue with cache
} }

View File

@@ -85,7 +85,7 @@ namespace BlackGui
{ {
this->setModeLogin(true); this->setModeLogin(true);
this->displayOverlayMessages(status); this->displayOverlayMessages(status);
CLogMessage(this).preformatted(status); CLogMessage::preformatted(status);
} }
} }

View File

@@ -476,7 +476,7 @@ namespace BlackGui
CStatusMessage msg = m_cachedVPilotModels.set(models); CStatusMessage msg = m_cachedVPilotModels.set(models);
if (msg.isWarningOrAbove()) if (msg.isWarningOrAbove())
{ {
CLogMessage(this).preformatted(msg); CLogMessage::preformatted(msg);
} }
else else
{ {

View File

@@ -37,7 +37,7 @@ namespace BlackMisc
void CSettingsCache::saveToStoreByPacket(const CValueCachePacket &values) void CSettingsCache::saveToStoreByPacket(const CValueCachePacket &values)
{ {
CStatusMessage status = saveToFiles(persistentStore(), values.toVariantMap()); CStatusMessage status = saveToFiles(persistentStore(), values.toVariantMap());
CLogMessage(this).preformatted(status); CLogMessage::preformatted(status);
} }
BlackMisc::CStatusMessage CSettingsCache::loadFromStore() BlackMisc::CStatusMessage CSettingsCache::loadFromStore()

View File

@@ -137,7 +137,7 @@ namespace BlackSimPlugin
{ {
CStatusMessage msg; CStatusMessage msg;
CPixmap pm(m_aircraftCfgParser->iconForModel(modelString, msg)); CPixmap pm(m_aircraftCfgParser->iconForModel(modelString, msg));
if (!msg.isEmpty()) { CLogMessage(this).preformatted(msg);} if (!msg.isEmpty()) { CLogMessage::preformatted(msg);}
return pm; return pm;
} }