AutoTest: Handle re-implemented test functions appropriate

If a derived test case implements the same private slot as one of
its base classes one of these information got lost as both were
using the same key to store the information at.
Additionally take care of what is possible and sensible when using
QtTest and deriving test cases from others.

Task-number: QTCREATORBUG-17522
Change-Id: I0d2a47c820d5eb002f8bdd851a07a4774e9838f0
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2017-01-05 10:34:03 +01:00
parent e0c4f87e6e
commit 92db5afba4
2 changed files with 66 additions and 17 deletions

View File

@@ -84,7 +84,7 @@ bool TestVisitor::visit(CPlusPlus::Class *symbol)
else
locationAndType.m_type = TestTreeItem::TestFunctionOrSet;
locationAndType.m_inherited = m_inherited;
m_privSlots.insert(name, locationAndType);
m_privSlots.insert(className + "::" + name, locationAndType);
}
}
for (unsigned counter = 0, end = symbol->baseClassCount(); counter < end; ++counter) {