forked from qt-creator/qt-creator
Manual test: Adapt to upstream change
Change-Id: I4bb8b323535eaeb456d3cfcedaef0e67970cfe4e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
#include <utils/filepath.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@@ -49,7 +50,7 @@ static int testSynchronous(const QString &cmd, const QStringList &args)
|
|||||||
std::fprintf(stdout, "testSynchronous %s %s\n", qPrintable(cmd),
|
std::fprintf(stdout, "testSynchronous %s %s\n", qPrintable(cmd),
|
||||||
qPrintable(args.join(QLatin1Char(' '))));
|
qPrintable(args.join(QLatin1Char(' '))));
|
||||||
Utils::QtcProcess p;
|
Utils::QtcProcess p;
|
||||||
p.setCommand({cmd, args});
|
p.setCommand({Utils::FilePath::fromString(cmd), args});
|
||||||
p.start();
|
p.start();
|
||||||
if (!p.waitForStarted())
|
if (!p.waitForStarted())
|
||||||
return -2;
|
return -2;
|
||||||
|
@@ -57,7 +57,7 @@ void MainWindow::test()
|
|||||||
qDebug() << "Async: " << cmd << args;
|
qDebug() << "Async: " << cmd << args;
|
||||||
process.setStdOutCallback([this](const QString &s) { append(s); });
|
process.setStdOutCallback([this](const QString &s) { append(s); });
|
||||||
process.setStdErrCallback([this](const QString &s) { append(s); });
|
process.setStdErrCallback([this](const QString &s) { append(s); });
|
||||||
process.setCommand({cmd, args});
|
process.setCommand({Utils::FilePath::fromString(cmd), args});
|
||||||
process.runBlocking();
|
process.runBlocking();
|
||||||
qDebug() << process;
|
qDebug() << process;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user