summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-06-17 10:53:42 +0200
committerLiang Qi <liang.qi@qt.io>2016-06-17 10:53:42 +0200
commit3cb56800d581dabd18e354a24f018c55bd91f748 (patch)
tree9b8e95cf62e22026463a0f87a3625b279f457aad /src/network
parentaed7540d45096791d1a824f500694a15426fd94b (diff)
parent3d8c8daae109fbd6d60e43c3d4457b581e5e62a3 (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If899cda251b4dc8b8a7c6764520e88ab719737cd
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qftp.cpp2
-rw-r--r--src/network/access/qnetworkcookiejar.cpp2
-rw-r--r--src/network/access/qspdyprotocolhandler.cpp20
-rw-r--r--src/network/kernel/qhostaddress.cpp2
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp2
5 files changed, 14 insertions, 14 deletions
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index 23ec390ae5..19b519243c 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -1218,7 +1218,7 @@ bool QFtpPI::startNextCmd()
pendingCommands.pop_front();
#if defined(QFTPPI_DEBUG)
- qDebug("QFtpPI send: %s", currentCmd.left(currentCmd.length()-2).toLatin1().constData());
+ qDebug("QFtpPI send: %s", currentCmd.leftRef(currentCmd.length() - 2).toLatin1().constData());
#endif
state = Waiting;
commandSocket.write(currentCmd.toUtf8());
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp
index 283dd3509e..429b71eb21 100644
--- a/src/network/access/qnetworkcookiejar.cpp
+++ b/src/network/access/qnetworkcookiejar.cpp
@@ -160,7 +160,7 @@ static inline bool isParentDomain(const QString &domain, const QString &referenc
if (!reference.startsWith(QLatin1Char('.')))
return domain == reference;
- return domain.endsWith(reference) || domain == reference.mid(1);
+ return domain.endsWith(reference) || domain == reference.midRef(1);
}
/*!
diff --git a/src/network/access/qspdyprotocolhandler.cpp b/src/network/access/qspdyprotocolhandler.cpp
index a87599c77a..445a2a1c29 100644
--- a/src/network/access/qspdyprotocolhandler.cpp
+++ b/src/network/access/qspdyprotocolhandler.cpp
@@ -364,43 +364,43 @@ void QSpdyProtocolHandler::_q_readyRead()
static qint16 twoBytesToInt(const char *bytes)
{
- return qFromBigEndian<qint16>(reinterpret_cast<const uchar *>(bytes));
+ return qFromBigEndian<qint16>(bytes);
}
static qint32 threeBytesToInt(const char *bytes)
{
- return qFromBigEndian<qint32>(reinterpret_cast<const uchar *>(bytes)) >> 8;
+ return qFromBigEndian<qint32>(bytes) >> 8;
}
static qint32 fourBytesToInt(const char *bytes)
{
- return qFromBigEndian<qint32>(reinterpret_cast<const uchar *>(bytes));
+ return qFromBigEndian<qint32>(bytes);
}
static void appendIntToThreeBytes(char *output, qint32 number)
{
- qToBigEndian<qint16>(number, reinterpret_cast<uchar *>(output + 1));
- qToBigEndian<qint8>(number >> 16, reinterpret_cast<uchar *>(output));
+ qToBigEndian<qint16>(number, output + 1);
+ qToBigEndian<qint8>(number >> 16, output);
}
static void appendIntToFourBytes(char *output, qint32 number)
{
- qToBigEndian<qint32>(number, reinterpret_cast<uchar *>(output));
+ qToBigEndian<qint32>(number, output);
}
static QByteArray intToFourBytes(qint32 number) // ### try to use appendIntToFourBytes where possible
{
- uchar data[4];
+ char data[4];
qToBigEndian<qint32>(number, data);
- QByteArray ret(reinterpret_cast<char *>(data), 4);
+ QByteArray ret(data, 4);
return ret;
}
static QByteArray intToThreeBytes(qint32 number)
{
- uchar data[4];
+ char data[4];
qToBigEndian<qint32>(number << 8, data);
- QByteArray ret(reinterpret_cast<char *>(data), 3);
+ QByteArray ret(data, 3);
return ret;
}
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index 681c81d6eb..95f90af49e 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -1103,7 +1103,7 @@ QPair<QHostAddress, int> QHostAddress::parseSubnet(const QString &subnet)
netmask = parser.prefixLength();
} else {
bool ok;
- netmask = subnet.mid(slash + 1).toUInt(&ok);
+ netmask = subnet.midRef(slash + 1).toUInt(&ok);
if (!ok)
return invalid; // failed to parse the subnet
}
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index 03109b4e46..2727bd9257 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -320,7 +320,7 @@ static QList<QNetworkProxy> parseServerList(const QNetworkProxyQuery &query, con
pos = entry.indexOf(QLatin1Char(':'), server);
if (pos != -1) {
bool ok;
- uint value = entry.mid(pos + 1).toUInt(&ok);
+ uint value = entry.midRef(pos + 1).toUInt(&ok);
if (!ok || value > 65535)
continue; // invalid port number