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

Method data

kdevplatform/shell/loadedpluginsdialog.cpp:73–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override
74 {
75 KDevelop::IPlugin* plugin = pluginForIndex(index);
76 if (!plugin)
77 return QVariant();
78
79 switch (role) {
80 case Qt::DisplayRole:
81 return displayName(plugin);
82 case DescriptionRole:
83 return pluginInfo(plugin).description();
84 case Qt::DecorationRole: {
85 const QString iconName = pluginInfo(plugin).iconName();
86 if (iconName.isEmpty()) {
87 return QStringLiteral("kdevelop");
88 }
89 return iconName;
90 }
91 default:
92 return QVariant();
93 };
94 }
95
96 int rowCount(const QModelIndex& parent = QModelIndex()) const override
97 {

Callers 1

paintFunction · 0.45

Calls 6

displayNameFunction · 0.85
pluginInfoFunction · 0.85
QVariantClass · 0.50
descriptionMethod · 0.45
iconNameMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected