refs #800 Fixed some declaration shadows variable in outer scope warnings.

This commit is contained in:
Mathew Sutcliffe
2016-11-10 00:39:09 +00:00
committed by Klaus Basan
parent 5791de6860
commit 6f972035ab
6 changed files with 15 additions and 15 deletions

View File

@@ -94,8 +94,8 @@ namespace BlackGui
if (volume > 100)
{
int v = volume - 100;
volume = 100 + v / 5;
int vol = volume - 100;
volume = 100 + vol / 5;
}
if (volume != ui->hs_Volume->value())

View File

@@ -113,9 +113,9 @@ namespace BlackGui
const QString sharedUrlHtml("<a href=\"%1\">%2</a>");
QString sharedUrlsHtml;
for (const CUrl &url : sharedUrls)
for (const CUrl &sharedUrl : sharedUrls)
{
sharedUrlsHtml += sharedUrlHtml.arg(url.getFullUrl(), url.getHost());
sharedUrlsHtml += sharedUrlHtml.arg(sharedUrl.getFullUrl(), sharedUrl.getHost());
sharedUrlsHtml += " ";
}
ui->lbl_SharedUrls->setText(sharedUrlsHtml.trimmed());

View File

@@ -103,13 +103,13 @@ namespace BlackGui
return;
}
QJsonParseError jsonError;
QJsonDocument json(QJsonDocument::fromJson(jsonParts.toUtf8(), &jsonError));
QJsonDocument jsonDoc(QJsonDocument::fromJson(jsonParts.toUtf8(), &jsonError));
if (jsonError.error != QJsonParseError::NoError)
{
CLogMessage(this).validationError("Parse error: %1") << jsonError.errorString();
return;
}
parts.convertFromJson(json.object());
parts.convertFromJson(jsonDoc.object());
partsToGui(parts);
}
else