aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2022-04-29 09:55:47 +0000
committerIngo Klöcker <[email protected]>2022-04-29 09:55:47 +0000
commit54c4fd16d1832fcce05aa9e471a4acebff0e3269 (patch)
treef169ed78694ebfc3ccd39f019fab2d32752fd670
parentqt: Add test runner for refresh job (diff)
downloadgpgme-54c4fd16d1832fcce05aa9e471a4acebff0e3269.tar.gz
gpgme-54c4fd16d1832fcce05aa9e471a4acebff0e3269.zip
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
-rw-r--r--lang/qt/src/qgpgmerefreshsmimekeysjob.cpp15
-rw-r--r--lang/qt/src/qgpgmerefreshsmimekeysjob.h1
2 files changed, 6 insertions, 10 deletions
diff --git a/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp b/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp
index 81257d55..84bf0245 100644
--- a/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp
+++ b/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp
@@ -152,10 +152,12 @@ GpgME::Error QGpgMERefreshSMIMEKeysJob::startAProcess()
connect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
SLOT(slotProcessExited(int,QProcess::ExitStatus)));
- connect(mProcess, SIGNAL(readyReadStandardOutput()),
- SLOT(slotStdout()));
- connect(mProcess, &QProcess::readyReadStandardError,
- this, &QGpgMERefreshSMIMEKeysJob::slotStderr);
+ connect(mProcess, &QProcess::readyReadStandardOutput, this, [this]() {
+ qCDebug(QGPGME_LOG) << "stdout:" << mProcess->readAllStandardOutput();
+ });
+ connect(mProcess, &QProcess::readyReadStandardError, this, [this]() {
+ qCDebug(QGPGME_LOG) << "stderr:" << mProcess->readAllStandardError();
+ });
mProcess->start();
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)
{
if (!mError && !mPatternsToDo.empty()) {
diff --git a/lang/qt/src/qgpgmerefreshsmimekeysjob.h b/lang/qt/src/qgpgmerefreshsmimekeysjob.h
index aa2d5b73..b5b70e99 100644
--- a/lang/qt/src/qgpgmerefreshsmimekeysjob.h
+++ b/lang/qt/src/qgpgmerefreshsmimekeysjob.h
@@ -65,7 +65,6 @@ private Q_SLOTS:
void slotCancel() Q_DECL_OVERRIDE;
void slotStatus(QProcess *, const QString &, const QStringList &);
- void slotStderr();
void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus);
private: