aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Parser.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-10-08 13:42:39 +0200
committerNikolai Kosjar <nikolai.kosjar@digia.com>2013-10-09 15:13:31 +0200
commit0e4deaba2356e0baec5d6e65dabf503bf6f7c3bc (patch)
treedab8ff508e9aba1e4ae06711fcf0f1555e2db9f8 /src/libs/3rdparty/cplusplus/Parser.cpp
parentc5dfcce948dd40dac4f1a22d97a53afc5c6b7494 (diff)
C++: Parse MEMBER in Q_PROPERTY()
MEMBER was added in Qt5. Task-number: QTCREATORBUG-10068 Change-Id: Ic6c15a0e5ee8981ab98e4c12fc1521dc281b731f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Parser.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/Parser.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp
index b67920266f..bf79803854 100644
--- a/src/libs/3rdparty/cplusplus/Parser.cpp
+++ b/src/libs/3rdparty/cplusplus/Parser.cpp
@@ -2138,16 +2138,17 @@ bool Parser::parseAccessDeclaration(DeclarationAST *&node)
/*
Q_PROPERTY(type name
- READ getFunction
- [WRITE setFunction]
- [RESET resetFunction]
- [NOTIFY notifySignal]
- [DESIGNABLE bool]
- [SCRIPTABLE bool]
- [STORED bool]
- [USER bool]
- [CONSTANT]
- [FINAL])
+ (READ getFunction [WRITE setFunction]
+ | MEMBER memberName [(READ getFunction | WRITE setFunction)])
+ [RESET resetFunction]
+ [NOTIFY notifySignal]
+ [REVISION int]
+ [DESIGNABLE bool]
+ [SCRIPTABLE bool]
+ [STORED bool]
+ [USER bool]
+ [CONSTANT]
+ [FINAL])
Note that "type" appears to be any valid type. So these are valid:
Q_PROPERTY(const char *zoo READ zoo)
@@ -2155,7 +2156,8 @@ bool Parser::parseAccessDeclaration(DeclarationAST *&node)
Furthermore, the only restriction on the order of the items in between the
parenthesis is that the type is the first parameter and the name comes after
- the type.
+ the type. Especially, there seems to be no restriction on the READ/WRITE/MEMBER
+ order.
*/
bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node)
{
@@ -2201,6 +2203,7 @@ bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node)
switch (peekAtQtContextKeyword()) {
case Token_READ:
case Token_WRITE:
+ case Token_MEMBER:
case Token_RESET:
case Token_NOTIFY:
case Token_REVISION: