Fix this regex so that it works in even if an empty base id is supplied (as pointed out by mommertz)

svn path=/trunk/KDE/kdelibs/; revision=1191337
This commit is contained in:
Ingomar Wesp 2010-10-30 17:19:00 +00:00
parent 4e646b8526
commit 7ebfc941b8

View File

@ -82,7 +82,7 @@ bool SharedSvgRenderer::load(
{
{ // Search the SVG to find and store all ids that contain size hints.
const QString contentsAsString(QString::fromLatin1(contents));
QRegExp idExpr("id\\s*=\\s*(['\"])(\\d+)-(\\d+)-(.+)\\1");
QRegExp idExpr("id\\s*=\\s*(['\"])(\\d+)-(\\d+)-(.*)\\1");
idExpr.setMinimal(true);
int pos = 0;