diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-05-24 01:11:57 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-05-24 02:37:36 (GMT) |
commit | b933f40a39a000ee79e80564b529a3b72365cfae (patch) | |
tree | 1f10d6fade41c633844dfaba705c9eda46e67c56 /src/declarative/qml/qdeclarativeworkerscript.cpp | |
parent | 80f946828264c8e9e9213e0b8760f772090c979f (diff) | |
download | Qt-b933f40a39a000ee79e80564b529a3b72365cfae.zip Qt-b933f40a39a000ee79e80564b529a3b72365cfae.tar.gz Qt-b933f40a39a000ee79e80564b529a3b72365cfae.tar.bz2 |
Move copies of toLocalFileOrQrc() to QDeclarativeEnginePrivate
Diffstat (limited to 'src/declarative/qml/qdeclarativeworkerscript.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeworkerscript.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index dc5bc6e..1550351 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -275,20 +275,12 @@ void QDeclarativeWorkerScriptEnginePrivate::processMessage(int id, const QVarian } } -static QString toLocalFileOrQrc(const QUrl& url) -{ - QString r = url.toLocalFile(); - if (r.isEmpty() && url.scheme() == QLatin1String("qrc")) - r = QLatin1Char(':') + url.path(); - return r; -} - void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) { if (url.isRelative()) return; - QString fileName = toLocalFileOrQrc(url); + QString fileName = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url); QFile f(fileName); if (f.open(QIODevice::ReadOnly)) { |