summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection.cpp
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/access/qhttpnetworkconnection.cpp
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/access/qhttpnetworkconnection.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp14
1 files changed, 7 insertions, 7 deletions
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);