diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-04-18 17:01:22 +0200 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2017-04-23 10:11:01 +0000 |
commit | 88b6abcebf29b455438d8da7db9fd5aa1aed2bf5 (patch) | |
tree | 64e7428da4636db6f3d5fe577b887966df816beb /src/gui/itemmodels/qstandarditemmodel_p.h | |
parent | 41eefd7493bf0119a4fd1a069e31ab4f2c4d10f9 (diff) | |
download | qtbase-88b6abcebf29b455438d8da7db9fd5aa1aed2bf5.tar.gz |
Fix UB in QStandardItemModel
The destructor of QStandardItem needs to access the model. So we need to
destroy them before the QStrandardItemModel gets destroyed.
In the destructor of the private, it is already too late because we are
already in the ~QObject
Since the destructor of QStandardItemPrivate is now empty, remove it
completely. There is no need for QStandardItemPrivate to have a virtual
table as there are no class that inherit from it.
Change-Id: Id6639e21f277f1c4e85c3f9bc720b4f29eb16c2c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui/itemmodels/qstandarditemmodel_p.h')
-rw-r--r-- | src/gui/itemmodels/qstandarditemmodel_p.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel_p.h b/src/gui/itemmodels/qstandarditemmodel_p.h index fbba93b93a..516cce8613 100644 --- a/src/gui/itemmodels/qstandarditemmodel_p.h +++ b/src/gui/itemmodels/qstandarditemmodel_p.h @@ -105,7 +105,6 @@ public: q_ptr(0), lastIndexOf(2) { } - virtual ~QStandardItemPrivate(); inline int childIndex(int row, int column) const { if ((row < 0) || (column < 0) |