TestResult: Devirtualize the class - part 4 of 5

Step 4 - implement intermediateHook.

Change-Id: I2a0d921cc16b109fd6f72c3831d0564c761bb006
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Jarek Kobus
2023-01-14 13:03:19 +01:00
parent 01828cfd8e
commit 2b99ba1db7
8 changed files with 33 additions and 28 deletions

View File

@@ -170,6 +170,8 @@ bool TestResult::isDirectParentOf(const TestResult *other, bool *needsIntermedia
bool TestResult::isIntermediateFor(const TestResult *other) const
{
QTC_ASSERT(other, return false);
if (m_hooks.intermediate)
return m_hooks.intermediate(*this, *other);
return !m_id.isEmpty() && m_id == other->m_id && m_name == other->m_name;
}