aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickimagebase.cpp
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2015-06-22 14:25:31 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-23 20:31:27 +0000
commit3d9df8b16a46cde647ce2f01a65c298cfa53435f (patch)
tree9c545bce5a438bfb55b7f15295181c7849feedb9 /src/quick/items/qquickimagebase.cpp
parent1b4f94c8fe0452cc053907fea2ad8be3930df8ce (diff)
QQuickImageBase: Use the static form of QFile::exists().
This avoids the penalty of creating a QFile along with a private, engine, etc when we're going to do nothing with it. This raises the delegates_image creation benchmark from ~450 to ~500 per frame for me.) Change-Id: I7665a55a3ee23102325f5d5f330967743b0c8538 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/items/qquickimagebase.cpp')
-rw-r--r--src/quick/items/qquickimagebase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp
index a1930e6623..cb2bf574b5 100644
--- a/src/quick/items/qquickimagebase.cpp
+++ b/src/quick/items/qquickimagebase.cpp
@@ -380,7 +380,7 @@ void QQuickImageBase::resolve2xLocalFile(const QUrl &url, qreal targetDevicePixe
// Look for an @2x version
QString localFile2x = image2xPath(localFile);
- if (!QFile(localFile2x).exists())
+ if (!QFile::exists(localFile2x))
return;
// @2x file found found: Change url and devicePixelRatio