Commit 30f64c8a authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Fix loop anaylysis issue

warning: loop variable 'widgetJsonValue' is always a copy because the
range of type 'QJsonArray' does not return a reference
parent fc14f277
......@@ -918,14 +918,14 @@ namespace {
ViewSplitter *restoreSessionsSplitterRecurse(const QJsonObject& jsonSplitter, ViewManager *manager)
{
auto splitterWidgets = jsonSplitter[QStringLiteral("Widgets")].toArray();
const QJsonArray splitterWidgets = jsonSplitter[QStringLiteral("Widgets")].toArray();
auto orientation = (jsonSplitter[QStringLiteral("Orientation")].toString() == QLatin1String("Horizontal"))
? Qt::Horizontal : Qt::Vertical;
auto *currentSplitter = new ViewSplitter();
currentSplitter->setOrientation(orientation);
for (const auto& widgetJsonValue : splitterWidgets) {
for (const auto widgetJsonValue : splitterWidgets) {
const auto widgetJsonObject = widgetJsonValue.toObject();
const auto sessionIterator = widgetJsonObject.constFind(QStringLiteral("SessionRestoreId"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment