mirror of
https://github.com/QRouland/UTPass.git
synced 2026-01-10 19:36:57 +00:00
Rewrite get all key with rnp
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
#ifndef IMPORTKEYJOB_H
|
||||
#define IMPORTKEYJOB_H
|
||||
|
||||
|
||||
|
||||
#include "rnpjob.h"
|
||||
|
||||
/**
|
||||
* @class ImportKeyJob
|
||||
* @brief A class to handle import a key file in a separate thread.
|
||||
* @brief A job to handle the import of a key file in a separate thread.
|
||||
*
|
||||
*/
|
||||
class ImportKeyJob : public RnpJob
|
||||
@@ -14,26 +13,34 @@ class ImportKeyJob : public RnpJob
|
||||
Q_OBJECT
|
||||
|
||||
/**
|
||||
* @brief The main function that performs the import operation.
|
||||
* @brief Executes the key import operation.
|
||||
*
|
||||
* Handles the process of removing recursively a target path.
|
||||
* This function handles the actual process of importing the GPG key file into the
|
||||
* keyring. It is executed in a separate thread to prevent UI freezing or blocking
|
||||
* of the main application thread during the import.
|
||||
*/
|
||||
void run() override;
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief Emitted when the key import operation is successful.
|
||||
*
|
||||
* This signal is emitted when the key file is successfully imported into the keyring.
|
||||
*/
|
||||
void resultSuccess();
|
||||
|
||||
private:
|
||||
QString m_key_file_path; ///< The path of the key file to import.
|
||||
QString m_key_file_path; /**< The path of the key file to import. */
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor for the ImportKeyJob class.
|
||||
* @brief Constructs an ImportKeyJob object with the specified key file and keyring directory.
|
||||
*
|
||||
* Initializes the ImportKeyJob with the file to import.
|
||||
* This constructor initializes the ImportKeyJob instance with the directory containing
|
||||
* the keyrings and the file path of the GPG key to import.
|
||||
*
|
||||
* @param rnp_homedir Rnp home dir that contains the keyrings.
|
||||
* @param path Path of the key file to import.
|
||||
* @param rnp_homedir The directory containing the keyrings.
|
||||
* @param path The path to the key file to import.
|
||||
*/
|
||||
ImportKeyJob(QDir rnp_homedir, QString path);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user