Process: Switch the default implementation into QProcess

Task-number: QTCREATORBUG-28811
Change-Id: I5647b760998a80f59583b478a65de6d615e1ca55
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-10-05 16:45:07 +02:00
parent e5b7f474b3
commit a53dfaf623
2 changed files with 2 additions and 3 deletions

View File

@@ -631,7 +631,8 @@ private:
static ProcessImpl defaultProcessImpl() static ProcessImpl defaultProcessImpl()
{ {
if (qtcEnvironmentVariableIsSet("QTC_USE_QPROCESS")) const QString value = qtcEnvironmentVariable("QTC_USE_QPROCESS", "TRUE").toUpper();
if (value != "FALSE" && value != "0")
return ProcessImpl::QProcess; return ProcessImpl::QProcess;
return ProcessImpl::ProcessLauncher; return ProcessImpl::ProcessLauncher;
} }

View File

@@ -1322,8 +1322,6 @@ void tst_Process::crashAfterOneSecond()
QVERIFY(process.waitForStarted(1000)); QVERIFY(process.waitForStarted(1000));
QElapsedTimer timer; QElapsedTimer timer;
timer.start(); timer.start();
// Please note that QProcess documentation says it should return false, but apparently
// it doesn't (try running this test with QTC_USE_QPROCESS=)
QVERIFY(process.waitForFinished(30000)); QVERIFY(process.waitForFinished(30000));
QVERIFY(timer.elapsed() < 30000); QVERIFY(timer.elapsed() < 30000);
QCOMPARE(process.state(), QProcess::NotRunning); QCOMPARE(process.state(), QProcess::NotRunning);