From 76ec1246980ae026ed541c0d1ccf9e7eac699aab Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 14 May 2024 15:27:20 +0200 Subject: [PATCH] QmlDesigner: Fix compilation error Change-Id: Ia49491a7deae085460fe4498cbcc6727cc10db7b Reviewed-by: Qt CI Patch Build Bot Reviewed-by: Marco Bubke Reviewed-by: Ali Kianian --- .../components/collectioneditor/collectionjsonparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }