|
|
|
@ -7,7 +7,8 @@ class Process : public QProcess {
|
|
|
|
|
public:
|
|
|
|
|
Process(QObject *parent = 0) : QProcess(parent) {}
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE void start(const QString &program, const QVariantList &arguments) {
|
|
|
|
|
Q_INVOKABLE void start(const QString &program,
|
|
|
|
|
const QVariantList &arguments) {
|
|
|
|
|
QStringList args;
|
|
|
|
|
|
|
|
|
|
// convert QVariantList from QML to QStringList for QProcess
|
|
|
|
@ -18,10 +19,15 @@ public:
|
|
|
|
|
QProcess::start(program, args);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE QByteArray readAll() {
|
|
|
|
|
return QProcess::readAll();
|
|
|
|
|
}
|
|
|
|
|
Q_INVOKABLE QByteArray readAll() { return QProcess::readAll(); }
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE QByteArray readAllStandardError() {
|
|
|
|
|
return QProcess::readAllStandardError();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE QByteArray readAllStandardOutput() {
|
|
|
|
|
return QProcess::readAllStandardOutput();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE QByteArray readLine() { return QProcess::readLine(); }
|
|
|
|
|
};
|
|
|
|
|