| 509 | } |
| 510 | |
| 511 | void RefactorWidget::onRightEditorTextChanged() |
| 512 | { |
| 513 | QString fullText = m_rightDocument->plainText(); |
| 514 | int startPos = m_contextBefore.isEmpty() ? 0 : m_contextBefore.length() + 1; |
| 515 | int endPos = m_contextAfter.isEmpty() ? fullText.length() : fullText.length() - m_contextAfter.length() - 1; |
| 516 | m_applyText = fullText.mid(startPos, endPos - startPos); |
| 517 | } |
| 518 | |
| 519 | void RefactorWidget::closeEvent(QCloseEvent *event) |
| 520 | { |