diff options
author | Saturneric <[email protected]> | 2022-12-22 10:30:36 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-12-22 10:30:36 +0000 |
commit | 3cb623b07e50d9e95dace9966dc0337e72f57dc2 (patch) | |
tree | dfe994f28f0a6dee6151febf3b50f22adceab74e /src/ui/dialog/key_generate/KeygenDialog.cpp | |
parent | Merge pull request #70 from saturneric/dev/2.0.8/saturneric (diff) | |
parent | fix: continue to solve ubuntu 18.04 build issues (diff) | |
download | GpgFrontend-3cb623b07e50d9e95dace9966dc0337e72f57dc2.tar.gz GpgFrontend-3cb623b07e50d9e95dace9966dc0337e72f57dc2.zip |
fix: solve conflictsv2.0.10
Diffstat (limited to 'src/ui/dialog/key_generate/KeygenDialog.cpp')
-rw-r--r-- | src/ui/dialog/key_generate/KeygenDialog.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/dialog/key_generate/KeygenDialog.cpp b/src/ui/dialog/key_generate/KeygenDialog.cpp index 42160ec9..b7ba6369 100644 --- a/src/ui/dialog/key_generate/KeygenDialog.cpp +++ b/src/ui/dialog/key_generate/KeygenDialog.cpp @@ -254,8 +254,9 @@ void KeyGenDialog::slot_authentication_box_changed(int state) { void KeyGenDialog::slot_activated_key_type(int index) { qDebug() << "key type index changed " << index; - gen_key_info_->SetAlgo( - this->key_type_combo_box_->itemText(index).toStdString()); + // check + assert(gen_key_info_->GetSupportedKeyAlgo().size() > index); + gen_key_info_->SetAlgo(gen_key_info_->GetSupportedKeyAlgo()[index]); refresh_widgets_state(); } @@ -357,7 +358,7 @@ QGroupBox* KeyGenDialog::create_basic_info_group_box() { key_type_combo_box_ = new QComboBox(this); for (auto& algo : GenKeyInfo::GetSupportedKeyAlgo()) { - key_type_combo_box_->addItem(QString::fromStdString(algo)); + key_type_combo_box_->addItem(QString::fromStdString(algo.first)); } if (!GenKeyInfo::GetSupportedKeyAlgo().empty()) { key_type_combo_box_->setCurrentIndex(0); |