#include <QtCore/QString>
#include <QtTest/QtTest>
-const char *NORMALMODE = "-qmljsdebugger=port:3777,block";
+const char *NORMALMODE = "-qmljsdebugger=port:3777,3787,block";
const char *QMLFILE = "test.qml";
class QQmlDebugMsgClient;
QVERIFY2(m_process->waitForSessionStart(),
"Could not launch application, or did not get 'Waiting for connection'.");
- m_connection->connectToHost("127.0.0.1", 3777);
+ const int port = m_process->debugPort();
+ m_connection->connectToHost("127.0.0.1", port);
QVERIFY(m_connection->waitForConnected());
if (m_client->state() != QQmlDebugClient::Enabled)
QQmlDebugConnection *connection1 = new QQmlDebugConnection();
QQmlDebugProcess *process1 = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
- process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3772, 3774 ") << testFile("test.qml"));
+ process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") << testFile("test.qml"));
if (!process1->waitForSessionStart())
QFAIL("could not launch application, or did not get 'Waiting for connection'.");
QQmlDebugConnection *connection2 = new QQmlDebugConnection();
QQmlDebugProcess *process2 = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
- process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3772,3774") << testFile("test.qml"));
+ process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792") << testFile("test.qml"));
if (!process2->waitForSessionStart())
QFAIL("could not launch application, or did not get 'Waiting for connection'.");
#include "qqmlinspectorclient.h"
#include "qqmlenginedebugclient.h"
-#define PORT 3776
-#define STR_PORT "3776"
+#define STR_PORT_FROM "3776"
+#define STR_PORT_TO "3786"
class tst_QQmlEngineDebugInspectorIntegration : public QQmlDataTest
{
void tst_QQmlEngineDebugInspectorIntegration::init()
{
- const QString argument = "-qmljsdebugger=port:" STR_PORT ",block";
+ const QString argument = "-qmljsdebugger=port:" STR_PORT_FROM "," STR_PORT_TO ",block";
m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
+ "/qmlscene", this);
m_inspectorClient = new QQmlInspectorClient(m_connection);
m_engineDebugClient = new QQmlEngineDebugClient(m_connection);
- m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT);
+ const int port = m_process->debugPort();
+ m_connection->connectToHost(QLatin1String("127.0.0.1"), port);
bool ok = m_connection->waitForConnected();
QVERIFY(ok);
}
#include "../../../shared/util.h"
#include "qqmlinspectorclient.h"
-#define PORT 3772
-#define STR_PORT "3772"
+#define STR_PORT_FROM "3772"
+#define STR_PORT_TO "3782"
void tst_QQmlInspector::startQmlsceneProcess(const char * /* qmlFile */)
{
- const QString argument = "-qmljsdebugger=port:" STR_PORT ",block";
+ const QString argument = "-qmljsdebugger=port:" STR_PORT_FROM "," STR_PORT_TO ",block";
m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
m_process->start(QStringList() << argument << testFile("qtquick2.qml"));
QQmlDebugConnection *m_connection = new QQmlDebugConnection();
m_client = new QQmlInspectorClient(m_connection);
- m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT);
+ const int port = m_process->debugPort();
+ m_connection->connectToHost(QLatin1String("127.0.0.1"), port);
}
void tst_QQmlInspector::init()
#include "qqmldebugclient.h"
#include "../../../shared/util.h"
-#define PORT 13773
-#define STR_PORT "13773"
+#define STR_PORT_FROM "13773"
+#define STR_PORT_TO "13783"
struct QQmlProfilerData
{
QStringList arguments;
if (block)
- arguments << QString("-qmljsdebugger=port:" STR_PORT ",block");
+ arguments << QString("-qmljsdebugger=port:" STR_PORT_FROM "," STR_PORT_TO ",block");
else
- arguments << QString("-qmljsdebugger=port:" STR_PORT);
+ arguments << QString("-qmljsdebugger=port:" STR_PORT_FROM "," STR_PORT_TO );
arguments << QQmlDataTest::instance()->testFile(testFile);
QQmlDebugConnection *m_connection = new QQmlDebugConnection();
m_client = new QQmlProfilerClient(m_connection);
- m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT);
+ const int port = m_process->debugPort();
+ m_connection->connectToHost(QLatin1String("127.0.0.1"), port);
}
void tst_QQmlProfilerService::cleanup()