MCPcopy Create free account
hub / github.com/KDE/kdevelop / textInserted

Method textInserted

kdevplatform/language/assistant/staticassistantsmanager.cpp:111–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void 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
128void StaticAssistantsManagerPrivate::textRemoved(Document* doc, const Range& range,
129 const QString& removedText)

Callers

nothing calls this directly

Calls 7

RangeClass · 0.70
CursorClass · 0.50
IndexedStringClass · 0.50
sizeMethod · 0.45
isUsefulMethod · 0.45
textChangedMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected