AutoTest: Store referencing file inside test tree item

This duplicates (temporarily) the information for referencing files,
but the cache inside the parser will be removed within a later patch.

Change-Id: I7377864547f0d9ce074fa409b9c12067c4329d40
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-01-25 09:30:41 +01:00
parent 3d5bb6d0bb
commit 1caeb9bb63
5 changed files with 56 additions and 1 deletions

View File

@@ -70,6 +70,7 @@ TestTreeItem::TestTreeItem(const TestTreeItem &other)
m_line(other.m_line),
m_column(other.m_column),
m_mainFile(other.m_mainFile),
m_referencingFile(other.m_referencingFile),
m_state(other.m_state)
{
for (int row = 0, count = other.childCount(); row < count; ++row)
@@ -185,6 +186,10 @@ bool TestTreeItem::modifyContent(const TestTreeItem *modified)
m_mainFile = modified->m_mainFile;
hasBeenModified = true;
}
if (m_referencingFile != modified->m_referencingFile) {
m_referencingFile = modified->m_referencingFile;
hasBeenModified = true;
}
if (m_type != modified->m_type) {
m_type = modified->m_type;
hasBeenModified = true;