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

Method data

kdevplatform/util/placeholderitemproxymodel.cpp:111–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111QVariant PlaceholderItemProxyModel::data(const QModelIndex& proxyIndex, int role) const
112{
113 Q_D(const PlaceholderItemProxyModel);
114
115 const int column = proxyIndex.column();
116 if (d->isPlaceholderRow(proxyIndex)) {
117 switch (role) {
118 case Qt::DisplayRole:
119 return columnHint(column);
120 case Qt::ForegroundRole: {
121 const KColorScheme scheme(QPalette::Normal);
122 return scheme.foreground(KColorScheme::InactiveText);
123 }
124 default:
125 return QVariant();
126 }
127 }
128 return QIdentityProxyModel::data(proxyIndex, role);
129}
130
131QModelIndex PlaceholderItemProxyModel::parent(const QModelIndex& child) const
132{

Callers

nothing calls this directly

Calls 4

isPlaceholderRowMethod · 0.80
QVariantClass · 0.70
dataFunction · 0.50
columnMethod · 0.45

Tested by

no test coverage detected