MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / setSymbols

Method setSymbols

gui/codeeditor.cpp:182–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182void Highlighter::setSymbols(const QStringList &symbols)
183{
184 mHighlightingRulesWithSymbols = mHighlightingRules;
185 for (const QString &sym : symbols) {
186 HighlightingRule rule;
187 rule.pattern = QRegularExpression("\\b" + sym + "\\b");
188 rule.format = mSymbolFormat;
189 rule.ruleRole = RuleRole::Symbol;
190 mHighlightingRulesWithSymbols.append(rule);
191 }
192}
193
194void Highlighter::setStyle(const CodeEditorStyle &newStyle)
195{

Callers 1

setErrorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected