summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativepixmapcache.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-05-24 01:11:57 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-05-24 02:37:36 (GMT)
commitb933f40a39a000ee79e80564b529a3b72365cfae (patch)
tree1f10d6fade41c633844dfaba705c9eda46e67c56 /src/declarative/util/qdeclarativepixmapcache.cpp
parent80f946828264c8e9e9213e0b8760f772090c979f (diff)
downloadQt-b933f40a39a000ee79e80564b529a3b72365cfae.zip
Qt-b933f40a39a000ee79e80564b529a3b72365cfae.tar.gz
Qt-b933f40a39a000ee79e80564b529a3b72365cfae.tar.bz2
Move copies of toLocalFileOrQrc() to QDeclarativeEnginePrivate
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)) {