TextEditor: move Link class to separate header in Utils

Link is a common class and is used across the plugins.

Change-Id: Id92e47e1b8604316ca8b970804e57abaf404ec28
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Ivan Donchevskii
2017-10-05 09:45:33 +02:00
parent f686dec480
commit 8efb598e60
27 changed files with 155 additions and 128 deletions

View File

@@ -679,7 +679,7 @@ void CppEditorWidget::switchDeclarationDefinition(bool inNextSplit)
}
// Link to function definition/declaration
CppEditorWidget::Link symbolLink;
Utils::Link symbolLink;
if (functionDeclarationSymbol) {
symbolLink = linkToSymbol(
d->m_modelManager->symbolFinder()
@@ -716,21 +716,21 @@ void CppEditorWidget::switchDeclarationDefinition(bool inNextSplit)
openLink(symbolLink, inNextSplit != alwaysOpenLinksInNextSplit());
}
CppEditorWidget::Link CppEditorWidget::findLinkAt(const QTextCursor &cursor,
bool resolveTarget,
bool inNextSplit)
Utils::Link CppEditorWidget::findLinkAt(const QTextCursor &cursor,
bool resolveTarget,
bool inNextSplit)
{
if (!d->m_modelManager)
return Link();
return Utils::Link();
const Utils::FileName &filePath = textDocument()->filePath();
return followSymbolInterface().findLink(CppTools::CursorInEditor{cursor, filePath, this},
resolveTarget,
d->m_modelManager->snapshot(),
d->m_lastSemanticInfo.doc,
d->m_modelManager->symbolFinder(),
inNextSplit);
resolveTarget,
d->m_modelManager->snapshot(),
d->m_lastSemanticInfo.doc,
d->m_modelManager->symbolFinder(),
inNextSplit);
}
unsigned CppEditorWidget::documentRevision() const