aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2021-07-19 20:13:05 +0000
committerGitHub <[email protected]>2021-07-19 20:13:05 +0000
commit837e9748bb6bc5b3255b0475b8bbb3106e061b9c (patch)
tree67acd04b79d0ce779fc2ade5bb3e43a872f660cd /include
parentMerge pull request #13 from saturneric/develop (diff)
parentAdd multi-language support. (diff)
downloadGpgFrontend-1.2.2.tar.gz
GpgFrontend-1.2.2.zip
Merge pull request #14 from saturneric/developv1.2.2
Version 1.2.2
Diffstat (limited to 'include')
-rw-r--r--include/gpg/GpgContext.h19
-rw-r--r--include/ui/keypair_details/KeyPairDetailTab.h10
-rw-r--r--include/ui/widgets/FilePage.h5
3 files changed, 22 insertions, 12 deletions
diff --git a/include/gpg/GpgContext.h b/include/gpg/GpgContext.h
index a2812b4e..fc4d8692 100644
--- a/include/gpg/GpgContext.h
+++ b/include/gpg/GpgContext.h
@@ -71,7 +71,7 @@ namespace GpgME {
~GpgContext() override;
- bool isGood() const;
+ [[nodiscard]] bool isGood() const;
GpgImportInformation importKey(QByteArray inBuffer);
@@ -115,7 +115,7 @@ namespace GpgME {
gpg_error_t
sign(const QVector<GpgKey> &keys, const QByteArray &inBuffer, QByteArray *outBuffer, bool detached = false,
- gpgme_sign_result_t* result = nullptr);
+ gpgme_sign_result_t *result = nullptr);
bool addUID(const GpgKey &key, const GpgUID &uid);
@@ -125,6 +125,8 @@ namespace GpgME {
bool setExpire(const GpgKey &key, const GpgSubKey *subkey, QDateTime *expires);
+ QProcess * generateRevokeCert(const GpgKey &key, const QString &outputFileName);
+
static bool checkIfKeyCanSign(const GpgKey &key);
static bool checkIfKeyCanCert(const GpgKey &key);
@@ -133,6 +135,7 @@ namespace GpgME {
static bool checkIfKeyCanEncr(const GpgKey &key);
+
/**
* @details If text contains PGP-message, put a linebreak before the message,
* so that gpgme can decrypt correctly
@@ -143,7 +146,7 @@ namespace GpgME {
GpgKey getKeyByFpr(const QString &fpr);
- const GpgKey & getKeyById(const QString &id);
+ const GpgKey &getKeyById(const QString &id);
static QString gpgErrString(gpgme_error_t err);
@@ -173,7 +176,7 @@ namespace GpgME {
void slotRefreshKeyList();
- void slotUpdateKeyList(const QString& key_id);
+ void slotUpdateKeyList(const QString &key_id);
private:
gpgme_ctx_t mCtx{};
@@ -204,11 +207,11 @@ namespace GpgME {
const char *passphrase_info,
int last_was_bad, int fd);
- void executeGpgCommand(const QStringList &arguments,
- QByteArray *stdOut,
- QByteArray *stdErr);
+ QProcess * executeGpgCommand(const QStringList &arguments,
+ QByteArray *stdOut,
+ QByteArray *stdErr, const std::function<void(QProcess *)> &interactFunc);
- QString gpgBin;
+ QString gpgExec;
QString gpgKeys;
};
} // namespace GpgME
diff --git a/include/ui/keypair_details/KeyPairDetailTab.h b/include/ui/keypair_details/KeyPairDetailTab.h
index 6d041f97..bb364718 100644
--- a/include/ui/keypair_details/KeyPairDetailTab.h
+++ b/include/ui/keypair_details/KeyPairDetailTab.h
@@ -36,10 +36,10 @@ class KeyPairDetailTab : public QWidget {
Q_OBJECT
/**
- * @details Return QString with a space inserted at every fourth character
- *
- * @param fingerprint The fingerprint to be beautified
- */
+ * @details Return QString with a space inserted at every fourth character
+ *
+ * @param fingerprint The fingerprint to be beautified
+ */
static QString beautifyFingerprint(QString fingerprint);
void createKeyServerOperaMenu();
@@ -64,6 +64,8 @@ private slots:
void slotUpdateKeyToServer();
+ void slotGenRevokeCert();
+
private:
QString *keyid; /** The id of the key the details should be shown for */
diff --git a/include/ui/widgets/FilePage.h b/include/ui/widgets/FilePage.h
index 3d2c8e72..45d638fa 100644
--- a/include/ui/widgets/FilePage.h
+++ b/include/ui/widgets/FilePage.h
@@ -57,6 +57,10 @@ private slots:
void onCustomContextMenu(const QPoint &point);
+protected:
+
+ void keyPressEvent(QKeyEvent *event) override;
+
private:
@@ -64,6 +68,7 @@ private:
QTreeView *dirTreeView;
QLineEdit *pathEdit;
QString mPath;
+ QString selectedPath;
QPushButton *upLevelButton;
QPushButton *goPathButton;