diff --git a/samples/blackmiscdbus/servicetool.cpp b/samples/blackmiscdbus/servicetool.cpp index 50262ae52..fc6c8eb8a 100644 --- a/samples/blackmiscdbus/servicetool.cpp +++ b/samples/blackmiscdbus/servicetool.cpp @@ -139,7 +139,7 @@ namespace BlackSample QVariant tsqv = QVariant::fromValue(trafficServer); QDBusVariant tsv(tsqv); testServiceInterface.receiveVariant(tsv, tsqv.userType()); - qtout << "Send server via interface and variant '" << trafficServer << QLatin1Literal("' ") << tsqv.userType() << endl; + qtout << "Send server via interface and variant '" << trafficServer << QLatin1String("' ") << tsqv.userType() << endl; // Aviation const CComSystem comSystem = CComSystem("DBUS COM1", CPhysicalQuantitiesConstants::FrequencyInternationalAirDistress(), CPhysicalQuantitiesConstants::FrequencyUnicom()); diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp index c70ff7aeb..e19f5da0c 100644 --- a/src/blackcore/application.cpp +++ b/src/blackcore/application.cpp @@ -465,12 +465,12 @@ namespace BlackCore QString CApplication::getEnvironmentInfoString(const QString &separator) const { const QString env = - QLatin1Literal("Beta: ") % + QLatin1String("Beta: ") % boolToYesNo(CBuildConfig::isBetaTest()) % - QLatin1Literal(" dev.env,: ") % + QLatin1String(" dev.env,: ") % boolToYesNo(isRunningInDeveloperEnvironment()) % separator % - QLatin1Literal("Windows: ") % + QLatin1String("Windows: ") % boolToYesNo(CBuildConfig::isRunningOnWindowsNtPlatform()); return env; } @@ -514,7 +514,7 @@ namespace BlackCore { const QString str = CVersion::version() % - QLatin1Char(' ') % (CBuildConfig::isReleaseBuild() ? QLatin1Literal("Release build") : QLatin1Literal("Debug build")) % + QLatin1Char(' ') % (CBuildConfig::isReleaseBuild() ? QLatin1String("Release build") : QLatin1String("Debug build")) % separator % getEnvironmentInfoString(separator) % separator % @@ -1133,11 +1133,11 @@ namespace BlackCore static const QString extension = CBuildConfig::isRunningOnWindowsNtPlatform() ? ".exe" : QString(); static const QString handler = CDirectoryUtils::applicationDirectoryPath() % QLatin1Char('/') % "swift_crashpad_handler" + extension; static const QString crashpadPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) % - QLatin1Literal("/org.swift-project/") % + QLatin1String("/org.swift-project/") % CDirectoryUtils::normalizedApplicationDirectory() % - QLatin1Literal("/crashpad"); - static const QString database = crashpadPath % QLatin1Literal("/database"); - static const QString metrics = crashpadPath % QLatin1Literal("/metrics"); + QLatin1String("/crashpad"); + static const QString database = crashpadPath % QLatin1String("/database"); + static const QString metrics = crashpadPath % QLatin1String("/metrics"); if (!QFileInfo::exists(handler)) { diff --git a/src/blackcore/context/contextapplicationproxy.cpp b/src/blackcore/context/contextapplicationproxy.cpp index 42f944a8c..928f7a2f4 100644 --- a/src/blackcore/context/contextapplicationproxy.cpp +++ b/src/blackcore/context/contextapplicationproxy.cpp @@ -15,7 +15,7 @@ #include "blackmisc/loghandler.h" #include -#include +#include #include #include @@ -70,23 +70,23 @@ namespace BlackCore { if (subscribersOf(message).containsAnyNotIn(CIdentifierList({ origin, {} }))) { - this->m_dBusInterface->callDBus(QLatin1Literal("logMessage"), message, origin); + this->m_dBusInterface->callDBus(QLatin1String("logMessage"), message, origin); } } void CContextApplicationProxy::addLogSubscription(const CIdentifier &subscriber, const CLogPattern &pattern) { - this->m_dBusInterface->callDBus(QLatin1Literal("addLogSubscription"), subscriber, pattern); + this->m_dBusInterface->callDBus(QLatin1String("addLogSubscription"), subscriber, pattern); } void CContextApplicationProxy::removeLogSubscription(const CIdentifier &subscriber, const CLogPattern &pattern) { - this->m_dBusInterface->callDBus(QLatin1Literal("removeLogSubscription"), subscriber, pattern); + this->m_dBusInterface->callDBus(QLatin1String("removeLogSubscription"), subscriber, pattern); } CLogSubscriptionHash CContextApplicationProxy::getAllLogSubscriptions() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAllLogSubscriptions")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAllLogSubscriptions")); } void CContextApplicationProxy::synchronizeLogSubscriptions() @@ -98,17 +98,17 @@ namespace BlackCore void CContextApplicationProxy::changeSettings(const CValueCachePacket &settings, const CIdentifier &origin) { - this->m_dBusInterface->callDBus(QLatin1Literal("changeSettings"), settings, origin); + this->m_dBusInterface->callDBus(QLatin1String("changeSettings"), settings, origin); } BlackMisc::CValueCachePacket CContextApplicationProxy::getAllSettings() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAllSettings")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAllSettings")); } QStringList CContextApplicationProxy::getUnsavedSettingsKeys() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getUnsavedSettingsKeys")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getUnsavedSettingsKeys")); } void CContextApplicationProxy::synchronizeLocalSettings() @@ -119,66 +119,66 @@ namespace BlackCore BlackMisc::CStatusMessage CContextApplicationProxy::saveSettings(const QString &keyPrefix) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("saveSettings"), keyPrefix); + return this->m_dBusInterface->callDBusRet(QLatin1String("saveSettings"), keyPrefix); } BlackMisc::CStatusMessage CContextApplicationProxy::saveSettingsByKey(const QStringList &keys) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("saveSettingsByKey"), keys); + return this->m_dBusInterface->callDBusRet(QLatin1String("saveSettingsByKey"), keys); } BlackMisc::CStatusMessage CContextApplicationProxy::loadSettings() { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("loadSettings")); + return this->m_dBusInterface->callDBusRet(QLatin1String("loadSettings")); } void CContextApplicationProxy::registerHotkeyActions(const QStringList &actions, const CIdentifier &origin) { - this->m_dBusInterface->callDBus(QLatin1Literal("registerHotkeyActions"), actions, origin); + this->m_dBusInterface->callDBus(QLatin1String("registerHotkeyActions"), actions, origin); } void CContextApplicationProxy::callHotkeyAction(const QString &action, bool argument, const CIdentifier &origin) { - this->m_dBusInterface->callDBus(QLatin1Literal("callHotkeyAction"), action, argument, origin); + this->m_dBusInterface->callDBus(QLatin1String("callHotkeyAction"), action, argument, origin); } BlackMisc::CIdentifier CContextApplicationProxy::registerApplication(const CIdentifier &application) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("registerApplication"), application); + return this->m_dBusInterface->callDBusRet(QLatin1String("registerApplication"), application); } void CContextApplicationProxy::unregisterApplication(const CIdentifier &application) { - this->m_dBusInterface->callDBus(QLatin1Literal("unregisterApplication"), application); + this->m_dBusInterface->callDBus(QLatin1String("unregisterApplication"), application); } BlackMisc::CIdentifierList CContextApplicationProxy::getRegisteredApplications() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getRegisteredApplications")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getRegisteredApplications")); } bool CContextApplicationProxy::writeToFile(const QString &fileName, const QString &content) { if (fileName.isEmpty()) { return false; } - return this->m_dBusInterface->callDBusRet(QLatin1Literal("writeToFile"), fileName, content); + return this->m_dBusInterface->callDBusRet(QLatin1String("writeToFile"), fileName, content); } QString CContextApplicationProxy::readFromFile(const QString &fileName) const { if (fileName.isEmpty()) { return ""; } - return this->m_dBusInterface->callDBusRet(QLatin1Literal("readFromFile"), fileName); + return this->m_dBusInterface->callDBusRet(QLatin1String("readFromFile"), fileName); } bool CContextApplicationProxy::removeFile(const QString &fileName) { if (fileName.isEmpty()) { return false; } - return this->m_dBusInterface->callDBusRet(QLatin1Literal("removeFile"), fileName); + return this->m_dBusInterface->callDBusRet(QLatin1String("removeFile"), fileName); } bool CContextApplicationProxy::existsFile(const QString &fileName) const { if (fileName.isEmpty()) { return false; } - return this->m_dBusInterface->callDBusRet(QLatin1Literal("existsFile"), fileName); + return this->m_dBusInterface->callDBusRet(QLatin1String("existsFile"), fileName); } bool CContextApplicationProxy::isContextResponsive(const QString &dBusAddress, QString &msg, int timeoutMs) diff --git a/src/blackcore/context/contextaudioproxy.cpp b/src/blackcore/context/contextaudioproxy.cpp index d949bfd20..bb9e8a382 100644 --- a/src/blackcore/context/contextaudioproxy.cpp +++ b/src/blackcore/context/contextaudioproxy.cpp @@ -13,7 +13,7 @@ #include "blackmisc/genericdbusinterface.h" #include -#include +#include #include using namespace BlackMisc; @@ -64,102 +64,102 @@ namespace BlackCore void CContextAudioProxy::leaveAllVoiceRooms() { - this->m_dBusInterface->callDBus(QLatin1Literal("leaveAllVoiceRooms")); + this->m_dBusInterface->callDBus(QLatin1String("leaveAllVoiceRooms")); } BlackMisc::Aviation::CCallsignSet CContextAudioProxy::getRoomCallsigns(BlackMisc::Aviation::CComSystem::ComUnit comUnitValue) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getRoomCallsigns"), comUnitValue); + return this->m_dBusInterface->callDBusRet(QLatin1String("getRoomCallsigns"), comUnitValue); } BlackMisc::Network::CUserList CContextAudioProxy::getRoomUsers(BlackMisc::Aviation::CComSystem::ComUnit comUnitValue) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getRoomUsers"), comUnitValue); + return this->m_dBusInterface->callDBusRet(QLatin1String("getRoomUsers"), comUnitValue); } CAudioDeviceInfoList CContextAudioProxy::getAudioDevices() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAudioDevices")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAudioDevices")); } CAudioDeviceInfoList CContextAudioProxy::getCurrentAudioDevices() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getCurrentAudioDevices")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getCurrentAudioDevices")); } void CContextAudioProxy::setCurrentAudioDevice(const CAudioDeviceInfo &audioDevice) { - this->m_dBusInterface->callDBus(QLatin1Literal("setCurrentAudioDevice"), audioDevice); + this->m_dBusInterface->callDBus(QLatin1String("setCurrentAudioDevice"), audioDevice); } CVoiceRoomList CContextAudioProxy::getComVoiceRoomsWithAudioStatus() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getComVoiceRoomsWithAudioStatus")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getComVoiceRoomsWithAudioStatus")); } CVoiceRoomList CContextAudioProxy::getComVoiceRooms() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getComVoiceRooms")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getComVoiceRooms")); } CVoiceRoom CContextAudioProxy::getVoiceRoom(BlackMisc::Aviation::CComSystem::ComUnit comUnitValue, bool withAudioStatus) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getVoiceRoom"), comUnitValue, withAudioStatus); + return this->m_dBusInterface->callDBusRet(QLatin1String("getVoiceRoom"), comUnitValue, withAudioStatus); } void CContextAudioProxy::setComVoiceRooms(const BlackMisc::Audio::CVoiceRoomList &voiceRooms) { - this->m_dBusInterface->callDBus(QLatin1Literal("setComVoiceRooms"), voiceRooms); + this->m_dBusInterface->callDBus(QLatin1String("setComVoiceRooms"), voiceRooms); } void CContextAudioProxy::setOwnCallsignForRooms(const CCallsign &callsign) { - this->m_dBusInterface->callDBus(QLatin1Literal("setOwnCallsignForRooms"), callsign); + this->m_dBusInterface->callDBus(QLatin1String("setOwnCallsignForRooms"), callsign); } void CContextAudioProxy::playSelcalTone(const CSelcal &selcal) const { - this->m_dBusInterface->callDBus(QLatin1Literal("playSelcalTone"), selcal); + this->m_dBusInterface->callDBus(QLatin1String("playSelcalTone"), selcal); } void CContextAudioProxy::playNotification(CNotificationSounds::Notification notification, bool considerSettings) const { - this->m_dBusInterface->callDBus(QLatin1Literal("playNotification"), notification, considerSettings); + this->m_dBusInterface->callDBus(QLatin1String("playNotification"), notification, considerSettings); } void CContextAudioProxy::setVoiceOutputVolume(int volume) { - this->m_dBusInterface->callDBus(QLatin1Literal("setVoiceOutputVolume"), volume); + this->m_dBusInterface->callDBus(QLatin1String("setVoiceOutputVolume"), volume); } int CContextAudioProxy::getVoiceOutputVolume() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getVoiceOutputVolume")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getVoiceOutputVolume")); } void CContextAudioProxy::setMute(bool muted) { - return this->m_dBusInterface->callDBus(QLatin1Literal("setMute"), muted); + return this->m_dBusInterface->callDBus(QLatin1String("setMute"), muted); } bool CContextAudioProxy::isMuted() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("isMuted")); + return this->m_dBusInterface->callDBusRet(QLatin1String("isMuted")); } void CContextAudioProxy::enableAudioLoopback(bool enable) { - this->m_dBusInterface->callDBus(QLatin1Literal("enableAudioLoopback"), enable); + this->m_dBusInterface->callDBus(QLatin1String("enableAudioLoopback"), enable); } bool CContextAudioProxy::isAudioLoopbackEnabled() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("isAudioLoopbackEnabled")); + return this->m_dBusInterface->callDBusRet(QLatin1String("isAudioLoopbackEnabled")); } bool CContextAudioProxy::parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("parseCommandLine"), commandLine, originator); + return this->m_dBusInterface->callDBusRet(QLatin1String("parseCommandLine"), commandLine, originator); } } // namespace } // namespace diff --git a/src/blackcore/context/contextnetworkproxy.cpp b/src/blackcore/context/contextnetworkproxy.cpp index 62cad4065..0171064df 100644 --- a/src/blackcore/context/contextnetworkproxy.cpp +++ b/src/blackcore/context/contextnetworkproxy.cpp @@ -14,7 +14,7 @@ #include "blackmisc/genericdbusinterface.h" #include -#include +#include #include #include #include @@ -103,227 +103,227 @@ namespace BlackCore void CContextNetworkProxy::requestAtcBookingsUpdate() const { - this->m_dBusInterface->callDBus(QLatin1Literal("requestAtcBookingsUpdate")); + this->m_dBusInterface->callDBus(QLatin1String("requestAtcBookingsUpdate")); } BlackMisc::Aviation::CAtcStationList CContextNetworkProxy::getAtcStationsOnline() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAtcStationsOnline")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAtcStationsOnline")); } CAtcStationList CContextNetworkProxy::getAtcStationsBooked() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAtcStationsBooked")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAtcStationsBooked")); } CSimulatedAircraftList CContextNetworkProxy::getAircraftInRange() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAircraftInRange")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAircraftInRange")); } CCallsignSet CContextNetworkProxy::getAircraftInRangeCallsigns() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAircraftInRangeCallsigns")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAircraftInRangeCallsigns")); } int CContextNetworkProxy::getAircraftInRangeCount() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAircraftInRangeCount")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAircraftInRangeCount")); } CSimulatedAircraft CContextNetworkProxy::getAircraftInRangeForCallsign(const CCallsign &callsign) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAircraftInRangeForCallsign"), callsign); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAircraftInRangeForCallsign"), callsign); } CAtcStation CContextNetworkProxy::getOnlineStationForCallsign(const CCallsign &callsign) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getOnlineStationForCallsign"), callsign); + return this->m_dBusInterface->callDBusRet(QLatin1String("getOnlineStationForCallsign"), callsign); } CUserList CContextNetworkProxy::getUsers() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getUsers")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getUsers")); } CUserList CContextNetworkProxy::getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getUsersForCallsigns"), callsigns); + return this->m_dBusInterface->callDBusRet(QLatin1String("getUsersForCallsigns"), callsigns); } CUser CContextNetworkProxy::getUserForCallsign(const BlackMisc::Aviation::CCallsign &callsign) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getUserForCallsign"), callsign); + return this->m_dBusInterface->callDBusRet(QLatin1String("getUserForCallsign"), callsign); } CClientList CContextNetworkProxy::getOtherClients() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getOtherClients")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getOtherClients")); } CServerList CContextNetworkProxy::getVatsimFsdServers() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getVatsimFsdServers")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getVatsimFsdServers")); } CServerList CContextNetworkProxy::getVatsimVoiceServers() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getVatsimVoiceServers")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getVatsimVoiceServers")); } CClientList CContextNetworkProxy::getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getOtherClientsForCallsigns"), callsigns); + return this->m_dBusInterface->callDBusRet(QLatin1String("getOtherClientsForCallsigns"), callsigns); } CVoiceRoomList CContextNetworkProxy::getSelectedVoiceRooms() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getSelectedVoiceRooms")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getSelectedVoiceRooms")); } CAtcStationList CContextNetworkProxy::getSelectedAtcStations() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getSelectedAtcStations")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getSelectedAtcStations")); } void CContextNetworkProxy::requestDataUpdates() { - this->m_dBusInterface->callDBus(QLatin1Literal("requestDataUpdates")); + this->m_dBusInterface->callDBus(QLatin1String("requestDataUpdates")); } void CContextNetworkProxy::requestAtisUpdates() { - this->m_dBusInterface->callDBus(QLatin1Literal("requestAtisUpdates")); + this->m_dBusInterface->callDBus(QLatin1String("requestAtisUpdates")); } bool CContextNetworkProxy::updateAircraftEnabled(const CCallsign &callsign, bool enabledForRedering) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateAircraftEnabled"), callsign, enabledForRedering); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateAircraftEnabled"), callsign, enabledForRedering); } bool CContextNetworkProxy::updateAircraftModel(const CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateAircraftModel"), callsign, model, originator); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateAircraftModel"), callsign, model, originator); } bool CContextNetworkProxy::updateAircraftNetworkModel(const CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateAircraftNetworkModel"), callsign, model, originator); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateAircraftNetworkModel"), callsign, model, originator); } bool CContextNetworkProxy::updateFastPositionEnabled(const CCallsign &callsign, bool enableFastPositionSending) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateFastPositionEnabled"), callsign, enableFastPositionSending); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateFastPositionEnabled"), callsign, enableFastPositionSending); } void CContextNetworkProxy::setFastPositionEnabledCallsigns(CCallsignSet &callsigns) { - this->m_dBusInterface->callDBus(QLatin1Literal("setFastPositionEnabledCallsigns"), callsigns); + this->m_dBusInterface->callDBus(QLatin1String("setFastPositionEnabledCallsigns"), callsigns); } CCallsignSet CContextNetworkProxy::getFastPositionEnabledCallsigns() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getFastPositionEnabledCallsigns")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getFastPositionEnabledCallsigns")); } CStatusMessageList CContextNetworkProxy::getReverseLookupMessages(const CCallsign &callsign) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getReverseLookupMessages"), callsign); + return this->m_dBusInterface->callDBusRet(QLatin1String("getReverseLookupMessages"), callsign); } bool CContextNetworkProxy::isReverseLookupMessagesEnabled() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("isReverseLookupLoggingEnabled")); + return this->m_dBusInterface->callDBusRet(QLatin1String("isReverseLookupLoggingEnabled")); } void CContextNetworkProxy::enableReverseLookupMessages(bool enabled) { - this->m_dBusInterface->callDBus(QLatin1Literal("enableReverseLookupLogging"), enabled); + this->m_dBusInterface->callDBus(QLatin1String("enableReverseLookupLogging"), enabled); } CStatusMessageList CContextNetworkProxy::getAircraftPartsHistory(const CCallsign &callsign) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getAircraftPartsHistory"), callsign); + return this->m_dBusInterface->callDBusRet(QLatin1String("getAircraftPartsHistory"), callsign); } CAircraftPartsList CContextNetworkProxy::getRemoteAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, qint64 cutoffTimeValuesBefore) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getRemoteAircraftParts"), callsign, cutoffTimeValuesBefore); + return this->m_dBusInterface->callDBusRet(QLatin1String("getRemoteAircraftParts"), callsign, cutoffTimeValuesBefore); } bool CContextNetworkProxy::isAircraftPartsHistoryEnabled() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("isAircraftPartsHistoryEnabled")); + return this->m_dBusInterface->callDBusRet(QLatin1String("isAircraftPartsHistoryEnabled")); } void CContextNetworkProxy::enableAircraftPartsHistory(bool enabled) { - this->m_dBusInterface->callDBus(QLatin1Literal("enableAircraftPartsHistory"), enabled); + this->m_dBusInterface->callDBus(QLatin1String("enableAircraftPartsHistory"), enabled); } void CContextNetworkProxy::testCreateDummyOnlineAtcStations(int number) { - this->m_dBusInterface->callDBus(QLatin1Literal("testCreateDummyOnlineAtcStations"), number); + this->m_dBusInterface->callDBus(QLatin1String("testCreateDummyOnlineAtcStations"), number); } void CContextNetworkProxy::testAddAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, const CAircraftParts &parts, bool incremental) { - this->m_dBusInterface->callDBus(QLatin1Literal("testAddAircraftParts"), callsign, parts, incremental); + this->m_dBusInterface->callDBus(QLatin1String("testAddAircraftParts"), callsign, parts, incremental); } void CContextNetworkProxy::testReceivedTextMessages(const CTextMessageList &textMessages) { - this->m_dBusInterface->callDBus(QLatin1Literal("testReceivedTextMessages"), textMessages); + this->m_dBusInterface->callDBus(QLatin1String("testReceivedTextMessages"), textMessages); } void CContextNetworkProxy::testRequestAircraftConfig(const CCallsign &callsign) { - this->m_dBusInterface->callDBus(QLatin1Literal("testRequestAircraftConfig"), callsign); + this->m_dBusInterface->callDBus(QLatin1String("testRequestAircraftConfig"), callsign); } CStatusMessage CContextNetworkProxy::connectToNetwork(const CServer &server, INetwork::LoginMode loginMode) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("connectToNetwork"), server, loginMode); + return this->m_dBusInterface->callDBusRet(QLatin1String("connectToNetwork"), server, loginMode); } CStatusMessage CContextNetworkProxy::disconnectFromNetwork() { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("disconnectFromNetwork")); + return this->m_dBusInterface->callDBusRet(QLatin1String("disconnectFromNetwork")); } bool CContextNetworkProxy::isConnected() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("isConnected")); + return this->m_dBusInterface->callDBusRet(QLatin1String("isConnected")); } CServer CContextNetworkProxy::getConnectedServer() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getConnectedServer")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getConnectedServer")); } bool CContextNetworkProxy::parseCommandLine(const QString &commandLine, const CIdentifier &originator) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("parseCommandLine"), commandLine, originator); + return this->m_dBusInterface->callDBusRet(QLatin1String("parseCommandLine"), commandLine, originator); } void CContextNetworkProxy::sendTextMessages(const CTextMessageList &textMessages) { - this->m_dBusInterface->callDBus(QLatin1Literal("sendTextMessages"), textMessages); + this->m_dBusInterface->callDBus(QLatin1String("sendTextMessages"), textMessages); } void CContextNetworkProxy::sendFlightPlan(const BlackMisc::Aviation::CFlightPlan &flightPlan) { - this->m_dBusInterface->callDBus(QLatin1Literal("sendFlightPlan"), flightPlan); + this->m_dBusInterface->callDBus(QLatin1String("sendFlightPlan"), flightPlan); } CFlightPlan CContextNetworkProxy::loadFlightPlanFromNetwork(const CCallsign &callsign) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("loadFlightPlanFromNetwork"), callsign); + return this->m_dBusInterface->callDBusRet(QLatin1String("loadFlightPlanFromNetwork"), callsign); } CMetar CContextNetworkProxy::getMetarForAirport(const CAirportIcaoCode &airportIcaoCode) const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getMetarForAirport"), airportIcaoCode); + return this->m_dBusInterface->callDBusRet(QLatin1String("getMetarForAirport"), airportIcaoCode); } } // ns } // ns diff --git a/src/blackcore/context/contextownaircraftproxy.cpp b/src/blackcore/context/contextownaircraftproxy.cpp index 59210506c..e7ee0313d 100644 --- a/src/blackcore/context/contextownaircraftproxy.cpp +++ b/src/blackcore/context/contextownaircraftproxy.cpp @@ -13,7 +13,7 @@ #include "blackmisc/genericdbusinterface.h" #include -#include +#include #include #include @@ -52,62 +52,62 @@ namespace BlackCore BlackMisc::Simulation::CSimulatedAircraft CContextOwnAircraftProxy::getOwnAircraft() const { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("getOwnAircraft")); + return this->m_dBusInterface->callDBusRet(QLatin1String("getOwnAircraft")); } bool CContextOwnAircraftProxy::updateCockpit(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2, const BlackMisc::Aviation::CTransponder &transponder, const CIdentifier &originator) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateCockpit"), com1, com2, transponder, originator); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateCockpit"), com1, com2, transponder, originator); } bool CContextOwnAircraftProxy::updateActiveComFrequency(const PhysicalQuantities::CFrequency &frequency, BlackMisc::Aviation::CComSystem::ComUnit comUnit, const CIdentifier &originator) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateActiveComFrequency"), frequency, comUnit, originator); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateActiveComFrequency"), frequency, comUnit, originator); } bool CContextOwnAircraftProxy::updateOwnAircraftPilot(const BlackMisc::Network::CUser &pilot) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateOwnAircraftPilot"), pilot); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateOwnAircraftPilot"), pilot); } bool CContextOwnAircraftProxy::updateSelcal(const CSelcal &selcal, const CIdentifier &originator) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateSelcal"), selcal, originator); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateSelcal"), selcal, originator); } bool CContextOwnAircraftProxy::updateOwnPosition(const BlackMisc::Geo::CCoordinateGeodetic &position, const BlackMisc::Aviation::CAltitude &altitude) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateOwnPosition"), position, altitude); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateOwnPosition"), position, altitude); } bool CContextOwnAircraftProxy::updateOwnCallsign(const CCallsign &callsign) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateOwnCallsign"), callsign); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateOwnCallsign"), callsign); } bool CContextOwnAircraftProxy::updateOwnIcaoCodes(const CAircraftIcaoCode &aircraftIcaoCode, const CAirlineIcaoCode &airlineIcaoCode) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("updateOwnIcaoCodes"), aircraftIcaoCode, airlineIcaoCode); + return this->m_dBusInterface->callDBusRet(QLatin1String("updateOwnIcaoCodes"), aircraftIcaoCode, airlineIcaoCode); } void CContextOwnAircraftProxy::setAudioOutputVolume(int outputVolume) { - this->m_dBusInterface->callDBus(QLatin1Literal("setAudioOutputVolume"), outputVolume); + this->m_dBusInterface->callDBus(QLatin1String("setAudioOutputVolume"), outputVolume); } void CContextOwnAircraftProxy::setAudioVoiceRoomOverrideUrls(const QString &voiceRoom1Url, const QString &voiceRoom2Url) { - this->m_dBusInterface->callDBus(QLatin1Literal("setAudioVoiceRoomOverrideUrls"), voiceRoom1Url, voiceRoom2Url); + this->m_dBusInterface->callDBus(QLatin1String("setAudioVoiceRoomOverrideUrls"), voiceRoom1Url, voiceRoom2Url); } void CContextOwnAircraftProxy::enableAutomaticVoiceRoomResolution(bool enable) { - this->m_dBusInterface->callDBus(QLatin1Literal("enableAutomaticVoiceRoomResolution"), enable); + this->m_dBusInterface->callDBus(QLatin1String("enableAutomaticVoiceRoomResolution"), enable); } bool CContextOwnAircraftProxy::parseCommandLine(const QString &commandLine, const CIdentifier &originator) { - return this->m_dBusInterface->callDBusRet(QLatin1Literal("parseCommandLine"), commandLine, originator); + return this->m_dBusInterface->callDBusRet(QLatin1String("parseCommandLine"), commandLine, originator); } } // namespace } // namespace diff --git a/src/blackcore/context/contextsimulatorproxy.cpp b/src/blackcore/context/contextsimulatorproxy.cpp index 197eee477..ad0db15e1 100644 --- a/src/blackcore/context/contextsimulatorproxy.cpp +++ b/src/blackcore/context/contextsimulatorproxy.cpp @@ -14,7 +14,7 @@ #include "blackmisc/simulation/simulatedaircraft.h" #include -#include +#include #include #include @@ -80,142 +80,142 @@ namespace BlackCore CSimulatorPluginInfoList CContextSimulatorProxy::getAvailableSimulatorPlugins() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getAvailableSimulatorPlugins")); + return m_dBusInterface->callDBusRet(QLatin1String("getAvailableSimulatorPlugins")); } int CContextSimulatorProxy::getSimulatorStatus() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getSimulatorStatus")); + return m_dBusInterface->callDBusRet(QLatin1String("getSimulatorStatus")); } CAirportList CContextSimulatorProxy::getAirportsInRange() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getAirportsInRange")); + return m_dBusInterface->callDBusRet(QLatin1String("getAirportsInRange")); } CAircraftModelList CContextSimulatorProxy::getModelSet() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getModelSet")); + return m_dBusInterface->callDBusRet(QLatin1String("getModelSet")); } CSimulatorInfo CContextSimulatorProxy::simulatorsWithInitializedModelSet() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("simulatorsWithInitializedModelSet")); + return m_dBusInterface->callDBusRet(QLatin1String("simulatorsWithInitializedModelSet")); } QStringList CContextSimulatorProxy::getModelSetStrings() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getModelSetStrings")); + return m_dBusInterface->callDBusRet(QLatin1String("getModelSetStrings")); } QStringList CContextSimulatorProxy::getModelSetCompleterStrings(bool sorted) const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getModelSetCompleterStrings"), sorted); + return m_dBusInterface->callDBusRet(QLatin1String("getModelSetCompleterStrings"), sorted); } CAircraftModelList CContextSimulatorProxy::getModelSetModelsStartingWith(const QString modelString) const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getModelSetModelsStartingWith"), modelString); + return m_dBusInterface->callDBusRet(QLatin1String("getModelSetModelsStartingWith"), modelString); } int CContextSimulatorProxy::getModelSetCount() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getModelSetCount")); + return m_dBusInterface->callDBusRet(QLatin1String("getModelSetCount")); } BlackMisc::Simulation::CSimulatorPluginInfo CContextSimulatorProxy::getSimulatorPluginInfo() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getSimulatorPluginInfo")); + return m_dBusInterface->callDBusRet(QLatin1String("getSimulatorPluginInfo")); } CSimulatorInternals CContextSimulatorProxy::getSimulatorInternals() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getSimulatorInternals")); + return m_dBusInterface->callDBusRet(QLatin1String("getSimulatorInternals")); } bool CContextSimulatorProxy::setTimeSynchronization(bool enable, const CTime &offset) { - return m_dBusInterface->callDBusRet(QLatin1Literal("setTimeSynchronization"), enable, offset); + return m_dBusInterface->callDBusRet(QLatin1String("setTimeSynchronization"), enable, offset); } bool CContextSimulatorProxy::isTimeSynchronized() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("isTimeSynchronized")); + return m_dBusInterface->callDBusRet(QLatin1String("isTimeSynchronized")); } CInterpolationAndRenderingSetup CContextSimulatorProxy::getInterpolationAndRenderingSetup() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getInterpolationAndRenderingSetup")); + return m_dBusInterface->callDBusRet(QLatin1String("getInterpolationAndRenderingSetup")); } void CContextSimulatorProxy::setInterpolationAndRenderingSetup(const CInterpolationAndRenderingSetup &setup) { - m_dBusInterface->callDBus(QLatin1Literal("setInterpolationAndRenderingSetup"), setup); + m_dBusInterface->callDBus(QLatin1String("setInterpolationAndRenderingSetup"), setup); } CTime CContextSimulatorProxy::getTimeSynchronizationOffset() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getTimeSynchronizationOffset")); + return m_dBusInterface->callDBusRet(QLatin1String("getTimeSynchronizationOffset")); } bool CContextSimulatorProxy::startSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorInfo) { - return m_dBusInterface->callDBusRet(QLatin1Literal("startSimulatorPlugin"), simulatorInfo); + return m_dBusInterface->callDBusRet(QLatin1String("startSimulatorPlugin"), simulatorInfo); } void CContextSimulatorProxy::stopSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorInfo) { - m_dBusInterface->callDBus(QLatin1Literal("stopSimulatorPlugin"), simulatorInfo); + m_dBusInterface->callDBus(QLatin1String("stopSimulatorPlugin"), simulatorInfo); } CPixmap CContextSimulatorProxy::iconForModel(const QString &modelString) const { - return m_dBusInterface->callDBusRet(QLatin1Literal("iconForModel"), modelString); + return m_dBusInterface->callDBusRet(QLatin1String("iconForModel"), modelString); } void CContextSimulatorProxy::highlightAircraft(const CSimulatedAircraft &aircraftToHighlight, bool enableHighlight, const CTime &displayTime) { - m_dBusInterface->callDBus(QLatin1Literal("highlightAircraft"), aircraftToHighlight, enableHighlight, displayTime); + m_dBusInterface->callDBus(QLatin1String("highlightAircraft"), aircraftToHighlight, enableHighlight, displayTime); } bool CContextSimulatorProxy::resetToModelMatchingAircraft(const CCallsign &callsign) { - return m_dBusInterface->callDBusRet(QLatin1Literal("resetToModelMatchingAircraft"), callsign, callsign); + return m_dBusInterface->callDBusRet(QLatin1String("resetToModelMatchingAircraft"), callsign, callsign); } void CContextSimulatorProxy::setWeatherActivated(bool activated) { - m_dBusInterface->callDBus(QLatin1Literal("setWeatherActivated"), activated); + m_dBusInterface->callDBus(QLatin1String("setWeatherActivated"), activated); } void CContextSimulatorProxy::requestWeatherGrid(const Weather::CWeatherGrid &weatherGrid, const CIdentifier &identifier) { - m_dBusInterface->callDBus(QLatin1Literal("requestWeatherGrid"), weatherGrid, identifier); + m_dBusInterface->callDBus(QLatin1String("requestWeatherGrid"), weatherGrid, identifier); } CStatusMessageList CContextSimulatorProxy::getMatchingMessages(const BlackMisc::Aviation::CCallsign &callsign) const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getMatchingMessages"), callsign); + return m_dBusInterface->callDBusRet(QLatin1String("getMatchingMessages"), callsign); } bool CContextSimulatorProxy::isMatchingMessagesEnabled() const { - return m_dBusInterface->callDBusRet(QLatin1Literal("isMatchingMessagesEnabled")); + return m_dBusInterface->callDBusRet(QLatin1String("isMatchingMessagesEnabled")); } void CContextSimulatorProxy::enableMatchingMessages(bool enabled) { - m_dBusInterface->callDBus(QLatin1Literal("enableMatchingMessages"), enabled); + m_dBusInterface->callDBus(QLatin1String("enableMatchingMessages"), enabled); } bool CContextSimulatorProxy::parseCommandLine(const QString &commandLine, const CIdentifier &originator) { - return m_dBusInterface->callDBusRet(QLatin1Literal("parseCommandLine"), commandLine, originator); + return m_dBusInterface->callDBusRet(QLatin1String("parseCommandLine"), commandLine, originator); } CMatchingStatistics CContextSimulatorProxy::getCurrentMatchingStatistics(bool missingOnly) const { - return m_dBusInterface->callDBusRet(QLatin1Literal("getCurrentMatchingStatistics"), missingOnly); + return m_dBusInterface->callDBusRet(QLatin1String("getCurrentMatchingStatistics"), missingOnly); } } // namespace } // namespace diff --git a/src/blackgui/components/aircraftpartshistory.cpp b/src/blackgui/components/aircraftpartshistory.cpp index f8eef8873..82e44abd9 100644 --- a/src/blackgui/components/aircraftpartshistory.cpp +++ b/src/blackgui/components/aircraftpartshistory.cpp @@ -115,36 +115,36 @@ namespace BlackGui QString html; if (currentAircraftParts == CAircraftParts() && aircraftPartsHistory.isEmpty()) { - html = cs.toQString() % QLatin1Literal(" does not support aircraft parts or nothing received yet."); + html = cs.toQString() % QLatin1String(" does not support aircraft parts or nothing received yet."); } else { const QString s = - QLatin1Literal("lights on:") % - QLatin1Literal("
") % - QLatin1Literal("    ") % + QLatin1String("lights on:") % + QLatin1String("
") % + QLatin1String("    ") % currentAircraftParts.getLights().toQString() % - QLatin1Literal("
") % - QLatin1Literal("gear down: ") % + QLatin1String("
") % + QLatin1String("gear down: ") % BlackMisc::boolToYesNo(currentAircraftParts.isGearDown()) % - QLatin1Literal("
") % - QLatin1Literal("flaps pct: ") % + QLatin1String("
") % + QLatin1String("flaps pct: ") % QString::number(currentAircraftParts.getFlapsPercent()) % - QLatin1Literal("
") % - QLatin1Literal("spoilers out: ") % + QLatin1String("
") % + QLatin1String("spoilers out: ") % BlackMisc::boolToYesNo(currentAircraftParts.isSpoilersOut()) % - QLatin1Literal("
") % - QLatin1Literal("engines on: ") % - QLatin1Literal("
") % - QLatin1Literal("    ") % + QLatin1String("
") % + QLatin1String("engines on: ") % + QLatin1String("
") % + QLatin1String("    ") % currentAircraftParts.getEngines().toQString() % - QLatin1Literal("
") % - QLatin1Literal(" on ground: ") % + QLatin1String("
") % + QLatin1String(" on ground: ") % BlackMisc::boolToYesNo(currentAircraftParts.isOnGround()); html += s; if (ui->cb_PartsHistoryEnabled->isChecked()) { - html += QLatin1Literal("
") % + html += QLatin1String("
") % aircraftPartsHistory.toHtml(CStatusMessageList::timestampHtmlOutput()); } } diff --git a/src/blackgui/components/remoteaircraftselector.cpp b/src/blackgui/components/remoteaircraftselector.cpp index 06c09cb55..8cc72467f 100644 --- a/src/blackgui/components/remoteaircraftselector.cpp +++ b/src/blackgui/components/remoteaircraftselector.cpp @@ -106,13 +106,13 @@ namespace BlackGui QString i(aircraft.getCallsign().toQString()); if (aircraft.hasAircraftDesignator()) { - i += QLatin1Literal(" (") % + i += QLatin1String(" (") % aircraft.getAircraftIcaoCode().toQString(false) % - QLatin1Literal(")"); + QLatin1String(")"); } if (aircraft.hasValidRealName()) { - i += QLatin1Literal(" - ") % aircraft.getPilotRealName(); + i += QLatin1String(" - ") % aircraft.getPilotRealName(); } if (m_showPartsEnabled) { diff --git a/src/blackmisc/aviation/aircraftlights.cpp b/src/blackmisc/aviation/aircraftlights.cpp index ebc4532df..827bc3fdd 100644 --- a/src/blackmisc/aviation/aircraftlights.cpp +++ b/src/blackmisc/aviation/aircraftlights.cpp @@ -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; } diff --git a/src/blackmisc/aviation/aircraftsituation.cpp b/src/blackmisc/aviation/aircraftsituation.cpp index 92d2be8e4..b117fbf2f 100644 --- a/src/blackmisc/aviation/aircraftsituation.cpp +++ b/src/blackmisc/aviation/aircraftsituation.cpp @@ -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; } diff --git a/src/blackmisc/aviation/atcstation.cpp b/src/blackmisc/aviation/atcstation.cpp index b18d68728..96a5aafd5 100644 --- a/src/blackmisc/aviation/atcstation.cpp +++ b/src/blackmisc/aviation/atcstation.cpp @@ -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")); diff --git a/src/blackmisc/aviation/flightplan.cpp b/src/blackmisc/aviation/flightplan.cpp index 8f514231b..f80b1f05a 100644 --- a/src/blackmisc/aviation/flightplan.cpp +++ b/src/blackmisc/aviation/flightplan.cpp @@ -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("???"); } } diff --git a/src/blackmisc/aviation/livery.cpp b/src/blackmisc/aviation/livery.cpp index fa6acc310..e204b255c 100644 --- a/src/blackmisc/aviation/livery.cpp +++ b/src/blackmisc/aviation/livery.cpp @@ -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"); diff --git a/src/blackmisc/dbusutils.cpp b/src/blackmisc/dbusutils.cpp index c2c672866..c369af754 100644 --- a/src/blackmisc/dbusutils.cpp +++ b/src/blackmisc/dbusutils.cpp @@ -37,12 +37,12 @@ namespace BlackMisc qv = arg.asVariant(); // this advances in the stream if (qv.canConvert()) { - out += indent % type % QLatin1Literal("signature ") % signature % QLatin1Char('\n'); + out += indent % type % QLatin1String("signature ") % signature % QLatin1Char('\n'); out += CDBusUtils::getQDBusArgumentSignature(qv.value(), 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"); } } diff --git a/src/blackmisc/simulation/aircraftmodel.cpp b/src/blackmisc/simulation/aircraftmodel.cpp index 5005f76c6..c2cc71e0a 100644 --- a/src/blackmisc/simulation/aircraftmodel.cpp +++ b/src/blackmisc/simulation/aircraftmodel.cpp @@ -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; } diff --git a/src/blackmisc/simulation/interpolator.cpp b/src/blackmisc/simulation/interpolator.cpp index 1c03c07a9..79c94c6c6 100644 --- a/src/blackmisc/simulation/interpolator.cpp +++ b/src/blackmisc/simulation/interpolator.cpp @@ -174,7 +174,7 @@ namespace BlackMisc CStatusMessageList IInterpolator::writeLogFile(const QList &interpolation, const QList &parts) { if (parts.isEmpty() && interpolation.isEmpty()) { return CStatusMessage(static_cast(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("") % - QLatin1Literal("c.CSVTOLtimestampsince") % - QLatin1Literal("ts oldts newts cur") % - QLatin1Literal("ΔtΔt fr.fraction") % - QLatin1Literal("lat.oldlat.newlat.cur") % - QLatin1Literal("lng.oldlng.newlng.cur") % - QLatin1Literal("alt.oldalt.newalt.cur") % - QLatin1Literal("elv.oldelv.newelv.cur") % - QLatin1Literal("gnd.factor") % - QLatin1Literal("onGnd.oldonGnd.newonGnd.cur") % - QLatin1Literal("partsc.parts details") % - QLatin1Literal("\n"); + QLatin1String("") % + QLatin1String("c.CSVTOLtimestampsince") % + QLatin1String("ts oldts newts cur") % + QLatin1String("ΔtΔt fr.fraction") % + QLatin1String("lat.oldlat.newlat.cur") % + QLatin1String("lng.oldlng.newlng.cur") % + QLatin1String("alt.oldalt.newalt.cur") % + QLatin1String("elv.oldelv.newelv.cur") % + QLatin1String("gnd.factor") % + QLatin1String("onGnd.oldonGnd.newonGnd.cur") % + QLatin1String("partsc.parts details") % + QLatin1String("\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("") % - (changedNewPosition ? QLatin1Literal("*") : QLatin1Literal("")) % - QLatin1Literal("") % log.callsign.asString() % QLatin1Literal("") % - QLatin1Literal("") % boolToYesNo(log.vtolAircraft) % QLatin1Literal("") % - QLatin1Literal("") % msSinceEpochToTime(log.timestamp) % QLatin1Literal("") % - QLatin1Literal("") % QString::number(log.timestamp - firstLog.timestamp) % QLatin1Literal("") % + QLatin1String("") % + (changedNewPosition ? QLatin1String("*") : QLatin1String("")) % + QLatin1String("") % log.callsign.asString() % QLatin1String("") % + QLatin1String("") % boolToYesNo(log.vtolAircraft) % QLatin1String("") % + QLatin1String("") % msSinceEpochToTime(log.timestamp) % QLatin1String("") % + QLatin1String("") % QString::number(log.timestamp - firstLog.timestamp) % QLatin1String("") % - QLatin1Literal("") % msSinceEpochToTime(log.oldSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.oldSituation.getTimeOffsetMs()) % QLatin1Literal("") % - QLatin1Literal("") % msSinceEpochToTime(log.newSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.newSituation.getTimeOffsetMs()) % QLatin1Literal("") % - QLatin1Literal("") % msSinceEpochToTime(log.currentSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.currentSituation.getTimeOffsetMs()) % QLatin1Literal("") % + QLatin1String("") % msSinceEpochToTime(log.oldSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.oldSituation.getTimeOffsetMs()) % QLatin1String("") % + QLatin1String("") % msSinceEpochToTime(log.newSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.newSituation.getTimeOffsetMs()) % QLatin1String("") % + QLatin1String("") % msSinceEpochToTime(log.currentSituation.getAdjustedMSecsSinceEpoch()) % QLatin1Char('-') % QString::number(log.currentSituation.getTimeOffsetMs()) % QLatin1String("") % - QLatin1Literal("") % QString::number(log.deltaTimeMs) % QLatin1Literal("") % - QLatin1Literal("") % QString::number(log.deltaTimeFractionMs) % QLatin1Literal("") % - QLatin1Literal("") % QString::number(log.simulationTimeFraction) % QLatin1Literal(""); + QLatin1String("") % QString::number(log.deltaTimeMs) % QLatin1String("") % + QLatin1String("") % QString::number(log.deltaTimeFractionMs) % QLatin1String("") % + QLatin1String("") % QString::number(log.simulationTimeFraction) % QLatin1String(""); tableRows += - QLatin1Literal("") % log.oldSituation.latitudeAsString() % QLatin1Literal("") % - QLatin1Literal("") % log.newSituation.latitudeAsString() % QLatin1Literal("") % - QLatin1Literal("") % log.currentSituation.latitudeAsString() % QLatin1Literal("") % + QLatin1String("") % log.oldSituation.latitudeAsString() % QLatin1String("") % + QLatin1String("") % log.newSituation.latitudeAsString() % QLatin1String("") % + QLatin1String("") % log.currentSituation.latitudeAsString() % QLatin1String("") % - QLatin1Literal("") % log.oldSituation.longitudeAsString() % QLatin1Literal("") % - QLatin1Literal("") % log.newSituation.longitudeAsString() % QLatin1Literal("") % - QLatin1Literal("") % log.currentSituation.longitudeAsString() % QLatin1Literal(""); + QLatin1String("") % log.oldSituation.longitudeAsString() % QLatin1String("") % + QLatin1String("") % log.newSituation.longitudeAsString() % QLatin1String("") % + QLatin1String("") % log.currentSituation.longitudeAsString() % QLatin1String(""); tableRows += - QLatin1Literal("") % log.oldSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1Literal("") % - QLatin1Literal("") % log.newSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1Literal("") % - QLatin1Literal("") % log.currentSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1Literal("") % + QLatin1String("") % log.oldSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1String("") % + QLatin1String("") % log.newSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1String("") % + QLatin1String("") % log.currentSituation.getAltitude().valueRoundedWithUnit(ft, 1) % QLatin1String("") % - QLatin1Literal("") % log.oldSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1Literal("") % - QLatin1Literal("") % log.newSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1Literal("") % - QLatin1Literal("") % log.currentSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1Literal("") % + QLatin1String("") % log.oldSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1String("") % + QLatin1String("") % log.newSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1String("") % + QLatin1String("") % log.currentSituation.getGroundElevation().valueRoundedWithUnit(ft, 1) % QLatin1String("") % - QLatin1Literal("") % QString::number(log.groundFactor) % QLatin1Literal("") % - QLatin1Literal("") % log.oldSituation.getOnGroundInfo() % QLatin1Literal("") % - QLatin1Literal("") % log.newSituation.getOnGroundInfo() % QLatin1Literal("") % - QLatin1Literal("") % log.currentSituation.getOnGroundInfo() % QLatin1Literal(""); + QLatin1String("") % QString::number(log.groundFactor) % QLatin1String("") % + QLatin1String("") % log.oldSituation.getOnGroundInfo() % QLatin1String("") % + QLatin1String("") % log.newSituation.getOnGroundInfo() % QLatin1String("") % + QLatin1String("") % log.currentSituation.getOnGroundInfo() % QLatin1String(""); tableRows += - QLatin1Literal("") % boolToYesNo(log.useParts) % QLatin1Literal("") % + QLatin1String("") % boolToYesNo(log.useParts) % QLatin1String("") % (changedParts ? QLatin1String("*") : QLatin1String("")) % - QLatin1Literal("") % (log.useParts ? log.parts.toQString(true) : QLatin1Literal("")) % QLatin1Literal("") % - QLatin1Literal("\n"); + QLatin1String("") % (log.useParts ? log.parts.toQString(true) : QLatin1String("")) % QLatin1String("") % + QLatin1String("\n"); } - tableRows += QLatin1Literal("\n"); - return QLatin1Literal("\n") % tableHeader % tableRows % QLatin1Literal("
\n"); + tableRows += QLatin1String("\n"); + return QLatin1String("\n") % tableHeader % tableRows % QLatin1String("
\n"); } QString IInterpolator::getHtmlPartsLog(const QList &logs) { if (logs.isEmpty()) { return {}; } const QString tableHeader = - QLatin1Literal("") % - QLatin1Literal("CStimestamp") % - QLatin1Literal("c.") % - QLatin1Literal("parts") % - QLatin1Literal("\n"); + QLatin1String("") % + QLatin1String("CStimestamp") % + QLatin1String("c.") % + QLatin1String("parts") % + QLatin1String("\n"); CAircraftParts lastParts; // default, so shown if parts are different from default QString tableRows("\n"); @@ -324,14 +324,14 @@ namespace BlackMisc const bool changedParts = lastParts != log.parts; lastParts = log.parts; tableRows += - QLatin1Literal("") % - QLatin1Literal("") % log.callsign.asString() % QLatin1Literal("") % - QLatin1Literal("") % msSinceEpochToTime(log.timestamp) % QLatin1Literal("") % + QLatin1String("") % + QLatin1String("") % log.callsign.asString() % QLatin1String("") % + QLatin1String("") % msSinceEpochToTime(log.timestamp) % QLatin1String("") % (changedParts ? QLatin1String("*") : QLatin1String("")) % - QLatin1Literal("") % log.parts.toQString() % QLatin1Literal(""); + QLatin1String("") % log.parts.toQString() % QLatin1String(""); } - tableRows += QLatin1Literal("\n"); - return QLatin1Literal("\n") % tableHeader % tableRows % QLatin1Literal("
\n"); + tableRows += QLatin1String("\n"); + return QLatin1String("\n") % tableHeader % tableRows % QLatin1String("
\n"); } void IInterpolator::clearLog() diff --git a/src/blackmisc/simulation/simulatedaircraft.cpp b/src/blackmisc/simulation/simulatedaircraft.cpp index 4db0e900c..fb01f3ef7 100644 --- a/src/blackmisc/simulation/simulatedaircraft.cpp +++ b/src/blackmisc/simulation/simulatedaircraft.cpp @@ -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; } diff --git a/src/blackmisc/statusmessagelist.cpp b/src/blackmisc/statusmessagelist.cpp index 1ab1cbd9d..aa6e5825b 100644 --- a/src/blackmisc/statusmessagelist.cpp +++ b/src/blackmisc/statusmessagelist.cpp @@ -179,12 +179,12 @@ namespace BlackMisc QString rowHtml; if (withLineNumbers) { - rowHtml = QLatin1Literal("") % QString::number(line++) % QLatin1Literal(""); + rowHtml = QLatin1String("") % QString::number(line++) % QLatin1String(""); } for (const CPropertyIndex &index : usedIndexes) { - rowHtml += QLatin1Literal("") % statusMessage.propertyByIndex(index).toQString(true).toHtmlEscaped() % QLatin1Literal(""); + rowHtml += QLatin1String("") % statusMessage.propertyByIndex(index).toQString(true).toHtmlEscaped() % QLatin1String(""); } 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; } diff --git a/src/blackmisc/test/testserviceinterface.h b/src/blackmisc/test/testserviceinterface.h index 1fd2a4e9b..d86bf7042 100644 --- a/src/blackmisc/test/testserviceinterface.h +++ b/src/blackmisc/test/testserviceinterface.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -81,293 +81,293 @@ namespace BlackMisc QDBusPendingReply getAtcStation() { QList argumentList; - return asyncCallWithArgumentList(QLatin1Literal("getAtcStation"), argumentList); + return asyncCallWithArgumentList(QLatin1String("getAtcStation"), argumentList); } QDBusPendingReply getAircraftCfgEntriesList(int number) { QList argumentList; argumentList << QVariant::fromValue(number); - return asyncCallWithArgumentList(QLatin1Literal("getAircraftCfgEntriesList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("getAircraftCfgEntriesList"), argumentList); } QDBusPendingReply getAtcStationList(int number) { QList argumentList; argumentList << QVariant::fromValue(number); - return asyncCallWithArgumentList(QLatin1Literal("getAtcStationList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("getAtcStationList"), argumentList); } QDBusPendingReply> getObjectPaths(int number) { QList argumentList; argumentList << QVariant::fromValue(number); - return asyncCallWithArgumentList(QLatin1Literal("getObjectPaths"), argumentList); + return asyncCallWithArgumentList(QLatin1String("getObjectPaths"), argumentList); } QDBusPendingReply getSpeed() { QList argumentList; - return asyncCallWithArgumentList(QLatin1Literal("getSpeed"), argumentList); + return asyncCallWithArgumentList(QLatin1String("getSpeed"), argumentList); } QDBusPendingReply pingAltitude(const BlackMisc::Aviation::CAltitude &altitude) { QList argumentList; argumentList << QVariant::fromValue(altitude); - return asyncCallWithArgumentList(QLatin1Literal("pingAltitude"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAltitude"), argumentList); } QDBusPendingReply pingSituation(const BlackMisc::Aviation::CAircraftSituation &situation) { QList argumentList; argumentList << QVariant::fromValue(situation); - return asyncCallWithArgumentList(QLatin1Literal("pingSituation"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingSituation"), argumentList); } QDBusPendingReply pingUser(const BlackMisc::Network::CUser &user) { QList argumentList; argumentList << QVariant::fromValue(user); - return asyncCallWithArgumentList(QLatin1Literal("pingUser"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingUser"), argumentList); } QDBusPendingReply pingTransponder(const BlackMisc::Aviation::CTransponder &transponder) { QList argumentList; argumentList << QVariant::fromValue(transponder); - return asyncCallWithArgumentList(QLatin1Literal("pingTransponder"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingTransponder"), argumentList); } QDBusPendingReply pingAtcStation(const BlackMisc::Aviation::CAtcStation &station) { QList argumentList; argumentList << QVariant::fromValue(station); - return asyncCallWithArgumentList(QLatin1Literal("pingAtcStation"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAtcStation"), argumentList); } QDBusPendingReply pingAircraftIcaoData(const BlackMisc::Aviation::CAircraftIcaoCode &icaoData) { QList argumentList; argumentList << QVariant::fromValue(icaoData); - return asyncCallWithArgumentList(QLatin1Literal("pingAircraftIcaoData"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAircraftIcaoData"), argumentList); } QDBusPendingReply pingAircraftLights(const BlackMisc::Aviation::CAircraftLights &lights) { QList argumentList; argumentList << QVariant::fromValue(lights); - return asyncCallWithArgumentList(QLatin1Literal("pingAircraftLights"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAircraftLights"), argumentList); } QDBusPendingReply pingAircraftParts(const BlackMisc::Aviation::CAircraftParts &parts) { QList argumentList; argumentList << QVariant::fromValue(parts); - return asyncCallWithArgumentList(QLatin1Literal("pingAircraftParts"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAircraftParts"), argumentList); } QDBusPendingReply pingAircraftEngine(const BlackMisc::Aviation::CAircraftEngine &engine) { QList argumentList; argumentList << QVariant::fromValue(engine); - return asyncCallWithArgumentList(QLatin1Literal("pingAircraftEngine"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAircraftEngine"), argumentList); } QDBusPendingReply pingAircraftModel(const BlackMisc::Simulation::CAircraftModel &model) { QList argumentList; argumentList << QVariant::fromValue(model); - return asyncCallWithArgumentList(QLatin1Literal("pingAircraftModel"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAircraftModel"), argumentList); } QDBusPendingReply pingAircraftModelList(const BlackMisc::Simulation::CAircraftModelList &model) { QList argumentList; argumentList << QVariant::fromValue(model); - return asyncCallWithArgumentList(QLatin1Literal("pingAircraftModelList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAircraftModelList"), argumentList); } QDBusPendingReply pingSimulatedAircraft(BlackMisc::Simulation::CSimulatedAircraft aircraft) { QList argumentList; argumentList << QVariant::fromValue(aircraft); - return asyncCallWithArgumentList(QLatin1Literal("pingSimulatedAircraft"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingSimulatedAircraft"), argumentList); } QDBusPendingReply pingPluginInfo(BlackMisc::Simulation::CSimulatorPluginInfo info) { QList argumentList; argumentList << QVariant::fromValue(info); - return asyncCallWithArgumentList(QLatin1Literal("pingPluginInfo"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingPluginInfo"), argumentList); } QDBusPendingReply pingAtcStationList(BlackMisc::Aviation::CAtcStationList atcStationList) { QList argumentList; argumentList << QVariant::fromValue(atcStationList); - return asyncCallWithArgumentList(QLatin1Literal("pingAtcStationList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAtcStationList"), argumentList); } QDBusPendingReply pingSpeed(const BlackMisc::PhysicalQuantities::CSpeed &speed) { QList argumentList; argumentList << QVariant::fromValue(speed); - return asyncCallWithArgumentList(QLatin1Literal("pingSpeed"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingSpeed"), argumentList); } QDBusPendingReply pingAircraftList(const BlackMisc::Simulation::CSimulatedAircraftList &aircraftList) { QList argumentList; argumentList << QVariant::fromValue(aircraftList); - return asyncCallWithArgumentList(QLatin1Literal("pingAircraftList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAircraftList"), argumentList); } QDBusPendingReply pingAirportList(const BlackMisc::Aviation::CAirportList &airportList) { QList argumentList; argumentList << QVariant::fromValue(airportList); - return asyncCallWithArgumentList(QLatin1Literal("pingAirportList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingAirportList"), argumentList); } QDBusPendingReply pingClientList(const BlackMisc::Network::CClientList &clientList) { QList argumentList; argumentList << QVariant::fromValue(clientList); - return asyncCallWithArgumentList(QLatin1Literal("pingClientList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingClientList"), argumentList); } QDBusPendingReply pingClient(const BlackMisc::Network::CClient &client) { QList argumentList; argumentList << QVariant::fromValue(client); - return asyncCallWithArgumentList(QLatin1Literal("pingClient"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingClient"), argumentList); } QDBusPendingReply pingCVariant(const BlackMisc::CVariant &variant) { QList argumentList; argumentList << QVariant::fromValue(variant); - return asyncCallWithArgumentList(QLatin1Literal("pingCVariant"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingCVariant"), argumentList); } QDBusPendingReply pingPropertyIndex(const BlackMisc::CPropertyIndex &index) { QList argumentList; argumentList << QVariant::fromValue(index); - return asyncCallWithArgumentList(QLatin1Literal("pingPropertyIndex"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingPropertyIndex"), argumentList); } QDBusPendingReply pingIndexVariantMap(BlackMisc::CPropertyIndexVariantMap indexVariantMap) { QList argumentList; argumentList << QVariant::fromValue(indexVariantMap); - return asyncCallWithArgumentList(QLatin1Literal("pingIndexVariantMap"), argumentList); + return asyncCallWithArgumentList(QLatin1String("pingIndexVariantMap"), argumentList); } QDBusPendingReply receiveAltitude(const BlackMisc::Aviation::CAltitude &altitude) { QList argumentList; argumentList << QVariant::fromValue(altitude); - return asyncCallWithArgumentList(QLatin1Literal("receiveAltitude"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveAltitude"), argumentList); } QDBusPendingReply<> receiveAtcStation(const BlackMisc::Aviation::CAtcStation &station) { QList argumentList; argumentList << QVariant::fromValue(station); - return asyncCallWithArgumentList(QLatin1Literal("receiveAtcStation"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveAtcStation"), argumentList); } QDBusPendingReply<> receiveAtcStationList(const BlackMisc::Aviation::CAtcStationList &atcStationList) { QList argumentList; argumentList << QVariant::fromValue(atcStationList); - return asyncCallWithArgumentList(QLatin1Literal("receiveAtcStationList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveAtcStationList"), argumentList); } QDBusPendingReply<> receiveCallsign(const BlackMisc::Aviation::CCallsign &callsign) { QList argumentList; argumentList << QVariant::fromValue(callsign); - return asyncCallWithArgumentList(QLatin1Literal("receiveCallsign"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveCallsign"), argumentList); } QDBusPendingReply<> receiveComUnit(const BlackMisc::Aviation::CComSystem &comUnit) { QList argumentList; argumentList << QVariant::fromValue(comUnit); - return asyncCallWithArgumentList(QLatin1Literal("receiveComUnit"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveComUnit"), argumentList); } QDBusPendingReply<> receiveGeoPosition(const BlackMisc::Geo::CCoordinateGeodetic &geo) { QList argumentList; argumentList << QVariant::fromValue(geo); - return asyncCallWithArgumentList(QLatin1Literal("receiveGeoPosition"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveGeoPosition"), argumentList); } QDBusPendingReply<> receiveLength(const BlackMisc::PhysicalQuantities::CLength &length) { QList argumentList; argumentList << QVariant::fromValue(length); - return asyncCallWithArgumentList(QLatin1Literal("receiveLength"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveLength"), argumentList); } QDBusPendingReply<> receiveVariantList(const BlackMisc::CVariantList &list) { QList argumentList; argumentList << QVariant::fromValue(list); - return asyncCallWithArgumentList(QLatin1Literal("receiveVariantList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveVariantList"), argumentList); } QDBusPendingReply<> receiveList(const QList &list) { QList argumentList; argumentList << QVariant::fromValue(list); - return asyncCallWithArgumentList(QLatin1Literal("receiveList"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveList"), argumentList); } QDBusPendingReply<> receiveSpeed(const BlackMisc::PhysicalQuantities::CSpeed &speed) { QList argumentList; argumentList << QVariant::fromValue(speed); - return asyncCallWithArgumentList(QLatin1Literal("receiveSpeed"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveSpeed"), argumentList); } QDBusPendingReply<> receiveStringMessage(const QString &message) { QList argumentList; argumentList << QVariant::fromValue(message); - return asyncCallWithArgumentList(QLatin1Literal("receiveStringMessage"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveStringMessage"), argumentList); } QDBusPendingReply<> receiveTrack(BlackMisc::Aviation::CTrack track) { QList argumentList; argumentList << QVariant::fromValue(track); - return asyncCallWithArgumentList(QLatin1Literal("receiveTrack"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveTrack"), argumentList); } QDBusPendingReply<> receiveTransponder(const BlackMisc::Aviation::CTransponder &transponder) { QList argumentList; argumentList << QVariant::fromValue(transponder); - return asyncCallWithArgumentList(QLatin1Literal("receiveTransponder"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveTransponder"), argumentList); } QDBusPendingReply<> receiveValueMap(const BlackMisc::CPropertyIndexVariantMap &valueMap) { QList argumentList; argumentList << QVariant::fromValue(valueMap); - return asyncCallWithArgumentList(QLatin1Literal("receiveValueMap"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveValueMap"), argumentList); } QDBusPendingReply<> receiveVariant(const QDBusVariant &variant, int localMetyType) { QList argumentList; argumentList << QVariant::fromValue(variant) << QVariant::fromValue(localMetyType); - return asyncCallWithArgumentList(QLatin1Literal("receiveVariant"), argumentList); + return asyncCallWithArgumentList(QLatin1String("receiveVariant"), argumentList); } //! @} diff --git a/src/swiftlauncher/swiftlauncher.cpp b/src/swiftlauncher/swiftlauncher.cpp index 809addb11..5e17d852c 100644 --- a/src/swiftlauncher/swiftlauncher.cpp +++ b/src/swiftlauncher/swiftlauncher.cpp @@ -187,7 +187,7 @@ void CSwiftLauncher::loadAbout() static const QString legalDir = sGui->getGlobalSetup().getLegalDirectoryUrl().getFullUrl(); // make links absolute static const QString htmlFixed = QString(html). - replace(QLatin1Literal("href=\"./"), "href=\"" + legalDir); + replace(QLatin1String("href=\"./"), "href=\"" + legalDir); ui->tbr_About->setHtml(htmlFixed); }