aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-22 17:15:30 +0200
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-04-25 12:02:55 +0000
commit79d56651edc05133ebae13bb93733373b10380f9 (patch)
treed60393857c0f1b28f9e34c55f4461e2f25c99a9e /tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
parentbfd596f36724029441d54095a126d25168e105c1 (diff)
Prospective fix for flakey "network" related QML testsv5.4.2
Replace hard-coded server ports with dynamically allocated ports. Change-Id: Iab8f9a88343a9f2c49af3cd700c954c13c3bf121 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp')
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 5c8d86f840..f2cc619f41 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -58,9 +58,6 @@
#include "../../shared/platformquirks.h"
#include "../../shared/platforminputcontext.h"
-#define SERVER_PORT 14460
-#define SERVER_ADDR "http://localhost:14460"
-
Q_DECLARE_METATYPE(QQuickTextInput::SelectionMode)
Q_DECLARE_METATYPE(QQuickTextInput::EchoMode)
Q_DECLARE_METATYPE(Qt::Key)
@@ -2859,12 +2856,12 @@ void tst_qquicktextinput::cursorDelegate()
void tst_qquicktextinput::remoteCursorDelegate()
{
TestHTTPServer server;
- QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString()));
+ QVERIFY2(server.listen(), qPrintable(server.errorString()));
server.serveDirectory(dataDirectory(), TestHTTPServer::Delay);
QQuickView view;
- QQmlComponent component(view.engine(), QUrl(SERVER_ADDR "/RemoteCursor.qml"));
+ QQmlComponent component(view.engine(), server.url("/RemoteCursor.qml"));
view.rootContext()->setContextProperty("contextDelegate", &component);
view.setSource(testFileUrl("cursorTestRemote.qml"));