diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-09 18:32:48 +0300 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-08-12 16:01:10 +0000 |
commit | e5592e75b5d17f409a0623f663474f963d66486b (patch) | |
tree | 60cc03127ed7e258f01291f059f99a844bc61201 /src/quick/items/qquickimagebase.cpp | |
parent | 87c23b33b7293a43a851a6e43a0ddc6ef44c17e4 (diff) |
Quick: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing.
Change-Id: I270cdc6eb8c5946f5c20b379bbb7c60f0ba518eb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
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 60e31631c0..a2b99b6395 100644 --- a/src/quick/items/qquickimagebase.cpp +++ b/src/quick/items/qquickimagebase.cpp @@ -355,7 +355,7 @@ void QQuickImageBase::resolve2xLocalFile(const QUrl &url, qreal targetDevicePixe if (disable2xImageLoading) return; - QString localFile = QQmlFile::urlToLocalFileOrQrc(url); + const QString localFile = QQmlFile::urlToLocalFileOrQrc(url); // Non-local file path: @2x loading is not supported. if (localFile.isEmpty()) |