mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T525 Avoid directly calling getLogCategories.
This commit is contained in:
@@ -1038,7 +1038,7 @@ namespace BlackCore
|
||||
const CStatusMessage m = this->supportsContexts() ?
|
||||
this->getIContextApplication()->saveSettings() :
|
||||
CSettingsCache::instance()->saveToStore();
|
||||
CLogMessage(getLogCategories()).preformatted(m);
|
||||
CLogMessage(this).preformatted(m);
|
||||
}
|
||||
|
||||
// from here on we really rip apart the application object
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace BlackCore
|
||||
|
||||
const CStatusMessage &CContext::statusMessageEmptyContext()
|
||||
{
|
||||
static const CStatusMessage m(getLogCategories(), CStatusMessage::SeverityWarning, u"empty context");
|
||||
static const CStatusMessage m(static_cast<CContext *>(nullptr), CStatusMessage::SeverityWarning, u"empty context");
|
||||
return m;
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -757,7 +757,7 @@ namespace BlackCore
|
||||
if (jsonContent.isEmpty())
|
||||
{
|
||||
static const QString errorMsg = "Empty JSON string, status: %1, URL: '%2', load time: %3";
|
||||
datastoreResponse.setMessage(CStatusMessage(getLogCategories(),
|
||||
datastoreResponse.setMessage(CStatusMessage(static_cast<CDatabaseReader *>(nullptr),
|
||||
CStatusMessage::SeverityError,
|
||||
errorMsg.arg(status).arg(datastoreResponse.getUrlString(), datastoreResponse.getLoadTimeStringWithStartedHint())));
|
||||
return;
|
||||
@@ -770,14 +770,14 @@ namespace BlackCore
|
||||
{
|
||||
static const QString errorMsg = "Looks like PHP errror, status %1, URL: '%2', msg: %3";
|
||||
const QString phpErrorMessage = CNetworkUtils::removeHtmlPartsFromPhpErrorMessage(jsonContent);
|
||||
datastoreResponse.setMessage(CStatusMessage(getLogCategories(),
|
||||
datastoreResponse.setMessage(CStatusMessage(static_cast<CDatabaseReader *>(nullptr),
|
||||
CStatusMessage::SeverityError,
|
||||
errorMsg.arg(status).arg(datastoreResponse.getUrlString(), phpErrorMessage)));
|
||||
}
|
||||
else
|
||||
{
|
||||
static const QString errorMsg = "Empty JSON document, URL: '%1', load time: %2";
|
||||
datastoreResponse.setMessage(CStatusMessage(getLogCategories(),
|
||||
datastoreResponse.setMessage(CStatusMessage(static_cast<CDatabaseReader *>(nullptr),
|
||||
CStatusMessage::SeverityError,
|
||||
errorMsg.arg(datastoreResponse.getUrlString(), datastoreResponse.getLoadTimeStringWithStartedHint())));
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ namespace BlackCore
|
||||
stashModels.push_back(dbModel); // changed DB model
|
||||
if (updateInfo)
|
||||
{
|
||||
const CStatusMessage m = CStatusMessage(getLogCategories()).info(u"%1 -> %2 (%3) for '%4'")
|
||||
const CStatusMessage m = CStatusMessage(static_cast<CDatabaseUtils *>(nullptr)).info(u"%1 -> %2 (%3) for '%4'")
|
||||
<< dbModelSimulator.toQString(true) << simulator.toQString(true)
|
||||
<< delta.toQString(true) << dbModel.getModelStringAndDbKey();
|
||||
updateInfo->push_back(m);
|
||||
|
||||
@@ -493,7 +493,7 @@ namespace BlackCore
|
||||
CStatusMessage m = m_updateInfo.set(updateInfo, lastModified);
|
||||
if (m.isFailure())
|
||||
{
|
||||
m.addCategories(getLogCategories());
|
||||
m.addCategories(this);
|
||||
CLogMessage::preformatted(m);
|
||||
this->manageUpdateInfoAvailability(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user