Commit d2488d0a authored by Donald Gagne's avatar Donald Gagne

Use QCoreApplicationName::applicationName()

Instead of hardcoded "QGroundContorl" strings
parent 6db6d272
...@@ -12,6 +12,7 @@ import QtQuick.Controls 1.2 ...@@ -12,6 +12,7 @@ import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2 import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.FactSystem 1.0 import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0 import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0 import QGroundControl.Controls 1.0
...@@ -89,8 +90,8 @@ SetupPage { ...@@ -89,8 +90,8 @@ SetupPage {
id: controller id: controller
factPanel: powerPage.viewPanel factPanel: powerPage.viewPanel
onOldFirmware: showMessage(qsTr("ESC Calibration"), qsTr("QGroundControl cannot perform ESC Calibration with this version of firmware. You will need to upgrade to a newer firmware."), StandardButton.Ok) onOldFirmware: showMessage(qsTr("ESC Calibration"), qsTr("%1 cannot perform ESC Calibration with this version of firmware. You will need to upgrade to a newer firmware.").arg(QGroundControl.appName), StandardButton.Ok)
onNewerFirmware: showMessage(qsTr("ESC Calibration"), qsTr("QGroundControl cannot perform ESC Calibration with this version of firmware. You will need to upgrade QGroundControl."), StandardButton.Ok) onNewerFirmware: showMessage(qsTr("ESC Calibration"), qsTr("%1 cannot perform ESC Calibration with this version of firmware. You will need to upgrade %1.").arg(QGroundControl.appName), StandardButton.Ok)
onBatteryConnected: showMessage(qsTr("ESC Calibration"), qsTr("Performing calibration. This will take a few seconds.."), 0) onBatteryConnected: showMessage(qsTr("ESC Calibration"), qsTr("Performing calibration. This will take a few seconds.."), 0)
onCalibrationFailed: showMessage(qsTr("ESC Calibration failed"), errorMessage, StandardButton.Ok) onCalibrationFailed: showMessage(qsTr("ESC Calibration failed"), errorMessage, StandardButton.Ok)
onCalibrationSuccess: showMessage(qsTr("ESC Calibration"), qsTr("Calibration complete. You can disconnect your battery now if you like."), StandardButton.Ok) onCalibrationSuccess: showMessage(qsTr("ESC Calibration"), qsTr("Calibration complete. You can disconnect your battery now if you like."), StandardButton.Ok)
......
...@@ -1038,10 +1038,10 @@ void ParameterManager::_checkInitialLoadComplete(void) ...@@ -1038,10 +1038,10 @@ void ParameterManager::_checkInitialLoadComplete(void)
_missingParameters = false; _missingParameters = false;
if (initialLoadFailures) { if (initialLoadFailures) {
_missingParameters = true; _missingParameters = true;
QString errorMsg = tr("QGroundControl was unable to retrieve the full set of parameters from vehicle %1. " QString errorMsg = tr("%1 was unable to retrieve the full set of parameters from vehicle %2. "
"This will cause QGroundControl to be unable to display its full user interface. " "This will cause %1 to be unable to display its full user interface. "
"If you are using modified firmware, you may need to resolve any vehicle startup errors to resolve the issue. " "If you are using modified firmware, you may need to resolve any vehicle startup errors to resolve the issue. "
"If you are using standard firmware, you may need to upgrade to a newer version to resolve the issue.").arg(_vehicle->id()); "If you are using standard firmware, you may need to upgrade to a newer version to resolve the issue.").arg(qgcApp()->applicationName()).arg(_vehicle->id());
qCDebug(ParameterManagerLog) << errorMsg; qCDebug(ParameterManagerLog) << errorMsg;
qgcApp()->showMessage(errorMsg); qgcApp()->showMessage(errorMsg);
if (!qgcApp()->runningUnitTests()) { if (!qgcApp()->runningUnitTests()) {
...@@ -1065,7 +1065,7 @@ void ParameterManager::_initialRequestTimeout(void) ...@@ -1065,7 +1065,7 @@ void ParameterManager::_initialRequestTimeout(void)
} else { } else {
if (!_vehicle->genericFirmware()) { if (!_vehicle->genericFirmware()) {
QString errorMsg = tr("Vehicle %1 did not respond to request for parameters. " QString errorMsg = tr("Vehicle %1 did not respond to request for parameters. "
"This will cause QGroundControl to be unable to display its full user interface.").arg(_vehicle->id()); "This will cause %2 to be unable to display its full user interface.").arg(_vehicle->id()).arg(qgcApp()->applicationName());
qCDebug(ParameterManagerLog) << errorMsg; qCDebug(ParameterManagerLog) << errorMsg;
qgcApp()->showMessage(errorMsg); qgcApp()->showMessage(errorMsg);
} }
......
...@@ -163,7 +163,7 @@ bool FixedWingLandingComplexItem::load(const QJsonObject& complexObject, int seq ...@@ -163,7 +163,7 @@ bool FixedWingLandingComplexItem::load(const QJsonObject& complexObject, int seq
QString itemType = complexObject[VisualMissionItem::jsonTypeKey].toString(); QString itemType = complexObject[VisualMissionItem::jsonTypeKey].toString();
QString complexType = complexObject[ComplexMissionItem::jsonComplexItemTypeKey].toString(); QString complexType = complexObject[ComplexMissionItem::jsonComplexItemTypeKey].toString();
if (itemType != VisualMissionItem::jsonTypeComplexItemValue || complexType != jsonComplexItemTypeValue) { if (itemType != VisualMissionItem::jsonTypeComplexItemValue || complexType != jsonComplexItemTypeValue) {
errorString = tr("QGroundControl does not support loading this complex mission item type: %1:2").arg(itemType).arg(complexType); errorString = tr("%1 does not support loading this complex mission item type: %2:%3").arg(qgcApp()->applicationName()).arg(itemType).arg(complexType);
return false; return false;
} }
......
...@@ -183,7 +183,7 @@ bool GeoFenceController::_loadTextFile(QTextStream& stream, QmlObjectListModel* ...@@ -183,7 +183,7 @@ bool GeoFenceController::_loadTextFile(QTextStream& stream, QmlObjectListModel*
} }
} }
} else { } else {
errorString = QStringLiteral("The mission file is not compatible with this version of QGroundControl."); errorString = QStringLiteral("The mission file is not compatible with this version of %1.").arg(qgcApp()->applicationName()));
return false; return false;
} }
......
...@@ -560,7 +560,7 @@ bool MissionController::_loadTextMissionFile(Vehicle* vehicle, QTextStream& stre ...@@ -560,7 +560,7 @@ bool MissionController::_loadTextMissionFile(Vehicle* vehicle, QTextStream& stre
} }
} }
} else { } else {
errorString = QStringLiteral("The mission file is not compatible with this version of QGroundControl."); errorString = QStringLiteral("The mission file is not compatible with this version of %1.").arg(qgcApp()->applicationName());
return false; return false;
} }
......
...@@ -381,7 +381,7 @@ bool SurveyMissionItem::load(const QJsonObject& complexObject, int sequenceNumbe ...@@ -381,7 +381,7 @@ bool SurveyMissionItem::load(const QJsonObject& complexObject, int sequenceNumbe
int version = v2Object[JsonHelper::jsonVersionKey].toInt(); int version = v2Object[JsonHelper::jsonVersionKey].toInt();
if (version != 2 && version != 3) { if (version != 2 && version != 3) {
errorString = tr("QGroundControl does not support this version of survey items"); errorString = tr("%1 does not support this version of survey items").arg(qgcApp()->applicationName());
return false; return false;
} }
if (version == 2) { if (version == 2) {
...@@ -411,7 +411,7 @@ bool SurveyMissionItem::load(const QJsonObject& complexObject, int sequenceNumbe ...@@ -411,7 +411,7 @@ bool SurveyMissionItem::load(const QJsonObject& complexObject, int sequenceNumbe
QString itemType = v2Object[VisualMissionItem::jsonTypeKey].toString(); QString itemType = v2Object[VisualMissionItem::jsonTypeKey].toString();
QString complexType = v2Object[ComplexMissionItem::jsonComplexItemTypeKey].toString(); QString complexType = v2Object[ComplexMissionItem::jsonComplexItemTypeKey].toString();
if (itemType != VisualMissionItem::jsonTypeComplexItemValue || complexType != jsonComplexItemTypeValue) { if (itemType != VisualMissionItem::jsonTypeComplexItemValue || complexType != jsonComplexItemTypeValue) {
errorString = tr("QGroundControl does not support loading this complex mission item type: %1:2").arg(itemType).arg(complexType); errorString = tr("%1 does not support loading this complex mission item type: %2:%3").arg(qgcApp()->applicationName()).arg(itemType).arg(complexType);
return false; return false;
} }
......
...@@ -191,12 +191,12 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) ...@@ -191,12 +191,12 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
if (!_runningUnitTests) { if (!_runningUnitTests) {
if (getuid() == 0) { if (getuid() == 0) {
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setInformativeText("You are running QGroundControl as root. " msgBox.setInformativeText(tr("You are running %1 as root. "
"You should not do this since it will cause other issues with QGroundControl. " "You should not do this since it will cause other issues with %1. "
"QGroundControl will now exit. " "%1 will now exit. "
"If you are having serial port issues on Ubuntu, execute the following commands to fix most issues:\n" "If you are having serial port issues on Ubuntu, execute the following commands to fix most issues:\n"
"sudo usermod -a -G dialout $USER\n" "sudo usermod -a -G dialout $USER\n"
"sudo apt-get remove modemmanager"); "sudo apt-get remove modemmanager").arg(qgcApp()->applicationName()));
msgBox.setStandardButtons(QMessageBox::Ok); msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.exec(); msgBox.exec();
......
...@@ -37,6 +37,8 @@ public: ...@@ -37,6 +37,8 @@ public:
QGroundControlQmlGlobal(QGCApplication* app); QGroundControlQmlGlobal(QGCApplication* app);
~QGroundControlQmlGlobal(); ~QGroundControlQmlGlobal();
Q_PROPERTY(QString appName READ appName CONSTANT)
Q_PROPERTY(FlightMapSettings* flightMapSettings READ flightMapSettings CONSTANT) Q_PROPERTY(FlightMapSettings* flightMapSettings READ flightMapSettings CONSTANT)
Q_PROPERTY(LinkManager* linkManager READ linkManager CONSTANT) Q_PROPERTY(LinkManager* linkManager READ linkManager CONSTANT)
Q_PROPERTY(MultiVehicleManager* multiVehicleManager READ multiVehicleManager CONSTANT) Q_PROPERTY(MultiVehicleManager* multiVehicleManager READ multiVehicleManager CONSTANT)
...@@ -123,6 +125,7 @@ public: ...@@ -123,6 +125,7 @@ public:
// Property accesors // Property accesors
QString appName () { return qgcApp()->applicationName(); }
FlightMapSettings* flightMapSettings () { return _flightMapSettings; } FlightMapSettings* flightMapSettings () { return _flightMapSettings; }
LinkManager* linkManager () { return _linkManager; } LinkManager* linkManager () { return _linkManager; }
MultiVehicleManager* multiVehicleManager () { return _multiVehicleManager; } MultiVehicleManager* multiVehicleManager () { return _multiVehicleManager; }
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
{ {
"name": "batteryPercentRemainingAnnounce", "name": "batteryPercentRemainingAnnounce",
"shortDescription": "Announce battery remaining percent", "shortDescription": "Announce battery remaining percent",
"longDescription": "QGroundControl will announce the remaining battery percent when it falls below the specified percentage.", "longDescription": "Announce the remaining battery percent when it falls below the specified percentage.",
"type": "uint32", "type": "uint32",
"defaultValue": 30, "defaultValue": 30,
"units": "%", "units": "%",
...@@ -92,8 +92,8 @@ ...@@ -92,8 +92,8 @@
}, },
{ {
"name": "BaseDeviceFontPointSize", "name": "BaseDeviceFontPointSize",
"shortDescription": "QGroundControl font size", "shortDescription": "Application font size",
"longDescription": "The point size for the default font used in QGroundControl.", "longDescription": "The point size for the default font used.",
"type": "uint32", "type": "uint32",
"units": "pt", "units": "pt",
"min": 6, "min": 6,
...@@ -102,8 +102,8 @@ ...@@ -102,8 +102,8 @@
}, },
{ {
"name": "StyleIsDark", "name": "StyleIsDark",
"shortDescription": "QGroundControl color scheme", "shortDescription": "Application color scheme",
"longDescription": "The color scheme for the QGroundControl user interface.", "longDescription": "The color scheme for the user interface.",
"type": "uint32", "type": "uint32",
"enumStrings": "Indoor,Outdoor", "enumStrings": "Indoor,Outdoor",
"enumValues": "1,0" "enumValues": "1,0"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{ {
"name": "VideoSource", "name": "VideoSource",
"shortDescription": "Video source", "shortDescription": "Video source",
"longDescription": "Source for video. UDP, RTSP and UVC Cameras may be supported supported depending on Vehicle and QGroundControl version.", "longDescription": "Source for video. UDP, RTSP and UVC Cameras may be supported depending on Vehicle and ground station version.",
"type": "string", "type": "string",
"defaultValue": "" "defaultValue": ""
}, },
......
...@@ -97,16 +97,16 @@ void MultiVehicleManager::_vehicleHeartbeatInfo(LinkInterface* link, int vehicle ...@@ -97,16 +97,16 @@ void MultiVehicleManager::_vehicleHeartbeatInfo(LinkInterface* link, int vehicle
<< vehicleType; << vehicleType;
if (vehicleId == _mavlinkProtocol->getSystemId()) { if (vehicleId == _mavlinkProtocol->getSystemId()) {
_app->showMessage(QString("Warning: A vehicle is using the same system id as QGroundControl: %1").arg(vehicleId)); _app->showMessage(QString("Warning: A vehicle is using the same system id as %1: %2").arg(qgcApp()->applicationName()).arg(vehicleId));
} }
// QSettings settings; // QSettings settings;
// bool mavlinkVersionCheck = settings.value("VERSION_CHECK_ENABLED", true).toBool(); // bool mavlinkVersionCheck = settings.value("VERSION_CHECK_ENABLED", true).toBool();
// if (mavlinkVersionCheck && vehicleMavlinkVersion != MAVLINK_VERSION) { // if (mavlinkVersionCheck && vehicleMavlinkVersion != MAVLINK_VERSION) {
// _ignoreVehicleIds += vehicleId; // _ignoreVehicleIds += vehicleId;
// _app->showMessage(QString("The MAVLink protocol version on vehicle #%1 and QGroundControl differ! " // _app->showMessage(QString("The MAVLink protocol version on vehicle #%1 and %2 differ! "
// "It is unsafe to use different MAVLink versions. " // "It is unsafe to use different MAVLink versions. "
// "QGroundControl therefore refuses to connect to vehicle #%1, which sends MAVLink version %2 (QGroundControl uses version %3).").arg(vehicleId).arg(vehicleMavlinkVersion).arg(MAVLINK_VERSION)); // "%2 therefore refuses to connect to vehicle #%1, which sends MAVLink version %3 (%2 uses version %4).").arg(vehicleId).arg(qgcApp()->applicationName()).arg(vehicleMavlinkVersion).arg(MAVLINK_VERSION));
// return; // return;
// } // }
......
...@@ -33,11 +33,11 @@ QGCView { ...@@ -33,11 +33,11 @@ QGCView {
readonly property string title: "FIRMWARE" readonly property string title: "FIRMWARE"
readonly property string highlightPrefix: "<font color=\"" + qgcPal.warningText + "\">" readonly property string highlightPrefix: "<font color=\"" + qgcPal.warningText + "\">"
readonly property string highlightSuffix: "</font>" readonly property string highlightSuffix: "</font>"
readonly property string welcomeText: "QGroundControl can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras." readonly property string welcomeText: qsTr("%1 can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras.").arg(QGroundControl.appName)
readonly property string plugInText: "<big>" + highlightPrefix + "Plug in your device" + highlightSuffix + " via USB to " + highlightPrefix + "start" + highlightSuffix + " firmware upgrade.</big>" readonly property string plugInText: "<big>" + highlightPrefix + "Plug in your device" + highlightSuffix + " via USB to " + highlightPrefix + "start" + highlightSuffix + " firmware upgrade.</big>"
readonly property string flashFailText: "If upgrade failed, make sure to connect " + highlightPrefix + "directly" + highlightSuffix + " to a powered USB port on your computer, not through a USB hub. " + readonly property string flashFailText: "If upgrade failed, make sure to connect " + highlightPrefix + "directly" + highlightSuffix + " to a powered USB port on your computer, not through a USB hub. " +
"Also make sure you are only powered via USB " + highlightPrefix + "not battery" + highlightSuffix + "." "Also make sure you are only powered via USB " + highlightPrefix + "not battery" + highlightSuffix + "."
readonly property string qgcUnplugText1: "All QGroundControl connections to vehicles must be " + highlightPrefix + " disconnected " + highlightSuffix + "prior to firmware upgrade." readonly property string qgcUnplugText1: qsTr("All %1 connections to vehicles must be ").arg(QGroundControl.appName) + highlightPrefix + " disconnected " + highlightSuffix + "prior to firmware upgrade."
readonly property string qgcUnplugText2: highlightPrefix + "<big>Please unplug your Pixhawk and/or Radio from USB.</big>" + highlightSuffix readonly property string qgcUnplugText2: highlightPrefix + "<big>Please unplug your Pixhawk and/or Radio from USB.</big>" + highlightSuffix
property string firmwareWarningMessage property string firmwareWarningMessage
......
...@@ -141,7 +141,7 @@ Rectangle { ...@@ -141,7 +141,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pointSize: ScreenTools.mediumFontPointSize font.pointSize: ScreenTools.mediumFontPointSize
text: "QGroundControl does not currently support setup of your vehicle type. " + text: tr("%1 does not currently support setup of your vehicle type. ").arg(QGroundControl.appName) +
"If your vehicle is already configured you can still Fly." "If your vehicle is already configured you can still Fly."
onLinkActivated: Qt.openUrlExternally(link) onLinkActivated: Qt.openUrlExternally(link)
...@@ -162,7 +162,7 @@ Rectangle { ...@@ -162,7 +162,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.pointSize: ScreenTools.largeFontPointSize font.pointSize: ScreenTools.largeFontPointSize
text: "Connect vehicle to your device and QGroundControl will automatically detect it." + text: qsTr("Connect vehicle to your device and %1 will automatically detect it.").arg(QGroundControl.appName) +
(ScreenTools.isMobile ? "" : " Click Firmware on the left to upgrade your vehicle.") (ScreenTools.isMobile ? "" : " Click Firmware on the left to upgrade your vehicle.")
onLinkActivated: Qt.openUrlExternally(link) onLinkActivated: Qt.openUrlExternally(link)
......
...@@ -867,8 +867,8 @@ void LinkManager::_activeLinkCheck(void) ...@@ -867,8 +867,8 @@ void LinkManager::_activeLinkCheck(void)
} }
qgcApp()->showMessage(foundNSHPrompt ? qgcApp()->showMessage(foundNSHPrompt ?
QStringLiteral("Please check to make sure you have an SD Card inserted in your Vehicle and try again.") : tr("Please check to make sure you have an SD Card inserted in your Vehicle and try again.") :
QStringLiteral("Your Vehicle is not responding. If this continues shutdown QGroundControl, restart the Vehicle letting it boot completely, then start QGroundControl.")); tr("Your Vehicle is not responding. If this continues, shutdown %1, restart the Vehicle letting it boot completely, then start %1.").arg(qgcApp()->applicationName()));
} }
} }
#endif #endif
......
...@@ -193,7 +193,7 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) ...@@ -193,7 +193,7 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
{ {
warnedUserNonMavlink = true; warnedUserNonMavlink = true;
emit protocolStatusMessage(tr("MAVLink Protocol"), tr("There is a MAVLink Version or Baud Rate Mismatch. " emit protocolStatusMessage(tr("MAVLink Protocol"), tr("There is a MAVLink Version or Baud Rate Mismatch. "
"Please check if the baud rates of QGroundControl and your autopilot are the same.")); "Please check if the baud rates of %1 and your autopilot are the same.").arg(qgcApp()->applicationName()));
} }
} }
} }
......
...@@ -288,7 +288,7 @@ void QGCFlightGearLink::readBytes() ...@@ -288,7 +288,7 @@ void QGCFlightGearLink::readBytes()
qDebug() << "RETURN LENGTH MISMATCHING EXPECTED" << nValues << "BUT GOT" << values.size(); qDebug() << "RETURN LENGTH MISMATCHING EXPECTED" << nValues << "BUT GOT" << values.size();
qDebug() << state; qDebug() << state;
emit showCriticalMessageFromThread(tr("FlightGear HIL"), emit showCriticalMessageFromThread(tr("FlightGear HIL"),
tr("Flight Gear protocol file '%1' is out of date. Quit QGroundControl. Delete the file and restart QGroundControl to fix.").arg(_fgProtocolFileFullyQualified)); tr("Flight Gear protocol file '%1' is out of date. Quit %2. Delete the file and restart %2 to fix.").arg(_fgProtocolFileFullyQualified).arg(qgcApp()->applicationName()));
disconnectSimulation(); disconnectSimulation();
return; return;
} }
...@@ -820,7 +820,7 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -820,7 +820,7 @@ bool QGCFlightGearLink::connectSimulation()
// Setup and verify directory which contains QGC provided aircraft files // Setup and verify directory which contains QGC provided aircraft files
QString qgcAircraftDir(QApplication::applicationDirPath() + "/flightgear/Aircraft"); QString qgcAircraftDir(QApplication::applicationDirPath() + "/flightgear/Aircraft");
if (!QFileInfo(qgcAircraftDir).isDir()) { if (!QFileInfo(qgcAircraftDir).isDir()) {
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. Aircraft directory is missing: '%1'.").arg(qgcAircraftDir)); QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect %1 installation. Aircraft directory is missing: '%2'.").arg(qgcApp()->applicationName()).arg(qgcAircraftDir));
return false; return false;
} }
_fgArgList += "--fg-aircraft=" + qgcAircraftDir; _fgArgList += "--fg-aircraft=" + qgcAircraftDir;
...@@ -841,7 +841,7 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -841,7 +841,7 @@ bool QGCFlightGearLink::connectSimulation()
// Verify directory which contains QGC provided FlightGear communication protocol files // Verify directory which contains QGC provided FlightGear communication protocol files
QDir qgcProtocolDir(QApplication::applicationDirPath() + "/flightgear/Protocol/"); QDir qgcProtocolDir(QApplication::applicationDirPath() + "/flightgear/Protocol/");
if (!qgcProtocolDir.isReadable()) { if (!qgcProtocolDir.isReadable()) {
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. Protocol directory is missing (%1).").arg(qgcProtocolDir.path())); QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect installation. Protocol directory is missing (%1).").arg(qgcProtocolDir.path()));
return false; return false;
} }
...@@ -849,7 +849,7 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -849,7 +849,7 @@ bool QGCFlightGearLink::connectSimulation()
QString fgProtocolXmlFile = fgProtocol + ".xml"; QString fgProtocolXmlFile = fgProtocol + ".xml";
QString qgcProtocolFileFullyQualified = qgcProtocolDir.absoluteFilePath(fgProtocolXmlFile); QString qgcProtocolFileFullyQualified = qgcProtocolDir.absoluteFilePath(fgProtocolXmlFile);
if (!QFileInfo(qgcProtocolFileFullyQualified).exists()) { if (!QFileInfo(qgcProtocolFileFullyQualified).exists()) {
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. FlightGear protocol file missing: %1").arg(qgcProtocolFileFullyQualified)); QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect installation. FlightGear protocol file missing: %1").arg(qgcProtocolFileFullyQualified));
return false; return false;
} }
...@@ -868,7 +868,7 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -868,7 +868,7 @@ bool QGCFlightGearLink::connectSimulation()
!qgcFile.open(QIODevice::ReadOnly)) { !qgcFile.open(QIODevice::ReadOnly)) {
QGCMessageBox::warning(tr("FlightGear HIL"), tr("Unable to verify that protocol file %1 is current. " QGCMessageBox::warning(tr("FlightGear HIL"), tr("Unable to verify that protocol file %1 is current. "
"If file is out of date, you may experience problems. " "If file is out of date, you may experience problems. "
"Safest approach is to delete the file manually and allow QGroundControl install the latest file.").arg(_fgProtocolFileFullyQualified)); "Safest approach is to delete the file manually and allow %2 install the latest file.").arg(qgcApp()->applicationName()).arg(_fgProtocolFileFullyQualified));
} }
QByteArray fgBytes = fgFile.readAll(); QByteArray fgBytes = fgFile.readAll();
...@@ -878,7 +878,7 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -878,7 +878,7 @@ bool QGCFlightGearLink::connectSimulation()
qgcFile.close(); qgcFile.close();
if (fgBytes != qgcBytes) { if (fgBytes != qgcBytes) {
QGCMessageBox::warning(tr("FlightGear HIL"), tr("FlightGear protocol file %1 is out of date. It will be deleted, which will cause QGroundControl to install the latest version of the file.").arg(_fgProtocolFileFullyQualified)); QGCMessageBox::warning(tr("FlightGear HIL"), tr("FlightGear protocol file %1 is out of date. It will be deleted, which will cause %2 to install the latest version of the file.").arg(_fgProtocolFileFullyQualified).arg(qgcApp()->applicationName()));
if (!QFile::remove(_fgProtocolFileFullyQualified)) { if (!QFile::remove(_fgProtocolFileFullyQualified)) {
QGCMessageBox::warning(tr("FlightGear HIL"), tr("Delete of protocol file failed. You will have to manually delete the file.")); QGCMessageBox::warning(tr("FlightGear HIL"), tr("Delete of protocol file failed. You will have to manually delete the file."));
return false; return false;
...@@ -889,7 +889,7 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -889,7 +889,7 @@ bool QGCFlightGearLink::connectSimulation()
if (!QFileInfo(_fgProtocolFileFullyQualified).exists()) { if (!QFileInfo(_fgProtocolFileFullyQualified).exists()) {
QMessageBox msgBox(QMessageBox::Critical, QMessageBox msgBox(QMessageBox::Critical,
tr("FlightGear Failed to Start"), tr("FlightGear Failed to Start"),
tr("FlightGear Failed to Start. QGroundControl protocol (%1) not installed to FlightGear Protocol directory (%2)").arg(fgProtocolXmlFile).arg(fgProtocolDir.path()), tr("FlightGear Failed to Start. %1 protocol (%2) not installed to FlightGear Protocol directory (%3)").arg(qgcApp()->applicationName()).arg(fgProtocolXmlFile).arg(fgProtocolDir.path()),
QMessageBox::Cancel, QMessageBox::Cancel,
MainWindow::instance()); MainWindow::instance());
msgBox.setWindowModality(Qt::ApplicationModal); msgBox.setWindowModality(Qt::ApplicationModal);
......
...@@ -134,7 +134,7 @@ Item { ...@@ -134,7 +134,7 @@ Item {
MessageDialog { MessageDialog {
id: unsavedMissionCloseDialog id: unsavedMissionCloseDialog
title: qsTr("QGroundControl close") title: qsTr("%1 close").arg(QGroundControl.appName)
text: qsTr("You have a mission edit in progress which has not been saved/sent. If you close you will lose changes. Are you sure you want to close?") text: qsTr("You have a mission edit in progress which has not been saved/sent. If you close you will lose changes. Are you sure you want to close?")
standardButtons: StandardButton.Yes | StandardButton.No standardButtons: StandardButton.Yes | StandardButton.No
modality: Qt.ApplicationModal modality: Qt.ApplicationModal
...@@ -153,7 +153,7 @@ Item { ...@@ -153,7 +153,7 @@ Item {
MessageDialog { MessageDialog {
id: activeConnectionsCloseDialog id: activeConnectionsCloseDialog
title: qsTr("QGroundControl close") title: qsTr("%1 close").arg(QGroundControl.appName)
text: qsTr("There are still active connections to vehicles. Do you want to disconnect these before closing?") text: qsTr("There are still active connections to vehicles. Do you want to disconnect these before closing?")
standardButtons: StandardButton.Yes | StandardButton.Cancel standardButtons: StandardButton.Yes | StandardButton.Cancel
modality: Qt.ApplicationModal modality: Qt.ApplicationModal
......
...@@ -277,7 +277,7 @@ QGCView { ...@@ -277,7 +277,7 @@ QGCView {
icon: StandardIcon.Warning icon: StandardIcon.Warning
standardButtons: StandardButton.Yes | StandardButton.No standardButtons: StandardButton.Yes | StandardButton.No
title: qsTr("Clear Settings") title: qsTr("Clear Settings")
text: qsTr("All saved settings will be reset the next time you start QGroundControl. Is this really what you want?") text: qsTr("All saved settings will be reset the next time you start %1. Is this really what you want?").arg(QGroundControl.appName)
onYes: { onYes: {
QGroundControl.deleteAllSettingsNextBoot() QGroundControl.deleteAllSettingsNextBoot()
clearDialog.visible = false clearDialog.visible = false
...@@ -598,7 +598,7 @@ QGCView { ...@@ -598,7 +598,7 @@ QGCView {
QGCLabel { QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("QGroundControl Version: " + QGroundControl.qgcVersion) text: qsTr("%1 Version: %2").arg(QGroundControl.appName).arg(QGroundControl.qgcVersion)
} }
} // settingsColumn } // settingsColumn
} // QGCFlickable } // QGCFlickable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment