| 62 | } |
| 63 | |
| 64 | void QuickFindWidget::setEditor(ScintillaNext *editor) |
| 65 | { |
| 66 | if (this->editor != Q_NULLPTR) { |
| 67 | disconnect(editor, &ScintillaNext::resized, this, &QuickFindWidget::positionWidget); |
| 68 | } |
| 69 | |
| 70 | connect(editor, &ScintillaNext::resized, this, &QuickFindWidget::positionWidget); |
| 71 | |
| 72 | this->editor = editor; |
| 73 | |
| 74 | if (finder == Q_NULLPTR) { |
| 75 | finder = new Finder(editor); |
| 76 | finder->setWrap(true); // Always wrap the search |
| 77 | } |
| 78 | else { |
| 79 | finder->setEditor(editor); |
| 80 | } |
| 81 | |
| 82 | initializeEditorIndicator(); |
| 83 | |
| 84 | positionWidget(); |
| 85 | } |
| 86 | |
| 87 | bool QuickFindWidget::eventFilter(QObject *obj, QEvent *event) |
| 88 | { |