| 478 | } |
| 479 | |
| 480 | void QuickRefactorDialog::onAddCustomCommand() |
| 481 | { |
| 482 | AddCustomInstructionDialog dialog(this); |
| 483 | if (dialog.exec() == QDialog::Accepted) { |
| 484 | CustomInstruction instruction = dialog.getInstruction(); |
| 485 | auto &manager = CustomInstructionsManager::instance(); |
| 486 | |
| 487 | if (manager.saveInstruction(instruction)) { |
| 488 | loadCustomCommands(); |
| 489 | m_commandsComboBox->setCurrentText(instruction.name); |
| 490 | } else { |
| 491 | QMessageBox::warning( |
| 492 | this, |
| 493 | Tr::tr("Error"), |
| 494 | Tr::tr("Failed to save custom instruction. Check logs for details.")); |
| 495 | } |
| 496 | } |
| 497 | } |
| 498 | |
| 499 | void QuickRefactorDialog::onEditCustomCommand() |
| 500 | { |
nothing calls this directly
no test coverage detected