summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativepixmapcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qdeclarativepixmapcache.cpp')
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index d9ce42c..a4ddf46 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -66,14 +66,6 @@ static const int maxImageRequestCount = 8;
QT_BEGIN_NAMESPACE
-static QString toLocalFileOrQrc(const QUrl& url)
-{
- QString r = url.toLocalFile();
- if (r.isEmpty() && url.scheme() == QLatin1String("qrc"))
- r = QLatin1Char(':') + url.path();
- return r;
-}
-
class QDeclarativeImageReaderEvent : public QEvent
{
public:
@@ -269,7 +261,7 @@ bool QDeclarativeImageRequestHandler::event(QEvent *event)
}
QCoreApplication::postEvent(runningJob, new QDeclarativeImageReaderEvent(errorCode, errorStr, image));
} else {
- QString lf = toLocalFileOrQrc(url);
+ QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url);
if (!lf.isEmpty()) {
// Image is local - load/decode immediately
QImage image;
@@ -613,7 +605,7 @@ QDeclarativePixmapReply::Status QDeclarativePixmapCache::get(const QUrl& url, QP
#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
if (!async) {
- QString lf = toLocalFileOrQrc(url);
+ QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url);
if (!lf.isEmpty()) {
status = QDeclarativePixmapReply::Ready;
if (!QPixmapCache::find(strKey,pixmap)) {