diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-07-31 03:01:50 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-31 11:02:38 +0200 |
commit | 524478f60e6eac991b9ef033a2030a9ea5aa5c36 (patch) | |
tree | 503d8fea0513f420ae93b5799ef7ca5686deba76 /src | |
parent | 056809af50752adddb75b1b86b0d810dcc97b73e (diff) | |
parent | 1262e6dc979d0624307897980be27b8310fe34a0 (diff) | |
download | qtsvg-524478f60e6eac991b9ef033a2030a9ea5aa5c36.tar.gz |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
.qmake.conf
Change-Id: Ic41094e6744df3d84d76bcfe701092e137660f80
Diffstat (limited to 'src')
-rw-r--r-- | src/svg/qsvghandler.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 1d83af2..10cb779 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -774,16 +774,17 @@ static QVector<qreal> parsePercentageList(const QChar *&str) static QString idFromUrl(const QString &url) { QString::const_iterator itr = url.constBegin(); - while ((*itr).isSpace()) + QString::const_iterator end = url.constEnd(); + while (itr != end && (*itr).isSpace()) ++itr; - if ((*itr) == QLatin1Char('(')) + if (itr != end && (*itr) == QLatin1Char('(')) ++itr; - while ((*itr).isSpace()) + while (itr != end && (*itr).isSpace()) ++itr; - if ((*itr) == QLatin1Char('#')) + if (itr != end && (*itr) == QLatin1Char('#')) ++itr; QString id; - while ((*itr) != QLatin1Char(')')) { + while (itr != end && (*itr) != QLatin1Char(')')) { id += *itr; ++itr; } |