diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-05-23 13:55:03 -0400 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-06-13 18:04:52 +0200 |
commit | 4ecadb38a07e6bccb4fce74341eece23ef4f37d8 (patch) | |
tree | c88d9b570484b01d5508d703e13568ef1fa238e7 /src/plugins/cppeditor/cppoutline.cpp | |
parent | eaecac2fd91de739d87e232807349589f5beb5ef (diff) | |
download | qt-creator-4ecadb38a07e6bccb4fce74341eece23ef4f37d8.tar.gz |
CppEditor: Extract CppEditorOutline
Change-Id: I3b41f91f17ce9fb24796f2f6bff353fb3c6177ec
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/cppoutline.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppoutline.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/cppeditor/cppoutline.cpp b/src/plugins/cppeditor/cppoutline.cpp index 0410af60f8..31c6cdee69 100644 --- a/src/plugins/cppeditor/cppoutline.cpp +++ b/src/plugins/cppeditor/cppoutline.cpp @@ -29,6 +29,8 @@ #include "cppoutline.h" +#include "cppeditoroutline.h" + #include <cplusplus/OverviewModel.h> #include <coreplugin/find/treeviewfind.h> @@ -92,7 +94,7 @@ CppOutlineWidget::CppOutlineWidget(CPPEditorWidget *editor) : TextEditor::IOutlineWidget(), m_editor(editor), m_treeView(new CppOutlineTreeView(this)), - m_model(m_editor->outlineModel()), + m_model(m_editor->outline()->model()), m_proxyModel(new CppOutlineFilterModel(m_model, this)), m_enableCursorSync(true), m_blockCursorSync(false) @@ -109,7 +111,7 @@ CppOutlineWidget::CppOutlineWidget(CPPEditorWidget *editor) : connect(m_model, SIGNAL(modelReset()), this, SLOT(modelUpdated())); modelUpdated(); - connect(m_editor, SIGNAL(outlineModelIndexChanged(QModelIndex)), + connect(m_editor->outline(), SIGNAL(modelIndexChanged(QModelIndex)), this, SLOT(updateSelectionInTree(QModelIndex))); connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateSelectionInText(QItemSelection))); @@ -126,7 +128,7 @@ void CppOutlineWidget::setCursorSynchronization(bool syncWithCursor) { m_enableCursorSync = syncWithCursor; if (m_enableCursorSync) - updateSelectionInTree(m_editor->outlineModelIndex()); + updateSelectionInTree(m_editor->outline()->modelIndex()); } void CppOutlineWidget::modelUpdated() |