summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativefontloader.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-05-24 15:45:02 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-05-24 15:45:02 (GMT)
commit3003f1d885e732e7cc19f73f9733aa8102b70717 (patch)
tree283f16e0e918023f53fa9c35463cc57b025656a4 /src/declarative/util/qdeclarativefontloader.cpp
parentaf84e21c40d3441546b22f631fc2d34a48580740 (diff)
parent1079096a57112d9615812771adba18d2e9297320 (diff)
downloadQt-3003f1d885e732e7cc19f73f9733aa8102b70717.zip
Qt-3003f1d885e732e7cc19f73f9733aa8102b70717.tar.gz
Qt-3003f1d885e732e7cc19f73f9733aa8102b70717.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/util/qdeclarativefontloader.cpp')
-rw-r--r--src/declarative/util/qdeclarativefontloader.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp
index adfcd62..c73f827 100644
--- a/src/declarative/util/qdeclarativefontloader.cpp
+++ b/src/declarative/util/qdeclarativefontloader.cpp
@@ -53,6 +53,7 @@
#include <QFontDatabase>
#include <private/qobject_p.h>
+#include <private/qdeclarativeengine_p.h>
#include <qdeclarativeinfo.h>
QT_BEGIN_NAMESPACE
@@ -98,15 +99,6 @@ QDeclarativeFontLoader::~QDeclarativeFontLoader()
{
}
-static QString toLocalFileOrQrc(const QUrl& url)
-{
- QString r = url.toLocalFile();
- if (r.isEmpty() && url.scheme() == QLatin1String("qrc"))
- r = QLatin1Char(':') + url.path();
- return r;
-}
-
-
/*!
\qmlproperty url FontLoader::source
The url of the font to load.
@@ -127,7 +119,7 @@ void QDeclarativeFontLoader::setSource(const QUrl &url)
d->status = Loading;
emit statusChanged();
#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
- QString lf = toLocalFileOrQrc(d->url);
+ QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url);
if (!lf.isEmpty()) {
int id = QFontDatabase::addApplicationFont(lf);
if (id != -1) {