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/hostosinfo.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QCheckBox>
|
||||
#include <QFormLayout>
|
||||
#include <QLabel>
|
||||
#include <QProcess>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
@@ -53,8 +53,9 @@ static QString getQbsVersion(const FilePath &qbsExe)
|
||||
{
|
||||
if (qbsExe.isEmpty() || !qbsExe.exists())
|
||||
return {};
|
||||
QProcess qbsProc;
|
||||
qbsProc.start(qbsExe.toString(), {"--version"});
|
||||
QtcProcess qbsProc;
|
||||
qbsProc.setCommand({qbsExe, {"--version"}});
|
||||
qbsProc.start();
|
||||
if (!qbsProc.waitForStarted(3000) || !qbsProc.waitForFinished(5000)
|
||||
|| qbsProc.exitCode() != 0) {
|
||||
return {};
|
||||
|
Reference in New Issue
Block a user