summaryrefslogtreecommitdiffstats
path: root/src/tools/testrunner/testrunner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/testrunner/testrunner.cpp')
-rw-r--r--src/tools/testrunner/testrunner.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/testrunner/testrunner.cpp b/src/tools/testrunner/testrunner.cpp
index 59d8d072..ce10cefd 100644
--- a/src/tools/testrunner/testrunner.cpp
+++ b/src/tools/testrunner/testrunner.cpp
@@ -118,6 +118,18 @@ void AmTest::ignoreMessage(MsgType type, const QRegExp &expression)
#endif
}
+int AmTest::observeObjectDestroyed(QObject *obj)
+{
+ static int idx = 0;
+ int index = idx++;
+
+ connect(obj, &QObject::destroyed, [this, index] () {
+ emit objectDestroyed(index);
+ });
+
+ return index;
+}
+
QTestRootObject::QTestRootObject(QObject *parent)
: QObject(parent)