diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-06-01 05:51:02 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-06-01 05:52:14 (GMT) |
commit | 3eafb8d13a51d72af053e19fa4bc66b83f81a923 (patch) | |
tree | 7d72a0c3c1d74c2df4bd14f398137bbc8f3a39fa /src/declarative/graphicsitems/qdeclarativescalegrid.cpp | |
parent | 08d09e02109f18d2a22fa48f331cd7bcfacc154f (diff) | |
download | Qt-3eafb8d13a51d72af053e19fa4bc66b83f81a923.zip Qt-3eafb8d13a51d72af053e19fa4bc66b83f81a923.tar.gz Qt-3eafb8d13a51d72af053e19fa4bc66b83f81a923.tar.bz2 |
Optimization for sci file loading.
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativescalegrid.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativescalegrid.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp index fe89190..a053aa0 100644 --- a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp +++ b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp @@ -130,8 +130,9 @@ QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(QIODevice *data) int b = -1; QString imgFile; - while(!data->atEnd()) { - QString line = QString::fromUtf8(data->readLine().trimmed()); + QByteArray raw; + while(raw = data->readLine(), !raw.isEmpty()) { + QString line = QString::fromUtf8(raw.trimmed()); if (line.isEmpty() || line.startsWith(QLatin1Char('#'))) continue; |