forked from qt-creator/qt-creator
Debugger: Work around deprecated QProcess::start(command)
Change-Id: I30d9656fb9a73399fb79b7a6e956ee0e6f0ab6a1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -28,11 +28,11 @@
|
|||||||
#include "watchdata.h"
|
#include "watchdata.h"
|
||||||
#include "watchutils.h"
|
#include "watchutils.h"
|
||||||
|
|
||||||
|
#include <utils/fileutils.h>
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
#ifdef Q_CC_MSVC
|
#ifdef Q_CC_MSVC
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
#include <utils/fileutils.h>
|
|
||||||
#include <utils/synchronousprocess.h>
|
#include <utils/synchronousprocess.h>
|
||||||
#endif // Q_CC_MSVC
|
#endif // Q_CC_MSVC
|
||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
@@ -220,6 +220,12 @@ struct BoostVersion : VersionBase
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ConfigTest
|
||||||
|
{
|
||||||
|
QString executable;
|
||||||
|
QStringList arguments;
|
||||||
|
};
|
||||||
|
|
||||||
static QString noValue = "\001";
|
static QString noValue = "\001";
|
||||||
|
|
||||||
enum DebuggerEngine
|
enum DebuggerEngine
|
||||||
@@ -962,7 +968,7 @@ public:
|
|||||||
mutable BoostVersion neededBoostVersion; // DEC. 105400 for 1.54.0
|
mutable BoostVersion neededBoostVersion; // DEC. 105400 for 1.54.0
|
||||||
mutable DwarfVersion neededDwarfVersion; // 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 allProfile; // Overrides anything below if not empty.
|
||||||
mutable QString allCode; // 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));
|
+ QByteArray::number(data.neededMsvcVersion.max));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data.configTest.isEmpty()) {
|
if (!data.configTest.executable.isEmpty()) {
|
||||||
QProcess configTest;
|
QProcess configTest;
|
||||||
configTest.start(data.configTest);
|
configTest.start(data.configTest.executable, data.configTest.arguments);
|
||||||
QVERIFY(configTest.waitForFinished());
|
QVERIFY(configTest.waitForFinished());
|
||||||
output = configTest.readAllStandardOutput();
|
output = configTest.readAllStandardOutput();
|
||||||
error = configTest.readAllStandardError();
|
error = configTest.readAllStandardError();
|
||||||
if (configTest.exitCode()) {
|
if (configTest.exitCode()) {
|
||||||
MSKIP_SINGLE("Configure test failed: '"
|
QString msg = "Configure test failed: '"
|
||||||
+ data.configTest.toUtf8() + "' " + output + ' ' + error);
|
+ 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
|
#ifdef Q_OS_LINUX
|
||||||
Data f90data;
|
Data f90data;
|
||||||
f90data.configTest = "which f95";
|
f90data.configTest = {"which", {"f95"}};
|
||||||
f90data.allProfile =
|
f90data.allProfile =
|
||||||
"CONFIG -= qt\n"
|
"CONFIG -= qt\n"
|
||||||
"SOURCES += main.f90\n"
|
"SOURCES += main.f90\n"
|
||||||
@@ -7684,7 +7693,7 @@ void tst_Dumpers::dumper_data()
|
|||||||
// touch qt_tst_dumpers_Nim_.../dummy.nimproject
|
// touch qt_tst_dumpers_Nim_.../dummy.nimproject
|
||||||
// qtcreator qt_tst_dumpers_Nim_*/dummy.nimproject
|
// qtcreator qt_tst_dumpers_Nim_*/dummy.nimproject
|
||||||
Data nimData;
|
Data nimData;
|
||||||
nimData.configTest = "which nim";
|
nimData.configTest = {"which", {"nim"}};
|
||||||
nimData.allProfile =
|
nimData.allProfile =
|
||||||
"CONFIG -= qt\n"
|
"CONFIG -= qt\n"
|
||||||
"SOURCES += main.nim\n"
|
"SOURCES += main.nim\n"
|
||||||
|
Reference in New Issue
Block a user