MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / highlightBlock

Method highlightBlock

syncthingwidgets/misc/diffhighlighter.cpp:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void DiffHighlighter::highlightBlock(const QString &text)
29{
30 if (text.startsWith(QChar('-'))) {
31 setFormat(0, static_cast<int>(text.size()), QColor(Qt::red));
32 } else if (text.startsWith(QChar('+'))) {
33 setFormat(0, static_cast<int>(text.size()), QColor(Qt::green));
34 }
35}
36
37} // namespace QtGui

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected