diff --git a/src/plugins/qmldesigner/components/collectioneditor/collectionjsonparser.cpp b/src/plugins/qmldesigner/components/collectioneditor/collectionjsonparser.cpp index 3756af47857..630abb7b4a4 100644 --- a/src/plugins/qmldesigner/components/collectioneditor/collectionjsonparser.cpp +++ b/src/plugins/qmldesigner/components/collectioneditor/collectionjsonparser.cpp @@ -204,7 +204,7 @@ bool JsonCollectionParser::visit([[maybe_unused]] QmlJS::AST::PatternElementList void JsonCollectionParser::endVisit([[maybe_unused]] QmlJS::AST::PatternElementList *patternElementList) { - if (auto curIndex = std::get_if(&keyStack.top())) + if (std::get_if(&keyStack.top())) keyStack.pop(); } @@ -220,7 +220,7 @@ void JsonCollectionParser::checkPropertyUpdates(QStack stack, { bool shouldUpdate = collectionPaths.contains(stack); if (!shouldUpdate && !stack.isEmpty()) { - if (auto lastIndex = std::get_if(&stack.top())) { + if (std::get_if(&stack.top())) { stack.pop(); shouldUpdate = collectionPaths.contains(stack); }