diff options
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); // }); // } |