Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API.

This commit is contained in:
Mat Sutcliffe
2018-12-23 20:12:49 +00:00
parent cba820cbce
commit 225ff81252
118 changed files with 724 additions and 721 deletions

View File

@@ -411,7 +411,7 @@ void SwiftGuiStd::verifyPrerequisites()
CStatusMessageList msgs;
if (!sGui->supportsContexts() || !sGui->getIContextSimulator())
{
msgs.push_back(CStatusMessage(this).error("No simulator context"));
msgs.push_back(CStatusMessage(this).error(u"No simulator context"));
}
else
{

View File

@@ -41,7 +41,7 @@ CStatusMessageList CSwiftGuiStdApplication::startHookIn()
if (coreMode == CoreModes::CoreInGuiProcess && !dBusAddress.isEmpty())
{
const CStatusMessage m = CStatusMessage(this, CLogCategory::validation()).
error("Inconsistent pair DBus: '%1' and core: '%2'")
error(u"Inconsistent pair DBus: '%1' and core: '%2'")
<< dBusAddress << coreModeStr;
return CStatusMessageList(m) ;
}
@@ -53,7 +53,7 @@ CStatusMessageList CSwiftGuiStdApplication::startHookIn()
{
coreMode = CoreModes::CoreExternalAudioGui; // default
const CStatusMessage m = CStatusMessage(this, CLogCategory::validation()).
info("No DBus address, setting core mode: '%1'")
info(u"No DBus address, setting core mode: '%1'")
<< CoreModes::coreModeToString(coreMode);
msgs.push_back(m);
}
@@ -61,7 +61,7 @@ CStatusMessageList CSwiftGuiStdApplication::startHookIn()
{
dBusAddress = CDBusServer::sessionBusAddress(); // a possible default
const CStatusMessage m = CStatusMessage(this, CLogCategory::validation()).
info("Setting DBus address to '%1'")
info(u"Setting DBus address to '%1'")
<< dBusAddress;
msgs.push_back(m);
}

View File

@@ -279,12 +279,12 @@ void SwiftGuiStd::initialContextDataReads()
this->setContextAvailability();
if (!m_coreAvailable)
{
CLogMessage(this).error("No initial data read as network context is not available");
CLogMessage(this).error(u"No initial data read as network context is not available");
return;
}
this->reloadOwnAircraft(); // init read, independent of traffic network
CLogMessage(this).info("Initial data read");
CLogMessage(this).info(u"Initial data read");
}
void SwiftGuiStd::stopAllTimers(bool disconnectSignalSlots)

View File

@@ -95,17 +95,17 @@ void SwiftGuiStd::attachSimulatorWindow()
QWindow *w = CForeignWindows::getFirstFoundSimulatorWindow();
if (!w)
{
CLogMessage(this).warning("No simulator window found");
CLogMessage(this).warning(u"No simulator window found");
return;
}
const bool a = CForeignWindows::setSimulatorAsParent(w, this);
if (a)
{
CLogMessage(this).info("Attached to simulator");
CLogMessage(this).info(u"Attached to simulator");
}
else
{
CLogMessage(this).warning("No simulator window found");
CLogMessage(this).warning(u"No simulator window found");
}
}
@@ -113,11 +113,11 @@ void SwiftGuiStd::detachSimulatorWindow()
{
if (CForeignWindows::unsetSimulatorAsParent(this))
{
CLogMessage(this).info("Detached simulator window");
CLogMessage(this).info(u"Detached simulator window");
}
else
{
CLogMessage(this).info("No simulator window to detach");
CLogMessage(this).info(u"No simulator window to detach");
}
}
@@ -173,5 +173,5 @@ void SwiftGuiStd::copyXSwiftBusDialog(bool checkFileTimestamp)
}
const int c = CCopyXSwiftBusDialog::displayDialogAndCopyBuildFiles(xPlaneRootDir, checkFileTimestamp, this);
if (c > 0) { CLogMessage(this).info("Copied %1 files from build directory") << c; }
if (c > 0) { CLogMessage(this).info(u"Copied %1 files from build directory") << c; }
}