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

Method highlighting

plugins/quickopen/projectfilequickopen.cpp:114–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114QList<QVariant> ProjectFileData::highlighting() const
115{
116 QTextCharFormat boldFormat;
117 boldFormat.setFontWeight(QFont::Bold);
118 QTextCharFormat normalFormat;
119
120 QString txt = text();
121
122 int fileNameLength = m_file.path.lastPathSegment().length();
123
124 const QList<QVariant> ret{
125 0,
126 txt.length() - fileNameLength,
127 QVariant(normalFormat),
128 txt.length() - fileNameLength,
129 fileNameLength,
130 QVariant(boldFormat),
131 };
132 return ret;
133}
134
135QWidget* ProjectFileData::expandingWidget() const
136{

Callers 1

dataMethod · 0.45

Calls 3

lastPathSegmentMethod · 0.80
QVariantClass · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected