summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-04-10 16:35:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-16 05:55:19 +0200
commit251a3c50ca89c32678fb51de48124d144155f704 (patch)
treebfca09ca415964e007011e3c5daf4315389d1f63
parent7b1f8c369100f57861ad8054d17a04da8b604203 (diff)
downloadqtwebkit-release.tar.gz
Fix cast from QByteArray to QStringv5.3.0-rc1v5.3.0release5.3.0
QUrl::toEncoded() returns a QByteArray which we should not try to append directly to a QString. Instead convert it first from ascii/latin1. Change-Id: I54fd1ef939cf25c81ad4f4ceab91fc4053b627ba Reviewed-by: Michael Bruning <michael.bruning@digia.com>
-rw-r--r--Source/WebCore/platform/qt/PasteboardQt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/platform/qt/PasteboardQt.cpp b/Source/WebCore/platform/qt/PasteboardQt.cpp
index cf1c3a619..7639e2302 100644
--- a/Source/WebCore/platform/qt/PasteboardQt.cpp
+++ b/Source/WebCore/platform/qt/PasteboardQt.cpp
@@ -171,7 +171,7 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
if (!title.isEmpty())
title = QStringLiteral(" title=\"") + title + QStringLiteral("\"");
if (urls.count() == 1) {
- QString html = QStringLiteral("<img src=\"") + urls.first().toEncoded() + QStringLiteral("\"") + title + QStringLiteral(">");
+ QString html = QStringLiteral("<img src=\"") + urls.first().toString(QUrl::FullyEncoded) + QStringLiteral("\"") + title + QStringLiteral(">");
RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->document(), html, "", DisallowScriptingAndPluginContent);
if (fragment)
return fragment.release();