summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@theqtcompany.com>2015-10-29 10:20:53 +0100
committerChristian Stenger <christian.stenger@theqtcompany.com>2015-11-02 11:28:23 +0000
commit33d1a8c3075712b9fac34a70ba136a012686a6fa (patch)
treebc046485c4a562779e5eac85f48ff5160cd5c9a9
parent11a3479b2a944d429bdd89fdc4aa13f3ef9c9a8e (diff)
downloadqt-creator-33d1a8c3075712b9fac34a70ba136a012686a6fa.tar.gz
Fix support for data tags
Functions defined within the declaration or inside a namespace had no qualified name stored by the visitor. This lead to ignoring them when creating the respective TestTreeItem. Change-Id: Id57c0c492a0cba460aa2d47dc7283bb1ac6e4aa6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
-rw-r--r--plugins/autotest/testvisitor.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/autotest/testvisitor.cpp b/plugins/autotest/testvisitor.cpp
index 3fe84cb077..7102476a7d 100644
--- a/plugins/autotest/testvisitor.cpp
+++ b/plugins/autotest/testvisitor.cpp
@@ -177,15 +177,14 @@ bool TestDataFunctionVisitor::visit(CPlusPlus::FunctionDefinitionAST *ast)
{
if (ast->declarator) {
CPlusPlus::DeclaratorIdAST *id = ast->declarator->core_declarator->asDeclaratorId();
- if (!id)
+ if (!id || !ast->symbol || ast->symbol->argumentCount() != 0)
return false;
- const QString prettyName = m_overview.prettyName(id->name->name);
+ CPlusPlus::LookupContext lc;
+ const QString prettyName = m_overview.prettyName(lc.fullyQualifiedName(ast->symbol));
// do not handle functions that aren't real test data functions
- if (!prettyName.endsWith(QLatin1String("_data")) || !ast->symbol
- || ast->symbol->argumentCount() != 0) {
+ if (!prettyName.endsWith(QLatin1String("_data")))
return false;
- }
m_currentFunction = prettyName.left(prettyName.size() - 5);
m_currentTags.clear();