aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/import_export
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/import_export')
-rw-r--r--src/ui/dialog/import_export/KeyImportDetailDialog.cpp12
-rw-r--r--src/ui/dialog/import_export/KeyServerImportDialog.cpp12
-rw-r--r--src/ui/dialog/import_export/KeyUploadDialog.cpp1
3 files changed, 15 insertions, 10 deletions
diff --git a/src/ui/dialog/import_export/KeyImportDetailDialog.cpp b/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
index 24062796..92e45eb6 100644
--- a/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
+++ b/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
@@ -28,7 +28,7 @@
#include "KeyImportDetailDialog.h"
-#include "core/function/gpg/GpgKeyGetter.h"
+#include "core/function/gpg/GpgAbstractKeyGetter.h"
#include "core/model/GpgImportInformation.h"
namespace GpgFrontend::UI {
@@ -147,11 +147,13 @@ void KeyImportDetailDialog::create_keys_table() {
int row = 0;
for (const auto& imp_key : m_result_->imported_keys) {
keys_table_->setRowCount(row + 1);
- auto key = GpgKeyGetter::GetInstance(current_gpg_context_channel_)
+
+ auto key = GpgAbstractKeyGetter::GetInstance(current_gpg_context_channel_)
.GetKey(imp_key.fpr);
- if (!key.IsGood()) continue;
- keys_table_->setItem(row, 0, new QTableWidgetItem(key.Name()));
- keys_table_->setItem(row, 1, new QTableWidgetItem(key.Email()));
+ if (key == nullptr) continue;
+
+ keys_table_->setItem(row, 0, new QTableWidgetItem(key->Name()));
+ keys_table_->setItem(row, 1, new QTableWidgetItem(key->Email()));
keys_table_->setItem(
row, 2, new QTableWidgetItem(get_status_string(imp_key.import_status)));
keys_table_->setItem(row, 3, new QTableWidgetItem(imp_key.fpr));
diff --git a/src/ui/dialog/import_export/KeyServerImportDialog.cpp b/src/ui/dialog/import_export/KeyServerImportDialog.cpp
index 03ee6c4a..8e01bd4b 100644
--- a/src/ui/dialog/import_export/KeyServerImportDialog.cpp
+++ b/src/ui/dialog/import_export/KeyServerImportDialog.cpp
@@ -422,10 +422,14 @@ void KeyServerImportDialog::slot_import_finished(
// refresh the key database
emit SignalKeyImported();
- // show details
- (new KeyImportDetailDialog(current_gpg_context_channel_, std::move(info),
- this))
- ->exec();
+ auto* connection = new QMetaObject::Connection;
+ *connection = connect(
+ UISignalStation::GetInstance(),
+ &UISignalStation::SignalKeyDatabaseRefreshDone, this, [=]() {
+ (new KeyImportDetailDialog(current_gpg_context_channel_, info, this));
+ QObject::disconnect(*connection);
+ delete connection;
+ });
}
void KeyServerImportDialog::set_loading(bool status) {
diff --git a/src/ui/dialog/import_export/KeyUploadDialog.cpp b/src/ui/dialog/import_export/KeyUploadDialog.cpp
index 346be765..8abcc8de 100644
--- a/src/ui/dialog/import_export/KeyUploadDialog.cpp
+++ b/src/ui/dialog/import_export/KeyUploadDialog.cpp
@@ -29,7 +29,6 @@
#include "KeyUploadDialog.h"
#include <QtNetwork>
-#include <utility>
#include "core/function/gpg/GpgKeyImportExporter.h"
#include "core/model/SettingsObject.h"