summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-02 16:32:26 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-04 12:46:05 +0200
commitdd5b373d41f99f06efd1a927a3323abada4fd6ef (patch)
treecc5f084b93a351df22a84b62dc3977df1e69caf1 /src/network
parent2883a6de408c991ecf6184d7216c7d3de6fa4f4f (diff)
Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtNetwork]
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: I94cc301ea75cc689bcb6e2d417120cf14e36808d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qftp.cpp4
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp14
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index a50415715c..d1d1c78299 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -938,7 +938,7 @@ void QFtpPI::readyRead()
while (commandSocket.canReadLine()) {
// read line with respect to line continuation
- QString line = QString::fromAscii(commandSocket.readLine());
+ QString line = QString::fromLatin1(commandSocket.readLine());
if (replyText.isEmpty()) {
if (line.length() < 3) {
// protocol error
@@ -970,7 +970,7 @@ void QFtpPI::readyRead()
replyText += line;
if (!commandSocket.canReadLine())
return;
- line = QString::fromAscii(commandSocket.readLine());
+ line = QString::fromLatin1(commandSocket.readLine());
lineLeft4 = line.left(4);
}
replyText += line.mid(4); // strip reply code 'xyz '
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 95b81c437d..21802e4e69 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -300,15 +300,15 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair)
// one always.
value = request.headerField("accept-language");
if (value.isEmpty()) {
- QString systemLocale = QLocale::system().name().replace(QChar::fromAscii('_'),QChar::fromAscii('-'));
+ QString systemLocale = QLocale::system().name().replace(QChar::fromLatin1('_'),QChar::fromLatin1('-'));
QString acceptLanguage;
if (systemLocale == QLatin1String("C"))
- acceptLanguage = QString::fromAscii("en,*");
+ acceptLanguage = QString::fromLatin1("en,*");
else if (systemLocale.startsWith(QLatin1String("en-")))
- acceptLanguage = QString::fromAscii("%1,*").arg(systemLocale);
+ acceptLanguage = QString::fromLatin1("%1,*").arg(systemLocale);
else
- acceptLanguage = QString::fromAscii("%1,en,*").arg(systemLocale);
- request.setHeaderField("Accept-Language", acceptLanguage.toAscii());
+ acceptLanguage = QString::fromLatin1("%1,en,*").arg(systemLocale);
+ request.setHeaderField("Accept-Language", acceptLanguage.toLatin1());
}
// set the User Agent
@@ -322,9 +322,9 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair)
QByteArray host;
if (add.setAddress(hostName)) {
if (add.protocol() == QAbstractSocket::IPv6Protocol)
- host = "[" + hostName.toAscii() + "]";//format the ipv6 in the standard way
+ host = "[" + hostName.toLatin1() + "]";//format the ipv6 in the standard way
else
- host = hostName.toAscii();
+ host = hostName.toLatin1();
} else {
host = QUrl::toAce(hostName);
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index d193449699..cb9bc520ef 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -1545,7 +1545,7 @@ QString QSslSocketBackendPrivate::getErrorsFromOpenSsl()
if (! errorString.isEmpty())
errorString.append(QLatin1String(", "));
const char *error = q_ERR_error_string(errNum, NULL);
- errorString.append(QString::fromAscii(error)); // error is ascii according to man ERR_error_string
+ errorString.append(QString::fromLatin1(error)); // error is ascii according to man ERR_error_string
}
return errorString;
}