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

Method data

kdevplatform/debugger/variable/variablecollection.cpp:212–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212QVariant Variable::data(int column, int role) const
213{
214 if (m_showError) {
215 if (role == Qt::FontRole) {
216 QVariant ret = TreeItem::data(column, role);
217 QFont font = ret.value<QFont>();
218 font.setStyle(QFont::StyleItalic);
219 return font;
220 } else if (column == VariableCollection::ValueColumn && role == Qt::DisplayRole) {
221 return i18n("Error");
222 }
223 }
224 if (column == VariableCollection::ValueColumn && role == Qt::ForegroundRole) {
225 KColorScheme scheme(QPalette::Active);
226 if (!m_inScope) {
227 return scheme.foreground(KColorScheme::InactiveText).color();
228 } else if (isPotentialProblematicValue()) {
229 return scheme.foreground(KColorScheme::NegativeText).color();
230 } else if (m_changed) {
231 return scheme.foreground(KColorScheme::NeutralText).color();
232 }
233 }
234 if (role == Qt::ToolTipRole) {
235 return TreeItem::data(column, Qt::DisplayRole);
236 }
237
238 return TreeItem::data(column, role);
239}
240
241QString Watches::sectionTitle()
242{

Callers 4

setupActionsMethod · 0.45
selectedVariableMethod · 0.45
contextMenuEventMethod · 0.45
lessThanMethod · 0.45

Calls 1

dataFunction · 0.50

Tested by

no test coverage detected