Warnings removed

This commit is contained in:
Bertrand Songis
2019-08-12 14:54:16 +02:00
parent abe1f843c1
commit 75a5dfef24
4 changed files with 19 additions and 15 deletions
+2 -2
View File
@@ -128,13 +128,13 @@ RawSourceRange RawSource::getRange(const ModelData * model, const GeneralSetting
case TELEMETRY_SOURCE_T2_MAX:
result.min = -30;
result.max = 225;
result.unit = trUtf8("°C");
result.unit = tr("°C");
break;
case TELEMETRY_SOURCE_HDG:
result.step = 2;
result.max = 360;
result.offset = 256;
result.unit = trUtf8("°");
result.unit = tr("°");
break;
case TELEMETRY_SOURCE_RPM:
case TELEMETRY_SOURCE_RPM_MAX:
+4 -4
View File
@@ -52,9 +52,9 @@ QString SensorData::unitString() const
case UNIT_FEET:
return tr("f");
case UNIT_CELSIUS:
return trUtf8("°C");
return tr("°C");
case UNIT_FAHRENHEIT:
return trUtf8("°F");
return tr("°F");
case UNIT_PERCENT:
return tr("%");
case UNIT_MAH:
@@ -70,9 +70,9 @@ QString SensorData::unitString() const
case UNIT_G:
return tr("g");
case UNIT_DEGREE:
return trUtf8("°");
return tr("°");
case UNIT_RADIANS:
return trUtf8("Rad");
return tr("Rad");
case UNIT_HOURS:
return tr("hours");
case UNIT_MINUTES:
+9 -9
View File
@@ -323,13 +323,13 @@ QString MainWindow::seekCodeString(const QByteArray & qba, const QString & label
{
int posLabel = qba.indexOf(label);
if (posLabel < 0)
return QString::null;
return QString();
int start = qba.indexOf("\"", posLabel + label.length());
if (start < 0)
return QString::null;
return QString();
int end = qba.indexOf("\"", start + 1);
if (end < 0)
return QString::null;
return QString();
return qba.mid(start + 1, end - start - 1);
}
@@ -529,10 +529,10 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
QAbstractButton *rnButton = nullptr;
msgBox.setText(tr("Firmware %1 does not seem to have ever been downloaded.\nVersion %2 is available.\nDo you want to download it now?\n\nWe recommend you view the release notes using the button below to learn about any changes that may be important to you.")
.arg(Firmware::getCurrentVariant()->getId()).arg(fullVersionString));
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
QAbstractButton *YesButton = msgBox.addButton(tr("Yes"), QMessageBox::YesRole);
msgBox.addButton(tr("No"), QMessageBox::NoRole);
if (!rn.isEmpty()) {
rnButton = msgBox.addButton(trUtf8("Release Notes"), QMessageBox::ActionRole);
rnButton = msgBox.addButton(tr("Release Notes"), QMessageBox::ActionRole);
}
msgBox.setIcon(QMessageBox::Question);
msgBox.resize(0, 0);
@@ -558,10 +558,10 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
QAbstractButton *rnButton = nullptr;
msgBox.setText(tr("A new version of %1 firmware is available:\n - current is %2\n - newer is %3\n\nDo you want to download it now?\n\nWe recommend you view the release notes using the button below to learn about any changes that may be important to you.")
.arg(Firmware::getCurrentVariant()->getId()).arg(currentVersionString).arg(fullVersionString));
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
QAbstractButton *YesButton = msgBox.addButton(tr("Yes"), QMessageBox::YesRole);
msgBox.addButton(tr("No"), QMessageBox::NoRole);
if (!rn.isEmpty()) {
rnButton = msgBox.addButton(trUtf8("Release Notes"), QMessageBox::ActionRole);
rnButton = msgBox.addButton(tr("Release Notes"), QMessageBox::ActionRole);
}
msgBox.setIcon(QMessageBox::Question);
msgBox.resize(0,0);
@@ -290,7 +290,11 @@ QWidget * RadioOutputsWidget::createLogicalSwitch(QWidget * parent, int switchNo
QFont font = swtch->font();
font.setBold(true);
swtch->setFont(font);
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
swtch->setMinimumWidth(swtch->fontMetrics().width("99") + 10);
#else
swtch->setMinimumWidth(swtch->fontMetrics().horizontalAdvance("99") + 10);
#endif
font.setBold(false);
swtch->setFont(font);
swtch->setText(QString("%1").arg(switchNo+1, 2, 10, QChar('0')));