From ea17c21fd8b93a94027fad7d3827904ae96e2a3b Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 4 Apr 2012 20:37:04 +0100 Subject: QHostAddress: improve qHash implementation Avoid the conversion to a temporary QString -- just hash the address as a byte array. Change-Id: Ic35cdbbc3ee66c32a28d911bd27de0092395979f Done-with: Shane Kearns Reviewed-by: Thiago Macieira Reviewed-by: Shane Kearns --- tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp') diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp index a0403e5550..d1027c81e0 100644 --- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp +++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp @@ -323,6 +323,8 @@ void tst_QHostAddress::compare() QFETCH(bool, result); QCOMPARE(first == second, result); + if (result == true) + QVERIFY(qHash(first) == qHash(second)); } void tst_QHostAddress::assignment() -- cgit v1.2.3