Merge remote-tracking branch 'origin/3.6'

Change-Id: I145c4413ab17aa6a91ae7c6b9df44cd3f95f6951
This commit is contained in:
Eike Ziller
2015-11-03 13:04:18 +01:00
2 changed files with 4 additions and 9 deletions

View File

@@ -631,14 +631,10 @@ void TestTreeModel::processChildren(QModelIndex &parentIndex, const TestTreeItem
// handle data tags - just remove old and add them // handle data tags - just remove old and add them
if (modifiedChild->childCount() || toBeModifiedChild->childCount()) { if (modifiedChild->childCount() || toBeModifiedChild->childCount()) {
beginRemoveRows(child, 0, toBeModifiedChild->childCount());
toBeModifiedChild->removeChildren(); toBeModifiedChild->removeChildren();
endRemoveRows();
const int count = modifiedChild->childCount(); const int count = modifiedChild->childCount();
beginInsertRows(child, 0, count);
for (int childRow = 0; childRow < count; ++childRow) for (int childRow = 0; childRow < count; ++childRow)
toBeModifiedChild->appendChild(new TestTreeItem(*modifiedChild->childItem(childRow))); toBeModifiedChild->appendChild(new TestTreeItem(*modifiedChild->childItem(childRow)));
endInsertRows();
} }
if (checkStates.contains(toBeModifiedChild->name())) { if (checkStates.contains(toBeModifiedChild->name())) {

View File

@@ -177,15 +177,14 @@ bool TestDataFunctionVisitor::visit(CPlusPlus::FunctionDefinitionAST *ast)
{ {
if (ast->declarator) { if (ast->declarator) {
CPlusPlus::DeclaratorIdAST *id = ast->declarator->core_declarator->asDeclaratorId(); CPlusPlus::DeclaratorIdAST *id = ast->declarator->core_declarator->asDeclaratorId();
if (!id) if (!id || !ast->symbol || ast->symbol->argumentCount() != 0)
return false; 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 // do not handle functions that aren't real test data functions
if (!prettyName.endsWith(QLatin1String("_data")) || !ast->symbol if (!prettyName.endsWith(QLatin1String("_data")))
|| ast->symbol->argumentCount() != 0) {
return false; return false;
}
m_currentFunction = prettyName.left(prettyName.size() - 5); m_currentFunction = prettyName.left(prettyName.size() - 5);
m_currentTags.clear(); m_currentTags.clear();