From c35eff2ace00a8d4b8cc31ab5b63ec79b96cc07c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 25 Aug 2016 09:06:54 +0200 Subject: Add qtest_network.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... and move toString() implementations there which were repeated in network tests, or #ifdef'ed in qtest.h. Since the functions moved from network tests are now in a public header, had to massage them a bit to pass headersclean: - replace Q_FOREACH with C++11 range-for - avoid implicit conversion from QByteArray -> const char* (done by re-using toString(QByteArray) instead of calling strdup() manually) Also made the functions overloads instead of specializations. This allows to pass the enum by value instead of by const-&. Like the existing QHostAddress, the newly-added toString() overloads are marked as \internal. We can decide later whether to turn them into public API. Change-Id: I8c23db7a0a6575273567017d42d7b2a957acece8 Reviewed-by: Jędrzej Nowacki Reviewed-by: Timur Pocheptsov --- src/testlib/testlib.pro | 1 + 1 file changed, 1 insertion(+) (limited to 'src/testlib/testlib.pro') diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro index 3fe1aeea96..d76dbb8c75 100644 --- a/src/testlib/testlib.pro +++ b/src/testlib/testlib.pro @@ -28,6 +28,7 @@ HEADERS = qbenchmark.h \ qtesteventloop.h \ qtest_global.h \ qtest_gui.h \ + qtest_network.h \ qtest_widgets.h \ qtest.h \ qtestkeyboard.h \ -- cgit v1.2.3