summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-10-04 14:21:55 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-10-14 02:13:49 +0000
commit28a6529c2a6b6a0e350037a712511d5bc822e70c (patch)
tree9040b30334fdb58232bdf949aaf9d56422660bfd /src
parent638dcbe3376c13e6bf173ce8c8338793471eb5b2 (diff)
QTest: make toString(QHostAddress) work
I don't know why this needs to be a template specialization instead of overload, like all the other toString overloads. With GCC 7, it was calling QTest::toString<QHostAddress>, which returns nullptr. Change-Id: I638cf58bfa7b4e5fb386fffd14ea7add0eef8f87 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/testlib/qtest_network.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testlib/qtest_network.h b/src/testlib/qtest_network.h
index 6f6b4c1b8e..57a37734fc 100644
--- a/src/testlib/qtest_network.h
+++ b/src/testlib/qtest_network.h
@@ -67,7 +67,8 @@ namespace QTest
/*!
\internal
*/
-inline char *toString(const QHostAddress &addr)
+template<>
+inline char *toString<QHostAddress>(const QHostAddress &addr)
{
switch (addr.protocol()) {
case QAbstractSocket::UnknownNetworkLayerProtocol: