diff options
| author | David Hallas <[email protected]> | 2019-02-16 16:50:42 +0100 |
|---|---|---|
| committer | David Hallas <[email protected]> | 2019-02-18 08:58:11 +0100 |
| commit | c72fdaa77380ef811dfef626a4edadbb824ed252 (patch) | |
| tree | 8ad301a9cc9cb250d0a10a652fc1faece33eda5b /src/kitemviews/kitemlistviewaccessible.h | |
| parent | 6e88d7cef072e1b504f5d428a2ce7d8aff736a8d (diff) | |
Fix crash during shutdown
Summary:
Fix crash during shutdown. The root cause is that when Dolphin in stopped as
part of an activity, the KItemListViewAccessible destructor is called after
QApplication::exec has returned causing Qt to already having cleaned up the
QAccessibleInterface instances kept in KItemListViewAccessible. Instead of
storing the pointers to QAccessibleInterface we store the QAccessible::Id so
that we can use the QAccessible::deleteAccessibleInterface function for
deleting the instances.
BUG: 402784
Test Plan:
I wasn't able to reproduce the crash in the first place, but I have just
opened and closed Dolphin a few times and verified the the QAccessibleInterface
instances are correctly cleaned up.
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, elvisangelaccio
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D19083
Diffstat (limited to 'src/kitemviews/kitemlistviewaccessible.h')
| -rw-r--r-- | src/kitemviews/kitemlistviewaccessible.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistviewaccessible.h b/src/kitemviews/kitemlistviewaccessible.h index fdc3ff1a3..3e39e2399 100644 --- a/src/kitemviews/kitemlistviewaccessible.h +++ b/src/kitemviews/kitemlistviewaccessible.h @@ -86,7 +86,13 @@ protected: inline QAccessibleInterface* cell(int index) const; private: - mutable QVector<QAccessibleInterface*> m_cells; + class AccessibleIdWrapper { + public: + AccessibleIdWrapper(); + bool isValid; + QAccessible::Id id; + }; + mutable QVector<AccessibleIdWrapper> m_cells; }; class DOLPHIN_EXPORT KItemListAccessibleCell: public QAccessibleInterface, public QAccessibleTableCellInterface |
