From f750a3679006222059291a4e65935ecea36c2da0 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 May 2012 15:41:25 +0200 Subject: [PATCH] Change uses of {to,from}Ascii to {to,from}Latin1 [Assistant] 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 --- src/assistant/assistant/installdialog.cpp | 2 +- src/assistant/clucene/qclucene_global_p.h | 2 +- src/assistant/clucene/qreader.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assistant/assistant/installdialog.cpp b/src/assistant/assistant/installdialog.cpp index cd1d0b6..b704c09 100644 --- a/src/assistant/assistant/installdialog.cpp +++ b/src/assistant/assistant/installdialog.cpp @@ -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!")); diff --git a/src/assistant/clucene/qclucene_global_p.h b/src/assistant/clucene/qclucene_global_p.h index 92702da..97b8248 100644 --- a/src/assistant/clucene/qclucene_global_p.h +++ b/src/assistant/clucene/qclucene_global_p.h @@ -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; diff --git a/src/assistant/clucene/qreader.cpp b/src/assistant/clucene/qreader.cpp index a8bb173..227ade0 100644 --- a/src/assistant/clucene/qreader.cpp +++ b/src/assistant/clucene/qreader.cpp @@ -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)); } -- 2.7.4