diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-09-08 13:58:07 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-11-13 11:32:16 +0000 |
commit | 1b97b5e4d3757e5e5ca85032c133009dea9de945 (patch) | |
tree | e6f68378b0a826025aa03dfd9b300161a53746e5 | |
parent | fa9912f3ad774bf71230ce9239b1e548c572c61a (diff) | |
download | qt-creator-1b97b5e4d3757e5e5ca85032c133009dea9de945.tar.gz |
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>
-rw-r--r-- | plugins/autotest/testcodeparser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/autotest/testcodeparser.cpp b/plugins/autotest/testcodeparser.cpp index b5451aef8e..975b92de92 100644 --- a/plugins/autotest/testcodeparser.cpp +++ b/plugins/autotest/testcodeparser.cpp @@ -480,8 +480,12 @@ void TestCodeParser::checkDocumentForTestCode(CPlusPlus::Document::Ptr document) visitor.accept(declaringDoc->globalNamespace()); const QMap<QString, TestCodeLocationAndType> testFunctions = visitor.privateSlots(); - const QMap<QString, TestCodeLocationList> dataTags = + QMap<QString, TestCodeLocationList> dataTags = checkForDataTags(declaringDoc->fileName(), testFunctions); + + if (declaringDoc->fileName() != document->fileName()) + dataTags.unite(checkForDataTags(document->fileName(), testFunctions)); + TestTreeItem *item = constructTestTreeItem(declaringDoc->fileName(), QString(), testCaseName, line, column, testFunctions, dataTags); |