Fix data tag support for split header and source

If data functions where defined inside the source file when having
source and header split they were simply ignored.

Change-Id: I6d32d3c721f656797a78d3ea740c102d6b93ec88
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-09-08 13:58:07 +02:00
parent fa9912f3ad
commit 1b97b5e4d3

View File

@@ -480,8 +480,12 @@ void TestCodeParser::checkDocumentForTestCode(CPlusPlus::Document::Ptr document)
visitor.accept(declaringDoc->globalNamespace()); visitor.accept(declaringDoc->globalNamespace());
const QMap<QString, TestCodeLocationAndType> testFunctions = visitor.privateSlots(); const QMap<QString, TestCodeLocationAndType> testFunctions = visitor.privateSlots();
const QMap<QString, TestCodeLocationList> dataTags = QMap<QString, TestCodeLocationList> dataTags =
checkForDataTags(declaringDoc->fileName(), testFunctions); checkForDataTags(declaringDoc->fileName(), testFunctions);
if (declaringDoc->fileName() != document->fileName())
dataTags.unite(checkForDataTags(document->fileName(), testFunctions));
TestTreeItem *item = constructTestTreeItem(declaringDoc->fileName(), QString(), TestTreeItem *item = constructTestTreeItem(declaringDoc->fileName(), QString(),
testCaseName, line, column, testFunctions, testCaseName, line, column, testFunctions,
dataTags); dataTags);