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>
This commit is contained in:
Thiago Macieira 2017-10-04 14:21:55 -07:00
parent 638dcbe337
commit 28a6529c2a

View File

@ -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: