summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Krems <m.krems@software-vision.eu>2012-12-10 20:21:51 +0100
committerThiago Macieira <thiago.macieira@intel.com>2012-12-11 21:37:35 +0100
commit2bd01bcd0656af7730afcdbc6b83156aa953b9b0 (patch)
treeb18df0f6d2e3f8bb10ba93aa09a7bc7088cc976c
parent487e1db93d9b597c398d4c50f23b1632a6156628 (diff)
Replace deprecated QString::fromAscii with QString::fromLatin1.
Change-Id: I44dbebb97c207592cab2fb737b64c6b48cfd23a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/qhttp/qhttp.cpp8
-rw-r--r--src/qhttp/qhttp.pro1
2 files changed, 4 insertions, 5 deletions
diff --git a/src/qhttp/qhttp.cpp b/src/qhttp/qhttp.cpp
index 8cb97e6..a9475dc 100644
--- a/src/qhttp/qhttp.cpp
+++ b/src/qhttp/qhttp.cpp
@@ -2432,7 +2432,7 @@ void QHttpPrivate::_q_slotSendRequest()
proxyUrl.setHost(hostName);
if (port && port != 80)
proxyUrl.setPort(port);
- QString request = QString::fromAscii(proxyUrl.resolved(QUrl::fromEncoded(header.path().toLatin1())).toEncoded());
+ QString request = QString::fromLatin1(proxyUrl.resolved(QUrl::fromEncoded(header.path().toLatin1())).toEncoded());
header.setRequest(header.method(), request, header.majorVersion(), header.minorVersion());
header.setValue(QLatin1String("Proxy-Connection"), QLatin1String("keep-alive"));
@@ -2706,7 +2706,7 @@ void QHttpPrivate::_q_slotReadyRead()
bool end = false;
QString tmp;
while (!end && socket->canReadLine()) {
- tmp = QString::fromAscii(socket->readLine());
+ tmp = QString::fromLatin1(socket->readLine());
if (tmp == QLatin1String("\r\n") || tmp == QLatin1String("\n") || tmp.isEmpty())
end = true;
else
@@ -2857,7 +2857,7 @@ void QHttpPrivate::_q_slotReadyRead()
if (chunkedSize == 0) {
if (!socket->canReadLine())
break;
- QString sizeString = QString::fromAscii(socket->readLine());
+ QString sizeString = QString::fromLatin1(socket->readLine());
int tPos = sizeString.indexOf(QLatin1Char(';'));
if (tPos != -1)
sizeString.truncate(tPos);
@@ -2876,7 +2876,7 @@ void QHttpPrivate::_q_slotReadyRead()
// read trailer
while (chunkedSize == -2 && socket->canReadLine()) {
- QString read = QString::fromAscii(socket->readLine());
+ QString read = QString::fromLatin1(socket->readLine());
if (read == QLatin1String("\r\n") || read == QLatin1String("\n"))
chunkedSize = -1;
}
diff --git a/src/qhttp/qhttp.pro b/src/qhttp/qhttp.pro
index d0d7955..6e2c6b9 100644
--- a/src/qhttp/qhttp.pro
+++ b/src/qhttp/qhttp.pro
@@ -13,4 +13,3 @@ load(qt_module)
# Input
HEADERS += qhttp.h qringbuffer_p.h qhttpauthenticator_p.h
SOURCES += qhttp.cpp qhttpauthenticator.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0