C++: remove builtin FollowSymbol dependency from CppEditor

Move FollowSymbolUnderCursor to CppTools and
builtin member ownership to internal model manager.

Change-Id: I97a4f744ec1709ccc0b34fb67b58680973ef566f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2017-09-18 10:19:27 +02:00
parent f130de2400
commit 55a5ffc1ec
24 changed files with 156 additions and 99 deletions

View File

@@ -25,12 +25,11 @@
#pragma once
#include <QTextCursor>
#include "cppeditorwidgetinterface.h"
#include <utils/fileutils.h>
namespace TextEditor {
class TextEditorWidget;
} // namespace TextEditor
#include <QTextCursor>
namespace CppTools {
@@ -38,18 +37,18 @@ class CursorInEditor
{
public:
CursorInEditor(const QTextCursor &cursor, const Utils::FileName &filePath,
TextEditor::TextEditorWidget *editorWidget = nullptr)
CppEditorWidgetInterface *editorWidget = nullptr)
: m_cursor(cursor)
, m_filePath(filePath)
, m_editorWidget(editorWidget)
{}
TextEditor::TextEditorWidget *editorWidget() const { return m_editorWidget; }
CppEditorWidgetInterface *editorWidget() const { return m_editorWidget; }
const QTextCursor &cursor() const { return m_cursor; }
const Utils::FileName &filePath() const { return m_filePath; }
private:
QTextCursor m_cursor;
Utils::FileName m_filePath;
TextEditor::TextEditorWidget *m_editorWidget = nullptr;
CppEditorWidgetInterface *m_editorWidget = nullptr;
};
} // namespace CppTools