forked from qt-creator/qt-creator
QmlJSEditor: remove modeUpdated method
It does not say what it does, it is better for understanding to call the direct method instead. Change-Id: I2150d4c84254f684474e353995b466b59d4844c0 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
committed by
Robert Loehning
parent
17fbbda57e
commit
2c1c51bbea
@@ -124,7 +124,7 @@ void QmlJSOutlineWidget::setEditor(QmlJSEditorWidget *editor)
|
||||
m_editor = editor;
|
||||
|
||||
m_filterModel->setSourceModel(m_editor->qmlJsEditorDocument()->outlineModel());
|
||||
modelUpdated();
|
||||
m_treeView->expandAll();
|
||||
|
||||
connect(m_treeView->selectionModel(), &QItemSelectionModel::selectionChanged,
|
||||
this, &QmlJSOutlineWidget::updateSelectionInText);
|
||||
@@ -134,8 +134,9 @@ void QmlJSOutlineWidget::setEditor(QmlJSEditorWidget *editor)
|
||||
|
||||
connect(m_editor, &QmlJSEditorWidget::outlineModelIndexChanged,
|
||||
this, &QmlJSOutlineWidget::updateSelectionInTree);
|
||||
connect(m_editor->qmlJsEditorDocument()->outlineModel(), &QmlOutlineModel::updated,
|
||||
this, &QmlJSOutlineWidget::modelUpdated);
|
||||
connect(m_editor->qmlJsEditorDocument()->outlineModel(), &QmlOutlineModel::updated, [this] () {
|
||||
m_treeView->expandAll();
|
||||
});
|
||||
}
|
||||
|
||||
QList<QAction*> QmlJSOutlineWidget::filterMenuActions() const
|
||||
@@ -161,11 +162,6 @@ QVariantMap QmlJSOutlineWidget::settings() const
|
||||
return {{QLatin1String("QmlJSOutline.ShowBindings"), m_showBindingsAction->isChecked()}};
|
||||
}
|
||||
|
||||
void QmlJSOutlineWidget::modelUpdated()
|
||||
{
|
||||
m_treeView->expandAll();
|
||||
}
|
||||
|
||||
void QmlJSOutlineWidget::updateSelectionInTree(const QModelIndex &index)
|
||||
{
|
||||
if (!syncCursor())
|
||||
@@ -230,7 +226,7 @@ void QmlJSOutlineWidget::focusEditor()
|
||||
void QmlJSOutlineWidget::setShowBindings(bool showBindings)
|
||||
{
|
||||
m_filterModel->setFilterBindings(!showBindings);
|
||||
modelUpdated();
|
||||
m_treeView->expandAll();
|
||||
updateSelectionInTree(m_editor->outlineModelIndex());
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,6 @@ public:
|
||||
virtual QVariantMap settings() const override;
|
||||
|
||||
private:
|
||||
void modelUpdated();
|
||||
void updateSelectionInTree(const QModelIndex &index);
|
||||
void updateSelectionInText(const QItemSelection &selection);
|
||||
void updateTextCursor(const QModelIndex &index);
|
||||
|
||||
Reference in New Issue
Block a user