qt: Fix connection to readyReadStandardOutput signal
* lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.cpp (QGpgMERefreshSMIMEKeysJob::slotStderr): Remove. * lang/qt/src/qgpgmerefreshsmimekeysjob.cpp (QGpgMERefreshSMIMEKeysJob::startAProcess): Handle readyReadStandardOutput and readyReadStandardError signals with lambdas. -- For now output stdout and stderr of gpgsm process as debug log. In particular, this "adds" the missing slot slotStdout. GnuPG-bug-id: 5951
This commit is contained in:
parent
9686258bd1
commit
54c4fd16d1
@ -152,10 +152,12 @@ GpgME::Error QGpgMERefreshSMIMEKeysJob::startAProcess()
|
|||||||
|
|
||||||
connect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
|
connect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||||
SLOT(slotProcessExited(int,QProcess::ExitStatus)));
|
SLOT(slotProcessExited(int,QProcess::ExitStatus)));
|
||||||
connect(mProcess, SIGNAL(readyReadStandardOutput()),
|
connect(mProcess, &QProcess::readyReadStandardOutput, this, [this]() {
|
||||||
SLOT(slotStdout()));
|
qCDebug(QGPGME_LOG) << "stdout:" << mProcess->readAllStandardOutput();
|
||||||
connect(mProcess, &QProcess::readyReadStandardError,
|
});
|
||||||
this, &QGpgMERefreshSMIMEKeysJob::slotStderr);
|
connect(mProcess, &QProcess::readyReadStandardError, this, [this]() {
|
||||||
|
qCDebug(QGPGME_LOG) << "stderr:" << mProcess->readAllStandardError();
|
||||||
|
});
|
||||||
|
|
||||||
mProcess->start();
|
mProcess->start();
|
||||||
if (!mProcess->waitForStarted()) {
|
if (!mProcess->waitForStarted()) {
|
||||||
@ -234,11 +236,6 @@ void QGpgMERefreshSMIMEKeysJob::slotStatus(QProcess *proc, const QString &type,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QGpgMERefreshSMIMEKeysJob::slotStderr()
|
|
||||||
{
|
|
||||||
// implement? or not?
|
|
||||||
}
|
|
||||||
|
|
||||||
void QGpgMERefreshSMIMEKeysJob::slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus)
|
void QGpgMERefreshSMIMEKeysJob::slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus)
|
||||||
{
|
{
|
||||||
if (!mError && !mPatternsToDo.empty()) {
|
if (!mError && !mPatternsToDo.empty()) {
|
||||||
|
@ -65,7 +65,6 @@ private Q_SLOTS:
|
|||||||
void slotCancel() Q_DECL_OVERRIDE;
|
void slotCancel() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
void slotStatus(QProcess *, const QString &, const QStringList &);
|
void slotStatus(QProcess *, const QString &, const QStringList &);
|
||||||
void slotStderr();
|
|
||||||
void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus);
|
void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user