forked from qt-creator/qt-creator
Use QtcProcess in run_meson()
Change-Id: Ib86940984d00de429a6ab138ee767155409f968f Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -32,10 +32,10 @@
|
|||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <utils/id.h>
|
#include <utils/id.h>
|
||||||
#include <utils/optional.h>
|
#include <utils/optional.h>
|
||||||
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QProcess>
|
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
|
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
@@ -57,9 +57,10 @@ bool containsFiles(const QString &path, const File_t &file, const T &...files)
|
|||||||
|
|
||||||
inline bool run_meson(const Command &command, QIODevice *output = nullptr)
|
inline bool run_meson(const Command &command, QIODevice *output = nullptr)
|
||||||
{
|
{
|
||||||
QProcess process;
|
Utils::QtcProcess process;
|
||||||
process.setWorkingDirectory(command.workDir().toString());
|
process.setWorkingDirectory(command.workDir());
|
||||||
process.start(command.executable().toString(), command.arguments());
|
process.setCommand(command.cmdLine());
|
||||||
|
process.start();
|
||||||
if (!process.waitForFinished())
|
if (!process.waitForFinished())
|
||||||
return false;
|
return false;
|
||||||
if (output) {
|
if (output) {
|
||||||
|
Reference in New Issue
Block a user