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

Method data

kdevplatform/documentation/documentationview.cpp:347–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347QVariant ProvidersModel::data(const QModelIndex& index, int role) const
348{
349 if (index.row() >= mProviders.count() || index.row() < 0)
350 return QVariant();
351
352 QVariant ret;
353 switch (role)
354 {
355 case Qt::DisplayRole:
356 ret = provider(index.row())->name();
357 break;
358 case Qt::DecorationRole:
359 ret = provider(index.row())->icon();
360 break;
361 }
362 return ret;
363}
364
365void ProvidersModel::addProvider(IDocumentationProvider* provider)
366{

Callers 2

setDocumentationMethod · 0.45
changedSelectionMethod · 0.45

Calls 5

QVariantClass · 0.50
rowMethod · 0.45
countMethod · 0.45
nameMethod · 0.45
iconMethod · 0.45

Tested by

no test coverage detected