diff options
author | saturneric <[email protected]> | 2023-11-06 12:49:44 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-11-06 12:49:44 +0000 |
commit | 889cb8092381b073a0f4a0411a4ede04cd7bdd14 (patch) | |
tree | 87ae80ee7be8b426afe869baff7c99384bbafaaa /src/ui/main_window/MainWindowSlotFunction.cpp | |
parent | refactor: clean up core's codes (diff) | |
download | GpgFrontend-889cb8092381b073a0f4a0411a4ede04cd7bdd14.tar.gz GpgFrontend-889cb8092381b073a0f4a0411a4ede04cd7bdd14.zip |
refactor: improve the code structure of core
Diffstat (limited to 'src/ui/main_window/MainWindowSlotFunction.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowSlotFunction.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp index ac7ba156..dbcfb01e 100644 --- a/src/ui/main_window/MainWindowSlotFunction.cpp +++ b/src/ui/main_window/MainWindowSlotFunction.cpp @@ -42,6 +42,8 @@ #include "core/function/result_analyse/GpgVerifyResultAnalyse.h" #include "core/model/DataObject.h" #include "core/module/ModuleManager.h" +#include "core/utils/CommonUtils.h" +#include "core/utils/GpgUtils.h" #include "ui/UserInterfaceUtils.h" #include "ui/dialog/SignersPicker.h" #include "ui/dialog/help/AboutDialog.h" @@ -260,13 +262,6 @@ void MainWindow::slot_decrypt() { QByteArray text = edit_->CurTextPage()->GetTextPage()->toPlainText().toUtf8(); - if (text.trimmed().startsWith(GpgConstants::GPG_FRONTEND_SHORT_CRYPTO_HEAD)) { - QMessageBox::critical( - this, _("Notice"), - _("Short Crypto Text only supports Decrypt & Verify.")); - return; - } - // data to transfer into task auto data_object = TransferParams( edit_->CurTextPage()->GetTextPage()->toPlainText().toStdString()); |