path: root/src/testlib
diff options
authorThiago Macieira <>2017-10-04 14:21:55 -0700
committerThiago Macieira <>2017-10-14 02:13:49 +0000
commit28a6529c2a6b6a0e350037a712511d5bc822e70c (patch)
tree9040b30334fdb58232bdf949aaf9d56422660bfd /src/testlib
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 <>
Diffstat (limited to 'src/testlib')
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
-inline char *toString(const QHostAddress &addr)
+inline char *toString<QHostAddress>(const QHostAddress &addr)
switch (addr.protocol()) {
case QAbstractSocket::UnknownNetworkLayerProtocol: