qdoc: Fix Q_PROPERTY parsing
authorTopi Reinio <topi.reinio@digia.com>
Mon, 30 Dec 2013 11:53:40 +0000 (03:53 -0800)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 31 Dec 2013 19:37:46 +0000 (20:37 +0100)
commit631c3dbc800bb9b2e3b227c0a09523f0f7eef0b7
tree283b012e3c8babe0fdb86a40d83b001e6a3ef4c6
parent080096590b9bc30fcbaba1bb140f6aee20418e7a
qdoc: Fix Q_PROPERTY parsing

When parsing Q_PROPERTY declarations, qdoc tries to always
read an associated value for each matched keyword. This
fails for property declarations including a CONSTANT or
FINAL, as they have no associated values.

This change fixes the above problem and makes the parsing
more robust by checking the return value of matchProperty()
and skipping to closing parenthesis in case of failure.

Task-number: QTBUG-35722
Change-Id: Ia483b8e74aeef19b2e761b21473cd4f765cdca19
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
src/tools/qdoc/cppcodeparser.cpp