| 188 | } |
| 189 | |
| 190 | void 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 | |
| 207 | void DocumentationView::showDocumentation(const IDocumentation::Ptr& doc) |
| 208 | { |
nothing calls this directly
no test coverage detected