add verbose parameter
This commit is contained in:
parent
dd0d7790e0
commit
7cdefc9b49
@ -7,11 +7,12 @@
|
||||
#include <QDateTime>
|
||||
|
||||
Command::Command(QString command, QStringList args, QString workingDirectory,
|
||||
int start_timeout, int finish_timeout)
|
||||
bool verbose, int start_timeout, int finish_timeout)
|
||||
: m_command(command.trimmed())
|
||||
, m_commandResult("")
|
||||
, m_waitForStartTimeout(start_timeout)
|
||||
, m_waitForFinishTimeout(finish_timeout)
|
||||
, m_verbose(verbose)
|
||||
, m_exitCode(-1)
|
||||
, m_workingDirectory(workingDirectory)
|
||||
, m_args(args) {
|
||||
@ -28,7 +29,10 @@ Command::Command(QString command, QStringList args, QString workingDirectory,
|
||||
void Command::readyReadStandardOutput() {
|
||||
QProcess *p = (QProcess *)sender();
|
||||
if (p) {
|
||||
qCritical().noquote() << p->readAllStandardOutput();
|
||||
QString s = p->readAllStandardOutput();
|
||||
if (m_verbose) {
|
||||
qCritical().noquote() << s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user