mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
Ref T480 No need for QStringLiteral when concatenating with %, use UTF-16 string literals.
This commit is contained in:
@@ -48,10 +48,10 @@ namespace BlackMisc
|
||||
QString CAircraftMatcherSetup::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
return QStringLiteral("algorithm: '") % this->getMatchingAlgorithmAsString() %
|
||||
QStringLiteral("' mode: '") % this->getMatchingModeAsString() %
|
||||
QStringLiteral("' strategy: '") % this->getPickStrategyAsString() %
|
||||
QStringLiteral("'");
|
||||
return u"algorithm: '" % this->getMatchingAlgorithmAsString() %
|
||||
u"' mode: '" % this->getMatchingModeAsString() %
|
||||
u"' strategy: '" % this->getPickStrategyAsString() %
|
||||
u'\'';
|
||||
}
|
||||
|
||||
CVariant CAircraftMatcherSetup::propertyByIndex(const CPropertyIndex &index) const
|
||||
|
||||
@@ -60,11 +60,11 @@ namespace BlackMisc
|
||||
{
|
||||
const QString s =
|
||||
(this->hasModelString() ? inApostrophes(m_modelString, true) % QStringLiteral(" ") : QString()) %
|
||||
QStringLiteral(" type: '") % this->getModelTypeAsString() %
|
||||
QStringLiteral("' ICAO: '") % this->getAircraftIcaoCode().toQString(i18n) %
|
||||
QStringLiteral(" CG: ") % this->getCG().valueRoundedWithUnit(1) %
|
||||
QStringLiteral("' {") % m_livery.toQString(i18n) %
|
||||
QStringLiteral("} file: '") % m_fileName % QStringLiteral("'");
|
||||
u" type: '" % this->getModelTypeAsString() %
|
||||
u"' ICAO: '" % this->getAircraftIcaoCode().toQString(i18n) %
|
||||
u" CG: " % this->getCG().valueRoundedWithUnit(1) %
|
||||
u"' {" % m_livery.toQString(i18n) %
|
||||
u"} file: '" % m_fileName % u'\'';
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -534,9 +534,9 @@ namespace BlackMisc
|
||||
QString CAircraftModel::getSwiftLiveryString() const
|
||||
{
|
||||
const QString l =
|
||||
(this->getLivery().hasValidDbKey() ? QStringLiteral("l") % this->getLivery().getDbKeyAsString() : QString()) %
|
||||
(this->getLivery().hasValidDbKey() ? u'l' % this->getLivery().getDbKeyAsString() : QString()) %
|
||||
(this->getAircraftIcaoCode().hasValidDbKey() ? QStringLiteral("a") % this->getAircraftIcaoCode().getDbKeyAsString() : QString()) %
|
||||
(this->hasValidDbKey() ? QStringLiteral("m") % this->getDbKeyAsString() : QString());
|
||||
(this->hasValidDbKey() ? u'm' % this->getDbKeyAsString() : QString());
|
||||
|
||||
return l.isEmpty() ? QString() : liveryStringPrefix() % l;
|
||||
}
|
||||
@@ -851,10 +851,10 @@ namespace BlackMisc
|
||||
static const QString prefixLivery("liv_");
|
||||
static const QString prefixDistributor("dist_");
|
||||
|
||||
const QString modelString(json.value(prefix % QStringLiteral("modelstring")).toString());
|
||||
const QString modelDescription(json.value(prefix % QStringLiteral("description")).toString());
|
||||
const QString modelName(json.value(prefix % QStringLiteral("name")).toString());
|
||||
const QString modelMode(json.value(prefix % QStringLiteral("mode")).toString());
|
||||
const QString modelString(json.value(prefix % u"modelstring").toString());
|
||||
const QString modelDescription(json.value(prefix % u"description").toString());
|
||||
const QString modelName(json.value(prefix % u"name").toString());
|
||||
const QString modelMode(json.value(prefix % u"mode").toString());
|
||||
|
||||
const CSimulatorInfo simInfo = CSimulatorInfo::fromDatabaseJson(json, prefix);
|
||||
CDistributor distributor(CDistributor::fromDatabaseJson(json, prefixDistributor));
|
||||
@@ -864,7 +864,7 @@ namespace BlackMisc
|
||||
//! \todo KB 2018-08 "idaircrafticao" seem not to be used anymore (remove???) in "vAircraftModelDenormalized", but was used in "vAircraftModelComplete"
|
||||
if (!aircraftIcao.isLoadedFromDb())
|
||||
{
|
||||
const int idAircraftIcao = json.value(prefix % QStringLiteral("idaircrafticao")).toInt(-1);
|
||||
const int idAircraftIcao = json.value(prefix % u"idaircrafticao").toInt(-1);
|
||||
if (idAircraftIcao >= 0)
|
||||
{
|
||||
aircraftIcao.setDbKey(idAircraftIcao);
|
||||
@@ -873,7 +873,7 @@ namespace BlackMisc
|
||||
|
||||
if (!livery.isLoadedFromDb())
|
||||
{
|
||||
const int idLivery = json.value(prefix % QStringLiteral("idlivery")).toInt(-1);
|
||||
const int idLivery = json.value(prefix % u"idlivery").toInt(-1);
|
||||
if (idLivery >= 0)
|
||||
{
|
||||
livery.setDbKey(idLivery);
|
||||
@@ -882,7 +882,7 @@ namespace BlackMisc
|
||||
|
||||
if (!distributor.isLoadedFromDb())
|
||||
{
|
||||
const QString idDistributor = json.value(prefix % QStringLiteral("iddistributor")).toString();
|
||||
const QString idDistributor = json.value(prefix % u"iddistributor").toString();
|
||||
if (!idDistributor.isEmpty())
|
||||
{
|
||||
distributor.setDbKey(idDistributor);
|
||||
@@ -907,15 +907,15 @@ namespace BlackMisc
|
||||
static const QString prefixLivery("liv_");
|
||||
static const QString prefixDistributor("dist_");
|
||||
|
||||
const QString modelString(json.value(prefix % QStringLiteral("modelstring")).toString());
|
||||
const QString modelDescription(json.value(prefix % QStringLiteral("description")).toString());
|
||||
const QString modelName(json.value(prefix % QStringLiteral("name")).toString());
|
||||
const QString modelMode(json.value(prefix % QStringLiteral("mode")).toString());
|
||||
const QString modelString(json.value(prefix % u"modelstring").toString());
|
||||
const QString modelDescription(json.value(prefix % u"description").toString());
|
||||
const QString modelName(json.value(prefix % u"name").toString());
|
||||
const QString modelMode(json.value(prefix % u"mode").toString());
|
||||
|
||||
const CSimulatorInfo simInfo = CSimulatorInfo::fromDatabaseJson(json, prefix);
|
||||
const int idAircraftIcao = json.value(prefixAircraftIcao % QStringLiteral("id")).toInt(-1);
|
||||
const int idLivery = json.value(prefixLivery % QStringLiteral("id")).toInt(-1);
|
||||
const QString idDistributor = json.value(prefixDistributor % QStringLiteral("id")).toString();
|
||||
const int idAircraftIcao = json.value(prefixAircraftIcao % u"id").toInt(-1);
|
||||
const int idLivery = json.value(prefixLivery % u"id").toInt(-1);
|
||||
const QString idDistributor = json.value(prefixDistributor % u"id").toString();
|
||||
const bool cachedAircraftIcao = (idAircraftIcao >= 0) && aircraftIcaos.contains(idAircraftIcao);
|
||||
const bool cachedLivery = (idLivery >= 0) && liveries.contains(idLivery);
|
||||
const bool cachedDistributor = !idDistributor.isEmpty() && distributors.contains(idDistributor);
|
||||
@@ -939,13 +939,13 @@ namespace BlackMisc
|
||||
|
||||
if (!livery.isLoadedFromDb())
|
||||
{
|
||||
const int idLivery = json.value(prefix % QStringLiteral("idlivery")).toInt(-1);
|
||||
const int idLivery = json.value(prefix % u"idlivery").toInt(-1);
|
||||
if (idLivery >= 0) { livery.setDbKey(idLivery); }
|
||||
}
|
||||
|
||||
if (!distributor.isLoadedFromDb())
|
||||
{
|
||||
const QString idDistributor = json.value(prefix % QStringLiteral("iddistributor")).toString();
|
||||
const QString idDistributor = json.value(prefix % u"iddistributor").toString();
|
||||
if (!idDistributor.isEmpty()) { distributor.setDbKey(idDistributor); }
|
||||
}
|
||||
|
||||
|
||||
@@ -1183,7 +1183,7 @@ namespace BlackMisc
|
||||
{
|
||||
html += html.isEmpty() ?
|
||||
model.asHtmlSummary(" ") :
|
||||
QStringLiteral("<br>") % model.asHtmlSummary(" ");
|
||||
u"<br>" % model.asHtmlSummary(" ");
|
||||
}
|
||||
return html;
|
||||
}
|
||||
@@ -1195,17 +1195,17 @@ namespace BlackMisc
|
||||
const int dbEntries = this->countWithValidDbKey();
|
||||
const double dbRatio = CMathUtils::round(static_cast<double>(100 * dbEntries) / this->size(), 1);
|
||||
return
|
||||
QStringLiteral("Entries: ") % QString::number(this->size()) %
|
||||
QStringLiteral(" | valid DB keys: ") % QString::number(dbEntries) %
|
||||
QStringLiteral(" (") % QString::number(dbRatio) % QStringLiteral("%)") % separator %
|
||||
QStringLiteral("color liveries: ") % QString::number(this->countModelsWithColorLivery()) %
|
||||
QStringLiteral(" | airline liveries: ") % QString::number(this->countModelsWithAirlineLivery()) % separator %
|
||||
QStringLiteral("VTOL: ") % QString::number(this->countVtolAircraft()) %
|
||||
QStringLiteral(" | military: ") % QString::number(this->countMilitaryAircraft()) %
|
||||
QStringLiteral(" | civilian: ") % QString::number(this->countCivilianAircraft()) % separator %
|
||||
QStringLiteral("Different airlines: ") % QString::number(this->countDifferentAirlines()) % separator %
|
||||
QStringLiteral("Combined types: '") % this->getCombinedTypesAsString() % QStringLiteral("'") % separator %
|
||||
QStringLiteral("Simulators: ") % this->countPerSimulator().toQString();
|
||||
u"Entries: " % QString::number(this->size()) %
|
||||
u" | valid DB keys: " % QString::number(dbEntries) %
|
||||
u" (" % QString::number(dbRatio) % u"%)" % separator %
|
||||
u"color liveries: " % QString::number(this->countModelsWithColorLivery()) %
|
||||
u" | airline liveries: " % QString::number(this->countModelsWithAirlineLivery()) % separator %
|
||||
u"VTOL: " % QString::number(this->countVtolAircraft()) %
|
||||
u" | military: " % QString::number(this->countMilitaryAircraft()) %
|
||||
u" | civilian: " % QString::number(this->countCivilianAircraft()) % separator %
|
||||
u"Different airlines: " % QString::number(this->countDifferentAirlines()) % separator %
|
||||
u"Combined types: '" % this->getCombinedTypesAsString() % u'\'' % separator %
|
||||
u"Simulators: " % this->countPerSimulator().toQString();
|
||||
}
|
||||
|
||||
QString CAircraftModelList::coverageSummaryForModel(const CAircraftModel &checkModel, const QString &separator) const
|
||||
@@ -1213,10 +1213,10 @@ namespace BlackMisc
|
||||
const bool combinedCodeForModel = this->containsCombinedType(checkModel.getAircraftIcaoCode().getCombinedType());
|
||||
const bool airlineForModel = checkModel.hasAirlineDesignator() && this->containsAirlineLivery(checkModel.getAirlineIcaoCode());
|
||||
return coverageSummary(separator) % separator %
|
||||
QStringLiteral("Data for input model, has combined: ") % boolToYesNo(combinedCodeForModel) %
|
||||
u"Data for input model, has combined: " % boolToYesNo(combinedCodeForModel) %
|
||||
(
|
||||
checkModel.hasAirlineDesignator() ?
|
||||
QStringLiteral(" airline '") % checkModel.getAirlineIcaoCodeDesignator() % QStringLiteral("': ") % boolToYesNo(airlineForModel) :
|
||||
u" airline '" % checkModel.getAirlineIcaoCodeDesignator() % u"': " % boolToYesNo(airlineForModel) :
|
||||
QString()
|
||||
);
|
||||
}
|
||||
@@ -1232,7 +1232,7 @@ namespace BlackMisc
|
||||
QStringList designators(icaos.allDesignators().toList());
|
||||
designators.sort();
|
||||
stats += sep % sep %
|
||||
QStringLiteral("Aircraft ICAOs from DB: ") % sep %
|
||||
u"Aircraft ICAOs from DB: " % sep %
|
||||
designators.join(", ");
|
||||
}
|
||||
|
||||
@@ -1241,7 +1241,7 @@ namespace BlackMisc
|
||||
const CAirlineIcaoCodeList icaos = this->getAirlineIcaoCodesFromDb();
|
||||
const QStringList designators = icaos.toIcaoDesignatorCompleterStrings();
|
||||
stats += sep % sep %
|
||||
QStringLiteral("Airline ICAOs from DB: ") % sep %
|
||||
u"Airline ICAOs from DB: " % sep %
|
||||
designators.join(", ");
|
||||
}
|
||||
|
||||
@@ -1250,7 +1250,7 @@ namespace BlackMisc
|
||||
const CAircraftModelList dbModels = this->findObjectsWithDbKey();
|
||||
stats += sep %
|
||||
sep %
|
||||
QStringLiteral("DB objects:<br>---------") %
|
||||
u"DB objects:<br>---------" %
|
||||
sep %
|
||||
dbModels.htmlStatistics(false, false);
|
||||
}
|
||||
|
||||
@@ -175,8 +175,8 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
const CSimulatorInfo simulator = CSimulatorInfo::fromDatabaseJson(json, prefix);
|
||||
const QString alias1(json.value(prefix % QStringLiteral("alias1")).toString());
|
||||
const QString alias2(json.value(prefix % QStringLiteral("alias2")).toString());
|
||||
const QString alias1(json.value(prefix % u"alias1").toString());
|
||||
const QString alias2(json.value(prefix % u"alias2").toString());
|
||||
Q_ASSERT_X(!description.isEmpty(), Q_FUNC_INFO, "Missing description");
|
||||
CDistributor distributor("", description, alias1, alias2, simulator);
|
||||
distributor.setKeyAndTimestampFromDatabaseJson(json, prefix);
|
||||
|
||||
@@ -338,7 +338,7 @@ namespace BlackMisc
|
||||
const QDir dir(simObjectsDirectoryFix);
|
||||
if (!dir.exists()) { return false; }
|
||||
|
||||
const QString lastSegment = QStringLiteral("/") % CFileUtils::lastPathSegment(simObjectsDirectoryFix) % QStringLiteral("/");
|
||||
const QString lastSegment = u'/' % CFileUtils::lastPathSegment(simObjectsDirectoryFix) % u'/';
|
||||
const int index = model.getFileName().lastIndexOf(lastSegment);
|
||||
if (index < 0) { return false; }
|
||||
const QString relPart = model.getFileName().mid(index + lastSegment.length());
|
||||
|
||||
@@ -285,19 +285,19 @@ namespace BlackMisc
|
||||
}
|
||||
// XX = Gust speed
|
||||
const int gustSpeed = windLayer.getGustSpeed().valueInteger(CSpeedUnit::kts());
|
||||
if (gustSpeed > 0) { simconnectWinds += QStringLiteral("G") % arg1s.arg(gustSpeed, 2, 10, QLatin1Char('0')); }
|
||||
if (gustSpeed > 0) { simconnectWinds += u'G' % arg1s.arg(gustSpeed, 2, 10, QLatin1Char('0')); }
|
||||
|
||||
// UUU = Speed units
|
||||
simconnectWinds += QLatin1String("KT");
|
||||
simconnectWinds += QStringLiteral("KT");
|
||||
|
||||
if (surface)
|
||||
{
|
||||
// Surface extension:
|
||||
// &DNNNNTS
|
||||
static const QString surfaceWinds =
|
||||
QLatin1String("&D") % // D = specifier for surface layer
|
||||
QLatin1String("305") % // Surface default depth is 1000 feet or 305m
|
||||
QLatin1String("NG"); // We don't have turbulence or wind shear information, hence we use the defaults
|
||||
"&D" // D = specifier for surface layer
|
||||
"305" // Surface default depth is 1000 feet or 305m
|
||||
"NG"; // We don't have turbulence or wind shear information, hence we use the defaults
|
||||
simconnectWinds += surfaceWinds;
|
||||
surface = false;
|
||||
}
|
||||
@@ -310,9 +310,9 @@ namespace BlackMisc
|
||||
// Winds aloft extension:
|
||||
// &ANNNNTS
|
||||
simconnectWinds +=
|
||||
QLatin1String("&A") % // A = specifier for altitude above mean sea-level (MSL)
|
||||
u"&A" % // A = specifier for altitude above mean sea-level (MSL)
|
||||
arg1s.arg(altitudeValue, 4, 10, QLatin1Char('0')) % // NNNN = depth (height) in meters.
|
||||
QLatin1String("NG"); // We don't have turbulence or wind shear information, hence we use the defaults
|
||||
u"NG"; // We don't have turbulence or wind shear information, hence we use the defaults
|
||||
}
|
||||
}
|
||||
return simconnectWinds;
|
||||
@@ -375,7 +375,7 @@ namespace BlackMisc
|
||||
// Ignore clouds higher than 99900 feet
|
||||
if (level > 999) { continue; }
|
||||
simconnectClouds += arg1s.arg(level, 3, 10, QLatin1Char('0')) %
|
||||
QLatin1Char('&');
|
||||
u'&';
|
||||
|
||||
// TT = Cloud type
|
||||
switch (cloudLayer.getClouds())
|
||||
@@ -447,9 +447,9 @@ namespace BlackMisc
|
||||
const int altitude = temperatureLayer.getLevel().valueInteger(CLengthUnit::m());
|
||||
|
||||
simconnectTemperatures += arg1s.arg(temperature, 2, 10, QLatin1Char('0')) % // TT = temperature in Celsius
|
||||
QLatin1String("/") %
|
||||
u'/' %
|
||||
arg1s.arg(dewPoint, 2, 10, QLatin1Char('0')) % // DD = dewpoint in Celsius
|
||||
QLatin1String("&A") %
|
||||
u"&A" %
|
||||
arg1s.arg(altitude, 5, 10, QLatin1Char('0')); // NNNNN = altitude of the temperatures in meters.
|
||||
}
|
||||
return simconnectTemperatures;
|
||||
|
||||
@@ -98,10 +98,10 @@ namespace BlackMisc
|
||||
QString CSimulatorSettings::convertToQString(const QString &separator, bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
return QStringLiteral("model directories: ") %
|
||||
return u"model directories: " %
|
||||
m_modelDirectories.join(',') %
|
||||
separator %
|
||||
QStringLiteral("exclude directories: ") %
|
||||
u"exclude directories: " %
|
||||
m_excludeDirectoryPatterns.join(',');
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace BlackMisc
|
||||
|
||||
QString CSimulatedAircraft::getAirlineAndAircraftIcaoCodeDesignators() const
|
||||
{
|
||||
if (this->hasAircraftAndAirlineDesignator()) { return this->getAircraftIcaoCodeDesignator() % QStringLiteral("/") % this->getAirlineIcaoCodeDesignator(); }
|
||||
if (this->hasAircraftAndAirlineDesignator()) { return this->getAircraftIcaoCodeDesignator() % u'/' % this->getAirlineIcaoCodeDesignator(); }
|
||||
if (this->hasAirlineDesignator()) { return this->getAirlineIcaoCodeDesignator(); }
|
||||
return this->getAircraftIcaoCodeDesignator();
|
||||
}
|
||||
@@ -464,8 +464,8 @@ namespace BlackMisc
|
||||
const CAircraftIcaoCode icaoNw(this->getNetworkModel().getAircraftIcaoCode());
|
||||
if (!icao.hasDesignator()) { return QStringLiteral("[x] no sim."); }
|
||||
if (!icaoNw.hasDesignator()) { return QStringLiteral("[x] no nw."); }
|
||||
if (icao.isDbEqual(icaoNw) || icao == icaoNw) { return QStringLiteral("[==] ") % icao.getDesignatorDbKey(); }
|
||||
if (icao.getDesignator() == icaoNw.getDesignator()) { return QStringLiteral("[=] ") % icao.getDesignator(); }
|
||||
if (icao.isDbEqual(icaoNw) || icao == icaoNw) { return u"[==] " % icao.getDesignatorDbKey(); }
|
||||
if (icao.getDesignator() == icaoNw.getDesignator()) { return u"[=] " % icao.getDesignator(); }
|
||||
static const QString diff("%1 -> %2");
|
||||
return diff.arg(icaoNw.getDesignator(), icao.getDesignator());
|
||||
}
|
||||
@@ -490,8 +490,8 @@ namespace BlackMisc
|
||||
|
||||
const CAirlineIcaoCode icao(this->getModel().getAirlineIcaoCode());
|
||||
const CAirlineIcaoCode icaoNw(this->getNetworkModel().getAirlineIcaoCode());
|
||||
if (icao.isDbEqual(icaoNw) || icao == icaoNw) { return QStringLiteral("[==] ") % icao.getDesignatorDbKey(); }
|
||||
if (icao.getDesignator() == icaoNw.getDesignator()) { return QStringLiteral("[=] ") % icao.getDesignatorDbKey(); }
|
||||
if (icao.isDbEqual(icaoNw) || icao == icaoNw) { return u"[==] " % icao.getDesignatorDbKey(); }
|
||||
if (icao.getDesignator() == icaoNw.getDesignator()) { return u"[=] " % icao.getDesignatorDbKey(); }
|
||||
return diff.arg(icaoNw.getDesignator(), icao.getDesignator());
|
||||
}
|
||||
|
||||
@@ -575,14 +575,14 @@ namespace BlackMisc
|
||||
QString CSimulatedAircraft::convertToQString(bool i18n) const
|
||||
{
|
||||
const QString s = m_callsign.toQString(i18n) %
|
||||
QLatin1Char(' ') % m_pilot.toQString(i18n) %
|
||||
QLatin1Char(' ') % m_situation.toQString(i18n) %
|
||||
QLatin1Char(' ') % m_com1system.toQString(i18n) %
|
||||
QLatin1Char(' ') % m_com2system.toQString(i18n) %
|
||||
QLatin1Char(' ') % m_transponder.toQString(i18n) %
|
||||
QLatin1String(" enabled: ") % BlackMisc::boolToYesNo(this->isEnabled()) %
|
||||
QLatin1String(" rendered: ") % BlackMisc::boolToYesNo(this->isRendered()) %
|
||||
QLatin1Char(' ') % this->getModel().toQString(i18n);
|
||||
u' ' % m_pilot.toQString(i18n) %
|
||||
u' ' % m_situation.toQString(i18n) %
|
||||
u' ' % m_com1system.toQString(i18n) %
|
||||
u' ' % m_com2system.toQString(i18n) %
|
||||
u' ' % m_transponder.toQString(i18n) %
|
||||
u" enabled: " % BlackMisc::boolToYesNo(this->isEnabled()) %
|
||||
u" rendered: " % BlackMisc::boolToYesNo(this->isRendered()) %
|
||||
u' '% this->getModel().toQString(i18n);
|
||||
return s;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace BlackMisc
|
||||
v = m_simulatorVersion;
|
||||
}
|
||||
|
||||
if (!n.isEmpty() && !v.isEmpty()) { return n % QStringLiteral(" ") % v; }
|
||||
if (!n.isEmpty() && !v.isEmpty()) { return n % u' ' % v; }
|
||||
if (!n.isEmpty()) { return n; }
|
||||
|
||||
const CSimulatorInfo simInfo = this->getSimulatorInfo();
|
||||
|
||||
@@ -333,11 +333,11 @@ namespace BlackMisc
|
||||
|
||||
CSimulatorInfo CSimulatorInfo::fromDatabaseJson(const QJsonObject &json, const QString &prefix)
|
||||
{
|
||||
const QJsonValue jfsx = json.value(prefix % QStringLiteral("simfsx"));
|
||||
const QJsonValue jfs9 = json.value(prefix % QStringLiteral("simfs9"));
|
||||
const QJsonValue jxp = json.value(prefix % QStringLiteral("simxplane"));
|
||||
const QJsonValue jp3d = json.value(prefix % QStringLiteral("simp3d"));
|
||||
const QJsonValue jfg = json.value(prefix % QStringLiteral("simfg"));
|
||||
const QJsonValue jfsx = json.value(prefix % u"simfsx");
|
||||
const QJsonValue jfs9 = json.value(prefix % u"simfs9");
|
||||
const QJsonValue jxp = json.value(prefix % u"simxplane");
|
||||
const QJsonValue jp3d = json.value(prefix % u"simp3d");
|
||||
const QJsonValue jfg = json.value(prefix % u"simfg");
|
||||
|
||||
// we handle bool JSON values and bool as string
|
||||
const bool fsx = jfsx.isBool() ? jfsx.toBool() : CDatastoreUtility::dbBoolStringToBool(jfsx.toString());
|
||||
@@ -401,11 +401,11 @@ namespace BlackMisc
|
||||
|
||||
QString CCountPerSimulator::toQString() const
|
||||
{
|
||||
return QStringLiteral("FSX: ") % QString::number(m_counts[0]) %
|
||||
QStringLiteral(" P3D: ") % QString::number(m_counts[1]) %
|
||||
QStringLiteral(" FS9: ") % QString::number(m_counts[2]) %
|
||||
QStringLiteral(" XPlane: ") % QString::number(m_counts[3]) %
|
||||
QStringLiteral(" FG: ") % QString::number(m_counts[4]);
|
||||
return u"FSX: " % QString::number(m_counts[0]) %
|
||||
u" P3D: " % QString::number(m_counts[1]) %
|
||||
u" FS9: " % QString::number(m_counts[2]) %
|
||||
u" XPlane: " % QString::number(m_counts[3]) %
|
||||
u" FG: " % QString::number(m_counts[4]);
|
||||
}
|
||||
|
||||
void CCountPerSimulator::setCount(int count, const CSimulatorInfo &simulator)
|
||||
|
||||
@@ -70,22 +70,22 @@ namespace BlackMisc
|
||||
{
|
||||
if (model.getDistributor().hasDescription() && !model.getName().contains(model.getDistributor().getDescription()))
|
||||
{
|
||||
return QStringLiteral("[ACF] ") % model.getName() % QStringLiteral(" by ") % model.getDistributor().getDescription();
|
||||
return u"[ACF] " % model.getName() % u" by " % model.getDistributor().getDescription();
|
||||
}
|
||||
else
|
||||
{
|
||||
return QStringLiteral("[ACF] ") % model.getName();
|
||||
return u"[ACF] " % model.getName();
|
||||
}
|
||||
}
|
||||
else if (model.hasAircraftDesignator())
|
||||
{
|
||||
if (model.getDistributor().hasDescription())
|
||||
{
|
||||
return QStringLiteral("[ACF] ") % model.getAircraftIcaoCodeDesignator() % QStringLiteral(" by ") % model.getDistributor().getDescription();
|
||||
return u"[ACF] " % model.getAircraftIcaoCodeDesignator() % u" by " % model.getDistributor().getDescription();
|
||||
}
|
||||
else
|
||||
{
|
||||
return QStringLiteral("[ACF] ") % model.getAircraftIcaoCodeDesignator();
|
||||
return u"[ACF] " % model.getAircraftIcaoCodeDesignator();
|
||||
}
|
||||
}
|
||||
return QStringLiteral("[ACF]");
|
||||
@@ -156,8 +156,8 @@ namespace BlackMisc
|
||||
{
|
||||
QString modelName =
|
||||
dirNames.join(' ') %
|
||||
QLatin1Char(' ') % objectName %
|
||||
QLatin1Char(' ') % textureName;
|
||||
u' ' % objectName %
|
||||
u' ' % textureName;
|
||||
return std::move(modelName).trimmed();
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace BlackMisc
|
||||
while (liveryIt.hasNext())
|
||||
{
|
||||
liveryIt.next();
|
||||
model.setModelString(baseModelString % ' ' % liveryIt.fileName());
|
||||
model.setModelString(baseModelString % u' ' % liveryIt.fileName());
|
||||
addUniqueModel(model, installedModels);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user