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
This commit is contained in:
parent
359906c8bc
commit
f47bc992ae
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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 <QDebug>
|
||||
#include "qgpgme_debug.h"
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
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"
|
@ -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__
|
Loading…
Reference in New Issue
Block a user