diff options
author | hjk <hjk@qt.io> | 2020-04-21 17:37:31 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-04-22 07:52:43 +0000 |
commit | 0603eb925f79c98b6a2c3543a5ae4b2d8abfa838 (patch) | |
tree | 5ca146f48d622c856a8a920ce5616c97298cff00 /tests | |
parent | c7ce2fb2b2d0977a263ff0a1e3c93c4ad7601381 (diff) | |
download | qt-creator-0603eb925f79c98b6a2c3543a5ae4b2d8abfa838.tar.gz |
Debugger: Work around deprecated QProcess::start(command)
Change-Id: I30d9656fb9a73399fb79b7a6e956ee0e6f0ab6a1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index d00b056c49..9c7d53415d 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -28,11 +28,11 @@ #include "watchdata.h" #include "watchutils.h" +#include <utils/fileutils.h> #ifdef Q_OS_WIN #include <utils/environment.h> #ifdef Q_CC_MSVC #include <utils/qtcprocess.h> -#include <utils/fileutils.h> #include <utils/synchronousprocess.h> #endif // Q_CC_MSVC #endif // Q_OS_WIN @@ -220,6 +220,12 @@ struct BoostVersion : VersionBase {} }; +struct ConfigTest +{ + QString executable; + QStringList arguments; +}; + static QString noValue = "\001"; enum DebuggerEngine @@ -962,7 +968,7 @@ public: mutable BoostVersion neededBoostVersion; // DEC. 105400 for 1.54.0 mutable DwarfVersion neededDwarfVersion; // DEC. 105400 for 1.54.0 - mutable QString configTest; + mutable ConfigTest configTest; mutable QString allProfile; // Overrides anything below if not empty. mutable QString allCode; // Overrides anything below if not empty. @@ -1288,15 +1294,18 @@ void tst_Dumpers::dumper() + QByteArray::number(data.neededMsvcVersion.max)); } - if (!data.configTest.isEmpty()) { + if (!data.configTest.executable.isEmpty()) { QProcess configTest; - configTest.start(data.configTest); + configTest.start(data.configTest.executable, data.configTest.arguments); QVERIFY(configTest.waitForFinished()); output = configTest.readAllStandardOutput(); error = configTest.readAllStandardError(); if (configTest.exitCode()) { - MSKIP_SINGLE("Configure test failed: '" - + data.configTest.toUtf8() + "' " + output + ' ' + error); + QString msg = "Configure test failed: '" + + data.configTest.executable + ' ' + + data.configTest.arguments.join(' ') + + "' " + output + ' ' + error; + MSKIP_SINGLE(msg.toUtf8()); } } @@ -7646,7 +7655,7 @@ void tst_Dumpers::dumper_data() #ifdef Q_OS_LINUX Data f90data; - f90data.configTest = "which f95"; + f90data.configTest = {"which", {"f95"}}; f90data.allProfile = "CONFIG -= qt\n" "SOURCES += main.f90\n" @@ -7684,7 +7693,7 @@ void tst_Dumpers::dumper_data() // touch qt_tst_dumpers_Nim_.../dummy.nimproject // qtcreator qt_tst_dumpers_Nim_*/dummy.nimproject Data nimData; - nimData.configTest = "which nim"; + nimData.configTest = {"which", {"nim"}}; nimData.allProfile = "CONFIG -= qt\n" "SOURCES += main.nim\n" |