| 73 | } |
| 74 | |
| 75 | void SettingDialog::initConnection() |
| 76 | { |
| 77 | connect(promptCB, &QComboBox::currentTextChanged, this, |
| 78 | [this] { |
| 79 | promptEdit->setPlainText(promptCB->currentData().toString()); |
| 80 | bool isDefault = promptCB->currentIndex() == 0; |
| 81 | delBtn->setEnabled(!isDefault); |
| 82 | promptEdit->setReadOnly(isDefault); |
| 83 | }); |
| 84 | connect(addBtn, &QPushButton::clicked, this, &SettingDialog::handleAddPrompt); |
| 85 | connect(delBtn, &QPushButton::clicked, this, &SettingDialog::handleDeletePrompt); |
| 86 | } |
| 87 | |
| 88 | void SettingDialog::updateSettings() |
| 89 | { |
nothing calls this directly
no test coverage detected