diff options
author | Saturneric <[email protected]> | 2022-02-02 06:47:24 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-02-02 06:47:24 +0000 |
commit | 3780c1baab8562e15eade1c1be25ccebd0e70814 (patch) | |
tree | 0f7984b0725830cad6492bd91a4d6adaf58601c2 /src/ui/key_generate/SubkeyGenerateDialog.cpp | |
parent | <doc>(project): Separate user manual from development documentation. (diff) | |
download | GpgFrontend-3780c1baab8562e15eade1c1be25ccebd0e70814.tar.gz GpgFrontend-3780c1baab8562e15eade1c1be25ccebd0e70814.zip |
<refactor, fix>(ui): Repair and tidy the signal and slot docking
1. Use more modern ways.
2. Repair partial docking.
Diffstat (limited to 'src/ui/key_generate/SubkeyGenerateDialog.cpp')
-rw-r--r-- | src/ui/key_generate/SubkeyGenerateDialog.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/ui/key_generate/SubkeyGenerateDialog.cpp b/src/ui/key_generate/SubkeyGenerateDialog.cpp index 94e41f10..49fe0f2d 100644 --- a/src/ui/key_generate/SubkeyGenerateDialog.cpp +++ b/src/ui/key_generate/SubkeyGenerateDialog.cpp @@ -73,8 +73,8 @@ SubkeyGenerateDialog::SubkeyGenerateDialog(const KeyId& key_id, QWidget* parent) this->setLayout(vbox2); this->setModal(true); - connect(this, SIGNAL(SignalSubKeyGenerated()), SignalStation::GetInstance(), - SIGNAL(KeyDatabaseRefresh())); + connect(this, &SubkeyGenerateDialog::SignalSubKeyGenerated, SignalStation::GetInstance(), + &SignalStation::SignalKeyDatabaseRefresh); set_signal_slot(); refresh_widgets_state(); @@ -156,23 +156,23 @@ QGroupBox* SubkeyGenerateDialog::create_basic_info_group_box() { } void SubkeyGenerateDialog::set_signal_slot() { - connect(button_box_, SIGNAL(accepted()), this, SLOT(slot_key_gen_accept())); - connect(button_box_, SIGNAL(rejected()), this, SLOT(reject())); - - connect(expire_check_box_, SIGNAL(stateChanged(int)), this, - SLOT(slot_expire_box_changed())); - - connect(key_usage_check_boxes_[0], SIGNAL(stateChanged(int)), this, - SLOT(slot_encryption_box_changed(int))); - connect(key_usage_check_boxes_[1], SIGNAL(stateChanged(int)), this, - SLOT(slot_signing_box_changed(int))); - connect(key_usage_check_boxes_[2], SIGNAL(stateChanged(int)), this, - SLOT(slot_certification_box_changed(int))); - connect(key_usage_check_boxes_[3], SIGNAL(stateChanged(int)), this, - SLOT(slot_authentication_box_changed(int))); - - connect(key_type_combo_box_, SIGNAL(currentIndexChanged(int)), this, - SLOT(slot_activated_key_type(int))); + connect(button_box_, &QDialogButtonBox::accepted, this, &SubkeyGenerateDialog::slot_key_gen_accept); + connect(button_box_, &QDialogButtonBox::rejected, this, &SubkeyGenerateDialog::reject); + + connect(expire_check_box_, &QCheckBox::stateChanged, this, + &SubkeyGenerateDialog::slot_expire_box_changed); + + connect(key_usage_check_boxes_[0], &QCheckBox::stateChanged, this, + &SubkeyGenerateDialog::slot_encryption_box_changed); + connect(key_usage_check_boxes_[1], &QCheckBox::stateChanged, this, + &SubkeyGenerateDialog::slot_signing_box_changed); + connect(key_usage_check_boxes_[2], &QCheckBox::stateChanged, this, + &SubkeyGenerateDialog::slot_certification_box_changed); + connect(key_usage_check_boxes_[3], &QCheckBox::stateChanged, this, + &SubkeyGenerateDialog::slot_authentication_box_changed); + + connect(key_type_combo_box_, qOverload<int>(&QComboBox::currentIndexChanged), this, + &SubkeyGenerateDialog::slot_activated_key_type); } void SubkeyGenerateDialog::slot_expire_box_changed() { |