Fix emission of QProcess:errorOccurred
Consistently use setErrorAndEmit to emit errorOccurred and the deprecated error signal. Change-Id: I8bc7634a72d4d13f74bbf76547de08271dfcbb59 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
parent
00061b968d
commit
2f0ffba638
@ -2090,10 +2090,7 @@ void QProcess::start(const QString &program, const QStringList &arguments, OpenM
|
||||
return;
|
||||
}
|
||||
if (program.isEmpty()) {
|
||||
Q_D(QProcess);
|
||||
d->processError = QProcess::FailedToStart;
|
||||
setErrorString(tr("No program defined"));
|
||||
emit error(d->processError);
|
||||
d->setErrorAndEmit(QProcess::FailedToStart, tr("No program defined"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2120,10 +2117,7 @@ void QProcess::start(OpenMode mode)
|
||||
return;
|
||||
}
|
||||
if (d->program.isEmpty()) {
|
||||
Q_D(QProcess);
|
||||
d->processError = QProcess::FailedToStart;
|
||||
setErrorString(tr("No program defined"));
|
||||
emit error(d->processError);
|
||||
d->setErrorAndEmit(QProcess::FailedToStart, tr("No program defined"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user