Replaced QLatin1Literal by QLatin1String

refs #883
This commit is contained in:
Klaus Basan
2017-02-20 05:38:51 +01:00
committed by Mathew Sutcliffe
parent c693423905
commit 060a10dfb6
21 changed files with 309 additions and 309 deletions

View File

@@ -39,14 +39,14 @@ namespace BlackMisc
QString CAircraftLights::convertToQString(bool i18n) const
{
Q_UNUSED(i18n);
const QString s = QLatin1Literal("strobe: ") % boolToYesNo(m_strobeOn) %
QLatin1Literal(" landing: ") % boolToYesNo(m_landingOn) %
QLatin1Literal(" taxi: ") % boolToYesNo(m_taxiOn) %
QLatin1Literal(" beacon: ") % boolToYesNo(m_beaconOn) %
QLatin1Literal(" nav: ") % boolToYesNo(m_navOn) %
QLatin1Literal(" logo: ") % boolToYesNo(m_logoOn) %
QLatin1Literal(" recognition: ") % boolToYesNo(m_recognition) %
QLatin1Literal(" cabin: ") % boolToYesNo(m_cabin);
const QString s = QLatin1String("strobe: ") % boolToYesNo(m_strobeOn) %
QLatin1String(" landing: ") % boolToYesNo(m_landingOn) %
QLatin1String(" taxi: ") % boolToYesNo(m_taxiOn) %
QLatin1String(" beacon: ") % boolToYesNo(m_beaconOn) %
QLatin1String(" nav: ") % boolToYesNo(m_navOn) %
QLatin1String(" logo: ") % boolToYesNo(m_logoOn) %
QLatin1String(" recognition: ") % boolToYesNo(m_recognition) %
QLatin1String(" cabin: ") % boolToYesNo(m_cabin);
return s;
}

View File

@@ -43,12 +43,12 @@ namespace BlackMisc
QString CAircraftSituation::convertToQString(bool i18n) const
{
const QString s = (this->m_position.toQString(i18n)) %
QLatin1Literal(" bank: ") % (this->m_bank.toQString(i18n)) %
QLatin1Literal(" pitch: ") % (this->m_pitch.toQString(i18n)) %
QLatin1Literal(" gs: ") % (this->m_groundSpeed.toQString(i18n)) %
QLatin1Literal(" elevation: ") % (this->m_groundElevation.toQString(i18n)) %
QLatin1Literal(" heading: ") % (this->m_heading.toQString(i18n)) %
QLatin1Literal(" timestamp: ") % (this->hasValidTimestamp() ? this->getFormattedUtcTimestampDhms() : QStringLiteral("-"));
QLatin1String(" bank: ") % (this->m_bank.toQString(i18n)) %
QLatin1String(" pitch: ") % (this->m_pitch.toQString(i18n)) %
QLatin1String(" gs: ") % (this->m_groundSpeed.toQString(i18n)) %
QLatin1String(" elevation: ") % (this->m_groundElevation.toQString(i18n)) %
QLatin1String(" heading: ") % (this->m_heading.toQString(i18n)) %
QLatin1String(" timestamp: ") % (this->hasValidTimestamp() ? this->getFormattedUtcTimestampDhms() : QStringLiteral("-"));
return s;
}

View File

@@ -90,7 +90,7 @@ namespace BlackMisc
static const QString fromUtcI18n(QCoreApplication::translate("Aviation", "from(UTC)"));
static const QString untilUtcI18n(QCoreApplication::translate("Aviation", "until(UTC)"));
const QString s = (i18n ? atcI18n : QLatin1Literal("ATC station")) %
const QString s = (i18n ? atcI18n : QLatin1String("ATC station")) %
QLatin1Char(' ') % this->m_callsign.toQString(i18n) %
QLatin1Char(' ') % this->m_position.toQString(i18n) %
QLatin1String(" online: ") % boolToYesNo(m_isOnline) %
@@ -111,7 +111,7 @@ namespace BlackMisc
QStringLiteral(" ") % this->m_metar.toQString(i18n)) %
// range
QLatin1Char(' ') % (i18n ? rangeI18n : QLatin1Literal("range")) %
QLatin1Char(' ') % (i18n ? rangeI18n : QLatin1String("range")) %
QLatin1Char(' ') % this->m_range.toQString(i18n) %
// distance / bearing
@@ -119,12 +119,12 @@ namespace BlackMisc
// booking from/until
QLatin1Char(' ') %
(i18n ? fromUtcI18n : QLatin1Literal("from(UTC)")) %
(i18n ? fromUtcI18n : QLatin1String("from(UTC)")) %
QLatin1Char(' ') %
(this->m_bookedFromUtc.isNull() ? QLatin1String("-") : this->m_bookedFromUtc.toString("yy-MM-dd HH:mm")) %
QLatin1Char(' ') %
(i18n ? untilUtcI18n : QLatin1Literal("until(UTC)")) %
(i18n ? untilUtcI18n : QLatin1String("until(UTC)")) %
QLatin1Char(' ') %
(this->m_bookedUntilUtc.isNull() ? QLatin1String("-") : this->m_bookedUntilUtc.toString("yy-MM-dd HH:mm"));

View File

@@ -49,10 +49,10 @@ namespace BlackMisc
{
switch (rule)
{
case VFR: return QLatin1Literal("VFR");
case IFR: return QLatin1Literal("IFR");
case SVFR: return QLatin1Literal("SVFR");
default: return QLatin1Literal("???");
case VFR: return QLatin1String("VFR");
case IFR: return QLatin1String("IFR");
case SVFR: return QLatin1String("SVFR");
default: return QLatin1String("???");
}
}

View File

@@ -70,7 +70,7 @@ namespace BlackMisc
QString s(getCombinedCode());
if (!this->getDescription().isEmpty())
{
s += QLatin1Literal(" (") % this->getDescription() % QLatin1Literal(")");
s += QLatin1String(" (") % this->getDescription() % QLatin1String(")");
}
return s;
}
@@ -120,12 +120,12 @@ namespace BlackMisc
static const QString liveryI18n(QCoreApplication::translate("Aviation", "Livery"));
return (i18n ? liveryI18n : livery) %
QLatin1Literal(" cc: '") % m_combinedCode %
QLatin1Literal("' airline: '") % m_airline.toQString(i18n) %
QLatin1Literal("' desc.: '") % m_description %
QLatin1Literal("' F: '") % m_colorFuselage.hex() %
QLatin1Literal("' T: '") % m_colorTail.hex() %
QLatin1Literal("' Mil: ") % boolToYesNo(this->isMilitary());
QLatin1String(" cc: '") % m_combinedCode %
QLatin1String("' airline: '") % m_airline.toQString(i18n) %
QLatin1String("' desc.: '") % m_description %
QLatin1String("' F: '") % m_colorFuselage.hex() %
QLatin1String("' T: '") % m_colorTail.hex() %
QLatin1String("' Mil: ") % boolToYesNo(this->isMilitary());
// force strings for translation in resource files
(void)QT_TRANSLATE_NOOP("Aviation", "Livery");