Change uses of {to,from}Ascii to {to,from}Latin1 [Assistant]
authorThiago Macieira <thiago.macieira@intel.com>
Thu, 3 May 2012 13:41:25 +0000 (15:41 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 3 May 2012 15:31:05 +0000 (17:31 +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: I8bcc6bbe2fcd49b31a4850029b2830b1f8cb0353
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
src/assistant/assistant/installdialog.cpp
src/assistant/clucene/qclucene_global_p.h
src/assistant/clucene/qreader.cpp

index cd1d0b6..b704c09 100644 (file)
@@ -248,7 +248,7 @@ void InstallDialog::httpRequestFinished(QNetworkReply *reply)
         if (!m_httpAborted) {
             while (reply->canReadLine()) {
                 QByteArray ba = reply->readLine();
-                const QStringList lst = QString::fromAscii(ba.constData()).split(QLatin1Char('|'));
+                const QStringList lst = QString::fromLatin1(ba.constData()).split(QLatin1Char('|'));
                 if (lst.count() != 4) {
                     QMessageBox::information(this, m_windowTitle,
                         tr("Documentation info file is corrupt!"));
index 92702da..97b8248 100644 (file)
@@ -110,7 +110,7 @@ namespace {
         #if defined(UNICODE) || defined(_CL_HAVE_WCHAR_H) && defined(_CL_HAVE_WCHAR_T)
             str.toWCharArray(string);
         #else
-            const QByteArray ba = str.toAscii();
+            const QByteArray ba = str.toLatin1();
             strcpy(string, ba.constData());
         #endif
         return string;
index a8bb173..227ade0 100644 (file)
@@ -88,7 +88,7 @@ QCLuceneFileReader::QCLuceneFileReader(const QString &path, const QString &encod
     : QCLuceneReader()
 {
     const QByteArray tmpPath = path.toLocal8Bit();
-    const QByteArray tmpEncoding = encoding.toAscii();
+    const QByteArray tmpEncoding = encoding.toLatin1();
     d->reader = new lucene::util::FileReader(tmpPath.constData(),
         tmpEncoding.constData(), int32_t(cacheLength), int32_t(cacheBuffer));
 }