D21788: Make Plasma::Svg::elementRect a bit leaner
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Fri Jun 14 00:15:39 BST 2019
bruns added a comment.
Please put the dead code removal in a separate review.
INLINE COMMENTS
> svg.cpp:111
> const QString contentsAsString(QString::fromLatin1(contents));
> - QRegExp idExpr(QLatin1String("id\\s*=\\s*(['\"])(\\d+-\\d+-.*)\\1"));
> + static QRegExp idExpr(QLatin1String("id\\s*=\\s*(['\"])(\\d+-\\d+-.*)\\1"));
> idExpr.setMinimal(true);
Please use a QRegularExpression with lazy quantifiers, you can use `const static` then, no need for `QRegExp.setMinimal(true)`.
Just replace `*`/`+` with `*?`/`+?`.
REPOSITORY
R242 Plasma Framework (Library)
REVISION DETAIL
https://phabricator.kde.org/D21788
To: apol, #plasma, #frameworks
Cc: bruns, kde-frameworks-devel, LeGast00n, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190613/146863c5/attachment.html>
More information about the Kde-frameworks-devel
mailing list