mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
[Qt6] mod QRegExp to QRegularExpression
note ad Core5Compat to Cmake
This commit is contained in:
@@ -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";
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user