summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-08-13 20:45:29 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-08-16 18:12:54 +0000
commitdbcf5730ac2d4f61f872e50126d3ce73e3f6031e (patch)
tree6c7fa30da3b63956fabc5dbbf84856d40c029e60 /src/network/kernel
parent3ae90ed371f5d10c0eaefce148e0c88157c43fa4 (diff)
QHostAddress hashing: use qHashBits
Instead of constructing a temporary QByteArray, which could conceivably fail, to hash those bits. Change-Id: I7de033f80b0e4431b7f1ffff13fa376302d9720f Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qhostaddress.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index 5087576b44..6ee76a4250 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -1129,7 +1129,7 @@ uint qHash(const QHostAddress &key, uint seed)
{
// both lines might throw
QT_ENSURE_PARSED(&key);
- return qHash(QByteArray::fromRawData(reinterpret_cast<const char *>(key.d->a6.c), 16), seed);
+ return qHashBits(key.d->a6.c, 16, seed);
}
#ifndef QT_NO_DATASTREAM