diff options
author | Saturn&Eric <[email protected]> | 2022-03-19 07:55:26 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2022-03-19 07:55:26 +0000 |
commit | d1e305cda3a8ddc066213f3309826caf29064423 (patch) | |
tree | fabeb080e66df2fe944011ba5690f680ebabe7b6 /src/ui/mail/RecipientsPicker.cpp | |
parent | <doc>(project): update README.md. (diff) | |
parent | Merge branch 'main' into develop-2.0.5 (diff) | |
download | GpgFrontend-d1e305cda3a8ddc066213f3309826caf29064423.tar.gz GpgFrontend-d1e305cda3a8ddc066213f3309826caf29064423.zip |
Merge pull request #49 from saturneric/develop-2.0.5
v2.0.5
Diffstat (limited to '')
-rw-r--r-- | src/ui/mail/RecipientsPicker.cpp (renamed from src/ui/smtp/RecipientsPicker.cpp) | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/ui/smtp/RecipientsPicker.cpp b/src/ui/mail/RecipientsPicker.cpp index eaaa683a..d6b8bcc5 100644 --- a/src/ui/smtp/RecipientsPicker.cpp +++ b/src/ui/mail/RecipientsPicker.cpp @@ -1,4 +1,6 @@ /** + * Copyright (C) 2021 Saturneric + * * This file is part of GpgFrontend. * * GpgFrontend is free software: you can redistribute it and/or modify @@ -6,19 +8,21 @@ * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Foobar is distributed in the hope that it will be useful, + * GpgFrontend is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from + * the gpg4usb project, which is under GPL-3.0-or-later. * - * The initial version of the source code is inherited from gpg4usb-team. - * Their source code version also complies with GNU General Public License. + * All the source code of GpgFrontend was modified and released by + * Saturneric<[email protected]> starting on May 12, 2021. * - * The source code version of this software was modified and released - * by Saturneric<[email protected]> starting on May 12, 2021. + * SPDX-License-Identifier: GPL-3.0-or-later * */ @@ -30,23 +34,23 @@ GpgFrontend::UI::RecipientsPicker::RecipientsPicker( const GpgFrontend::KeyIdArgsListPtr& current_key_ids, QWidget* parent) : QDialog(parent) { auto confirm_button = new QPushButton(_("Confirm")); - connect(confirm_button, SIGNAL(clicked(bool)), this, SLOT(accept())); + connect(confirm_button,&QPushButton::clicked, this, &RecipientsPicker::accept); // Setup KeyList key_list_ = new KeyList(KeyMenuAbility::NONE, this); - key_list_->addListGroupTab( + key_list_->AddListGroupTab( _("Recipient(s)"), KeyListRow::SECRET_OR_PUBLIC_KEY, KeyListColumn::NAME | KeyListColumn::EmailAddress, [](const GpgKey& key) -> bool { - return !key.is_private_key() && key.CanEncrActual(); + return !key.IsPrivateKey() && key.IsHasActualEncryptionCapability(); }); - key_list_->slotRefresh(); + key_list_->SlotRefresh(); auto key_ids = std::make_unique<GpgFrontend::KeyIdArgsList>(); for (const auto& key_id : *current_key_ids) { key_ids->push_back(key_id); } - key_list_->setChecked(std::move(key_ids)); + key_list_->SetChecked(std::move(key_ids)); auto* vbox2 = new QVBoxLayout(); vbox2->addWidget(new QLabel(QString(_("Select Recipient(s)")) + ": ")); @@ -71,6 +75,6 @@ GpgFrontend::UI::RecipientsPicker::RecipientsPicker( } GpgFrontend::KeyIdArgsListPtr -GpgFrontend::UI::RecipientsPicker::getCheckedRecipients() { - return key_list_->getChecked(); +GpgFrontend::UI::RecipientsPicker::GetCheckedRecipients() { + return key_list_->GetChecked(); } |