summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Keywords.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-03-25 11:50:17 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2009-03-25 11:50:17 +0100
commit424dd77e18468a0516f1dbce10bcd3c25f979cf5 (patch)
tree14727ba29f39dfb03e34404264980088498179db /src/shared/cplusplus/Keywords.cpp
parent014efbdab0cce09f9c5c4b084cbb801f43d9ef7f (diff)
downloadqt-creator-424dd77e18468a0516f1dbce10bcd3c25f979cf5.tar.gz
Added support for Q_SIGNAL and Q_SLOT.
Diffstat (limited to 'src/shared/cplusplus/Keywords.cpp')
-rw-r--r--src/shared/cplusplus/Keywords.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Keywords.cpp b/src/shared/cplusplus/Keywords.cpp
index 28cd42227b..57d3b56961 100644
--- a/src/shared/cplusplus/Keywords.cpp
+++ b/src/shared/cplusplus/Keywords.cpp
@@ -532,6 +532,19 @@ static inline int classify6(const char *s, bool q) {
}
}
}
+ else if (q && s[0] == 'Q') {
+ if (s[1] == '_') {
+ if (s[2] == 'S') {
+ if (s[3] == 'L') {
+ if (s[4] == 'O') {
+ if (s[5] == 'T') {
+ return T_Q_SLOT;
+ }
+ }
+ }
+ }
+ }
+ }
return T_IDENTIFIER;
}
@@ -850,6 +863,23 @@ static inline int classify8(const char *s, bool) {
}
}
}
+ else if (s[0] == 'Q') {
+ if (s[1] == '_') {
+ if (s[2] == 'S') {
+ if (s[3] == 'I') {
+ if (s[4] == 'G') {
+ if (s[5] == 'N') {
+ if (s[6] == 'A') {
+ if (s[7] == 'L') {
+ return T_Q_SIGNAL;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return T_IDENTIFIER;
}