path: root/src/testlib/
diff options
authorMarc Mutz <>2016-08-25 09:06:54 +0200
committerMarc Mutz <>2016-09-29 21:46:19 +0000
commitc35eff2ace00a8d4b8cc31ab5b63ec79b96cc07c (patch)
tree2326731d86ff01ad89c8915bf207a71d3132a961 /src/testlib/
parent157ee01a8d0be9a4dbac03883c9eaf3609fc1172 (diff)
Add qtest_network.h
... 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 <>
Diffstat (limited to 'src/testlib/')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/testlib/ b/src/testlib/
index 3fe1aeea96..d76dbb8c75 100644
--- a/src/testlib/
+++ b/src/testlib/
@@ -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 \