summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-09-05 08:45:19 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-09-07 12:46:27 +0000
commit05cebe43075f0dd9864199533608c1c520aea0fd (patch)
tree164e1062e04e2401e00b69b99310bc53cd8f4cdd /tests
parent94a1fe0b12d63fc68e8f8e8670cfe981f67dcbe3 (diff)
downloadqtwebsockets-05cebe43075f0dd9864199533608c1c520aea0fd.tar.gz
Eradicate Q_FOREACH and Java-style loops and mark the module as Q_FOREACH-free
Change-Id: I200f72423f13b54c636e995b120a70968b0e0758 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/websockets/tst_websockets.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/manual/websockets/tst_websockets.cpp b/tests/manual/websockets/tst_websockets.cpp
index 8568532..6b327aa 100644
--- a/tests/manual/websockets/tst_websockets.cpp
+++ b/tests/manual/websockets/tst_websockets.cpp
@@ -152,12 +152,11 @@ void tst_WebSocketsTest::testLocalAddress()
void tst_WebSocketsTest::testPeerAddress()
{
QHostInfo hostInfo = QHostInfo::fromName(m_url.host());
- QList<QHostAddress> addresses = hostInfo.addresses();
+ const QList<QHostAddress> addresses = hostInfo.addresses();
QVERIFY(addresses.length() > 0);
QHostAddress peer = m_pWebSocket->peerAddress();
bool found = false;
- Q_FOREACH (const QHostAddress &a, addresses)
- {
+ for (const QHostAddress &a : addresses) {
if (a == peer)
{
found = true;