Ref T27, utility functions for debug messages

This commit is contained in:
Klaus Basan
2017-06-25 19:46:42 +02:00
committed by Mathew Sutcliffe
parent 042f725e54
commit bd67824ce6
2 changed files with 28 additions and 0 deletions

View File

@@ -198,6 +198,25 @@ namespace BlackCore
return false;
}
void CSimulatorCommon::debugLogMessage(const QString &msg) const
{
if (!showDebugLogMessage()) { return; }
if (msg.isEmpty()) { return; }
CLogMessage(this).info(msg);
}
void CSimulatorCommon::debugLogMessage(const QString &funcInfo, const QString &msg) const
{
if (!showDebugLogMessage()) { return; }
if (msg.isEmpty()) { return; }
CLogMessage(this).info("%1 %2") << msg << funcInfo;
}
bool CSimulatorCommon::showDebugLogMessage() const
{
return m_interpolationRenderingSetup.showSimulatorDebugMessages();
}
void CSimulatorCommon::reverseLookupAndUpdateOwnAircraftModel(const BlackMisc::Simulation::CAircraftModel &model)
{
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing sApp");