Commit 6b0d9f70 authored by Eike Ziller's avatar Eike Ziller

Locator: Fix data processing from multiple filters

The tree view uses a connection to rowsInserted internally for updating
the view, so we may only remove our specific connection to updateSize.
Otherwise the view stops showing items after the first rowsInserted.

Task-number: QTCREATORBUG-18522
Change-Id: Ib80fa39ee5556221a447db3556495a3608e3f62b
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent af986522
......@@ -123,6 +123,9 @@ public:
void keyPressEvent(QKeyEvent *event);
bool eventFilter(QObject *watched, QEvent *event);
private:
QMetaObject::Connection m_updateSizeConnection;
};
class TopLeftLocatorPopup : public LocatorPopup
......@@ -265,7 +268,7 @@ void CompletionList::setModel(QAbstractItemModel *newModel)
const QStyleOptionViewItem &option = viewOptions();
const QSize shint = itemDelegate()->sizeHint(option, model()->index(0, 0));
setFixedHeight(shint.height() * 17 + frameWidth() * 2);
disconnect(model(), &QAbstractItemModel::rowsInserted, this, 0);
disconnect(m_updateSizeConnection);
}
};
......@@ -276,8 +279,8 @@ void CompletionList::setModel(QAbstractItemModel *newModel)
if (newModel) {
connect(newModel, &QAbstractItemModel::columnsInserted,
this, &CompletionList::resizeHeaders);
connect(newModel, &QAbstractItemModel::rowsInserted,
this, updateSize);
m_updateSizeConnection = connect(newModel, &QAbstractItemModel::rowsInserted,
this, updateSize);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment