summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativefontloader.cpp
diff options
context:
space:
mode:
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) {