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 \
|
qgpgmeimportjob.cpp qgpgmekeygenerationjob.cpp qgpgmekeylistjob.cpp \
|
||||||
qgpgmelistallkeysjob.cpp qgpgmenewcryptoconfig.cpp \
|
qgpgmelistallkeysjob.cpp qgpgmenewcryptoconfig.cpp \
|
||||||
qgpgmereceivekeysjob.cpp \
|
qgpgmereceivekeysjob.cpp \
|
||||||
qgpgmerefreshkeysjob.cpp \
|
qgpgmerefreshsmimekeysjob.cpp \
|
||||||
qgpgmerevokekeyjob.cpp \
|
qgpgmerevokekeyjob.cpp \
|
||||||
qgpgmesignencryptjob.cpp \
|
qgpgmesignencryptjob.cpp \
|
||||||
qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \
|
qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \
|
||||||
@ -161,7 +161,7 @@ private_qgpgme_headers = \
|
|||||||
qgpgmekeylistjob.h \
|
qgpgmekeylistjob.h \
|
||||||
qgpgmelistallkeysjob.h \
|
qgpgmelistallkeysjob.h \
|
||||||
qgpgmereceivekeysjob.h \
|
qgpgmereceivekeysjob.h \
|
||||||
qgpgmerefreshkeysjob.h \
|
qgpgmerefreshsmimekeysjob.h \
|
||||||
qgpgmerevokekeyjob.h \
|
qgpgmerevokekeyjob.h \
|
||||||
qgpgmesignencryptjob.h \
|
qgpgmesignencryptjob.h \
|
||||||
qgpgmesignjob.h \
|
qgpgmesignjob.h \
|
||||||
@ -215,7 +215,7 @@ qgpgme_moc_sources = \
|
|||||||
qgpgmekeylistjob.moc \
|
qgpgmekeylistjob.moc \
|
||||||
qgpgmelistallkeysjob.moc \
|
qgpgmelistallkeysjob.moc \
|
||||||
qgpgmereceivekeysjob.moc \
|
qgpgmereceivekeysjob.moc \
|
||||||
qgpgmerefreshkeysjob.moc \
|
qgpgmerefreshsmimekeysjob.moc \
|
||||||
qgpgmerevokekeyjob.moc \
|
qgpgmerevokekeyjob.moc \
|
||||||
qgpgmesignencryptjob.moc \
|
qgpgmesignencryptjob.moc \
|
||||||
qgpgmesignjob.moc \
|
qgpgmesignjob.moc \
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include "qgpgmelistallkeysjob.h"
|
#include "qgpgmelistallkeysjob.h"
|
||||||
#include "qgpgmedecryptjob.h"
|
#include "qgpgmedecryptjob.h"
|
||||||
#include "qgpgmedecryptverifyjob.h"
|
#include "qgpgmedecryptverifyjob.h"
|
||||||
#include "qgpgmerefreshkeysjob.h"
|
#include "qgpgmerefreshsmimekeysjob.h"
|
||||||
#include "qgpgmedeletejob.h"
|
#include "qgpgmedeletejob.h"
|
||||||
#include "qgpgmedownloadjob.h"
|
#include "qgpgmedownloadjob.h"
|
||||||
#include "qgpgmesignencryptjob.h"
|
#include "qgpgmesignencryptjob.h"
|
||||||
@ -288,7 +288,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this operation is not supported by gpgme, so we have to call gpgsm ourselves:
|
// 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
|
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
|
This file is part of qgpgme, the Qt API binding for gpgme
|
||||||
Copyright (c) 2004 Klarävdalens Datakonsult AB
|
Copyright (c) 2004 Klarävdalens Datakonsult AB
|
||||||
@ -38,7 +38,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "qgpgmerefreshkeysjob.h"
|
#include "qgpgmerefreshsmimekeysjob.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "qgpgme_debug.h"
|
#include "qgpgme_debug.h"
|
||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
QGpgME::QGpgMERefreshKeysJob::QGpgMERefreshKeysJob()
|
QGpgME::QGpgMERefreshSMIMEKeysJob::QGpgMERefreshSMIMEKeysJob()
|
||||||
: RefreshKeysJob(nullptr),
|
: RefreshKeysJob(nullptr),
|
||||||
mProcess(nullptr),
|
mProcess(nullptr),
|
||||||
mError(0)
|
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());
|
assert(mPatternsToDo.empty());
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ GpgME::Error QGpgME::QGpgMERefreshKeysJob::start(const QStringList &patterns)
|
|||||||
#error MAX_CMD_LENGTH is too low
|
#error MAX_CMD_LENGTH is too low
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GpgME::Error QGpgME::QGpgMERefreshKeysJob::startAProcess()
|
GpgME::Error QGpgME::QGpgMERefreshSMIMEKeysJob::startAProcess()
|
||||||
{
|
{
|
||||||
if (mPatternsToDo.empty()) {
|
if (mPatternsToDo.empty()) {
|
||||||
return GpgME::Error();
|
return GpgME::Error();
|
||||||
@ -125,7 +125,7 @@ GpgME::Error QGpgME::QGpgMERefreshKeysJob::startAProcess()
|
|||||||
connect(mProcess, SIGNAL(readyReadStandardOutput()),
|
connect(mProcess, SIGNAL(readyReadStandardOutput()),
|
||||||
SLOT(slotStdout()));
|
SLOT(slotStdout()));
|
||||||
connect(mProcess, &QProcess::readyReadStandardError,
|
connect(mProcess, &QProcess::readyReadStandardError,
|
||||||
this, &QGpgMERefreshKeysJob::slotStderr);
|
this, &QGpgMERefreshSMIMEKeysJob::slotStderr);
|
||||||
|
|
||||||
mProcess->start();
|
mProcess->start();
|
||||||
if (!mProcess->waitForStarted()) {
|
if (!mProcess->waitForStarted()) {
|
||||||
@ -137,7 +137,7 @@ GpgME::Error QGpgME::QGpgMERefreshKeysJob::startAProcess()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QGpgME::QGpgMERefreshKeysJob::slotCancel()
|
void QGpgME::QGpgMERefreshSMIMEKeysJob::slotCancel()
|
||||||
{
|
{
|
||||||
if (mProcess) {
|
if (mProcess) {
|
||||||
mProcess->kill();
|
mProcess->kill();
|
||||||
@ -146,7 +146,7 @@ void QGpgME::QGpgMERefreshKeysJob::slotCancel()
|
|||||||
mError = GpgME::Error::fromCode(GPG_ERR_CANCELED, GPG_ERR_SOURCE_GPGSM);
|
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) {
|
if (proc != mProcess) {
|
||||||
return;
|
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?
|
// 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 (!mError && !mPatternsToDo.empty()) {
|
||||||
if (const GpgME::Error err = startAProcess()) {
|
if (const GpgME::Error err = startAProcess()) {
|
||||||
@ -227,4 +227,4 @@ void QGpgME::QGpgMERefreshKeysJob::slotProcessExited(int exitCode, QProcess::Exi
|
|||||||
Q_EMIT result(mError);
|
Q_EMIT result(mError);
|
||||||
deleteLater();
|
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
|
This file is part of qgpgme, the Qt API binding for gpgme
|
||||||
Copyright (c) 2004 Klarälvdalens Datakonsult AB
|
Copyright (c) 2004 Klarälvdalens Datakonsult AB
|
||||||
@ -32,8 +32,8 @@
|
|||||||
your version.
|
your version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __QGPGME_QGPGMEREFRESHKEYSJOB_H__
|
#ifndef __QGPGME_QGPGMEREFRESHSMIMEKEYSJOB_H__
|
||||||
#define __QGPGME_QGPGMEREFRESHKEYSJOB_H__
|
#define __QGPGME_QGPGMEREFRESHSMIMEKEYSJOB_H__
|
||||||
|
|
||||||
#include "refreshkeysjob.h"
|
#include "refreshkeysjob.h"
|
||||||
#ifdef BUILDING_QGPGME
|
#ifdef BUILDING_QGPGME
|
||||||
@ -48,12 +48,12 @@
|
|||||||
namespace QGpgME
|
namespace QGpgME
|
||||||
{
|
{
|
||||||
|
|
||||||
class QGpgMERefreshKeysJob : public RefreshKeysJob
|
class QGpgMERefreshSMIMEKeysJob : public RefreshKeysJob
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
QGpgMERefreshKeysJob();
|
QGpgMERefreshSMIMEKeysJob();
|
||||||
~QGpgMERefreshKeysJob();
|
~QGpgMERefreshSMIMEKeysJob();
|
||||||
|
|
||||||
/* from RefreshKeysJob */
|
/* from RefreshKeysJob */
|
||||||
GpgME::Error start(const QStringList &patterns) Q_DECL_OVERRIDE;
|
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