qt5base-lts/tests/auto/widgets/itemviews/qabstractitemview
Raschbauer, Reinhard 52c66e8515 QAbstractItemView: fix nullptr violation
If in a slot connected to QAbstractItemView::clicked
QAbstractItemView::setModel(nullptr) is called the method
QAbstractItemView::mouseReleaseEvent will cause a segmentation fault.
The problem is that the method QAbstractItemView::model used in
QAbstractItemView::mouseReleaseEvent will return a nullptr if a null
model was set. The solution is to used d->model since it is always a
valid model. (See line d->model =
(model ? model : QAbstractItemModelPrivate::staticEmptyModel());
in method QAbstractItemView::setModel)

Change-Id: I6f01bdeac64495ee4a76adcc7bf8da8a7719ef4d
Reviewed-by: David Faure <david.faure@kdab.com>
2017-08-04 08:36:29 +00:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
qabstractitemview.pro Do not run tst_qabstractitemview in parallel 2014-03-19 01:02:03 +01:00
tst_qabstractitemview.cpp QAbstractItemView: fix nullptr violation 2017-08-04 08:36:29 +00:00