AutoTest: Make results tree a real tree

Provide a way to control how the results tree will be
generated for the respective test framework and use
this information to construct a real tree.
Basically this changes the layout of Qt test results,
but keeps the former layout of Google test results.

Task-number: QTCREATORBUG-17104
Change-Id: I7fca4d8e365bfebcca4cf7855cf6a882e5379143
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Stenger
2016-10-31 13:11:52 +01:00
parent 5b6e9671d7
commit cdd94cbb02
12 changed files with 269 additions and 99 deletions

View File

@@ -25,6 +25,7 @@
#include "testresult.h"
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
namespace Autotest {
@@ -158,5 +159,24 @@ QColor TestResult::colorForType(const Result::Type type)
}
}
bool TestResult::isDirectParentOf(const TestResult *other, bool * /*needsIntermediate*/) const
{
QTC_ASSERT(other, return false);
return m_name == other->m_name;
}
bool TestResult::isIntermediateFor(const TestResult *other) const
{
QTC_ASSERT(other, return false);
return m_name == other->m_name;
}
TestResult *TestResult::createIntermediateResultFor(const TestResult *other)
{
QTC_ASSERT(other, return 0);
TestResult *intermediate = new TestResult(other->m_name);
return intermediate;
}
} // namespace Internal
} // namespace Autotest