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

Method attributeForDepth

kdevplatform/language/highlighting/codehighlighting.cpp:315–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315KTextEditor::Attribute::Ptr CodeHighlighting::attributeForDepth(int depth) const
316{
317 while (depth >= m_depthAttributes.count()) {
318 KTextEditor::Attribute::Ptr a(new KTextEditor::Attribute());
319 a->setBackground(QColor(Qt::white).darker(100 + (m_depthAttributes.count() * 25)));
320 a->setBackgroundFillWhitespace(true);
321 if (depth % 2)
322 a->setOutline(Qt::red);
323 m_depthAttributes.append(a);
324 }
325
326 return m_depthAttributes[depth];
327}
328
329KDevelop::Declaration* CodeHighlightingInstance::localClassFromCodeContext(KDevelop::DUContext* context) const
330{

Callers 1

testInitializationMethod · 0.80

Calls 3

QColorClass · 0.85
countMethod · 0.45
appendMethod · 0.45

Tested by 1

testInitializationMethod · 0.64