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:
@@ -592,26 +592,6 @@ void CppEditorWidget::slotCodeStyleSettingsChanged(const QVariant &)
|
||||
formatter.invalidateCache(document());
|
||||
}
|
||||
|
||||
CppEditorWidget::Link CppEditorWidget::linkToSymbol(CPlusPlus::Symbol *symbol)
|
||||
{
|
||||
if (!symbol)
|
||||
return 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 Link(filename, line, column);
|
||||
}
|
||||
|
||||
void CppEditorWidget::updateSemanticInfo(const SemanticInfo &semanticInfo,
|
||||
bool updateUseSelectionSynchronously)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user