summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-05-21 14:56:43 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-05-23 10:46:03 +0000
commit3f7741000ccf058212da26c7dc4ab4c8b4c9c0f3 (patch)
tree38fe934cd4dde30d0e72abce67b473f0a6da5e46 /src/gui/accessible
parentffde36c9a31c488eb327a86a7437a6aa3665b452 (diff)
QTestAccessible: Clear objects in EventList when deleted
The list persists events, which reference objects. Those objects might get deleted by the time we investigate the objects. We cannot change the event to store a QPointer for BIC reasons, and for normal usage of the events, that doesn't make sense either. Instead, connect the objects destroyed signal to a lambda which clears the events' object member. In order to access the private member, we befriend the test class. Change-Id: I036be7053dccde4bdf862173789564e89d729ee1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/qaccessible.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 093a48e211..c47ff41207 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -715,6 +715,7 @@ protected:
QAccessible::Id m_uniqueId;
};
+ friend class QTestAccessibility;
};
class Q_GUI_EXPORT QAccessibleStateChangeEvent :public QAccessibleEvent