aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/keypair_details/KeyNewUIDDialog.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-17 15:28:04 +0000
committersaturneric <[email protected]>2025-04-17 15:28:04 +0000
commite276f9e86b161362d6f379ab790476936a0e6208 (patch)
tree65c27e3efcbf113a052bc053e1c2739f4a351217 /src/ui/dialog/keypair_details/KeyNewUIDDialog.cpp
parentfix: compiler issues on CI (diff)
downloadGpgFrontend-e276f9e86b161362d6f379ab790476936a0e6208.tar.gz
GpgFrontend-e276f9e86b161362d6f379ab790476936a0e6208.zip
feat: generate cark keys
Diffstat (limited to '')
-rw-r--r--src/ui/dialog/keypair_details/KeyNewUIDDialog.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/ui/dialog/keypair_details/KeyNewUIDDialog.cpp b/src/ui/dialog/keypair_details/KeyNewUIDDialog.cpp
index 6a6745da..37688b44 100644
--- a/src/ui/dialog/keypair_details/KeyNewUIDDialog.cpp
+++ b/src/ui/dialog/keypair_details/KeyNewUIDDialog.cpp
@@ -29,6 +29,7 @@
#include "KeyNewUIDDialog.h"
#include "core/function/gpg/GpgUIDOperator.h"
+#include "core/utils/CommonUtils.h"
#include "ui/UISignalStation.h"
namespace GpgFrontend::UI {
@@ -81,14 +82,11 @@ void KeyNewUIDDialog::slot_create_new_uid() {
QString buffer;
QTextStream error_stream(&buffer);
- /**
- * check for errors in keygen dialog input
- */
if ((name_->text()).size() < 5) {
error_stream << " " << tr("Name must contain at least five characters.")
<< Qt::endl;
}
- if (email_->text().isEmpty() || !check_email_address(email_->text())) {
+ if (email_->text().isEmpty() || !IsEmailAddress(email_->text())) {
error_stream << " " << tr("Please give a email address.") << Qt::endl;
}
auto error_string = error_stream.readAll();
@@ -117,7 +115,4 @@ void KeyNewUIDDialog::slot_create_new_uid() {
}
}
-auto KeyNewUIDDialog::check_email_address(const QString& str) -> bool {
- return re_email_.match(str).hasMatch();
-}
} // namespace GpgFrontend::UI