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");

View File

@@ -37,12 +37,12 @@ namespace BlackMisc
qv = arg.asVariant(); // this advances in the stream
if (qv.canConvert<QDBusArgument>())
{
out += indent % type % QLatin1Literal("signature ") % signature % QLatin1Char('\n');
out += indent % type % QLatin1String("signature ") % signature % QLatin1Char('\n');
out += CDBusUtils::getQDBusArgumentSignature(qv.value<QDBusArgument>(), level + 1) % QLatin1Char('\n');
}
else
{
out += indent % QLatin1Literal("type: ") % type % QLatin1Literal("signature ") % signature % QLatin1Literal(" value ") % qv.toString() % QLatin1Char('\n');
out += indent % QLatin1String("type: ") % type % QLatin1String("signature ") % signature % QLatin1String(" value ") % qv.toString() % QLatin1Char('\n');
}
}
arg.endArray();
@@ -53,15 +53,15 @@ namespace BlackMisc
{
switch (type)
{
case QDBusArgument::BasicType: return QLatin1Literal("BasicType");
case QDBusArgument::VariantType: return QLatin1Literal("VariantType");
case QDBusArgument::ArrayType: return QLatin1Literal("ArrayType");
case QDBusArgument::StructureType: return QLatin1Literal("StructureType");
case QDBusArgument::MapType: return QLatin1Literal("MapType");
case QDBusArgument::MapEntryType: return QLatin1Literal("MapEntryType");
case QDBusArgument::BasicType: return QLatin1String("BasicType");
case QDBusArgument::VariantType: return QLatin1String("VariantType");
case QDBusArgument::ArrayType: return QLatin1String("ArrayType");
case QDBusArgument::StructureType: return QLatin1String("StructureType");
case QDBusArgument::MapType: return QLatin1String("MapType");
case QDBusArgument::MapEntryType: return QLatin1String("MapEntryType");
case QDBusArgument::UnknownType:
default:
return QLatin1Literal("Unknown type");
return QLatin1String("Unknown type");
}
}

View File

@@ -59,10 +59,10 @@ namespace BlackMisc
{
const QString s =
this->m_modelString %
QLatin1Literal(" type: '") % this->getModelTypeAsString() %
QLatin1Literal("' ICAO: '") % this->getAircraftIcaoCode().toQString(i18n) %
QLatin1Literal("' {") % this->m_livery.toQString(i18n) %
QLatin1Literal("} file: '") % this->m_fileName % QLatin1Literal("'");
QLatin1String(" type: '") % this->getModelTypeAsString() %
QLatin1String("' ICAO: '") % this->getAircraftIcaoCode().toQString(i18n) %
QLatin1String("' {") % this->m_livery.toQString(i18n) %
QLatin1String("} file: '") % this->m_fileName % QLatin1String("'");
return s;
}

View File

@@ -174,7 +174,7 @@ namespace BlackMisc
CStatusMessageList IInterpolator::writeLogFile(const QList<InterpolationLog> &interpolation, const QList<PartsLog> &parts)
{
if (parts.isEmpty() && interpolation.isEmpty()) { return CStatusMessage(static_cast<IInterpolator *>(nullptr)).warning("No data for log"); }
static const QString html = QLatin1Literal("Entries: %1\n\n%2");
static const QString html = QLatin1String("Entries: %1\n\n%2");
const QString htmlTemplate = CFileUtils::readFileToString(CBuildConfig::getHtmlTemplateFileName());
CStatusMessageList msgs;
@@ -231,18 +231,18 @@ namespace BlackMisc
{
if (logs.isEmpty()) { return {}; }
const QString tableHeader =
QLatin1Literal("<thead><tr>") %
QLatin1Literal("<th>c.</th><th>CS</th><th>VTOL</th><th>timestamp</th><th>since</th>") %
QLatin1Literal("<th>ts old</th><th>ts new</th><th>ts cur</th>") %
QLatin1Literal("<th>&Delta;t</th><th>&Delta;t fr.</th><th>fraction</th>") %
QLatin1Literal("<th>lat.old</th><th>lat.new</th><th>lat.cur</th>") %
QLatin1Literal("<th>lng.old</th><th>lng.new</th><th>lng.cur</th>") %
QLatin1Literal("<th>alt.old</th><th>alt.new</th><th>alt.cur</th>") %
QLatin1Literal("<th>elv.old</th><th>elv.new</th><th>elv.cur</th>") %
QLatin1Literal("<th>gnd.factor</th>") %
QLatin1Literal("<th>onGnd.old</th><th>onGnd.new</th><th>onGnd.cur</th>") %
QLatin1Literal("<th>parts</th><th>c.</th><th>parts details</th>") %
QLatin1Literal("</tr></thead>\n");
QLatin1String("<thead><tr>") %
QLatin1String("<th>c.</th><th>CS</th><th>VTOL</th><th>timestamp</th><th>since</th>") %
QLatin1String("<th>ts old</th><th>ts new</th><th>ts cur</th>") %
QLatin1String("<th>&Delta;t</th><th>&Delta;t fr.</th><th>fraction</th>") %
QLatin1String("<th>lat.old</th><th>lat.new</th><th>lat.cur</th>") %
QLatin1String("<th>lng.old</th><th>lng.new</th><th>lng.cur</th>") %
QLatin1String("<th>alt.old</th><th>alt.new</th><th>alt.cur</th>") %
QLatin1String("<th>elv.old</th><th>elv.new</th><th>elv.cur</th>") %
QLatin1String("<th>gnd.factor</th>") %
QLatin1String("<th>onGnd.old</th><th>onGnd.new</th><th>onGnd.cur</th>") %
QLatin1String("<th>parts</th><th>c.</th><th>parts details</th>") %
QLatin1String("</tr></thead>\n");
static const CLengthUnit ft = CLengthUnit::ft();
const InterpolationLog firstLog = logs.first();
@@ -259,63 +259,63 @@ namespace BlackMisc
// concatenating in multiple steps, otherwise C4503 warnings
tableRows +=
QLatin1Literal("<tr>") %
(changedNewPosition ? QLatin1Literal("<td class=\"changed\">*</td>") : QLatin1Literal("<td></td>")) %
QLatin1Literal("<td>") % log.callsign.asString() % QLatin1Literal("</td>") %
QLatin1Literal("<td>") % boolToYesNo(log.vtolAircraft) % QLatin1Literal("</td>") %
QLatin1Literal("<td>") % msSinceEpochToTime(log.timestamp) % QLatin1Literal("</td>") %
QLatin1Literal("<td>") % QString::number(log.timestamp - firstLog.timestamp) % QLatin1Literal("</td>") %
QLatin1String("<tr>") %
(changedNewPosition ? QLatin1String("<td class=\"changed\">*</td>") : QLatin1String("<td></td>")) %
QLatin1String("<td>") % log.callsign.asString() % QLatin1String("</td>") %
QLatin1String("<td>") % boolToYesNo(log.vtolAircraft) % QLatin1String("</td>") %
QLatin1String("<td>") % msSinceEpochToTime(log.timestamp) % QLatin1String("</td>") %
QLatin1String("<td>") % QString::number(log.timestamp - firstLog.timestamp) % QLatin1String("</td>") %
QLatin1Literal("<td class=\"old\">") % msSinceEpochToTime(log.oldSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.oldSituation.getTimeOffsetMs()) % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"new\">") % msSinceEpochToTime(log.newSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.newSituation.getTimeOffsetMs()) % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"cur\">") % msSinceEpochToTime(log.currentSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.currentSituation.getTimeOffsetMs()) % QLatin1Literal("</td>") %
QLatin1String("<td class=\"old\">") % msSinceEpochToTime(log.oldSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.oldSituation.getTimeOffsetMs()) % QLatin1String("</td>") %
QLatin1String("<td class=\"new\">") % msSinceEpochToTime(log.newSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.newSituation.getTimeOffsetMs()) % QLatin1String("</td>") %
QLatin1String("<td class=\"cur\">") % msSinceEpochToTime(log.currentSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.currentSituation.getTimeOffsetMs()) % QLatin1String("</td>") %
QLatin1Literal("<td>") % QString::number(log.deltaTimeMs) % QLatin1Literal("</td>") %
QLatin1Literal("<td>") % QString::number(log.deltaTimeFractionMs) % QLatin1Literal("</td>") %
QLatin1Literal("<td>") % QString::number(log.simulationTimeFraction) % QLatin1Literal("</td>");
QLatin1String("<td>") % QString::number(log.deltaTimeMs) % QLatin1String("</td>") %
QLatin1String("<td>") % QString::number(log.deltaTimeFractionMs) % QLatin1String("</td>") %
QLatin1String("<td>") % QString::number(log.simulationTimeFraction) % QLatin1String("</td>");
tableRows +=
QLatin1Literal("<td class=\"old\">") % log.oldSituation.latitudeAsString() % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"new\">") % log.newSituation.latitudeAsString() % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"cur\">") % log.currentSituation.latitudeAsString() % QLatin1Literal("</td>") %
QLatin1String("<td class=\"old\">") % log.oldSituation.latitudeAsString() % QLatin1String("</td>") %
QLatin1String("<td class=\"new\">") % log.newSituation.latitudeAsString() % QLatin1String("</td>") %
QLatin1String("<td class=\"cur\">") % log.currentSituation.latitudeAsString() % QLatin1String("</td>") %
QLatin1Literal("<td class=\"old\">") % log.oldSituation.longitudeAsString() % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"new\">") % log.newSituation.longitudeAsString() % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"cur\">") % log.currentSituation.longitudeAsString() % QLatin1Literal("</td>");
QLatin1String("<td class=\"old\">") % log.oldSituation.longitudeAsString() % QLatin1String("</td>") %
QLatin1String("<td class=\"new\">") % log.newSituation.longitudeAsString() % QLatin1String("</td>") %
QLatin1String("<td class=\"cur\">") % log.currentSituation.longitudeAsString() % QLatin1String("</td>");
tableRows +=
QLatin1Literal("<td class=\"old\">") % log.oldSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"new\">") % log.newSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"cur\">") % log.currentSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1Literal("</td>") %
QLatin1String("<td class=\"old\">") % log.oldSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1String("</td>") %
QLatin1String("<td class=\"new\">") % log.newSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1String("</td>") %
QLatin1String("<td class=\"cur\">") % log.currentSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1String("</td>") %
QLatin1Literal("<td class=\"old\">") % log.oldSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"new\">") % log.newSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"cur\">") % log.currentSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1Literal("</td>") %
QLatin1String("<td class=\"old\">") % log.oldSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1String("</td>") %
QLatin1String("<td class=\"new\">") % log.newSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1String("</td>") %
QLatin1String("<td class=\"cur\">") % log.currentSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1String("</td>") %
QLatin1Literal("<td>") % QString::number(log.groundFactor) % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"old\">") % log.oldSituation.getOnGroundInfo() % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"new\">") % log.newSituation.getOnGroundInfo() % QLatin1Literal("</td>") %
QLatin1Literal("<td class=\"cur\">") % log.currentSituation.getOnGroundInfo() % QLatin1Literal("</td>");
QLatin1String("<td>") % QString::number(log.groundFactor) % QLatin1String("</td>") %
QLatin1String("<td class=\"old\">") % log.oldSituation.getOnGroundInfo() % QLatin1String("</td>") %
QLatin1String("<td class=\"new\">") % log.newSituation.getOnGroundInfo() % QLatin1String("</td>") %
QLatin1String("<td class=\"cur\">") % log.currentSituation.getOnGroundInfo() % QLatin1String("</td>");
tableRows +=
QLatin1Literal("<td>") % boolToYesNo(log.useParts) % QLatin1Literal("</td>") %
QLatin1String("<td>") % boolToYesNo(log.useParts) % QLatin1String("</td>") %
(changedParts ? QLatin1String("<td>*</td>") : QLatin1String("<td></td>")) %
QLatin1Literal("<td>") % (log.useParts ? log.parts.toQString(true) : QLatin1Literal("")) % QLatin1Literal("</td>") %
QLatin1Literal("</tr>\n");
QLatin1String("<td>") % (log.useParts ? log.parts.toQString(true) : QLatin1String("")) % QLatin1String("</td>") %
QLatin1String("</tr>\n");
}
tableRows += QLatin1Literal("</tbody>\n");
return QLatin1Literal("<table class=\"small\">\n") % tableHeader % tableRows % QLatin1Literal("</table>\n");
tableRows += QLatin1String("</tbody>\n");
return QLatin1String("<table class=\"small\">\n") % tableHeader % tableRows % QLatin1String("</table>\n");
}
QString IInterpolator::getHtmlPartsLog(const QList<PartsLog> &logs)
{
if (logs.isEmpty()) { return {}; }
const QString tableHeader =
QLatin1Literal("<thead><tr>") %
QLatin1Literal("<th>CS</th><th>timestamp</th>") %
QLatin1Literal("<th>c.</th>") %
QLatin1Literal("<th>parts</th>") %
QLatin1Literal("</tr></thead>\n");
QLatin1String("<thead><tr>") %
QLatin1String("<th>CS</th><th>timestamp</th>") %
QLatin1String("<th>c.</th>") %
QLatin1String("<th>parts</th>") %
QLatin1String("</tr></thead>\n");
CAircraftParts lastParts; // default, so shown if parts are different from default
QString tableRows("<tbody>\n");
@@ -324,14 +324,14 @@ namespace BlackMisc
const bool changedParts = lastParts != log.parts;
lastParts = log.parts;
tableRows +=
QLatin1Literal("<tr>") %
QLatin1Literal("<td>") % log.callsign.asString() % QLatin1Literal("</td>") %
QLatin1Literal("<td>") % msSinceEpochToTime(log.timestamp) % QLatin1Literal("</td>") %
QLatin1String("<tr>") %
QLatin1String("<td>") % log.callsign.asString() % QLatin1String("</td>") %
QLatin1String("<td>") % msSinceEpochToTime(log.timestamp) % QLatin1String("</td>") %
(changedParts ? QLatin1String("<td class=\"changed\">*</td>") : QLatin1String("<td></td>")) %
QLatin1Literal("<td>") % log.parts.toQString() % QLatin1Literal("</td>");
QLatin1String("<td>") % log.parts.toQString() % QLatin1String("</td>");
}
tableRows += QLatin1Literal("</tbody>\n");
return QLatin1Literal("<table class=\"small\">\n") % tableHeader % tableRows % QLatin1Literal("</table>\n");
tableRows += QLatin1String("</tbody>\n");
return QLatin1String("<table class=\"small\">\n") % tableHeader % tableRows % QLatin1String("</table>\n");
}
void IInterpolator::clearLog()

View File

@@ -552,8 +552,8 @@ namespace BlackMisc
QLatin1Char(' ') % this->m_com1system.toQString(i18n) %
QLatin1Char(' ') % this->m_com2system.toQString(i18n) %
QLatin1Char(' ') % this->m_transponder.toQString(i18n) %
QLatin1Literal(" enabled: ") % BlackMisc::boolToYesNo(this->isEnabled()) %
QLatin1Literal(" rendered: ") % BlackMisc::boolToYesNo(this->isRendered()) %
QLatin1String(" enabled: ") % BlackMisc::boolToYesNo(this->isEnabled()) %
QLatin1String(" rendered: ") % BlackMisc::boolToYesNo(this->isRendered()) %
QLatin1Char(' ') % this->getModel().toQString(i18n);
return s;
}

View File

@@ -179,12 +179,12 @@ namespace BlackMisc
QString rowHtml;
if (withLineNumbers)
{
rowHtml = QLatin1Literal("<td>") % QString::number(line++) % QLatin1Literal("</td>");
rowHtml = QLatin1String("<td>") % QString::number(line++) % QLatin1String("</td>");
}
for (const CPropertyIndex &index : usedIndexes)
{
rowHtml += QLatin1Literal("<td>") % statusMessage.propertyByIndex(index).toQString(true).toHtmlEscaped() % QLatin1Literal("</td>");
rowHtml += QLatin1String("<td>") % statusMessage.propertyByIndex(index).toQString(true).toHtmlEscaped() % QLatin1String("</td>");
}
const QString severityClass = statusMessage.getSeverityAsString();
@@ -207,10 +207,10 @@ namespace BlackMisc
const QString htmlStyleSheetImpl()
{
const QString style = QLatin1Char('.') % CStatusMessage::severityToString(CStatusMessage::SeverityDebug) % QLatin1Literal(" { color: lightgreen; } ") %
QLatin1Char('.') % CStatusMessage::severityToString(CStatusMessage::SeverityInfo) % QLatin1Literal(" { color: lightgreen; } ") %
QLatin1Char('.') % CStatusMessage::severityToString(CStatusMessage::SeverityWarning) % QLatin1Literal(" { color: yellow; } ") %
QLatin1Char('.') % CStatusMessage::severityToString(CStatusMessage::SeverityError) % QLatin1Literal(" { color: red; }");
const QString style = QLatin1Char('.') % CStatusMessage::severityToString(CStatusMessage::SeverityDebug) % QLatin1String(" { color: lightgreen; } ") %
QLatin1Char('.') % CStatusMessage::severityToString(CStatusMessage::SeverityInfo) % QLatin1String(" { color: lightgreen; } ") %
QLatin1Char('.') % CStatusMessage::severityToString(CStatusMessage::SeverityWarning) % QLatin1String(" { color: yellow; } ") %
QLatin1Char('.') % CStatusMessage::severityToString(CStatusMessage::SeverityError) % QLatin1String(" { color: red; }");
return style;
}

View File

@@ -40,7 +40,7 @@
#include <QDBusAbstractInterface>
#include <QDBusPendingCall>
#include <QDBusPendingReply>
#include <QLatin1Literal>
#include <QLatin1String>
#include <QList>
#include <QObject>
#include <QString>
@@ -81,293 +81,293 @@ namespace BlackMisc
QDBusPendingReply<BlackMisc::Aviation::CAtcStation> getAtcStation()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1Literal("getAtcStation"), argumentList);
return asyncCallWithArgumentList(QLatin1String("getAtcStation"), argumentList);
}
QDBusPendingReply<BlackMisc::Simulation::FsCommon::CAircraftCfgEntriesList> getAircraftCfgEntriesList(int number)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(number);
return asyncCallWithArgumentList(QLatin1Literal("getAircraftCfgEntriesList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("getAircraftCfgEntriesList"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAtcStationList> getAtcStationList(int number)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(number);
return asyncCallWithArgumentList(QLatin1Literal("getAtcStationList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("getAtcStationList"), argumentList);
}
QDBusPendingReply<QList<QDBusObjectPath>> getObjectPaths(int number)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(number);
return asyncCallWithArgumentList(QLatin1Literal("getObjectPaths"), argumentList);
return asyncCallWithArgumentList(QLatin1String("getObjectPaths"), argumentList);
}
QDBusPendingReply<BlackMisc::PhysicalQuantities::CSpeed> getSpeed()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1Literal("getSpeed"), argumentList);
return asyncCallWithArgumentList(QLatin1String("getSpeed"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAltitude> pingAltitude(const BlackMisc::Aviation::CAltitude &altitude)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(altitude);
return asyncCallWithArgumentList(QLatin1Literal("pingAltitude"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAltitude"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAircraftSituation> pingSituation(const BlackMisc::Aviation::CAircraftSituation &situation)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(situation);
return asyncCallWithArgumentList(QLatin1Literal("pingSituation"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingSituation"), argumentList);
}
QDBusPendingReply<BlackMisc::Network::CUser> pingUser(const BlackMisc::Network::CUser &user)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(user);
return asyncCallWithArgumentList(QLatin1Literal("pingUser"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingUser"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CTransponder> pingTransponder(const BlackMisc::Aviation::CTransponder &transponder)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(transponder);
return asyncCallWithArgumentList(QLatin1Literal("pingTransponder"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingTransponder"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAtcStation> pingAtcStation(const BlackMisc::Aviation::CAtcStation &station)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(station);
return asyncCallWithArgumentList(QLatin1Literal("pingAtcStation"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAtcStation"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAircraftIcaoCode> pingAircraftIcaoData(const BlackMisc::Aviation::CAircraftIcaoCode &icaoData)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(icaoData);
return asyncCallWithArgumentList(QLatin1Literal("pingAircraftIcaoData"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAircraftIcaoData"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAircraftLights> pingAircraftLights(const BlackMisc::Aviation::CAircraftLights &lights)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(lights);
return asyncCallWithArgumentList(QLatin1Literal("pingAircraftLights"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAircraftLights"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAircraftParts> pingAircraftParts(const BlackMisc::Aviation::CAircraftParts &parts)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(parts);
return asyncCallWithArgumentList(QLatin1Literal("pingAircraftParts"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAircraftParts"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAircraftEngine> pingAircraftEngine(const BlackMisc::Aviation::CAircraftEngine &engine)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(engine);
return asyncCallWithArgumentList(QLatin1Literal("pingAircraftEngine"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAircraftEngine"), argumentList);
}
QDBusPendingReply<BlackMisc::Simulation::CAircraftModel> pingAircraftModel(const BlackMisc::Simulation::CAircraftModel &model)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(model);
return asyncCallWithArgumentList(QLatin1Literal("pingAircraftModel"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAircraftModel"), argumentList);
}
QDBusPendingReply<BlackMisc::Simulation::CAircraftModelList> pingAircraftModelList(const BlackMisc::Simulation::CAircraftModelList &model)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(model);
return asyncCallWithArgumentList(QLatin1Literal("pingAircraftModelList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAircraftModelList"), argumentList);
}
QDBusPendingReply<BlackMisc::Simulation::CSimulatedAircraft> pingSimulatedAircraft(BlackMisc::Simulation::CSimulatedAircraft aircraft)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(aircraft);
return asyncCallWithArgumentList(QLatin1Literal("pingSimulatedAircraft"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingSimulatedAircraft"), argumentList);
}
QDBusPendingReply<BlackMisc::Simulation::CSimulatorPluginInfo> pingPluginInfo(BlackMisc::Simulation::CSimulatorPluginInfo info)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(info);
return asyncCallWithArgumentList(QLatin1Literal("pingPluginInfo"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingPluginInfo"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAtcStationList> pingAtcStationList(BlackMisc::Aviation::CAtcStationList atcStationList)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(atcStationList);
return asyncCallWithArgumentList(QLatin1Literal("pingAtcStationList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAtcStationList"), argumentList);
}
QDBusPendingReply<BlackMisc::PhysicalQuantities::CSpeed> pingSpeed(const BlackMisc::PhysicalQuantities::CSpeed &speed)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(speed);
return asyncCallWithArgumentList(QLatin1Literal("pingSpeed"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingSpeed"), argumentList);
}
QDBusPendingReply<BlackMisc::Simulation::CSimulatedAircraftList> pingAircraftList(const BlackMisc::Simulation::CSimulatedAircraftList &aircraftList)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(aircraftList);
return asyncCallWithArgumentList(QLatin1Literal("pingAircraftList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAircraftList"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAirportList> pingAirportList(const BlackMisc::Aviation::CAirportList &airportList)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(airportList);
return asyncCallWithArgumentList(QLatin1Literal("pingAirportList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingAirportList"), argumentList);
}
QDBusPendingReply<BlackMisc::Network::CClientList> pingClientList(const BlackMisc::Network::CClientList &clientList)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(clientList);
return asyncCallWithArgumentList(QLatin1Literal("pingClientList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingClientList"), argumentList);
}
QDBusPendingReply<BlackMisc::Network::CClient> pingClient(const BlackMisc::Network::CClient &client)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(client);
return asyncCallWithArgumentList(QLatin1Literal("pingClient"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingClient"), argumentList);
}
QDBusPendingReply<BlackMisc::CVariant> pingCVariant(const BlackMisc::CVariant &variant)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(variant);
return asyncCallWithArgumentList(QLatin1Literal("pingCVariant"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingCVariant"), argumentList);
}
QDBusPendingReply<BlackMisc::CPropertyIndex> pingPropertyIndex(const BlackMisc::CPropertyIndex &index)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(index);
return asyncCallWithArgumentList(QLatin1Literal("pingPropertyIndex"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingPropertyIndex"), argumentList);
}
QDBusPendingReply<BlackMisc::CPropertyIndexVariantMap> pingIndexVariantMap(BlackMisc::CPropertyIndexVariantMap indexVariantMap)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(indexVariantMap);
return asyncCallWithArgumentList(QLatin1Literal("pingIndexVariantMap"), argumentList);
return asyncCallWithArgumentList(QLatin1String("pingIndexVariantMap"), argumentList);
}
QDBusPendingReply<BlackMisc::Aviation::CAltitude> receiveAltitude(const BlackMisc::Aviation::CAltitude &altitude)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(altitude);
return asyncCallWithArgumentList(QLatin1Literal("receiveAltitude"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveAltitude"), argumentList);
}
QDBusPendingReply<> receiveAtcStation(const BlackMisc::Aviation::CAtcStation &station)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(station);
return asyncCallWithArgumentList(QLatin1Literal("receiveAtcStation"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveAtcStation"), argumentList);
}
QDBusPendingReply<> receiveAtcStationList(const BlackMisc::Aviation::CAtcStationList &atcStationList)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(atcStationList);
return asyncCallWithArgumentList(QLatin1Literal("receiveAtcStationList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveAtcStationList"), argumentList);
}
QDBusPendingReply<> receiveCallsign(const BlackMisc::Aviation::CCallsign &callsign)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(callsign);
return asyncCallWithArgumentList(QLatin1Literal("receiveCallsign"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveCallsign"), argumentList);
}
QDBusPendingReply<> receiveComUnit(const BlackMisc::Aviation::CComSystem &comUnit)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(comUnit);
return asyncCallWithArgumentList(QLatin1Literal("receiveComUnit"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveComUnit"), argumentList);
}
QDBusPendingReply<> receiveGeoPosition(const BlackMisc::Geo::CCoordinateGeodetic &geo)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(geo);
return asyncCallWithArgumentList(QLatin1Literal("receiveGeoPosition"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveGeoPosition"), argumentList);
}
QDBusPendingReply<> receiveLength(const BlackMisc::PhysicalQuantities::CLength &length)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(length);
return asyncCallWithArgumentList(QLatin1Literal("receiveLength"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveLength"), argumentList);
}
QDBusPendingReply<> receiveVariantList(const BlackMisc::CVariantList &list)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(list);
return asyncCallWithArgumentList(QLatin1Literal("receiveVariantList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveVariantList"), argumentList);
}
QDBusPendingReply<> receiveList(const QList<double> &list)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(list);
return asyncCallWithArgumentList(QLatin1Literal("receiveList"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveList"), argumentList);
}
QDBusPendingReply<> receiveSpeed(const BlackMisc::PhysicalQuantities::CSpeed &speed)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(speed);
return asyncCallWithArgumentList(QLatin1Literal("receiveSpeed"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveSpeed"), argumentList);
}
QDBusPendingReply<> receiveStringMessage(const QString &message)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(message);
return asyncCallWithArgumentList(QLatin1Literal("receiveStringMessage"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveStringMessage"), argumentList);
}
QDBusPendingReply<> receiveTrack(BlackMisc::Aviation::CTrack track)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(track);
return asyncCallWithArgumentList(QLatin1Literal("receiveTrack"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveTrack"), argumentList);
}
QDBusPendingReply<> receiveTransponder(const BlackMisc::Aviation::CTransponder &transponder)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(transponder);
return asyncCallWithArgumentList(QLatin1Literal("receiveTransponder"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveTransponder"), argumentList);
}
QDBusPendingReply<> receiveValueMap(const BlackMisc::CPropertyIndexVariantMap &valueMap)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(valueMap);
return asyncCallWithArgumentList(QLatin1Literal("receiveValueMap"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveValueMap"), argumentList);
}
QDBusPendingReply<> receiveVariant(const QDBusVariant &variant, int localMetyType)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(variant) << QVariant::fromValue(localMetyType);
return asyncCallWithArgumentList(QLatin1Literal("receiveVariant"), argumentList);
return asyncCallWithArgumentList(QLatin1String("receiveVariant"), argumentList);
}
//! @}