Added QStringLiteral and tr

This commit is contained in:
0xFEEDC0DE64
2017-12-21 21:49:02 +01:00
parent f877ab8a0a
commit 43515e3245
3 changed files with 5 additions and 5 deletions

View File

@@ -31,8 +31,8 @@ UpdaterDialog::UpdaterDialog(MainWindow &mainWindow) :
connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &UpdaterDialog::rejectedSlot); connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &UpdaterDialog::rejectedSlot);
auto url = m_mainWindow.settings().value(QStringLiteral("UpdaterPlugin/url"), auto url = m_mainWindow.settings().value(QStringLiteral("UpdaterPlugin/url"),
QUrl(QStringLiteral("https://api.github.com/repos/0xFEEDC0DE64/QtZeiterfassung/releases"))).toUrl(); QStringLiteral("https://api.github.com/repos/0xFEEDC0DE64/QtZeiterfassung/releases")).toString();
m_reply = m_mainWindow.erfassung().manager()->get(QNetworkRequest(url)); m_reply = m_mainWindow.erfassung().manager()->get(QNetworkRequest(QUrl(url)));
connect(m_reply, &QNetworkReply::finished, this, &UpdaterDialog::finished); connect(m_reply, &QNetworkReply::finished, this, &UpdaterDialog::finished);
} }

View File

@@ -69,14 +69,14 @@ void WeatherWidget::finished()
if(!obj.contains(QStringLiteral("weather"))) if(!obj.contains(QStringLiteral("weather")))
{ {
qWarning() << "no weather" << obj; qWarning() << "no weather" << obj;
setText("No weater found"); setText(tr("No weather found"));
goto after; goto after;
} }
if(!obj.contains(QStringLiteral("main"))) if(!obj.contains(QStringLiteral("main")))
{ {
qWarning() << "no main" << obj; qWarning() << "no main" << obj;
setText("No main found"); setText(tr("No main found"));
goto after; goto after;
} }

View File

@@ -438,7 +438,7 @@ bool StripsWidget::createStrips()
auto label = new QLabel(tr("Strip rendering aborted due error.\n" auto label = new QLabel(tr("Strip rendering aborted due error.\n"
"Your bookings and time assignments for this day are in an illegal state!") % "\n" % "Your bookings and time assignments for this day are in an illegal state!") % "\n" %
errorMessage, this); errorMessage, this);
label->setStyleSheet("color: red;"); label->setStyleSheet(QStringLiteral("color: red;"));
m_stripsLayout->addWidget(label); m_stripsLayout->addWidget(label);
} }