Debugger: Fix warnings about QProcess still running in autotest
authorKai Koehne <kai.koehne@nokia.com>
Thu, 17 Nov 2011 11:24:50 +0000 (12:24 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 17 Nov 2011 17:08:50 +0000 (18:08 +0100)
Change-Id: Ib0c68629cfe430a0d13b1504f86bfa78e85007b4
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp
tests/auto/declarative/debugger/shared/debugutil.cpp
tests/auto/declarative/debugger/shared/debugutil_p.h

index ffeb822..90958f8 100644 (file)
@@ -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;
index 5abafd2..7af3d0f 100644 (file)
@@ -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);
     }
 }
index 24b7e25..d24d2d9 100644 (file)
@@ -102,14 +102,12 @@ public:
     bool waitForSessionStart();
 
     QString output() const;
+    void stop();
 
 private slots:
     void processAppOutput();
 
 private:
-    void stop();
-
-private:
     QString m_executable;
     QProcess m_process;
     QString m_outputBuffer;