aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-09-06 13:41:44 -0400
committerKen Moore <ken@pcbsd.org>2016-09-06 13:41:44 -0400
commit79083e6a77f403ca606ae45d3fa933ad26fd6547 (patch)
treee48de5f4d64a8ba6cd08c502d57eb62937ea3cdd /src-qt5/desktop-utils/lumina-textedit
parentClean up a bit more of the syntaxhighlighting rules - ensuring that single-li... (diff)
downloadlumina-79083e6a77f403ca606ae45d3fa933ad26fd6547.tar.gz
lumina-79083e6a77f403ca606ae45d3fa933ad26fd6547.tar.bz2
lumina-79083e6a77f403ca606ae45d3fa933ad26fd6547.zip
Another couple quick fixes for the C/C++ regex rules: don't highlight the Qt classes anymore (Q*), and instead use that rule to highlight any subclass definitions (*::).
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp
index 60f5af57..695730f7 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp
@@ -52,7 +52,7 @@ void Custom_Syntax::loadRules(QString type){
if(type=="C++"){
//Keywords (standard C/C++/Qt definitions)
QStringList keywords;
- keywords << "char" << "class" << "const" << "double" << "enum" << "explicit" << "friend" << "inline" \
+ keywords << "char" << "class" << "const" << "double" << "enum" << "explicit" << "extern" << "friend" << "inline" \
<< "int" << "long" << "namespace" << "operator" << "private" << "protected" << "public" \
<< "short" << "signals" << "signed" << "slots" << "static" << "struct" << "template" \
<< "typedef" << "typename" << "union" << "unsigned" << "virtual" << "void" << "volatile" \
@@ -75,7 +75,7 @@ void Custom_Syntax::loadRules(QString type){
}
//Class Names
rule.format.setForeground( QColor(settings->value("colors/class").toString()) );
- rule.pattern = QRegExp("\\bQ[A-Za-z]+\\b");
+ rule.pattern = QRegExp("\\b[A-Za-z0-9_-\\.]+(?=::)\\b");
rules << rule;
//Quotes
rule.format.setForeground( QColor(settings->value("colors/text").toString()) );
bgstack15