From b4724996c617feda1164b35adfc676df01e4aea3 Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Wed, 19 Dec 2018 18:50:23 +0000 Subject: [PATCH] Fixed clazy warnings: unused QString. --- src/blackcore/setupreader.cpp | 2 -- src/blackgui/components/settingsfontcomponent.cpp | 1 - src/blackmisc/json.cpp | 7 +++++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/blackcore/setupreader.cpp b/src/blackcore/setupreader.cpp index da6a15e5e..a905a1e31 100644 --- a/src/blackcore/setupreader.cpp +++ b/src/blackcore/setupreader.cpp @@ -377,7 +377,6 @@ namespace BlackCore const QUrl url(nwReply->url()); const QString urlString(url.toString()); - const QString replyMessage(nwReply->errorString()); if (nwReply->error() == QNetworkReply::NoError) { @@ -464,7 +463,6 @@ namespace BlackCore const QUrl url(nwReply->url()); const QString urlString(url.toString()); - const QString replyMessage(nwReply->errorString()); if (nwReply->error() == QNetworkReply::NoError) { diff --git a/src/blackgui/components/settingsfontcomponent.cpp b/src/blackgui/components/settingsfontcomponent.cpp index 7a81459bf..4bff4d6e1 100644 --- a/src/blackgui/components/settingsfontcomponent.cpp +++ b/src/blackgui/components/settingsfontcomponent.cpp @@ -126,7 +126,6 @@ namespace BlackGui void CSettingsFontComponent::initUiValues(const QFont &font, const QColor &color) { - const QString family = font.family(); ui->cb_SettingsGuiFontStyle->setCurrentText(CStyleSheetUtility::fontAsCombinedWeightStyle(font)); ui->cb_SettingsGuiFont->setCurrentFont(font); ui->cb_SettingsGuiFontSize->setCurrentText(QString::number(font.pointSize())); diff --git a/src/blackmisc/json.cpp b/src/blackmisc/json.cpp index 81f3bd8d8..63663bdd8 100644 --- a/src/blackmisc/json.cpp +++ b/src/blackmisc/json.cpp @@ -498,12 +498,15 @@ namespace BlackMisc // - type // - value if (object.size() != 1) { return object; } // no cache format - const QString key = object.constBegin().key(); const QJsonObject cacheObject = object.constBegin()->toObject(); if (cacheObject.contains("type") && cacheObject.contains("value")) { - const QString type = cacheObject.value("type").toString(); // just to verify in debugger +#ifdef QT_DEBUG + const QString key = object.constBegin().key(); // clazy:exclude=unused-non-trivial-variable + const QString type = cacheObject.value("type").toString(); // clazy:exclude=unused-non-trivial-variable + Q_UNUSED(key); Q_UNUSED(type); +#endif return cacheObject.value("value").toObject(); } return object;