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

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