Commit a421f566 authored by Volker Krause's avatar Volker Krause
Browse files

Port away from QRegExp

parent bed3b367
Pipeline #176593 passed with stage
in 1 minute
......@@ -383,9 +383,14 @@ QString EngineExplorer::convertToString(const QVariant &value)
QRectF rectF = value.toRectF();
return QString("<x:%1, y:%2, w:%3, h:%4>").arg(rectF.x()).arg(rectF.y()).arg(rectF.width()).arg(rectF.height());
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
case QVariant::RegExp: {
return QString("%1").arg(value.toRegExp().pattern());
}
#endif
case QVariant::RegularExpression: {
return value.toRegularExpression().pattern();
}
case QVariant::Region: {
QRect region = value.value<QRegion>().boundingRect();
return QString("<x:%1, y:%2, w:%3, h:%4>").arg(region.x()).arg(region.y()).arg(region.width()).arg(region.height());
......
......@@ -49,7 +49,7 @@ bool IconsParserHandler::startElement(const QString &namespaceURI, const QString
const QString id = atts.value("id");
// qWarning() << "Start Element:"<<id;
if (!id.isEmpty() && !id.contains(QRegExp("\\d\\d$")) && id != "base" && !id.contains("layer")) {
if (!id.isEmpty() && !id.contains(QRegularExpression("\\d\\d$")) && id != "base" && !id.contains("layer")) {
m_ids << id;
}
if (id.endsWith(QLatin1String("-center")) && !id.contains("hint-")) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment