From f47bc992ae6ca6a9043d4de5bfc10179e4676256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 28 Apr 2022 12:04:10 +0200 Subject: [PATCH] qt: Rename QGpgMERefreshKeysJob to QGpgMERefreshSMIMEKeysJob * lang/qt/src/qgpgmerefreshkeysjob.h, lang/qt/src/qgpgmerefreshkeysjob.cpp: Change name to * lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.cpp: ... this, and adapt the include guard. (class QGpgMERefreshKeysJob): Rename to QGpgMERefreshSMIMEKeysJob. * lang/qt/src/Makefile.am: Adapt mentioned file names accordingly. * lang/qt/src/protocol_p.h (Protocol::refreshKeysJob): Use renamed class. -- To avoid confusion with a similar job for OpenPGP keys with a completely different implementation, we rename this class to make clear that it is specific for S/MIME keys. GnuPG-bug-id: 5951 --- lang/qt/src/Makefile.am | 6 ++--- lang/qt/src/protocol_p.h | 4 ++-- ...sjob.cpp => qgpgmerefreshsmimekeysjob.cpp} | 24 +++++++++---------- ...hkeysjob.h => qgpgmerefreshsmimekeysjob.h} | 14 +++++------ 4 files changed, 24 insertions(+), 24 deletions(-) rename lang/qt/src/{qgpgmerefreshkeysjob.cpp => qgpgmerefreshsmimekeysjob.cpp} (89%) rename lang/qt/src/{qgpgmerefreshkeysjob.h => qgpgmerefreshsmimekeysjob.h} (88%) diff --git a/lang/qt/src/Makefile.am b/lang/qt/src/Makefile.am index 3b0b9c3c..e20d239d 100644 --- a/lang/qt/src/Makefile.am +++ b/lang/qt/src/Makefile.am @@ -35,7 +35,7 @@ qgpgme_sources = \ qgpgmeimportjob.cpp qgpgmekeygenerationjob.cpp qgpgmekeylistjob.cpp \ qgpgmelistallkeysjob.cpp qgpgmenewcryptoconfig.cpp \ qgpgmereceivekeysjob.cpp \ - qgpgmerefreshkeysjob.cpp \ + qgpgmerefreshsmimekeysjob.cpp \ qgpgmerevokekeyjob.cpp \ qgpgmesignencryptjob.cpp \ qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \ @@ -161,7 +161,7 @@ private_qgpgme_headers = \ qgpgmekeylistjob.h \ qgpgmelistallkeysjob.h \ qgpgmereceivekeysjob.h \ - qgpgmerefreshkeysjob.h \ + qgpgmerefreshsmimekeysjob.h \ qgpgmerevokekeyjob.h \ qgpgmesignencryptjob.h \ qgpgmesignjob.h \ @@ -215,7 +215,7 @@ qgpgme_moc_sources = \ qgpgmekeylistjob.moc \ qgpgmelistallkeysjob.moc \ qgpgmereceivekeysjob.moc \ - qgpgmerefreshkeysjob.moc \ + qgpgmerefreshsmimekeysjob.moc \ qgpgmerevokekeyjob.moc \ qgpgmesignencryptjob.moc \ qgpgmesignjob.moc \ diff --git a/lang/qt/src/protocol_p.h b/lang/qt/src/protocol_p.h index 2ca1cf18..91c522f1 100644 --- a/lang/qt/src/protocol_p.h +++ b/lang/qt/src/protocol_p.h @@ -42,7 +42,7 @@ #include "qgpgmelistallkeysjob.h" #include "qgpgmedecryptjob.h" #include "qgpgmedecryptverifyjob.h" -#include "qgpgmerefreshkeysjob.h" +#include "qgpgmerefreshsmimekeysjob.h" #include "qgpgmedeletejob.h" #include "qgpgmedownloadjob.h" #include "qgpgmesignencryptjob.h" @@ -288,7 +288,7 @@ public: } // this operation is not supported by gpgme, so we have to call gpgsm ourselves: - return new QGpgME::QGpgMERefreshKeysJob(); + return new QGpgME::QGpgMERefreshSMIMEKeysJob(); } QGpgME::DownloadJob *downloadJob(bool armor) const Q_DECL_OVERRIDE diff --git a/lang/qt/src/qgpgmerefreshkeysjob.cpp b/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp similarity index 89% rename from lang/qt/src/qgpgmerefreshkeysjob.cpp rename to lang/qt/src/qgpgmerefreshsmimekeysjob.cpp index 5f78f2ae..e300454b 100644 --- a/lang/qt/src/qgpgmerefreshkeysjob.cpp +++ b/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp @@ -1,5 +1,5 @@ /* - qgpgmerefreshkeysjob.cpp + qgpgmerefreshsmimekeysjob.cpp This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarävdalens Datakonsult AB @@ -38,7 +38,7 @@ #include "config.h" #endif -#include "qgpgmerefreshkeysjob.h" +#include "qgpgmerefreshsmimekeysjob.h" #include #include "qgpgme_debug.h" @@ -52,7 +52,7 @@ #include -QGpgME::QGpgMERefreshKeysJob::QGpgMERefreshKeysJob() +QGpgME::QGpgMERefreshSMIMEKeysJob::QGpgMERefreshSMIMEKeysJob() : RefreshKeysJob(nullptr), mProcess(nullptr), mError(0) @@ -60,12 +60,12 @@ QGpgME::QGpgMERefreshKeysJob::QGpgMERefreshKeysJob() } -QGpgME::QGpgMERefreshKeysJob::~QGpgMERefreshKeysJob() +QGpgME::QGpgMERefreshSMIMEKeysJob::~QGpgMERefreshSMIMEKeysJob() { } -GpgME::Error QGpgME::QGpgMERefreshKeysJob::start(const QStringList &patterns) +GpgME::Error QGpgME::QGpgMERefreshSMIMEKeysJob::start(const QStringList &patterns) { assert(mPatternsToDo.empty()); @@ -83,7 +83,7 @@ GpgME::Error QGpgME::QGpgMERefreshKeysJob::start(const QStringList &patterns) #error MAX_CMD_LENGTH is too low #endif -GpgME::Error QGpgME::QGpgMERefreshKeysJob::startAProcess() +GpgME::Error QGpgME::QGpgMERefreshSMIMEKeysJob::startAProcess() { if (mPatternsToDo.empty()) { return GpgME::Error(); @@ -125,7 +125,7 @@ GpgME::Error QGpgME::QGpgMERefreshKeysJob::startAProcess() connect(mProcess, SIGNAL(readyReadStandardOutput()), SLOT(slotStdout())); connect(mProcess, &QProcess::readyReadStandardError, - this, &QGpgMERefreshKeysJob::slotStderr); + this, &QGpgMERefreshSMIMEKeysJob::slotStderr); mProcess->start(); if (!mProcess->waitForStarted()) { @@ -137,7 +137,7 @@ GpgME::Error QGpgME::QGpgMERefreshKeysJob::startAProcess() } } -void QGpgME::QGpgMERefreshKeysJob::slotCancel() +void QGpgME::QGpgMERefreshSMIMEKeysJob::slotCancel() { if (mProcess) { mProcess->kill(); @@ -146,7 +146,7 @@ void QGpgME::QGpgMERefreshKeysJob::slotCancel() mError = GpgME::Error::fromCode(GPG_ERR_CANCELED, GPG_ERR_SOURCE_GPGSM); } -void QGpgME::QGpgMERefreshKeysJob::slotStatus(QProcess *proc, const QString &type, const QStringList &args) +void QGpgME::QGpgMERefreshSMIMEKeysJob::slotStatus(QProcess *proc, const QString &type, const QStringList &args) { if (proc != mProcess) { return; @@ -204,12 +204,12 @@ void QGpgME::QGpgMERefreshKeysJob::slotStatus(QProcess *proc, const QString &typ } } -void QGpgME::QGpgMERefreshKeysJob::slotStderr() +void QGpgME::QGpgMERefreshSMIMEKeysJob::slotStderr() { // implement? or not? } -void QGpgME::QGpgMERefreshKeysJob::slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus) +void QGpgME::QGpgMERefreshSMIMEKeysJob::slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus) { if (!mError && !mPatternsToDo.empty()) { if (const GpgME::Error err = startAProcess()) { @@ -227,4 +227,4 @@ void QGpgME::QGpgMERefreshKeysJob::slotProcessExited(int exitCode, QProcess::Exi Q_EMIT result(mError); deleteLater(); } -#include "qgpgmerefreshkeysjob.moc" +#include "qgpgmerefreshsmimekeysjob.moc" diff --git a/lang/qt/src/qgpgmerefreshkeysjob.h b/lang/qt/src/qgpgmerefreshsmimekeysjob.h similarity index 88% rename from lang/qt/src/qgpgmerefreshkeysjob.h rename to lang/qt/src/qgpgmerefreshsmimekeysjob.h index 4dfd942f..8ed0b379 100644 --- a/lang/qt/src/qgpgmerefreshkeysjob.h +++ b/lang/qt/src/qgpgmerefreshsmimekeysjob.h @@ -1,5 +1,5 @@ /* - qgpgmerefreshkeysjob.h + qgpgmerefreshsmimekeysjob.h This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB @@ -32,8 +32,8 @@ your version. */ -#ifndef __QGPGME_QGPGMEREFRESHKEYSJOB_H__ -#define __QGPGME_QGPGMEREFRESHKEYSJOB_H__ +#ifndef __QGPGME_QGPGMEREFRESHSMIMEKEYSJOB_H__ +#define __QGPGME_QGPGMEREFRESHSMIMEKEYSJOB_H__ #include "refreshkeysjob.h" #ifdef BUILDING_QGPGME @@ -48,12 +48,12 @@ namespace QGpgME { -class QGpgMERefreshKeysJob : public RefreshKeysJob +class QGpgMERefreshSMIMEKeysJob : public RefreshKeysJob { Q_OBJECT public: - QGpgMERefreshKeysJob(); - ~QGpgMERefreshKeysJob(); + QGpgMERefreshSMIMEKeysJob(); + ~QGpgMERefreshSMIMEKeysJob(); /* from RefreshKeysJob */ GpgME::Error start(const QStringList &patterns) Q_DECL_OVERRIDE; @@ -77,4 +77,4 @@ private: } -#endif // __QGPGME_QGPGMEREFRESHKEYSJOB_H__ +#endif // __QGPGME_QGPGMEREFRESHSMIMEKEYSJOB_H__