MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / loadCustomCommands

Method loadCustomCommands

widgets/QuickRefactorDialog.cpp:416–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416void QuickRefactorDialog::loadCustomCommands()
417{
418 m_commandsComboBox->clear();
419 m_commandsComboBox->addItem("", QString());
420
421 auto &manager = CustomInstructionsManager::instance();
422 const QVector<CustomInstruction> &instructions = manager.instructions();
423
424 QStringList instructionNames;
425
426 for (const CustomInstruction &instruction : instructions) {
427 m_commandsComboBox->addItem(instruction.name, instruction.id);
428 instructionNames.append(instruction.name);
429 }
430
431 if (m_commandsComboBox->completer()) {
432 QStringListModel *model = new QStringListModel(instructionNames, this);
433 m_commandsComboBox->completer()->setModel(model);
434 }
435
436 bool hasInstructions = !instructions.isEmpty();
437 m_editCommandButton->setEnabled(hasInstructions);
438 m_deleteCommandButton->setEnabled(hasInstructions);
439}
440
441CustomInstruction QuickRefactorDialog::findCurrentInstruction() const
442{

Callers

nothing calls this directly

Calls 4

appendMethod · 0.80
clearMethod · 0.45
instructionsMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected