MCPcopy Create free account
hub / github.com/Qucs/qucs / highlightBlock

Method highlightBlock

qucs/syntax.cpp:248–261  ·  view source on GitHub ↗

---------------------------------------------------

Source from the content-addressed store, hash-verified

246
247// ---------------------------------------------------
248void SyntaxHighlighter::highlightBlock(const QString& text) {
249
250
251foreach (const HighlightingRule &rule, highlightingRules) {
252 QRegExp expression(rule.pattern);
253 int index = expression.indexIn(text);
254 while (index >= 0) {
255 int length = expression.matchedLength();
256 setFormat(index, length, rule.format);
257 index = expression.indexIn(text, index + length);
258 }
259 }
260
261}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected