forked from qt-creator/qt-creator
QmlProject: Use QtcProcess instead of QProcess
Change-Id: Ie80ed4bd3d831718e7f246d6b8ab9df9db8c67d1 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
#include <extensionsystem/pluginspec.h>
|
#include <extensionsystem/pluginspec.h>
|
||||||
|
|
||||||
#include <utils/infobar.h>
|
#include <utils/infobar.h>
|
||||||
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
@@ -91,13 +92,14 @@ QmlProjectPlugin::~QmlProjectPlugin()
|
|||||||
|
|
||||||
void QmlProjectPlugin::openQDS(const Utils::FilePath &fileName)
|
void QmlProjectPlugin::openQDS(const Utils::FilePath &fileName)
|
||||||
{
|
{
|
||||||
const QString &qdsPath = QmlProjectPlugin::qdsInstallationEntry().toString();
|
const Utils::FilePath &qdsPath = QmlProjectPlugin::qdsInstallationEntry();
|
||||||
bool qdsStarted = false;
|
bool qdsStarted = false;
|
||||||
//-a and -client arguments help to append project to open design studio application
|
//-a and -client arguments help to append project to open design studio application
|
||||||
if (Utils::HostOsInfo::isMacHost())
|
if (Utils::HostOsInfo::isMacHost())
|
||||||
qdsStarted = QProcess::startDetached("/usr/bin/open", {"-a", qdsPath, fileName.toString()});
|
qdsStarted = Utils::QtcProcess::startDetached(
|
||||||
|
{"/usr/bin/open", {"-a", qdsPath.path(), fileName.toString()}});
|
||||||
else
|
else
|
||||||
qdsStarted = QProcess::startDetached(qdsPath, {"-client", fileName.toString()});
|
qdsStarted = Utils::QtcProcess::startDetached({qdsPath, {"-client", fileName.toString()}});
|
||||||
|
|
||||||
if (!qdsStarted) {
|
if (!qdsStarted) {
|
||||||
QMessageBox::warning(Core::ICore::dialogParent(),
|
QMessageBox::warning(Core::ICore::dialogParent(),
|
||||||
|
|||||||
Reference in New Issue
Block a user