diff options
Diffstat (limited to 'tests/auto')
5 files changed, 12 insertions, 6 deletions
diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp index a76740a3f9..7d31940ee4 100644 --- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp +++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp @@ -125,7 +125,7 @@ void tst_QQmlDebuggingEnabler::qmlscene() QQmlDebugClient::Enabled : QQmlDebugClient::Unavailable); } - QCOMPARE(m_process->state(), QLatin1String("running")); + QCOMPARE(m_process->state(), QProcess::Running); if (!blockMode) QTRY_VERIFY(m_process->output().contains(QLatin1String("qml: Component.onCompleted"))); } @@ -170,7 +170,7 @@ void tst_QQmlDebuggingEnabler::custom() QQmlDebugClient::Enabled : QQmlDebugClient::Unavailable); } - QCOMPARE(m_process->state(), QLatin1String("running")); + QCOMPARE(m_process->state(), QProcess::Running); if (!blockMode) QTRY_VERIFY(m_process->output().contains(QLatin1String("QQmlEngine created"))); } diff --git a/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/tst_qqmldebugprocess.cpp b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/tst_qqmldebugprocess.cpp index 993a1d5f63..35bd912d9b 100644 --- a/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/tst_qqmldebugprocess.cpp +++ b/tests/auto/qml/debugger/qqmldebugprocess/qqmldebugprocess/tst_qqmldebugprocess.cpp @@ -118,7 +118,7 @@ void tst_QQmlDebugProcess::sessionStart() QTimer::singleShot(delay, process.data(), wait); QTRY_VERIFY(done); - QVERIFY(process->state().startsWith("not running")); + QCOMPARE(process->state(), QProcess::NotRunning); } QTEST_MAIN(tst_QQmlDebugProcess) diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp index 8ecbe53822..b38e0bd731 100644 --- a/tests/auto/qml/debugger/shared/debugutil.cpp +++ b/tests/auto/qml/debugger/shared/debugutil.cpp @@ -205,7 +205,7 @@ void QQmlDebugTest::cleanup() if (QTest::currentTestFailed()) { const QString null = QStringLiteral("null"); - qDebug() << "Process State:" << (m_process ? m_process->state() : null); + qDebug() << "Process State:" << (m_process ? m_process->stateString() : null); qDebug() << "Application Output:" << (m_process ? m_process->output() : null); qDebug() << "Connection State:" << QQmlDebugTest::connectionStateString(m_connection); for (QQmlDebugClient *client : m_clients) { diff --git a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp index 201a6b1a76..0ac8567956 100644 --- a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp +++ b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp @@ -61,7 +61,7 @@ QQmlDebugProcess::~QQmlDebugProcess() stop(); } -QString QQmlDebugProcess::state() +QString QQmlDebugProcess::stateString() const { QString stateStr; switch (m_process.state()) { @@ -157,6 +157,11 @@ bool QQmlDebugProcess::waitForFinished() return m_process.waitForFinished(); } +QProcess::ProcessState QQmlDebugProcess::state() const +{ + return m_process.state(); +} + QProcess::ExitStatus QQmlDebugProcess::exitStatus() const { return m_process.exitStatus(); diff --git a/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h b/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h index fd2c89bb41..7aa63cde41 100644 --- a/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h +++ b/tests/auto/qml/debugger/shared/qqmldebugprocess_p.h @@ -52,7 +52,7 @@ public: QQmlDebugProcess(const QString &executable, QObject *parent = 0); ~QQmlDebugProcess(); - QString state(); + QString stateString() const; void addEnvironment(const QString &environment); @@ -61,6 +61,7 @@ public: int debugPort() const; bool waitForFinished(); + QProcess::ProcessState state() const; QProcess::ExitStatus exitStatus() const; QString output() const; |