QProcess: Include program in destructor warning.
authorFriedemann Kleint <Friedemann.Kleint@digia.com>
Tue, 23 Oct 2012 08:11:54 +0000 (10:11 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 23 Oct 2012 10:28:23 +0000 (12:28 +0200)
Change-Id: Ib6870d2b161197fdeab7fe5140ac4757c79f478e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
src/corelib/io/qprocess.cpp

index b115310..395effa 100644 (file)
@@ -41,8 +41,9 @@
 
 //#define QPROCESS_DEBUG
 
-#if defined QPROCESS_DEBUG
 #include <qdebug.h>
+#include <qdir.h>
+#if defined QPROCESS_DEBUG
 #include <qstring.h>
 #include <ctype.h>
 #if !defined(Q_OS_WINCE)
@@ -1147,7 +1148,8 @@ QProcess::~QProcess()
 {
     Q_D(QProcess);
     if (d->processState != NotRunning) {
-        qWarning("QProcess: Destroyed while process is still running.");
+        qWarning().nospace()
+            << "QProcess: Destroyed while process (" << QDir::toNativeSeparators(program()) << ") is still running.";
         kill();
         waitForFinished();
     }