forked from qt-creator/qt-creator
Use QtcProcess in QbsSettings
Change-Id: I2d58e039ab84d1a3fe1a04b708209c893384cca0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -33,12 +33,12 @@
|
|||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QProcess>
|
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
@@ -53,8 +53,9 @@ static QString getQbsVersion(const FilePath &qbsExe)
|
|||||||
{
|
{
|
||||||
if (qbsExe.isEmpty() || !qbsExe.exists())
|
if (qbsExe.isEmpty() || !qbsExe.exists())
|
||||||
return {};
|
return {};
|
||||||
QProcess qbsProc;
|
QtcProcess qbsProc;
|
||||||
qbsProc.start(qbsExe.toString(), {"--version"});
|
qbsProc.setCommand({qbsExe, {"--version"}});
|
||||||
|
qbsProc.start();
|
||||||
if (!qbsProc.waitForStarted(3000) || !qbsProc.waitForFinished(5000)
|
if (!qbsProc.waitForStarted(3000) || !qbsProc.waitForFinished(5000)
|
||||||
|| qbsProc.exitCode() != 0) {
|
|| qbsProc.exitCode() != 0) {
|
||||||
return {};
|
return {};
|
||||||
|
Reference in New Issue
Block a user