Check if QProcess::waitForFinished was called after a process was finished.

According to documentation QProcess::waitForFinished returns true if the process
finished; otherwise returns false (if the operation timed out, if an error
occurred, or if this QProcess is already finished). This last case is seems like
importnant in this case.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-07-30 17:42:53 +03:00
parent 1dbd914679
commit fa2e0b13d0

View File

@ -97,7 +97,7 @@ bool AbstractTest::Run(bool showWarn, int exit, int &exitCode, const QString &pr
process->setWorkingDirectory(info.absoluteDir().absolutePath());
process->start(program, arguments);
if (not process->waitForFinished(msecs))
if (not process->waitForFinished(msecs) && process->state() != QProcess::NotRunning)
{
const QString msg = QString("The operation timed out or an error occurred.\n%1").arg(parameters);
QWARN(qUtf8Printable(msg));