Ref T180, formatting / const

This commit is contained in:
Klaus Basan
2017-11-01 03:12:58 +01:00
parent a23ccb5ac7
commit d5bb1733f4
17 changed files with 203 additions and 231 deletions

View File

@@ -67,11 +67,11 @@ namespace BlackCore
void ISimulator::emitSimulatorCombinedStatus(SimulatorStatus oldStatus)
{
const SimulatorStatus newStatus = getSimulatorStatus();
const SimulatorStatus newStatus = this->getSimulatorStatus();
if (oldStatus != newStatus)
{
// decouple, follow up of signal can include unloading
// simulator so this should happen asyncronously (which is like forcing Qt::QueuedConnection)
// simulator so this should happen strictly asyncronously (which is like forcing Qt::QueuedConnection)
QTimer::singleShot(0, this, [ = ]
{
emit this->simulatorStatusChanged(newStatus);
@@ -85,7 +85,7 @@ namespace BlackCore
this->setObjectName("ISimulatorListener:" + info.toQString());
// stop listener after it reports simulator ready
bool s = connect(this, &ISimulatorListener::simulatorStarted, this, &ISimulatorListener::stop, Qt::QueuedConnection);
const bool s = connect(this, &ISimulatorListener::simulatorStarted, this, &ISimulatorListener::stop, Qt::QueuedConnection);
Q_ASSERT_X(s, Q_FUNC_INFO, "connect failed");
Q_UNUSED(s)
}
@@ -104,13 +104,13 @@ namespace BlackCore
{
if (m_isRunning) { return; }
m_isRunning = true;
startImpl();
this->startImpl();
}
void ISimulatorListener::stop()
{
if (!m_isRunning) { return; }
stopImpl();
this->stopImpl();
m_isRunning = false;
}

View File

@@ -70,8 +70,8 @@ namespace BlackCore
// timer
connect(&m_oneSecondTimer, &QTimer::timeout, this, &CSimulatorCommon::oneSecondTimerTimeout);
this->m_oneSecondTimer.setObjectName(this->objectName().append(":m_oneSecondTimer"));
this->m_oneSecondTimer.start(1000);
m_oneSecondTimer.setObjectName(this->objectName().append(":m_oneSecondTimer"));
m_oneSecondTimer.start(1000);
// swift data
if (sApp && sApp->hasWebDataServices())
@@ -213,14 +213,14 @@ namespace BlackCore
void CSimulatorCommon::debugLogMessage(const QString &msg) const
{
if (!showDebugLogMessage()) { return; }
if (!this->showDebugLogMessage()) { return; }
if (msg.isEmpty()) { return; }
CLogMessage(this).info(msg);
}
void CSimulatorCommon::debugLogMessage(const QString &funcInfo, const QString &msg) const
{
if (!showDebugLogMessage()) { return; }
if (!this->showDebugLogMessage()) { return; }
if (msg.isEmpty()) { return; }
CLogMessage(this).info("%1 %2") << msg << funcInfo;
}