[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

zecke at webkit.org zecke at webkit.org
Thu Feb 4 21:30:59 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 81dc4dde6254097673a6a4b349869c55a4a245fa
Author: zecke at webkit.org <zecke at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 28 11:54:12 2010 +0000

    [Qt] Speed up KURL to QUrl conversion
    
    https://bugs.webkit.org/show_bug.cgi?id=33873
    
    The WebCore::String::utf8 method will use the generic WebCore::TextCodec
    and then call the encode method on it. In QtWebKit this class is implemented
    around the QTextCodec class. Instead of going the generic codec way we treat
    the WebCore::String as a QString (no copying) and then use the built-in
    QString::toUtf8 to do the conversion.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 686f16f..b82c0b7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-18  Holger Hans Peter Freyther  <zecke at selfish.org>
+
+        Reviewed by Eric Seidel.
+
+        [Qt] Speed up KURL to QUrl conversion
+        https://bugs.webkit.org/show_bug.cgi?id=33873
+
+        The WebCore::String::utf8 method will use the generic WebCore::TextCodec
+        and then call the encode method on it. In QtWebKit this class is implemented
+        around the QTextCodec class. Instead of going the generic codec way we treat
+        the WebCore::String as a QString (no copying) and then use the built-in
+        QString::toUtf8 to do the conversion.
+
+        * platform/qt/KURLQt.cpp:
+        (WebCore::KURL::operator QUrl):
+
 2010-01-28  Ben Murdoch  <benm at google.com>
 
         Reviewed by Simon Hausmann.
diff --git a/WebCore/platform/qt/KURLQt.cpp b/WebCore/platform/qt/KURLQt.cpp
index 1f62006..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);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list