diff options
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativescalegrid.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativescalegrid.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp index 804e91d..3ad0da6 100644 --- a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp +++ b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp @@ -136,12 +136,12 @@ QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(QIODevice *data) if (line.isEmpty() || line.startsWith(QLatin1Char('#'))) continue; - QStringList list = line.split(QLatin1Char(':')); - if (list.count() != 2) + int colonId = line.indexOf(QLatin1Char(':')); + if (colonId <= 0) return; - - list[0] = list[0].trimmed(); - list[1] = list[1].trimmed(); + QStringList list; + list.append(line.left(colonId).trimmed()); + list.append(line.mid(colonId+1).trimmed()); if (list[0] == QLatin1String("border.left")) l = list[1].toInt(); |