CPlusPlus: Add toLink method to the Symbol

Basically move it from CppTools to CPlusPlus
to be able to use it there.

Change-Id: I0af80f93bdc029824397ceafdf940cb86c4382b0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-02-02 12:52:07 +01:00
parent 31f1713c75
commit c020f2448b
9 changed files with 30 additions and 31 deletions

View File

@@ -230,26 +230,6 @@ const Macro *findCanonicalMacro(const QTextCursor &cursor, Document::Ptr documen
return 0;
}
Utils::Link linkToSymbol(Symbol *symbol)
{
if (!symbol)
return Utils::Link();
const QString filename = QString::fromUtf8(symbol->fileName(),
symbol->fileNameLength());
unsigned line = symbol->line();
unsigned column = symbol->column();
if (column)
--column;
if (symbol->isGenerated())
column = 0;
return Utils::Link(filename, line, column);
}
QSharedPointer<CppCodeModelSettings> codeModelSettings()
{
return CppTools::Internal::CppToolsPlugin::instance()->codeModelSettings();