regular expression shouldn't be static

This commit is contained in:
Aleix Pol 2019-07-04 12:20:42 +02:00
parent 6c692309ed
commit e3c6c2731e

View File

@ -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.
static const QRegularExpression sizeHintedKeyExpr(CACHE_ID_NATURAL_SIZE(QStringLiteral("$(\\d+)-(\\d+)-(.+)^"), status, ratio));
const QRegularExpression sizeHintedKeyExpr(CACHE_ID_NATURAL_SIZE(QStringLiteral("$(\\d+)-(\\d+)-(.+)^"), status, ratio));
foreach (const QString &key, cacheAndColorsTheme()->listCachedRectKeys(path)) {
const auto match = sizeHintedKeyExpr.match(key);