summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qarraydataops.h8
-rw-r--r--src/network/access/qftp.cpp2
-rw-r--r--src/network/access/qnetworkcookiejar.cpp2
-rw-r--r--src/network/kernel/qhostaddress.cpp2
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp2
5 files changed, 9 insertions, 7 deletions
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index 47df15ddaa..6bb8280ca8 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -319,7 +319,8 @@ struct QMovableArrayOps
, end(finish)
, displace(diff)
{
- ::memmove(begin + displace, begin, (end - begin) * sizeof(T));
+ ::memmove(static_cast<void *>(begin + displace), static_cast<void *>(begin),
+ (end - begin) * sizeof(T));
}
void commit() { displace = 0; }
@@ -327,7 +328,8 @@ struct QMovableArrayOps
~ReversibleDisplace()
{
if (displace)
- ::memmove(begin, begin + displace, (end - begin) * sizeof(T));
+ ::memmove(static_cast<void *>(begin), static_cast<void *>(begin + displace),
+ (end - begin) * sizeof(T));
}
T *const begin;
@@ -384,7 +386,7 @@ struct QMovableArrayOps
~Mover()
{
- ::memmove(destination, source, n * sizeof(T));
+ ::memmove(static_cast<void *>(destination), static_cast<const void *>(source), n * sizeof(T));
size -= (source - destination);
}
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/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index 2c09e63d6e..13ecfac3f5 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -1015,7 +1015,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 40abafec73..513eeaac12 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -323,7 +323,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