Fixed clazy warnings: unused QString.

This commit is contained in:
Mat Sutcliffe
2018-12-19 18:50:23 +00:00
parent a65be602bb
commit b4724996c6
3 changed files with 5 additions and 5 deletions

View File

@@ -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)
{

View File

@@ -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()));

View File

@@ -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;