aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Token.cpp
diff options
context:
space:
mode:
authorLeandro Melo <leandro.melo@nokia.com>2012-06-28 10:55:51 +0200
committerLeandro Melo <leandro.melo@nokia.com>2012-06-28 11:49:50 +0200
commit621e5c3dbefef6d90ce02229aeff2da16309d541 (patch)
treef101e2b881d17467b20ba25d516945670ede9e20 /src/libs/3rdparty/cplusplus/Token.cpp
parentd1971174d4d475e48c6f922e9aefab933a8581af (diff)
C++: Parse emit/Q_EMIT properly
The parser now understands emit/Q_EMIT as an expression statement. Also, the recent fixes in the preprocessor introduced a side-effect in the hanlding of code such as: emit signal(); Member signal started being treated as a local use (parsed as a declaration) and possibily being highlighted as unused variable. Previously that worked by accident since there was an inconsistency in the preprocessor on which only object-like macros were being expanded even when the "no expand" flag was set. Then, the code mentioned above was being parsed as an expression, what kind of worked. Change-Id: I47a68ed4c1c1702872620b8ed7c7264fb0997034 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Token.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/Token.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/3rdparty/cplusplus/Token.cpp b/src/libs/3rdparty/cplusplus/Token.cpp
index 5183de593a..9021002483 100644
--- a/src/libs/3rdparty/cplusplus/Token.cpp
+++ b/src/libs/3rdparty/cplusplus/Token.cpp
@@ -71,10 +71,10 @@ static const char *token_names[] = {
("@synchronized"), ("@synthesize"), ("@throw"), ("@try"),
// Qt keywords
- ("SIGNAL"), ("SLOT"), ("Q_SIGNAL"), ("Q_SLOT"), ("signals"), ("slots"),
+ ("emit"), ("SIGNAL"), ("SLOT"), ("Q_SIGNAL"), ("Q_SLOT"), ("signals"), ("slots"),
("Q_FOREACH"), ("Q_D"), ("Q_Q"),
("Q_INVOKABLE"), ("Q_PROPERTY"), ("T_Q_PRIVATE_PROPERTY"),
- ("Q_INTERFACES"), ("Q_ENUMS"), ("Q_FLAGS"),
+ ("Q_INTERFACES"), ("Q_EMIT"), ("Q_ENUMS"), ("Q_FLAGS"),
("Q_PRIVATE_SLOT"), ("Q_DECLARE_INTERFACE"), ("Q_OBJECT"), ("Q_GADGET"),
};