diff options
author | Saturneric <[email protected]> | 2021-12-02 22:44:09 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-12-04 19:28:28 +0000 |
commit | ea7c0113486f336f3fe14435e1ce5eb55ad4eca9 (patch) | |
tree | 8f1c5c61be4d55df5e7efad79e16f9c0212510db /src/ui/main_window/MainWindowFileSlotFunction.cpp | |
parent | Fixed (diff) | |
download | GpgFrontend-ea7c0113486f336f3fe14435e1ce5eb55ad4eca9.tar.gz GpgFrontend-ea7c0113486f336f3fe14435e1ce5eb55ad4eca9.zip |
Fixed
1. Ci Fixed for New Version.
2. Bugs fixed for cross-platform.
3. Bugs fixed for i18n.
Diffstat (limited to 'src/ui/main_window/MainWindowFileSlotFunction.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowFileSlotFunction.cpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/ui/main_window/MainWindowFileSlotFunction.cpp b/src/ui/main_window/MainWindowFileSlotFunction.cpp index b0f7c535..0b4f7837 100644 --- a/src/ui/main_window/MainWindowFileSlotFunction.cpp +++ b/src/ui/main_window/MainWindowFileSlotFunction.cpp @@ -278,11 +278,37 @@ void MainWindow::slotFileVerify() { resultAnalyse.analyse(); process_result_analyse(edit, infoBoard, resultAnalyse); - // if (resultAnalyse->getStatus() >= 0) { + if (resultAnalyse.getStatus() == -2) { + QMessageBox::StandardButton reply; + reply = QMessageBox::question( + this, _("Public key not found locally"), + _("There is no target public key content in local for GpgFrontend to " + "gather enough information about this Signature. Do you want to " + "import the public key from Keyserver now?"), + QMessageBox::Yes | QMessageBox::No); + if (reply == QMessageBox::Yes) { + qDebug() << "Yes was clicked"; + auto dialog = KeyServerImportDialog(true, this); + auto key_ids = std::make_unique<KeyIdArgsList>(); + auto* signature = resultAnalyse.GetSignatures(); + while (signature != nullptr) { + LOG(INFO) << "signature fpr" << signature->fpr; + key_ids->push_back(signature->fpr); + signature = signature->next; + } + dialog.slotImport(key_ids); + dialog.show(); + + } else { + qDebug() << "Yes was *not* clicked"; + } + } + + // if (resultAnalyse.getStatus() >= 0) { // infoBoard->resetOptionActionsMenu(); // infoBoard->addOptionalAction( - // "Show Verify Details", [this, error, result]() { - // VerifyDetailsDialog(this, mCtx, mKeyList, error, result); + // "Show Verify Details", [this, error, &result]() { + // VerifyDetailsDialog(this, mKeyList, error, result); // }); // } |