diff options
author | Saturneric <[email protected]> | 2022-06-05 11:39:38 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-06-05 11:40:22 +0000 |
commit | 96009aba6df716ac3abdae1acdfa32125681bbf1 (patch) | |
tree | 5dc8e78ea5903a85062676ac69fb41abcc611ef1 /src/ui/import_export/KeyServerImportDialog.h | |
parent | fix(ui): fix crash when start app. (diff) | |
download | GpgFrontend-96009aba6df716ac3abdae1acdfa32125681bbf1.tar.gz GpgFrontend-96009aba6df716ac3abdae1acdfa32125681bbf1.zip |
fix: fix some issues
1. fix crash when keyserver list is empty.
2. refactor KeyServerImportDialog
3. reduce header file including
Diffstat (limited to 'src/ui/import_export/KeyServerImportDialog.h')
-rw-r--r-- | src/ui/import_export/KeyServerImportDialog.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/ui/import_export/KeyServerImportDialog.h b/src/ui/import_export/KeyServerImportDialog.h index 37362859..6bde96b8 100644 --- a/src/ui/import_export/KeyServerImportDialog.h +++ b/src/ui/import_export/KeyServerImportDialog.h @@ -29,6 +29,8 @@ #ifndef __KEY_SERVER_IMPORT_DIALOG_H__ #define __KEY_SERVER_IMPORT_DIALOG_H__ +#include <string> + #include "KeyImportDetailDialog.h" #include "core/GpgContext.h" #include "ui/GpgFrontendUI.h" @@ -74,7 +76,8 @@ class KeyServerImportDialog : public QDialog { * @param keyIds * @param keyserverUrl */ - void SlotImport(const QStringList& keyIds, const QUrl& keyserverUrl); + void SlotImport(std::vector<std::string> key_ids_list, + std::string keyserver_url); signals: @@ -87,7 +90,7 @@ class KeyServerImportDialog : public QDialog { private slots: /** - * @brief + * @brief import key(s) for the key table selection * */ void slot_import(); @@ -96,14 +99,16 @@ class KeyServerImportDialog : public QDialog { * @brief * */ - void slot_search_finished(); + void slot_search_finished(QNetworkReply::NetworkError reply, + QByteArray buffer); /** * @brief * * @param keyid */ - void slot_import_finished(const QString& keyid); + void slot_import_finished(QNetworkReply::NetworkError error, + QByteArray buffer); /** * @brief @@ -164,18 +169,17 @@ class KeyServerImportDialog : public QDialog { bool m_automatic_ = false; ///< - QLineEdit* search_line_edit_{}; ///< - QComboBox* key_server_combo_box_{}; ///< - QProgressBar* waiting_bar_; ///< - QLabel* search_label_{}; ///< - QLabel* key_server_label_{}; ///< - QLabel* message_{}; ///< - QLabel* icon_{}; ///< - QPushButton* close_button_{}; ///< - QPushButton* import_button_{}; ///< - QPushButton* search_button_{}; ///< - QTableWidget* keys_table_{}; ///< - QNetworkAccessManager* network_access_manager_{}; ///< + QLineEdit* search_line_edit_{}; ///< + QComboBox* key_server_combo_box_{}; ///< + QProgressBar* waiting_bar_; ///< + QLabel* search_label_{}; ///< + QLabel* key_server_label_{}; ///< + QLabel* message_{}; ///< + QLabel* icon_{}; ///< + QPushButton* close_button_{}; ///< + QPushButton* import_button_{}; ///< + QPushButton* search_button_{}; ///< + QTableWidget* keys_table_{}; ///< }; } // namespace GpgFrontend::UI |