mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
refs #800 Fixed some declaration shadows variable in outer scope warnings.
This commit is contained in:
committed by
Klaus Basan
parent
5791de6860
commit
6f972035ab
@@ -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())
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace BlackGui
|
||||
{
|
||||
CDockWidget::initialFloating(); // initial floating to init position & size
|
||||
QList<CEnableForDockWidgetInfoArea *> infoAreaDockWidgets = this->findEmbeddedDockWidgetInfoAreaComponents();
|
||||
foreach(CEnableForDockWidgetInfoArea * dwia, infoAreaDockWidgets)
|
||||
for(CEnableForDockWidgetInfoArea *dwia : infoAreaDockWidgets)
|
||||
{
|
||||
Q_ASSERT_X(dwia, Q_FUNC_INFO, "Missing info area");
|
||||
dwia->setParentDockWidgetInfoArea(this);
|
||||
@@ -109,7 +109,7 @@ namespace BlackGui
|
||||
{
|
||||
QList<QWidget *> widgets = this->findChildren<QWidget *>();
|
||||
QList<CEnableForDockWidgetInfoArea *> widgetsWithDockWidgetInfoAreaComponent;
|
||||
foreach(QWidget * w, widgets)
|
||||
for(QWidget *w : widgets)
|
||||
{
|
||||
Q_ASSERT(w);
|
||||
CEnableForDockWidgetInfoArea *dwc = dynamic_cast<Components::CEnableForDockWidgetInfoArea *>(w);
|
||||
@@ -122,11 +122,11 @@ namespace BlackGui
|
||||
if (nestedInfoAreas.isEmpty()) return widgetsWithDockWidgetInfoAreaComponent;
|
||||
|
||||
// we have to exclude the nested embedded areas
|
||||
foreach(CDockWidgetInfoArea * ia, nestedInfoAreas)
|
||||
for(CDockWidgetInfoArea *ia : nestedInfoAreas)
|
||||
{
|
||||
QList<CEnableForDockWidgetInfoArea *> nestedInfoAreaComponents = ia->findEmbeddedDockWidgetInfoAreaComponents();
|
||||
if (nestedInfoAreaComponents.isEmpty()) { continue; }
|
||||
foreach(CEnableForDockWidgetInfoArea * iac, nestedInfoAreaComponents)
|
||||
for(CEnableForDockWidgetInfoArea *iac : nestedInfoAreaComponents)
|
||||
{
|
||||
bool r = widgetsWithDockWidgetInfoAreaComponent.removeOne(iac);
|
||||
Q_ASSERT(r); // why is the nested component not in the child list?
|
||||
|
||||
@@ -60,8 +60,8 @@ namespace BlackMisc
|
||||
{
|
||||
if (static_cast<QMetaType::Type>(variant.type()) == QMetaType::Int)
|
||||
{
|
||||
CIcons::IconIndex index = variant.value<CIcons::IconIndex>();
|
||||
this->m_icon = CIconList::iconByIndex(index);
|
||||
CIcons::IconIndex iconIndex = variant.value<CIcons::IconIndex>();
|
||||
this->m_icon = CIconList::iconByIndex(iconIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -147,10 +147,10 @@ namespace BlackCoreTest
|
||||
timer.start();
|
||||
for (qint64 currentTime = ts - 2 * deltaT; currentTime < ts; currentTime += 250)
|
||||
{
|
||||
IInterpolator::PartsStatus status;
|
||||
CAircraftPartsList pl(interpolator.getPartsBeforeTime(cs, ts, status));
|
||||
IInterpolator::PartsStatus partsStatus;
|
||||
CAircraftPartsList pl(interpolator.getPartsBeforeTime(cs, ts, partsStatus));
|
||||
fetchedParts++;
|
||||
QVERIFY2(status.isSupportingParts(), "Parts not supported");
|
||||
QVERIFY2(partsStatus.isSupportingParts(), "Parts not supported");
|
||||
QVERIFY2(!pl.isEmpty(), "Parts empty");
|
||||
}
|
||||
timeMs = timer.elapsed();
|
||||
|
||||
Reference in New Issue
Block a user