diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-05-24 15:45:02 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-05-24 15:45:02 (GMT) |
commit | 3003f1d885e732e7cc19f73f9733aa8102b70717 (patch) | |
tree | 283f16e0e918023f53fa9c35463cc57b025656a4 /src/declarative/util/qdeclarativefontloader.cpp | |
parent | af84e21c40d3441546b22f631fc2d34a48580740 (diff) | |
parent | 1079096a57112d9615812771adba18d2e9297320 (diff) | |
download | Qt-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.cpp | 12 |
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) { |