When calling arg() on a QString constructed from a literal, use QStringLiteral.

This commit is contained in:
Mat Sutcliffe
2018-12-20 21:32:39 +00:00
parent ace7650ebe
commit 6c05c5249d
99 changed files with 227 additions and 291 deletions

View File

@@ -64,8 +64,8 @@ namespace BlackCore
if (this->isEmptyObject()) { return "no audio"; }
const CIdentifier i = this->audioRunsWhere();
return this->isUsingImplementingObject() ?
QString("Local audio on '%1', '%2'.").arg(i.getMachineName(), i.getProcessName()) :
QString("Remote audio on '%1', '%2'.").arg(i.getMachineName(), i.getProcessName());
QStringLiteral("Local audio on '%1', '%2'.").arg(i.getMachineName(), i.getProcessName()) :
QStringLiteral("Remote audio on '%1', '%2'.").arg(i.getMachineName(), i.getProcessName());
}
} // ns
} // ns

View File

@@ -551,11 +551,11 @@ namespace BlackCore
brokenAircraft.setEnabled(false);
brokenAircraft.setRendered(false);
emit this->aircraftRenderingChanged(brokenAircraft);
CMatchingUtils::addLogDetailsToList(pMatchingMessages, callsign, QString("Cannot add remote aircraft, no model string: '%1'").arg(brokenAircraft.toQString()));
CMatchingUtils::addLogDetailsToList(pMatchingMessages, callsign, QStringLiteral("Cannot add remote aircraft, no model string: '%1'").arg(brokenAircraft.toQString()));
return;
}
m_simulatorPlugin.second->logicallyAddRemoteAircraft(aircraftAfterModelApplied);
CMatchingUtils::addLogDetailsToList(pMatchingMessages, callsign, QString("Logically added remote aircraft: %1").arg(aircraftAfterModelApplied.toQString()));
CMatchingUtils::addLogDetailsToList(pMatchingMessages, callsign, QStringLiteral("Logically added remote aircraft: %1").arg(aircraftAfterModelApplied.toQString()));
this->clearMatchingMessages(callsign);
this->addMatchingMessages(callsign, matchingMessages);