| 109 | } |
| 110 | |
| 111 | void StaticAssistantsManagerPrivate::textInserted(Document* doc, const Cursor& cursor, const QString& text) |
| 112 | { |
| 113 | auto changed = false; |
| 114 | for (auto& assistant : std::as_const(m_registeredAssistants)) { |
| 115 | auto range = Range(cursor, cursor + Cursor(0, text.size())); |
| 116 | auto wasUseful = assistant->isUseful(); |
| 117 | assistant->textChanged(doc, range, {}); |
| 118 | if (wasUseful != assistant->isUseful()) { |
| 119 | changed = true; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | if (changed) { |
| 124 | Q_EMIT q->problemsChanged(IndexedString(doc->url())); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | void StaticAssistantsManagerPrivate::textRemoved(Document* doc, const Range& range, |
| 129 | const QString& removedText) |
nothing calls this directly
no test coverage detected