mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T516 Update CStatusMessage call sites to use new syntax.
This commit is contained in:
@@ -555,7 +555,7 @@ namespace BlackMisc
|
||||
|
||||
CPixmap CAircraftModel::loadIcon(CStatusMessage &success) const
|
||||
{
|
||||
static const CStatusMessage noIcon(this, CStatusMessage::SeverityInfo, "no icon");
|
||||
static const CStatusMessage noIcon(this, CStatusMessage::SeverityInfo, u"no icon");
|
||||
if (m_iconPath.isEmpty()) { success = noIcon; return CPixmap(); }
|
||||
|
||||
// load from file
|
||||
@@ -770,10 +770,10 @@ namespace BlackMisc
|
||||
{
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||
CStatusMessageList msgs;
|
||||
if (!hasModelString()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Model: missing model string (aka key)")); }
|
||||
if (!hasValidSimulator()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Model: no simulator set")); }
|
||||
if (!hasModelString()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Model: missing model string (aka key)")); }
|
||||
if (!hasValidSimulator()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, u"Model: no simulator set")); }
|
||||
// as of T34 made description optional, lines can be removed after 6/2017
|
||||
// if (!hasDescription()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityWarning, "Model: no description")); }
|
||||
// if (!hasDescription()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityWarning, u"Model: no description")); }
|
||||
if (withNestedObjects)
|
||||
{
|
||||
msgs.push_back(m_aircraftIcao.validate());
|
||||
@@ -788,12 +788,12 @@ namespace BlackMisc
|
||||
{
|
||||
if (same)
|
||||
{
|
||||
static const CStatusMessage msgSame({ CLogCategory::validation() }, CStatusMessage::SeverityWarning, "Model '%1' same %2 '%3'");
|
||||
static const CStatusMessage msgSame({ CLogCategory::validation() }, CStatusMessage::SeverityWarning, u"Model '%1' same %2 '%3'");
|
||||
return CStatusMessage(msgSame) << model.getModelStringAndDbKey() << description << newValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
static const CStatusMessage msgDiff({ CLogCategory::validation() }, CStatusMessage::SeverityInfo, "Model '%1' changed %2 '%3'->'%4'");
|
||||
static const CStatusMessage msgDiff({ CLogCategory::validation() }, CStatusMessage::SeverityInfo, u"Model '%1' changed %2 '%3'->'%4'");
|
||||
return CStatusMessage(msgDiff) << model.getModelStringAndDbKey() << description << oldValue << newValue;
|
||||
}
|
||||
}
|
||||
@@ -802,7 +802,7 @@ namespace BlackMisc
|
||||
{
|
||||
if (!dbModel.isLoadedFromDb())
|
||||
{
|
||||
static const CStatusMessage msgNoDbModel({ CLogCategory::validation() }, CStatusMessage::SeverityInfo, "No DB model yet");
|
||||
static const CStatusMessage msgNoDbModel({ CLogCategory::validation() }, CStatusMessage::SeverityInfo, u"No DB model yet");
|
||||
if (details) { details->push_back(msgNoDbModel); }
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user