aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/VerifyDetailsDialog.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-06-06 19:41:06 +0000
committerSaturneric <[email protected]>2021-06-06 19:41:06 +0000
commit7191b3bb0caf9d74648820b094a8af63f618e8a8 (patch)
treea94bac8131da0128b562f0d874bfbdfa271214c8 /src/ui/VerifyDetailsDialog.cpp
parentAdjust and improve the detailed interface of the verification information res... (diff)
downloadGpgFrontend-7191b3bb0caf9d74648820b094a8af63f618e8a8.tar.gz
GpgFrontend-7191b3bb0caf9d74648820b094a8af63f618e8a8.zip
Add encryption and signature function.
Adjust and improve the dashboard control. Modify and adjust GpgSignature. Separate Verify result processing code in code structure. Add additional operation toolbar function. Adjust and optimize code structure. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to 'src/ui/VerifyDetailsDialog.cpp')
-rw-r--r--src/ui/VerifyDetailsDialog.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/ui/VerifyDetailsDialog.cpp b/src/ui/VerifyDetailsDialog.cpp
index 27306280..fe193aa0 100644
--- a/src/ui/VerifyDetailsDialog.cpp
+++ b/src/ui/VerifyDetailsDialog.cpp
@@ -25,28 +25,22 @@
#include "ui/VerifyDetailsDialog.h"
VerifyDetailsDialog::VerifyDetailsDialog(QWidget *parent, GpgME::GpgContext *ctx, KeyList *keyList,
- QByteArray *inputData, QByteArray *inputSignature) :
- QDialog(parent) {
- mCtx = ctx;
- mKeyList = keyList;
- //mTextpage = edit;
- mInputData = inputData;
- mInputSignature = inputSignature;
+ gpgme_signature_t signature) :
+ QDialog(parent), mCtx(ctx), mKeyList(keyList), sign(signature) {
+
this->setWindowTitle(tr("Signature Details"));
- connect(mCtx, SIGNAL(keyDBChanged()), this, SLOT(slotRefresh()));
+ connect(mCtx, SIGNAL(signalKeyInfoChanged()), this, SLOT(slotRefresh()));
mainLayout = new QHBoxLayout();
this->setLayout(mainLayout);
- mVbox = new QWidget();
slotRefresh();
this->exec();
}
void VerifyDetailsDialog::slotRefresh() {
- mVbox->close();
mVbox = new QWidget();
auto *mVboxLayout = new QVBoxLayout(mVbox);
@@ -56,16 +50,6 @@ void VerifyDetailsDialog::slotRefresh() {
buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
- // Get signature information of current text
- //QByteArray text = mTextpage->toPlainText().toUtf8();
- //mCtx->preventNoDataErr(&text);
- gpgme_signature_t sign;
- if (mInputSignature != nullptr) {
- sign = mCtx->verify(mInputData, mInputSignature);
- } else {
- sign = mCtx->verify(mInputData);
- }
-
if (sign == nullptr) {
mVboxLayout->addWidget(new QLabel(tr("No valid input found")));
mVboxLayout->addWidget(buttonBox);