diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-08-10 13:08:15 -0700 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> | 2015-08-19 06:13:33 +0000 |
commit | dd92002416270c56c795cce81fb9f0e55c1b2ddd (patch) | |
tree | 220bf20215468061670059ab61b2a7f3d30d4966 /tests/auto | |
parent | b479d5befbf6f6ed1bffef0dbccecf504263e1d6 (diff) |
QHostAddress: Improve code generation
Mostly related to IPv6, because Q_IPV6ADDR is an array of char, so the
compilers were generating byte access to each value. Instead, force
access as 32- and 64-bit in most places that make sense (64-bit access
decays to 32-bit on 32-bit machines). In one isLoopback(), this is now a
128-bit access for best improvement.
Some smaller improvements relating to SpecialAddress by combining the
three IPv4 special addresses.
Change-Id: I7de033f80b0e4431b7f1ffff13f932b1cd7b5d21
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp | 2 |
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 b644372dab..8069865d93 100644 --- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp +++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp @@ -642,10 +642,12 @@ void tst_QHostAddress::isLoopback_data() QTest::newRow("AnyIPv6") << QHostAddress(QHostAddress::AnyIPv6) << false; QTest::newRow("Broadcast") << QHostAddress(QHostAddress::Broadcast) << false; QTest::newRow("Null") << QHostAddress(QHostAddress::Null) << false; + QTest::newRow("ipv6-all-ffff") << QHostAddress("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff") << false; QTest::newRow("::ffff:127.0.0.1") << QHostAddress("::ffff:127.0.0.1") << true; QTest::newRow("::ffff:127.0.0.2") << QHostAddress("::ffff:127.0.0.2") << true; QTest::newRow("::ffff:127.3.2.1") << QHostAddress("::ffff:127.3.2.1") << true; + } void tst_QHostAddress::isLoopback() |