diff options
author | saturneric <[email protected]> | 2025-01-27 22:12:00 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-01-27 22:12:00 +0000 |
commit | a66d868f500c0bd94fe9783172ac3d17b1dbb6f5 (patch) | |
tree | 3c2c07e0ec717fac5beec08d9678bd311a84e134 /src/ui/main_window/MainWindowFileSlotFunction.cpp | |
parent | refactor: reduce code duplication of gnupg file operations (diff) | |
download | GpgFrontend-a66d868f500c0bd94fe9783172ac3d17b1dbb6f5.tar.gz GpgFrontend-a66d868f500c0bd94fe9783172ac3d17b1dbb6f5.zip |
refactor: reduce code duplication of gnupg operations
Diffstat (limited to 'src/ui/main_window/MainWindowFileSlotFunction.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowFileSlotFunction.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/ui/main_window/MainWindowFileSlotFunction.cpp b/src/ui/main_window/MainWindowFileSlotFunction.cpp index ba6a6ec2..b46034b7 100644 --- a/src/ui/main_window/MainWindowFileSlotFunction.cpp +++ b/src/ui/main_window/MainWindowFileSlotFunction.cpp @@ -131,13 +131,6 @@ auto MainWindow::check_keys_helper( return keys; } -auto MainWindow::execute_operas_helper( - const QString& task, - const QSharedPointer<GpgOperaContextBasement>& contexts) { - GpgOperaHelper::WaitForMultipleOperas(this, task, contexts->operas); - slot_result_analyse_show_helper(contexts->opera_results); -} - void MainWindow::SlotFileEncrypt(const QStringList& paths) { auto contexts = QSharedPointer<GpgOperaContextBasement>::create(); @@ -191,7 +184,7 @@ void MainWindow::SlotFileEncrypt(const QStringList& paths) { m_key_list_->GetCurrentGpgContextChannel(), GpgOperaHelper::BuildOperasDirectoryEncrypt); - execute_operas_helper(tr("Encrypting"), contexts); + exec_operas_helper(tr("Encrypting"), contexts); } void MainWindow::SlotFileDecrypt(const QStringList& paths) { @@ -226,7 +219,7 @@ void MainWindow::SlotFileDecrypt(const QStringList& paths) { m_key_list_->GetCurrentGpgContextChannel(), GpgOperaHelper::BuildOperasArchiveDecrypt); - execute_operas_helper(tr("Decrypting"), contexts); + exec_operas_helper(tr("Decrypting"), contexts); } void MainWindow::SlotFileSign(const QStringList& paths) { @@ -260,7 +253,7 @@ void MainWindow::SlotFileSign(const QStringList& paths) { m_key_list_->GetCurrentGpgContextChannel(), GpgOperaHelper::BuildOperasFileSign); - execute_operas_helper(tr("Signing"), contexts); + exec_operas_helper(tr("Signing"), contexts); } void MainWindow::SlotFileVerify(const QStringList& paths) { @@ -306,7 +299,7 @@ void MainWindow::SlotFileVerify(const QStringList& paths) { m_key_list_->GetCurrentGpgContextChannel(), GpgOperaHelper::BuildOperasFileVerify); - execute_operas_helper(tr("Verifying"), contexts); + exec_operas_helper(tr("Verifying"), contexts); if (!contexts->unknown_fprs.isEmpty()) { slot_verifying_unknown_signature_helper(contexts->unknown_fprs); @@ -372,7 +365,7 @@ void MainWindow::SlotFileEncryptSign(const QStringList& paths) { m_key_list_->GetCurrentGpgContextChannel(), GpgOperaHelper::BuildOperasDirectoryEncryptSign); - execute_operas_helper(tr("Encrypting and Signing"), contexts); + exec_operas_helper(tr("Encrypting and Signing"), contexts); } void MainWindow::SlotFileDecryptVerify(const QStringList& paths) { @@ -407,7 +400,7 @@ void MainWindow::SlotFileDecryptVerify(const QStringList& paths) { m_key_list_->GetCurrentGpgContextChannel(), GpgOperaHelper::BuildOperasArchiveDecryptVerify); - execute_operas_helper(tr("Decrypting and Verifying"), contexts); + exec_operas_helper(tr("Decrypting and Verifying"), contexts); if (!contexts->unknown_fprs.isEmpty()) { slot_verifying_unknown_signature_helper(contexts->unknown_fprs); |