Skip to content
Snippets Groups Projects
Commit dc1f1cc3 authored by Christian Kamm's avatar Christian Kamm
Browse files

C++: Fix Bind run on QtPropertyDeclarationAST.

Also adjust findusages test to account for QtProperty symbol.

Reviewed-by: Erik Verbruggen
parent 0824a128
No related branches found
No related tags found
No related merge requests found
......@@ -1892,6 +1892,8 @@ bool Bind::visit(QtPropertyDeclarationAST *ast)
for (QtPropertyDeclarationItemListAST *it = ast->property_declaration_item_list; it; it = it->next) {
if (!it->value || !it->value->item_name_token)
continue;
this->expression(it->value->expression);
std::string name = spell(it->value->item_name_token);
if (name == "CONSTANT") {
......
......@@ -180,8 +180,8 @@ void tst_FindUsages::qproperty_1()
Class *tst = doc->globalSymbolAt(0)->asClass();
QVERIFY(tst);
QCOMPARE(tst->memberCount(), 4U);
Function *setX_method = tst->memberAt(1)->asFunction();
QCOMPARE(tst->memberCount(), 5U);
Function *setX_method = tst->memberAt(2)->asFunction();
QVERIFY(setX_method);
QCOMPARE(setX_method->identifier()->chars(), "setX");
QCOMPARE(setX_method->argumentCount(), 1U);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment