diff options
author | Robin Burchell <robin.burchell@viroteck.net> | 2015-06-26 11:56:05 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2015-08-19 22:29:26 +0000 |
commit | 04f30db289225e700fe99c163f53f0dd7e920caf (patch) | |
tree | d29da016a36af8cf5d989f140076dfca9fb7845c /src/quick/items/qquickimagebase.cpp | |
parent | 88cfe493381e9daea55f660d49ea989e351cdce4 (diff) |
QQuickImageBase: Use QUrl::path() instead of QUrl::toString().
This copies less data, which is faster. Increases creation/delegates_image from
560 ops/frame to 600 ops/frame for me.
Change-Id: I9c230bb9fa82fd631020881fb741857285589bca
Suggested-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/items/qquickimagebase.cpp')
-rw-r--r-- | src/quick/items/qquickimagebase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp index e54f5bb9c9..1ad37ef414 100644 --- a/src/quick/items/qquickimagebase.cpp +++ b/src/quick/items/qquickimagebase.cpp @@ -222,7 +222,7 @@ void QQuickImageBase::load() if (loadUrl.scheme() == QStringLiteral("image")) { setDevicePixelRatio = true; } else { - QString stringUrl = loadUrl.toString(); + QString stringUrl = loadUrl.path(QUrl::PrettyDecoded); if (stringUrl.endsWith(QLatin1String("svg")) || stringUrl.endsWith(QLatin1String("svgz"))) { setDevicePixelRatio = true; |