Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtXml]
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 2 May 2012 14:32:26 +0000 (16:32 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 3 May 2012 09:33:05 +0000 (11:33 +0200)
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: I7e7202e6a1a84699ae0d43e4b2e7ee9ec87ed0b6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/xml/sax/qxml.cpp
tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp

index 616ceeb..b841deb 100644 (file)
@@ -1563,7 +1563,7 @@ QString QXmlInputSource::fromRawData(const QByteArray &data, bool beginning)
 {
 #ifdef QT_NO_TEXTCODEC
     Q_UNUSED(beginning);
-    return QString::fromAscii(data.constData(), data.size());
+    return QString::fromLatin1(data.constData(), data.size());
 #else
     if (data.size() == 0)
         return QString();
index d8b193f..2b92f7c 100644 (file)
@@ -138,10 +138,10 @@ public slots:
     {
         QUrl url("http://127.0.0.1:1088");
         QNetworkRequest req(url);
-        req.setRawHeader("POST", url.path().toAscii());
+        req.setRawHeader("POST", url.path().toLatin1());
         req.setRawHeader("user-agent", "xml-test");
         req.setRawHeader("keep-alive", "false");
-        req.setRawHeader("host", url.host().toAscii());
+        req.setRawHeader("host", url.host().toLatin1());
 
         QByteArray xmlrpc("<methodCall>\r\n\
                 <methodName>SFD.GetVersion</methodName>\r\n\