Change remaining uses of {to,from}Ascii to {to,from}Latin1 [other]
authorThiago Macieira <thiago.macieira@intel.com>
Thu, 3 May 2012 13:13:46 +0000 (15:13 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 3 May 2012 15:30:35 +0000 (17:30 +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: Ib84e307f486cb3049f0b61a667caa40799394f86
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/xmlpatterns/functions/qpatternmatchingfns.cpp
src/xmlpatterns/parser/qxquerytokenizer.cpp
src/xmlpatterns/parser/qxquerytokenizer_p.h
tests/auto/network-settings.h
tools/xmlpatterns/qapplicationargumentparser.cpp

index 27c7dd4..4e5848d 100644 (file)
@@ -111,7 +111,7 @@ QString ReplaceFN::parseReplacement(const int,
     for(int i = 0; i < len; ++i)
     {
         const QChar ch(input.at(i));
-        switch(ch.toAscii())
+        switch(ch.toLatin1())
         {
             case '$':
             {
index 9988c7d..0c8960d 100644 (file)
@@ -83,7 +83,7 @@ const QChar XQueryTokenizer::current() const
 
 char XQueryTokenizer::peekCurrent() const
 {
-    return current().toAscii();
+    return current().toLatin1();
 }
 
 int XQueryTokenizer::peekForColonColon() const
@@ -94,7 +94,7 @@ int XQueryTokenizer::peekForColonColon() const
 
     while(pos < m_length)
     {
-        switch(m_data.at(pos).toAscii())
+        switch(m_data.at(pos).toLatin1())
         {
             /* Fallthrough these four. */
             case ' ':
@@ -317,7 +317,7 @@ Tokenizer::TokenType XQueryTokenizer::consumeWhitespace()
 char XQueryTokenizer::peekAhead(const int length) const
 {
     if(m_pos + length < m_length)
-        return m_data.at(m_pos + length).toAscii();
+        return m_data.at(m_pos + length).toLatin1();
     else
         return 0;
 }
@@ -702,7 +702,7 @@ bool XQueryTokenizer::aheadEquals(const char *const chs,
 
     for(int i = offset; i < (len + offset); ++i)
     {
-        if(m_data.at(m_pos + i).toAscii() != chs[i - offset])
+        if(m_data.at(m_pos + i).toLatin1() != chs[i - offset])
             return false;
     }
 
@@ -711,7 +711,7 @@ bool XQueryTokenizer::aheadEquals(const char *const chs,
 
 const TokenMap *XQueryTokenizer::lookupKeyword(const QString &keyword)
 {
-    return TokenLookup::value(keyword.toAscii().constData(), keyword.length());
+    return TokenLookup::value(keyword.toLatin1().constData(), keyword.length());
 }
 
 XQueryTokenizer::State XQueryTokenizer::state() const
index b0ac364..3949047 100644 (file)
@@ -173,7 +173,7 @@ namespace QPatternist
          * Equivalent to calling:
          *
          * @code
-         * current().toAscii();
+         * current().toLatin1();
          * @endcode
          */
         inline char peekCurrent() const;
index f2c12bc..179eea9 100644 (file)
@@ -82,12 +82,12 @@ public:
 
         // Mandriva; old test server
         expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " )
-            .append(QtNetworkSettings::serverName().toAscii())
+            .append(QtNetworkSettings::serverName().toLatin1())
             .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
 
         // Ubuntu 10.04; new test server
         expected << QByteArray( "* OK " )
-            .append(QtNetworkSettings::serverLocalName().toAscii())
+            .append(QtNetworkSettings::serverLocalName().toLatin1())
             .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n");
 
         // Feel free to add more as needed
@@ -107,12 +107,12 @@ public:
 
         // Mandriva; old test server
         expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " )
-            .append(QtNetworkSettings::serverName().toAscii())
+            .append(QtNetworkSettings::serverName().toLatin1())
             .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
 
         // Ubuntu 10.04; new test server
         expected << QByteArray( "* OK " )
-            .append(QtNetworkSettings::serverLocalName().toAscii())
+            .append(QtNetworkSettings::serverLocalName().toLatin1())
             .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n");
 
         // Feel free to add more as needed
index 008d905..62a15cc 100644 (file)
@@ -299,7 +299,7 @@ void QApplicationArgumentParserPrivate::displayVersion() const
 {
     QTextStream out(stderr);
 
-    out << tr("%1 version %2 using Qt %3").arg(QCoreApplication::applicationName(), applicationVersion, QString::fromAscii(qVersion()))
+    out << tr("%1 version %2 using Qt %3").arg(QCoreApplication::applicationName(), applicationVersion, QString::fromLatin1(qVersion()))
         << endl;
 }