summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJonas M. Gastal <jgastal@profusion.mobi>2011-12-29 12:24:17 -0200
committerQt by Nokia <qt-info@nokia.com>2011-12-29 16:20:45 +0100
commit231369eb043e9c5221da1a4f2a724643a3f380f3 (patch)
tree0aeb845bbeea919dba5485c2351f3d7341525d0e /src/gui
parent4c1469f7da33dd65eb5e8e9a50b79d935eb4add0 (diff)
Make qDecodeDataUrl return bool.
Change-Id: I23b9fed39af7bea6c171b35e10bd72c424bd903e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qtextdocument.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 8d9a8c405a..1028a2329a 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1925,8 +1925,12 @@ QVariant QTextDocument::loadResource(int type, const QUrl &name)
#endif
// handle data: URLs
- if (r.isNull() && name.scheme().compare(QLatin1String("data"), Qt::CaseInsensitive) == 0)
- r = qDecodeDataUrl(name).second;
+ if (r.isNull() && name.scheme().compare(QLatin1String("data"), Qt::CaseInsensitive) == 0) {
+ QString mimetype;
+ QByteArray payload;
+ if (qDecodeDataUrl(name, mimetype, payload))
+ r = payload;
+ }
// if resource was not loaded try to load it here
if (!doc && r.isNull() && name.isRelative()) {