QItemSelectionModel: remove some redundant code
QObject::disconnect(connection) already sets connection.d_ptr to
nullptr, and the default constructor only does that:
QMetaObject::Connection::Connection() : d_ptr(nullptr) {}
So calling disconnect() suffices in this case.
Pick-to: 6.6 6.5 6.2
Change-Id: Icd5f9a15c83939eeecd9efb474ac3b38c0f2dfe4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
bb10
parent
b74f180ac0
commit
3bac473364
|
|
@ -595,10 +595,8 @@ void QItemSelectionModelPrivate::initModel(QAbstractItemModel *m)
|
|||
|
||||
void QItemSelectionModelPrivate::disconnectModel()
|
||||
{
|
||||
for (auto &connection : connections) {
|
||||
for (auto &connection : connections)
|
||||
QObject::disconnect(connection);
|
||||
connection = QMetaObject::Connection();
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue