From c887b0e84674378c26b85da292bdee54536056b7 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 17 Nov 2011 12:24:50 +0100 Subject: Debugger: Fix warnings about QProcess still running in autotest Change-Id: Ib0c68629cfe430a0d13b1504f86bfa78e85007b4 Reviewed-by: Aurindam Jana --- .../debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp | 8 ++++++-- tests/auto/declarative/debugger/shared/debugutil.cpp | 2 +- tests/auto/declarative/debugger/shared/debugutil_p.h | 4 +--- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp b/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp index ffeb822f99..90958f8264 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp +++ b/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp @@ -950,8 +950,10 @@ void tst_QDeclarativeDebugJS::initTestCase() void tst_QDeclarativeDebugJS::cleanupTestCase() { - if (process) + if (process) { + process->stop(); delete process; + } if (client) delete client; @@ -979,8 +981,10 @@ void tst_QDeclarativeDebugJS::init() void tst_QDeclarativeDebugJS::cleanup() { - if (process) + if (process) { + process->stop(); delete process; + } if (client) delete client; diff --git a/tests/auto/declarative/debugger/shared/debugutil.cpp b/tests/auto/declarative/debugger/shared/debugutil.cpp index 5abafd2111..7af3d0f68f 100644 --- a/tests/auto/declarative/debugger/shared/debugutil.cpp +++ b/tests/auto/declarative/debugger/shared/debugutil.cpp @@ -131,7 +131,7 @@ void QDeclarativeDebugProcess::start(const QStringList &arguments) void QDeclarativeDebugProcess::stop() { if (m_process.state() != QProcess::NotRunning) { - m_process.terminate(); + m_process.kill(); m_process.waitForFinished(5000); } } diff --git a/tests/auto/declarative/debugger/shared/debugutil_p.h b/tests/auto/declarative/debugger/shared/debugutil_p.h index 24b7e252cb..d24d2d949f 100644 --- a/tests/auto/declarative/debugger/shared/debugutil_p.h +++ b/tests/auto/declarative/debugger/shared/debugutil_p.h @@ -102,13 +102,11 @@ public: bool waitForSessionStart(); QString output() const; + void stop(); private slots: void processAppOutput(); -private: - void stop(); - private: QString m_executable; QProcess m_process; -- cgit v1.2.3