diff --git a/src/plugins/qmljseditor/qmljsoutline.cpp b/src/plugins/qmljseditor/qmljsoutline.cpp index 89d2dd68320..73a9b2b0b33 100644 --- a/src/plugins/qmljseditor/qmljsoutline.cpp +++ b/src/plugins/qmljseditor/qmljsoutline.cpp @@ -44,9 +44,13 @@ bool QmlJSOutlineFilterModel::filterAcceptsRow(int sourceRow, { if (m_filterBindings) { QModelIndex sourceIndex = sourceModel()->index(sourceRow, 0, sourceParent); - QVariant itemType = sourceIndex.data(QmlOutlineModel::ItemTypeRole); - if (itemType == QmlOutlineModel::NonElementBindingType) - return false; + while (sourceIndex.isValid()) { + if (sourceIndex.data(QmlOutlineModel::ItemTypeRole) + == QmlOutlineModel::NonElementBindingType) { + return false; + } + sourceIndex = sourceIndex.parent(); + } } return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent); }