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

Method changedSelection

kdevplatform/documentation/documentationview.cpp:190–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190void DocumentationView::changedSelection(const QModelIndex& idx)
191{
192 if (idx.isValid()) {
193 // Skip view update if user try to show already opened documentation
194 mIdentifiers->setText(idx.data(Qt::DisplayRole).toString());
195 if (mIdentifiers->text() == (*mCurrent)->name()) {
196 return;
197 }
198
199 IDocumentationProvider* prov = mProvidersModel->provider(mProviders->currentIndex());
200 auto doc = prov->documentationForIndex(idx);
201 if (doc) {
202 showDocumentation(doc);
203 }
204 }
205}
206
207void DocumentationView::showDocumentation(const IDocumentation::Ptr& doc)
208{

Callers

nothing calls this directly

Calls 9

isValidMethod · 0.45
setTextMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
textMethod · 0.45
nameMethod · 0.45
providerMethod · 0.45
currentIndexMethod · 0.45
documentationForIndexMethod · 0.45

Tested by

no test coverage detected