forked from qt-creator/qt-creator
CppEditor: Move CppEditorWidget::linkToSymbol to CppTools
* Cuts direct dependency to CPlusPlus from cppeditor.h, but cppfunctiondecldeflink.h still pulls it in. * Cuts direct dependency to cppeditor.h from cppvirtualfunctionassistprovider.cpp, but it still depends on cppeditorconstants.h. * Cuts direct dependency to cppeditor.h from cppelementevaluator.cpp. The long-term goal is to make the CppEditor independent from concrete code model backends. Change-Id: I291ee0d0da5fc5ed1a839a763fe7be11dcf7a6fb Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -366,7 +366,7 @@ CppEditorWidget::Link attemptFuncDeclDef(const QTextCursor &cursor,
|
||||
}
|
||||
|
||||
if (target) {
|
||||
result = CppEditorWidget::linkToSymbol(target);
|
||||
result = CppTools::linkToSymbol(target);
|
||||
|
||||
unsigned startLine, startColumn, endLine, endColumn;
|
||||
document->translationUnit()->getTokenStartPosition(name->firstToken(), &startLine,
|
||||
@@ -714,7 +714,7 @@ TextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &curs
|
||||
|
||||
}
|
||||
|
||||
link = m_widget->linkToSymbol(def ? def : symbol);
|
||||
link = CppTools::linkToSymbol(def ? def : symbol);
|
||||
link.linkTextStart = beginOfToken;
|
||||
link.linkTextEnd = endOfToken;
|
||||
return link;
|
||||
|
||||
Reference in New Issue
Block a user