Replaced QLatin1Literal by QLatin1String

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

View File

@@ -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))
{

View File

@@ -15,7 +15,7 @@
#include "blackmisc/loghandler.h"
#include <QDBusConnection>
#include <QLatin1Literal>
#include <QLatin1String>
#include <QObject>
#include <QtGlobal>
@@ -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<CLogSubscriptionHash>(QLatin1Literal("getAllLogSubscriptions"));
return this->m_dBusInterface->callDBusRet<CLogSubscriptionHash>(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<BlackMisc::CValueCachePacket>(QLatin1Literal("getAllSettings"));
return this->m_dBusInterface->callDBusRet<BlackMisc::CValueCachePacket>(QLatin1String("getAllSettings"));
}
QStringList CContextApplicationProxy::getUnsavedSettingsKeys() const
{
return this->m_dBusInterface->callDBusRet<QStringList>(QLatin1Literal("getUnsavedSettingsKeys"));
return this->m_dBusInterface->callDBusRet<QStringList>(QLatin1String("getUnsavedSettingsKeys"));
}
void CContextApplicationProxy::synchronizeLocalSettings()
@@ -119,66 +119,66 @@ namespace BlackCore
BlackMisc::CStatusMessage CContextApplicationProxy::saveSettings(const QString &keyPrefix)
{
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1Literal("saveSettings"), keyPrefix);
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1String("saveSettings"), keyPrefix);
}
BlackMisc::CStatusMessage CContextApplicationProxy::saveSettingsByKey(const QStringList &keys)
{
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1Literal("saveSettingsByKey"), keys);
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1String("saveSettingsByKey"), keys);
}
BlackMisc::CStatusMessage CContextApplicationProxy::loadSettings()
{
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1Literal("loadSettings"));
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(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<BlackMisc::CIdentifier>(QLatin1Literal("registerApplication"), application);
return this->m_dBusInterface->callDBusRet<BlackMisc::CIdentifier>(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<BlackMisc::CIdentifierList>(QLatin1Literal("getRegisteredApplications"));
return this->m_dBusInterface->callDBusRet<BlackMisc::CIdentifierList>(QLatin1String("getRegisteredApplications"));
}
bool CContextApplicationProxy::writeToFile(const QString &fileName, const QString &content)
{
if (fileName.isEmpty()) { return false; }
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("writeToFile"), fileName, content);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("writeToFile"), fileName, content);
}
QString CContextApplicationProxy::readFromFile(const QString &fileName) const
{
if (fileName.isEmpty()) { return ""; }
return this->m_dBusInterface->callDBusRet<QString>(QLatin1Literal("readFromFile"), fileName);
return this->m_dBusInterface->callDBusRet<QString>(QLatin1String("readFromFile"), fileName);
}
bool CContextApplicationProxy::removeFile(const QString &fileName)
{
if (fileName.isEmpty()) { return false; }
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("removeFile"), fileName);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("removeFile"), fileName);
}
bool CContextApplicationProxy::existsFile(const QString &fileName) const
{
if (fileName.isEmpty()) { return false; }
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("existsFile"), fileName);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("existsFile"), fileName);
}
bool CContextApplicationProxy::isContextResponsive(const QString &dBusAddress, QString &msg, int timeoutMs)

View File

@@ -13,7 +13,7 @@
#include "blackmisc/genericdbusinterface.h"
#include <QDBusConnection>
#include <QLatin1Literal>
#include <QLatin1String>
#include <QtGlobal>
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<BlackMisc::Aviation::CCallsignSet>(QLatin1Literal("getRoomCallsigns"), comUnitValue);
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CCallsignSet>(QLatin1String("getRoomCallsigns"), comUnitValue);
}
BlackMisc::Network::CUserList CContextAudioProxy::getRoomUsers(BlackMisc::Aviation::CComSystem::ComUnit comUnitValue) const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUserList>(QLatin1Literal("getRoomUsers"), comUnitValue);
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUserList>(QLatin1String("getRoomUsers"), comUnitValue);
}
CAudioDeviceInfoList CContextAudioProxy::getAudioDevices() const
{
return this->m_dBusInterface->callDBusRet<CAudioDeviceInfoList>(QLatin1Literal("getAudioDevices"));
return this->m_dBusInterface->callDBusRet<CAudioDeviceInfoList>(QLatin1String("getAudioDevices"));
}
CAudioDeviceInfoList CContextAudioProxy::getCurrentAudioDevices() const
{
return this->m_dBusInterface->callDBusRet<CAudioDeviceInfoList>(QLatin1Literal("getCurrentAudioDevices"));
return this->m_dBusInterface->callDBusRet<CAudioDeviceInfoList>(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<CVoiceRoomList>(QLatin1Literal("getComVoiceRoomsWithAudioStatus"));
return this->m_dBusInterface->callDBusRet<CVoiceRoomList>(QLatin1String("getComVoiceRoomsWithAudioStatus"));
}
CVoiceRoomList CContextAudioProxy::getComVoiceRooms() const
{
return this->m_dBusInterface->callDBusRet<CVoiceRoomList>(QLatin1Literal("getComVoiceRooms"));
return this->m_dBusInterface->callDBusRet<CVoiceRoomList>(QLatin1String("getComVoiceRooms"));
}
CVoiceRoom CContextAudioProxy::getVoiceRoom(BlackMisc::Aviation::CComSystem::ComUnit comUnitValue, bool withAudioStatus) const
{
return this->m_dBusInterface->callDBusRet<CVoiceRoom>(QLatin1Literal("getVoiceRoom"), comUnitValue, withAudioStatus);
return this->m_dBusInterface->callDBusRet<CVoiceRoom>(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<int>(QLatin1Literal("getVoiceOutputVolume"));
return this->m_dBusInterface->callDBusRet<int>(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<bool>(QLatin1Literal("isMuted"));
return this->m_dBusInterface->callDBusRet<bool>(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<bool>(QLatin1Literal("isAudioLoopbackEnabled"));
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("isAudioLoopbackEnabled"));
}
bool CContextAudioProxy::parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("parseCommandLine"), commandLine, originator);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("parseCommandLine"), commandLine, originator);
}
} // namespace
} // namespace

View File

@@ -14,7 +14,7 @@
#include "blackmisc/genericdbusinterface.h"
#include <QDBusConnection>
#include <QLatin1Literal>
#include <QLatin1String>
#include <QObject>
#include <QtGlobal>
#include <QMetaObject>
@@ -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<BlackMisc::Aviation::CAtcStationList>(QLatin1Literal("getAtcStationsOnline"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1String("getAtcStationsOnline"));
}
CAtcStationList CContextNetworkProxy::getAtcStationsBooked() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1Literal("getAtcStationsBooked"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1String("getAtcStationsBooked"));
}
CSimulatedAircraftList CContextNetworkProxy::getAircraftInRange() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatedAircraftList>(QLatin1Literal("getAircraftInRange"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatedAircraftList>(QLatin1String("getAircraftInRange"));
}
CCallsignSet CContextNetworkProxy::getAircraftInRangeCallsigns() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CCallsignSet>(QLatin1Literal("getAircraftInRangeCallsigns"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CCallsignSet>(QLatin1String("getAircraftInRangeCallsigns"));
}
int CContextNetworkProxy::getAircraftInRangeCount() const
{
return this->m_dBusInterface->callDBusRet<int>(QLatin1Literal("getAircraftInRangeCount"));
return this->m_dBusInterface->callDBusRet<int>(QLatin1String("getAircraftInRangeCount"));
}
CSimulatedAircraft CContextNetworkProxy::getAircraftInRangeForCallsign(const CCallsign &callsign) const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatedAircraft>(QLatin1Literal("getAircraftInRangeForCallsign"), callsign);
return this->m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatedAircraft>(QLatin1String("getAircraftInRangeForCallsign"), callsign);
}
CAtcStation CContextNetworkProxy::getOnlineStationForCallsign(const CCallsign &callsign) const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStation>(QLatin1Literal("getOnlineStationForCallsign"), callsign);
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStation>(QLatin1String("getOnlineStationForCallsign"), callsign);
}
CUserList CContextNetworkProxy::getUsers() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUserList>(QLatin1Literal("getUsers"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUserList>(QLatin1String("getUsers"));
}
CUserList CContextNetworkProxy::getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUserList>(QLatin1Literal("getUsersForCallsigns"), callsigns);
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUserList>(QLatin1String("getUsersForCallsigns"), callsigns);
}
CUser CContextNetworkProxy::getUserForCallsign(const BlackMisc::Aviation::CCallsign &callsign) const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUser>(QLatin1Literal("getUserForCallsign"), callsign);
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUser>(QLatin1String("getUserForCallsign"), callsign);
}
CClientList CContextNetworkProxy::getOtherClients() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CClientList>(QLatin1Literal("getOtherClients"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CClientList>(QLatin1String("getOtherClients"));
}
CServerList CContextNetworkProxy::getVatsimFsdServers() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CServerList>(QLatin1Literal("getVatsimFsdServers"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CServerList>(QLatin1String("getVatsimFsdServers"));
}
CServerList CContextNetworkProxy::getVatsimVoiceServers() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CServerList>(QLatin1Literal("getVatsimVoiceServers"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CServerList>(QLatin1String("getVatsimVoiceServers"));
}
CClientList CContextNetworkProxy::getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CClientList>(QLatin1Literal("getOtherClientsForCallsigns"), callsigns);
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CClientList>(QLatin1String("getOtherClientsForCallsigns"), callsigns);
}
CVoiceRoomList CContextNetworkProxy::getSelectedVoiceRooms() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Audio::CVoiceRoomList>(QLatin1Literal("getSelectedVoiceRooms"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Audio::CVoiceRoomList>(QLatin1String("getSelectedVoiceRooms"));
}
CAtcStationList CContextNetworkProxy::getSelectedAtcStations() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1Literal("getSelectedAtcStations"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(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<bool>(QLatin1Literal("updateAircraftEnabled"), callsign, enabledForRedering);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("updateAircraftEnabled"), callsign, enabledForRedering);
}
bool CContextNetworkProxy::updateAircraftModel(const CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateAircraftModel"), callsign, model, originator);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("updateAircraftModel"), callsign, model, originator);
}
bool CContextNetworkProxy::updateAircraftNetworkModel(const CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateAircraftNetworkModel"), callsign, model, originator);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("updateAircraftNetworkModel"), callsign, model, originator);
}
bool CContextNetworkProxy::updateFastPositionEnabled(const CCallsign &callsign, bool enableFastPositionSending)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateFastPositionEnabled"), callsign, enableFastPositionSending);
return this->m_dBusInterface->callDBusRet<bool>(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<CCallsignSet>(QLatin1Literal("getFastPositionEnabledCallsigns"));
return this->m_dBusInterface->callDBusRet<CCallsignSet>(QLatin1String("getFastPositionEnabledCallsigns"));
}
CStatusMessageList CContextNetworkProxy::getReverseLookupMessages(const CCallsign &callsign) const
{
return this->m_dBusInterface->callDBusRet<CStatusMessageList>(QLatin1Literal("getReverseLookupMessages"), callsign);
return this->m_dBusInterface->callDBusRet<CStatusMessageList>(QLatin1String("getReverseLookupMessages"), callsign);
}
bool CContextNetworkProxy::isReverseLookupMessagesEnabled() const
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("isReverseLookupLoggingEnabled"));
return this->m_dBusInterface->callDBusRet<bool>(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<CStatusMessageList>(QLatin1Literal("getAircraftPartsHistory"), callsign);
return this->m_dBusInterface->callDBusRet<CStatusMessageList>(QLatin1String("getAircraftPartsHistory"), callsign);
}
CAircraftPartsList CContextNetworkProxy::getRemoteAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, qint64 cutoffTimeValuesBefore) const
{
return this->m_dBusInterface->callDBusRet<CAircraftPartsList>(QLatin1Literal("getRemoteAircraftParts"), callsign, cutoffTimeValuesBefore);
return this->m_dBusInterface->callDBusRet<CAircraftPartsList>(QLatin1String("getRemoteAircraftParts"), callsign, cutoffTimeValuesBefore);
}
bool CContextNetworkProxy::isAircraftPartsHistoryEnabled() const
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("isAircraftPartsHistoryEnabled"));
return this->m_dBusInterface->callDBusRet<bool>(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<BlackMisc::CStatusMessage>(QLatin1Literal("connectToNetwork"), server, loginMode);
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1String("connectToNetwork"), server, loginMode);
}
CStatusMessage CContextNetworkProxy::disconnectFromNetwork()
{
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1Literal("disconnectFromNetwork"));
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1String("disconnectFromNetwork"));
}
bool CContextNetworkProxy::isConnected() const
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("isConnected"));
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("isConnected"));
}
CServer CContextNetworkProxy::getConnectedServer() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CServer>(QLatin1Literal("getConnectedServer"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CServer>(QLatin1String("getConnectedServer"));
}
bool CContextNetworkProxy::parseCommandLine(const QString &commandLine, const CIdentifier &originator)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("parseCommandLine"), commandLine, originator);
return this->m_dBusInterface->callDBusRet<bool>(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<BlackMisc::Aviation::CFlightPlan>(QLatin1Literal("loadFlightPlanFromNetwork"), callsign);
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CFlightPlan>(QLatin1String("loadFlightPlanFromNetwork"), callsign);
}
CMetar CContextNetworkProxy::getMetarForAirport(const CAirportIcaoCode &airportIcaoCode) const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Weather::CMetar>(QLatin1Literal("getMetarForAirport"), airportIcaoCode);
return this->m_dBusInterface->callDBusRet<BlackMisc::Weather::CMetar>(QLatin1String("getMetarForAirport"), airportIcaoCode);
}
} // ns
} // ns

View File

@@ -13,7 +13,7 @@
#include "blackmisc/genericdbusinterface.h"
#include <QDBusConnection>
#include <QLatin1Literal>
#include <QLatin1String>
#include <QObject>
#include <QtGlobal>
@@ -52,62 +52,62 @@ namespace BlackCore
BlackMisc::Simulation::CSimulatedAircraft CContextOwnAircraftProxy::getOwnAircraft() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatedAircraft>(QLatin1Literal("getOwnAircraft"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatedAircraft>(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<bool>(QLatin1Literal("updateCockpit"), com1, com2, transponder, originator);
return this->m_dBusInterface->callDBusRet<bool>(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<bool>(QLatin1Literal("updateActiveComFrequency"), frequency, comUnit, originator);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("updateActiveComFrequency"), frequency, comUnit, originator);
}
bool CContextOwnAircraftProxy::updateOwnAircraftPilot(const BlackMisc::Network::CUser &pilot)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateOwnAircraftPilot"), pilot);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("updateOwnAircraftPilot"), pilot);
}
bool CContextOwnAircraftProxy::updateSelcal(const CSelcal &selcal, const CIdentifier &originator)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateSelcal"), selcal, originator);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("updateSelcal"), selcal, originator);
}
bool CContextOwnAircraftProxy::updateOwnPosition(const BlackMisc::Geo::CCoordinateGeodetic &position, const BlackMisc::Aviation::CAltitude &altitude)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateOwnPosition"), position, altitude);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("updateOwnPosition"), position, altitude);
}
bool CContextOwnAircraftProxy::updateOwnCallsign(const CCallsign &callsign)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateOwnCallsign"), callsign);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("updateOwnCallsign"), callsign);
}
bool CContextOwnAircraftProxy::updateOwnIcaoCodes(const CAircraftIcaoCode &aircraftIcaoCode, const CAirlineIcaoCode &airlineIcaoCode)
{
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateOwnIcaoCodes"), aircraftIcaoCode, airlineIcaoCode);
return this->m_dBusInterface->callDBusRet<bool>(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<bool>(QLatin1Literal("parseCommandLine"), commandLine, originator);
return this->m_dBusInterface->callDBusRet<bool>(QLatin1String("parseCommandLine"), commandLine, originator);
}
} // namespace
} // namespace

View File

@@ -14,7 +14,7 @@
#include "blackmisc/simulation/simulatedaircraft.h"
#include <QDBusConnection>
#include <QLatin1Literal>
#include <QLatin1String>
#include <QObject>
#include <QtGlobal>
@@ -80,142 +80,142 @@ namespace BlackCore
CSimulatorPluginInfoList CContextSimulatorProxy::getAvailableSimulatorPlugins() const
{
return m_dBusInterface->callDBusRet<CSimulatorPluginInfoList>(QLatin1Literal("getAvailableSimulatorPlugins"));
return m_dBusInterface->callDBusRet<CSimulatorPluginInfoList>(QLatin1String("getAvailableSimulatorPlugins"));
}
int CContextSimulatorProxy::getSimulatorStatus() const
{
return m_dBusInterface->callDBusRet<int>(QLatin1Literal("getSimulatorStatus"));
return m_dBusInterface->callDBusRet<int>(QLatin1String("getSimulatorStatus"));
}
CAirportList CContextSimulatorProxy::getAirportsInRange() const
{
return m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAirportList>(QLatin1Literal("getAirportsInRange"));
return m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAirportList>(QLatin1String("getAirportsInRange"));
}
CAircraftModelList CContextSimulatorProxy::getModelSet() const
{
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CAircraftModelList>(QLatin1Literal("getModelSet"));
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CAircraftModelList>(QLatin1String("getModelSet"));
}
CSimulatorInfo CContextSimulatorProxy::simulatorsWithInitializedModelSet() const
{
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatorInfo>(QLatin1Literal("simulatorsWithInitializedModelSet"));
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatorInfo>(QLatin1String("simulatorsWithInitializedModelSet"));
}
QStringList CContextSimulatorProxy::getModelSetStrings() const
{
return m_dBusInterface->callDBusRet<QStringList>(QLatin1Literal("getModelSetStrings"));
return m_dBusInterface->callDBusRet<QStringList>(QLatin1String("getModelSetStrings"));
}
QStringList CContextSimulatorProxy::getModelSetCompleterStrings(bool sorted) const
{
return m_dBusInterface->callDBusRet<QStringList>(QLatin1Literal("getModelSetCompleterStrings"), sorted);
return m_dBusInterface->callDBusRet<QStringList>(QLatin1String("getModelSetCompleterStrings"), sorted);
}
CAircraftModelList CContextSimulatorProxy::getModelSetModelsStartingWith(const QString modelString) const
{
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CAircraftModelList>(QLatin1Literal("getModelSetModelsStartingWith"), modelString);
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CAircraftModelList>(QLatin1String("getModelSetModelsStartingWith"), modelString);
}
int CContextSimulatorProxy::getModelSetCount() const
{
return m_dBusInterface->callDBusRet<int>(QLatin1Literal("getModelSetCount"));
return m_dBusInterface->callDBusRet<int>(QLatin1String("getModelSetCount"));
}
BlackMisc::Simulation::CSimulatorPluginInfo CContextSimulatorProxy::getSimulatorPluginInfo() const
{
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatorPluginInfo>(QLatin1Literal("getSimulatorPluginInfo"));
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatorPluginInfo>(QLatin1String("getSimulatorPluginInfo"));
}
CSimulatorInternals CContextSimulatorProxy::getSimulatorInternals() const
{
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatorInternals>(QLatin1Literal("getSimulatorInternals"));
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatorInternals>(QLatin1String("getSimulatorInternals"));
}
bool CContextSimulatorProxy::setTimeSynchronization(bool enable, const CTime &offset)
{
return m_dBusInterface->callDBusRet<bool>(QLatin1Literal("setTimeSynchronization"), enable, offset);
return m_dBusInterface->callDBusRet<bool>(QLatin1String("setTimeSynchronization"), enable, offset);
}
bool CContextSimulatorProxy::isTimeSynchronized() const
{
return m_dBusInterface->callDBusRet<bool>(QLatin1Literal("isTimeSynchronized"));
return m_dBusInterface->callDBusRet<bool>(QLatin1String("isTimeSynchronized"));
}
CInterpolationAndRenderingSetup CContextSimulatorProxy::getInterpolationAndRenderingSetup() const
{
return m_dBusInterface->callDBusRet<CInterpolationAndRenderingSetup>(QLatin1Literal("getInterpolationAndRenderingSetup"));
return m_dBusInterface->callDBusRet<CInterpolationAndRenderingSetup>(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<BlackMisc::PhysicalQuantities::CTime>(QLatin1Literal("getTimeSynchronizationOffset"));
return m_dBusInterface->callDBusRet<BlackMisc::PhysicalQuantities::CTime>(QLatin1String("getTimeSynchronizationOffset"));
}
bool CContextSimulatorProxy::startSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorInfo)
{
return m_dBusInterface->callDBusRet<bool>(QLatin1Literal("startSimulatorPlugin"), simulatorInfo);
return m_dBusInterface->callDBusRet<bool>(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<CPixmap>(QLatin1Literal("iconForModel"), modelString);
return m_dBusInterface->callDBusRet<CPixmap>(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<bool>(QLatin1Literal("resetToModelMatchingAircraft"), callsign, callsign);
return m_dBusInterface->callDBusRet<bool>(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<BlackMisc::CStatusMessageList>(QLatin1Literal("getMatchingMessages"), callsign);
return m_dBusInterface->callDBusRet<BlackMisc::CStatusMessageList>(QLatin1String("getMatchingMessages"), callsign);
}
bool CContextSimulatorProxy::isMatchingMessagesEnabled() const
{
return m_dBusInterface->callDBusRet<bool>(QLatin1Literal("isMatchingMessagesEnabled"));
return m_dBusInterface->callDBusRet<bool>(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<bool>(QLatin1Literal("parseCommandLine"), commandLine, originator);
return m_dBusInterface->callDBusRet<bool>(QLatin1String("parseCommandLine"), commandLine, originator);
}
CMatchingStatistics CContextSimulatorProxy::getCurrentMatchingStatistics(bool missingOnly) const
{
return m_dBusInterface->callDBusRet<CMatchingStatistics>(QLatin1Literal("getCurrentMatchingStatistics"), missingOnly);
return m_dBusInterface->callDBusRet<CMatchingStatistics>(QLatin1String("getCurrentMatchingStatistics"), missingOnly);
}
} // namespace
} // namespace

View File

@@ -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("<br>") %
QLatin1Literal("&nbsp;&nbsp;&nbsp;&nbsp;") %
QLatin1String("lights on:") %
QLatin1String("<br>") %
QLatin1String("&nbsp;&nbsp;&nbsp;&nbsp;") %
currentAircraftParts.getLights().toQString() %
QLatin1Literal("<br>") %
QLatin1Literal("gear down: ") %
QLatin1String("<br>") %
QLatin1String("gear down: ") %
BlackMisc::boolToYesNo(currentAircraftParts.isGearDown()) %
QLatin1Literal("<br>") %
QLatin1Literal("flaps pct: ") %
QLatin1String("<br>") %
QLatin1String("flaps pct: ") %
QString::number(currentAircraftParts.getFlapsPercent()) %
QLatin1Literal("<br>") %
QLatin1Literal("spoilers out: ") %
QLatin1String("<br>") %
QLatin1String("spoilers out: ") %
BlackMisc::boolToYesNo(currentAircraftParts.isSpoilersOut()) %
QLatin1Literal("<br>") %
QLatin1Literal("engines on: ") %
QLatin1Literal("<br>") %
QLatin1Literal("&nbsp;&nbsp;&nbsp;&nbsp;") %
QLatin1String("<br>") %
QLatin1String("engines on: ") %
QLatin1String("<br>") %
QLatin1String("&nbsp;&nbsp;&nbsp;&nbsp;") %
currentAircraftParts.getEngines().toQString() %
QLatin1Literal("<br>") %
QLatin1Literal(" on ground: ") %
QLatin1String("<br>") %
QLatin1String(" on ground: ") %
BlackMisc::boolToYesNo(currentAircraftParts.isOnGround());
html += s;
if (ui->cb_PartsHistoryEnabled->isChecked())
{
html += QLatin1Literal("<hr>") %
html += QLatin1String("<hr>") %
aircraftPartsHistory.toHtml(CStatusMessageList::timestampHtmlOutput());
}
}

View File

@@ -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)
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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);
}