summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/qt/KURLQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/qt/KURLQt.cpp')
-rw-r--r--WebCore/platform/qt/KURLQt.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/WebCore/platform/qt/KURLQt.cpp b/WebCore/platform/qt/KURLQt.cpp
index 0763fe0..3bb3db2 100644
--- a/WebCore/platform/qt/KURLQt.cpp
+++ b/WebCore/platform/qt/KURLQt.cpp
@@ -86,7 +86,8 @@ KURL::operator QUrl() const
#else
// Qt 4.5 or later
// No need for special encoding
- QByteArray ba = m_string.utf8().data();
+ QString str = QString::fromRawData(reinterpret_cast<const QChar*>(m_string.characters()), m_string.length());
+ QByteArray ba = str.toUtf8();
#endif
QUrl url = QUrl::fromEncoded(ba);
@@ -95,8 +96,10 @@ KURL::operator QUrl() const
String KURL::fileSystemPath() const
{
- notImplemented();
- return String();
+ if (!isValid() || !protocolIs("file"))
+ return String();
+
+ return String(path());
}
}