diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2012-08-30 15:04:25 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-08-30 15:34:04 +0200 |
commit | 813539a70a45ba04ec982d4ad9aabb0842c00df5 (patch) | |
tree | 9444b1de454a4d91f353b0380a8e1c58cacb1c4a /src/libs/3rdparty/cplusplus/Keywords.cpp | |
parent | e160d286f88c7e415e72afe736bf147049c0e322 (diff) |
C++: Fix lexer for token Q_SLOT
When adding Q_EMIT a while ago the the if chain got messed up
and Q_SLOT was being skipped.
Change-Id: Ib1f49c00290a09286506de9510d0067eaf5e3b96
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Keywords.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Keywords.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/libs/3rdparty/cplusplus/Keywords.cpp b/src/libs/3rdparty/cplusplus/Keywords.cpp index 3d1b50e67a..cac51a4fd6 100644 --- a/src/libs/3rdparty/cplusplus/Keywords.cpp +++ b/src/libs/3rdparty/cplusplus/Keywords.cpp @@ -424,19 +424,6 @@ static inline int classify6(const char *s, bool q, bool) { } } } - else if (q && s[0] == 'Q') { - if (s[1] == '_') { - if (s[2] == 'E') { - if (s[3] == 'M') { - if (s[4] == 'I') { - if (s[5] == 'T') { - return T_Q_EMIT; - } - } - } - } - } - } else if (s[0] == 'r') { if (s[1] == 'e') { if (s[2] == 't') { @@ -545,6 +532,15 @@ static inline int classify6(const char *s, bool q, bool) { } } } + else if (s[2] == 'E') { + if (s[3] == 'M') { + if (s[4] == 'I') { + if (s[5] == 'T') { + return T_Q_EMIT; + } + } + } + } } } return T_IDENTIFIER; |