[Svg] Fix porting error from QRegExp::exactMatch
The CACHE_ID_NATURAL_SIZE adds stuff around the argument string, so explicitly move the ^ and $ outside. Differential Revision: https://phabricator.kde.org/D22275
This commit is contained in:
parent
46f0da45c6
commit
214838313d
@ -310,7 +310,7 @@ QPixmap SvgPrivate::findInCache(const QString &elementId, qreal ratio, const QSi
|
||||
if (elementsWithSizeHints.isEmpty()) {
|
||||
// Fetch all size hinted element ids from the theme's rect cache
|
||||
// and store them locally.
|
||||
const QRegularExpression sizeHintedKeyExpr(CACHE_ID_NATURAL_SIZE(QStringLiteral("$(\\d+)-(\\d+)-(.+)^"), status, ratio));
|
||||
const QRegularExpression sizeHintedKeyExpr(QLatin1String("^") + CACHE_ID_NATURAL_SIZE(QStringLiteral("(\\d+)-(\\d+)-(.+)"), status, ratio) + QLatin1String("$"));
|
||||
|
||||
foreach (const QString &key, cacheAndColorsTheme()->listCachedRectKeys(path)) {
|
||||
const auto match = sizeHintedKeyExpr.match(key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user