| 80 | } |
| 81 | |
| 82 | QuickRefactorDialog::QuickRefactorDialog(QWidget *parent, const QString &lastInstructions) |
| 83 | : QDialog(parent) |
| 84 | , m_lastInstructions(lastInstructions) |
| 85 | { |
| 86 | setWindowTitle(Tr::tr("Quick Refactor")); |
| 87 | setupUi(); |
| 88 | |
| 89 | if (!m_lastInstructions.isEmpty()) { |
| 90 | m_instructionEdit->setPlainText(m_lastInstructions); |
| 91 | m_instructionEdit->selectAll(); |
| 92 | } |
| 93 | |
| 94 | QTimer::singleShot(0, this, &QuickRefactorDialog::updateDialogSize); |
| 95 | m_instructionEdit->installEventFilter(this); |
| 96 | m_commandsComboBox->installEventFilter(this); |
| 97 | updateDialogSize(); |
| 98 | |
| 99 | m_instructionEdit->setFocus(); |
| 100 | } |
| 101 | |
| 102 | void QuickRefactorDialog::setupUi() |
| 103 | { |