From 04f30db289225e700fe99c163f53f0dd7e920caf Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 26 Jun 2015 11:56:05 +0200 Subject: 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 Reviewed-by: Michael Brasser Reviewed-by: Gunnar Sletta --- src/quick/items/qquickimagebase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3