Quick/QQuickFontLoader: Output warning on failure.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Tue, 22 May 2012 06:28:04 +0000 (08:28 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 22 May 2012 11:56:57 +0000 (13:56 +0200)
Helps in case the 'file::' prefix is missing from local file URLs
on Windows. 'C:\foo' is then interpreted as URL with protocol
'c', causing an error.

Change-Id: I252ab453a7ce241f3bd290ef59d3106110146662
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>

src/quick/util/qquickfontloader.cpp

index c121484..dfdad9e 100644 (file)
@@ -120,6 +120,8 @@ void QQuickFontObject::replyFinished()
             else
                 emit fontDownloaded(QString(), QQuickFontLoader::Error);
         } else {
+            qWarning("%s: Unable to load font '%s': %s", Q_FUNC_INFO,
+                     qPrintable(reply->url().toString()), qPrintable(reply->errorString()));
             emit fontDownloaded(QString(), QQuickFontLoader::Error);
         }
         reply->deleteLater();