[Qt6] mod QRegExp to QRegularExpression

note ad Core5Compat to Cmake
This commit is contained in:
Simon De Backer
2021-03-07 20:21:39 +01:00
parent 332d978043
commit a4872bf686

View File

@@ -773,8 +773,27 @@ bool ElementsLocation::setXml(const QDomDocument &xml_document) const
#else
#if TODO_LIST
#pragma message("@TODO remove code for QT 6 or later")
# pragma message("@TODO ad Core5Compat to Cmake")
#endif
qDebug() << "Help code for QT 6 or later";
QString path_ = collectionPath(false);
QRegularExpression rx("^(.*)/(.*\\.elmt)$");
if (rx.exactMatch(path_))
{
return project()
->embeddedElementCollection()
->addElementDefinition(
rx.cap(1),
rx.cap(2),
xml_document.documentElement());
}
else
{
qDebug() << "ElementsLocation::setXml :"
" rx don't match";
}
#endif
}
}