Use QtcProcess in webassembly

Change-Id: I19da9f4d9b2892256bf19655858ef585aa4825a8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Jarek Kobus
2021-11-03 17:54:53 +01:00
parent cd6d2b0cd8
commit fa1515185a

View File

@@ -30,6 +30,7 @@
#include <projectexplorer/target.h>
#include <utils/layoutbuilder.h>
#include <utils/qtcprocess.h>
#include <QComboBox>
@@ -48,11 +49,10 @@ static QStringList detectedBrowsers(ProjectExplorer::Target *target)
const Utils::Environment environment = bc->environment();
const Utils::FilePath emrunPath = environment.searchInPath("emrun");
QProcess browserLister;
browserLister.setProcessEnvironment(environment.toProcessEnvironment());
browserLister.setProgram(emrunPath.toString());
browserLister.setArguments({"--list_browsers"});
browserLister.start(QIODevice::ReadOnly);
QtcProcess browserLister;
browserLister.setEnvironment(environment);
browserLister.setCommand({emrunPath, {"--list_browsers"}});
browserLister.start();
if (browserLister.waitForFinished()) {
const QByteArray output = browserLister.readAllStandardOutput();