forked from qt-creator/qt-creator
TaskModel: Remove updateMapping calls that lead to bad performance
Those were missed in 48255c9229
Task-number: QTCREATORBUG-12109
Change-Id: Ie0cf9026038dd6627593c8dd14ab52d6c1ff19cf
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -362,7 +362,6 @@ int TaskFilterModel::rowCount(const QModelIndex &parent) const
|
|||||||
if (parent.isValid())
|
if (parent.isValid())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
updateMapping();
|
|
||||||
return m_mapping.count();
|
return m_mapping.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,7 +454,6 @@ void TaskFilterModel::handleReset()
|
|||||||
|
|
||||||
QModelIndex TaskFilterModel::mapFromSource(const QModelIndex &idx) const
|
QModelIndex TaskFilterModel::mapFromSource(const QModelIndex &idx) const
|
||||||
{
|
{
|
||||||
updateMapping();
|
|
||||||
QList<int>::const_iterator it = qBinaryFind(m_mapping.constBegin(), m_mapping.constEnd(), idx.row());
|
QList<int>::const_iterator it = qBinaryFind(m_mapping.constBegin(), m_mapping.constEnd(), idx.row());
|
||||||
if (it == m_mapping.constEnd())
|
if (it == m_mapping.constEnd())
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
@@ -464,7 +462,6 @@ QModelIndex TaskFilterModel::mapFromSource(const QModelIndex &idx) const
|
|||||||
|
|
||||||
QModelIndex TaskFilterModel::mapToSource(const QModelIndex &index) const
|
QModelIndex TaskFilterModel::mapToSource(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
updateMapping();
|
|
||||||
int row = index.row();
|
int row = index.row();
|
||||||
if (row >= m_mapping.count())
|
if (row >= m_mapping.count())
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
|
|||||||
Reference in New Issue
Block a user