TechDraw: Use QStringLiteral

This commit is contained in:
Benjamin Bræstrup Sayoc
2025-02-09 17:51:41 +01:00
parent 97b9b6de89
commit 9a8bdbaf9f
41 changed files with 250 additions and 250 deletions

View File

@@ -199,11 +199,11 @@ double QGIViewSymbol::symbolScaler(TechDraw::DrawViewSymbol* feature) const
QByteArray qba(feature->Symbol.getValue(), strlen(feature->Symbol.getValue()));
QString qSymbolString = QString::fromUtf8(qba);
const QString pxToken{QString::fromUtf8("px")};
const QString mmToken{QString::fromUtf8("mm")};
const QString pxToken{QStringLiteral("px")};
const QString mmToken{QStringLiteral("mm")};
// heightRegex finds (height="51.8309mm") in the svg text and returns the mm if present
QString heightRegex = QString::fromUtf8(R"(height=\"\d*\.?\d+([a-zA-Z]+)\")");
QString heightRegex = QStringLiteral(R"(height=\"\d*\.?\d+([a-zA-Z]+)\")");
QRegularExpression reHeight(heightRegex);
QRegularExpressionMatch matchHeight = reHeight.match(qSymbolString);