From 0dc45f056e4a37f8e62f0c94d14bb2af20529142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Hellstr=C3=B6mer?= Date: Sun, 8 Sep 2024 21:10:13 +0200 Subject: [PATCH] Fixed deprecated regex exactMatch() --- sources/ElementsCollection/elementslocation.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/ElementsCollection/elementslocation.cpp b/sources/ElementsCollection/elementslocation.cpp index f9c66c369..28b6fb52c 100644 --- a/sources/ElementsCollection/elementslocation.cpp +++ b/sources/ElementsCollection/elementslocation.cpp @@ -805,15 +805,15 @@ bool ElementsLocation::setXml(const QDomDocument &xml_document) const qDebug() << "Help code for QT 6 or later"; QString path_ = collectionPath(false); - QRegularExpression rx("^(.*)/(.*\\.elmt)$"); - - if (rx.exactMatch(path_)) + QRegularExpression rx(QRegularExpression::anchoredPattern("(.*)/(.*\\.elmt)")); + QRegularExpressionMatch match = rx.match(path_); + if (match.hasMatch()) { return project() ->embeddedElementCollection() ->addElementDefinition( - rx.cap(1), - rx.cap(2), + match.captured(1), + match.captured(2), xml_document.documentElement()); } else