aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest/testresult.h
diff options
context:
space:
mode:
authorJarek Kobus <[email protected]>2023-01-14 13:03:19 +0100
committerJarek Kobus <[email protected]>2023-01-25 09:35:18 +0000
commit2b99ba1db767ae6950a86e538f28a546de6587ef (patch)
tree84a3a343cc36a70c324f6daf8439dfb749a42464 /src/plugins/autotest/testresult.h
parent01828cfd8e47f6c612f83680b65710863167a209 (diff)
TestResult: Devirtualize the class - part 4 of 5
Step 4 - implement intermediateHook. Change-Id: I2a0d921cc16b109fd6f72c3831d0564c761bb006 Reviewed-by: <[email protected]> Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/autotest/testresult.h')
-rw-r--r--src/plugins/autotest/testresult.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/autotest/testresult.h b/src/plugins/autotest/testresult.h
index 34d0b9d0466..23ad1ddd248 100644
--- a/src/plugins/autotest/testresult.h
+++ b/src/plugins/autotest/testresult.h
@@ -65,10 +65,12 @@ struct ResultHooks
using OutputStringHook = std::function<QString(const TestResult &, bool)>;
using FindTestItemHook = std::function<ITestTreeItem *(const TestResult &)>;
using DirectParentHook = std::function<bool(const TestResult &, const TestResult &, bool *)>;
+ using IntermediateHook = std::function<bool(const TestResult &, const TestResult &)>;
+ QVariant extraData;
OutputStringHook outputString;
FindTestItemHook findTestItem;
DirectParentHook directParent;
- QVariant extraData;
+ IntermediateHook intermediate = {};
};
class TestResult
@@ -100,7 +102,7 @@ public:
static QColor colorForType(const ResultType type);
bool isDirectParentOf(const TestResult *other, bool *needsIntermediate) const;
- virtual bool isIntermediateFor(const TestResult *other) const;
+ bool isIntermediateFor(const TestResult *other) const;
virtual TestResult *createIntermediateResultFor(const TestResult *other) const;
private: