Changeset View
Changeset View
Standalone View
Standalone View
infokcmmodel.cpp
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Line(s) | 154 | { | |||
---|---|---|---|---|---|
159 | KcmTreeItem *item = static_cast<KcmTreeItem*>(index.internalPointer()); | 159 | KcmTreeItem *item = static_cast<KcmTreeItem*>(index.internalPointer()); | ||
160 | 160 | | |||
161 | switch(role) { | 161 | switch(role) { | ||
162 | case Qt::DisplayRole: | 162 | case Qt::DisplayRole: | ||
163 | return item->data(); | 163 | return item->data(); | ||
164 | case Qt::UserRole: | 164 | case Qt::UserRole: | ||
165 | return item->weight(); | 165 | return item->weight(); | ||
166 | case Qt::DecorationRole: | 166 | case Qt::DecorationRole: | ||
167 | return item->icon(); | 167 | return QIcon::fromTheme(item->iconName()); | ||
168 | default: | 168 | default: | ||
169 | return QVariant(); | 169 | return QVariant(); | ||
170 | } | 170 | } | ||
171 | } | 171 | } | ||
172 | 172 | | |||
173 | QVariant InfoKcmModel::headerData(int section, Qt::Orientation orientation, int role) const | 173 | QVariant InfoKcmModel::headerData(int section, Qt::Orientation orientation, int role) const | ||
174 | { | 174 | { | ||
175 | Q_UNUSED(section); | 175 | Q_UNUSED(section); | ||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |