From 43515e32452622476970a3d69d610dfb48db383c Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Thu, 21 Dec 2017 21:49:02 +0100 Subject: [PATCH] Added QStringLiteral and tr --- plugins/updaterplugin/updaterdialog.cpp | 4 ++-- plugins/weatherplugin/weatherwidget.cpp | 4 ++-- zeiterfassungguilib/stripswidget.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/updaterplugin/updaterdialog.cpp b/plugins/updaterplugin/updaterdialog.cpp index 55f5bdb..74272d4 100644 --- a/plugins/updaterplugin/updaterdialog.cpp +++ b/plugins/updaterplugin/updaterdialog.cpp @@ -31,8 +31,8 @@ UpdaterDialog::UpdaterDialog(MainWindow &mainWindow) : connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &UpdaterDialog::rejectedSlot); auto url = m_mainWindow.settings().value(QStringLiteral("UpdaterPlugin/url"), - QUrl(QStringLiteral("https://api.github.com/repos/0xFEEDC0DE64/QtZeiterfassung/releases"))).toUrl(); - m_reply = m_mainWindow.erfassung().manager()->get(QNetworkRequest(url)); + QStringLiteral("https://api.github.com/repos/0xFEEDC0DE64/QtZeiterfassung/releases")).toString(); + m_reply = m_mainWindow.erfassung().manager()->get(QNetworkRequest(QUrl(url))); connect(m_reply, &QNetworkReply::finished, this, &UpdaterDialog::finished); } diff --git a/plugins/weatherplugin/weatherwidget.cpp b/plugins/weatherplugin/weatherwidget.cpp index 76efa1a..4bdb88d 100644 --- a/plugins/weatherplugin/weatherwidget.cpp +++ b/plugins/weatherplugin/weatherwidget.cpp @@ -69,14 +69,14 @@ void WeatherWidget::finished() if(!obj.contains(QStringLiteral("weather"))) { qWarning() << "no weather" << obj; - setText("No weater found"); + setText(tr("No weather found")); goto after; } if(!obj.contains(QStringLiteral("main"))) { qWarning() << "no main" << obj; - setText("No main found"); + setText(tr("No main found")); goto after; } diff --git a/zeiterfassungguilib/stripswidget.cpp b/zeiterfassungguilib/stripswidget.cpp index 2abac45..ab0e37c 100644 --- a/zeiterfassungguilib/stripswidget.cpp +++ b/zeiterfassungguilib/stripswidget.cpp @@ -438,7 +438,7 @@ bool StripsWidget::createStrips() 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" % errorMessage, this); - label->setStyleSheet("color: red;"); + label->setStyleSheet(QStringLiteral("color: red;")); m_stripsLayout->addWidget(label); }