summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/kernel/qhostaddress
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <dangelog@gmail.com>2012-04-04 20:37:04 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-08 18:25:10 +0200
commitea17c21fd8b93a94027fad7d3827904ae96e2a3b (patch)
tree695df83108ba235481dd6c3df494595e9741b5b2 /tests/auto/network/kernel/qhostaddress
parent9166163f103b8ac35544270c8cf397de3416b8f0 (diff)
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 <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'tests/auto/network/kernel/qhostaddress')
-rw-r--r--tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp2
1 files changed, 2 insertions, 0 deletions
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()