summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-09-22 02:53:25 +0300
committerAhmad Samir <a.samirh78@gmail.com>2023-09-22 22:49:35 +0300
commitf58df0419643f86df44555ece3280e3421ab6da0 (patch)
tree937d1a4109072de084d7689772fdd27169d167ac /src/corelib/itemmodels
parentba98644180bcaf40341a9005abe93575cf45cc5a (diff)
QConcatenateTablesProxyModel: simplify code
If there is a reason to static_cast to `const QAIM*` then cast away the const, I failed to see it. QObject::sender() returns a non-co. Change-Id: Ibf8c8613c3de1584b426269c1ffba94db75d26d6 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r--src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp b/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp
index e6d12cd755..7047a1c1fc 100644
--- a/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp
+++ b/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp
@@ -641,7 +641,7 @@ void QConcatenateTablesProxyModelPrivate::_q_slotSourceLayoutChanged(const QList
void QConcatenateTablesProxyModelPrivate::_q_slotModelAboutToBeReset()
{
Q_Q(QConcatenateTablesProxyModel);
- Q_ASSERT(m_models.contains(const_cast<QAbstractItemModel *>(static_cast<const QAbstractItemModel *>(q->sender()))));
+ Q_ASSERT(m_models.contains(static_cast<QAbstractItemModel *>(q->sender())));
q->beginResetModel();
// A reset might reduce both rowCount and columnCount, and we can't notify of both at the same time,
// and notifying of one after the other leaves an intermediary invalid situation.
@@ -651,7 +651,7 @@ void QConcatenateTablesProxyModelPrivate::_q_slotModelAboutToBeReset()
void QConcatenateTablesProxyModelPrivate::_q_slotModelReset()
{
Q_Q(QConcatenateTablesProxyModel);
- Q_ASSERT(m_models.contains(const_cast<QAbstractItemModel *>(static_cast<const QAbstractItemModel *>(q->sender()))));
+ Q_ASSERT(m_models.contains(static_cast<QAbstractItemModel *>(q->sender())));
m_columnCount = calculatedColumnCount();
m_rowCount = computeRowsPrior(nullptr);
q->endResetModel();