From aa578c4e296a3bf5117fd878fcac70d1c11bd255 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 20 Mar 2014 23:21:49 +0100 Subject: TestHTTPServer: Make listening an explicit operation that reports failure. Use this to print the error message when listening fails, and switch to always stack allocating TestHTTPServer instances for easier cleanup. Change-Id: I63b2bd38963b66611dc08a5c322615d91a91e675 Reviewed-by: John Brooks Reviewed-by: J-P Nurmi Reviewed-by: Lorn Potter --- tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp') diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp index dbf28a5471..d5a5f10634 100644 --- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp +++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -267,8 +267,8 @@ void tst_qqmlcomponent::qmlCreateParentReference() void tst_qqmlcomponent::async() { - TestHTTPServer server(SERVER_PORT); - QVERIFY(server.isValid()); + TestHTTPServer server; + QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); server.serveDirectory(dataDirectory()); QQmlComponent component(&engine); @@ -287,8 +287,8 @@ void tst_qqmlcomponent::async() void tst_qqmlcomponent::asyncHierarchy() { - TestHTTPServer server(SERVER_PORT); - QVERIFY(server.isValid()); + TestHTTPServer server; + QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); server.serveDirectory(dataDirectory()); // ensure that the item hierarchy is compiled correctly. -- cgit v1.2.3