forked from qt-creator/qt-creator
Fix follow symbol in next split, and simplify code
Follow symbol in next split broke with fd9b2af921
because the flag was no longer handled through EditorManager::openEditorAt
Also remove the flag NoNewSplits which is no longer used, and simplify
how links are opened from the C++ editor.
Change-Id: I845cc3a0a43d82b79d5c46a273232b69fd6e3ea9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -417,7 +417,7 @@ void CppEditorWidget::switchDeclarationDefinition(bool inNextSplit)
|
||||
|
||||
// Open Editor at link position
|
||||
if (symbolLink.hasValidTarget())
|
||||
openCppEditorAt(symbolLink, inNextSplit != alwaysOpenLinksInNextSplit());
|
||||
openLink(symbolLink, inNextSplit != alwaysOpenLinksInNextSplit());
|
||||
}
|
||||
|
||||
CppEditorWidget::Link CppEditorWidget::findLinkAt(const QTextCursor &cursor, bool resolveTarget,
|
||||
@@ -576,21 +576,6 @@ CppEditorWidget::Link CppEditorWidget::linkToSymbol(CPlusPlus::Symbol *symbol)
|
||||
return Link(filename, line, column);
|
||||
}
|
||||
|
||||
bool CppEditorWidget::openCppEditorAt(const Link &link, bool inNextSplit)
|
||||
{
|
||||
if (!link.hasValidTarget())
|
||||
return false;
|
||||
|
||||
EditorManager::OpenEditorFlags flags;
|
||||
if (inNextSplit)
|
||||
flags |= EditorManager::OpenInOtherSplit;
|
||||
return EditorManager::openEditorAt(link.targetFileName,
|
||||
link.targetLine,
|
||||
link.targetColumn,
|
||||
Constants::CPPEDITOR_ID,
|
||||
flags);
|
||||
}
|
||||
|
||||
void CppEditorWidget::updateSemanticInfo(const SemanticInfo &semanticInfo,
|
||||
bool updateUseSelectionSynchronously)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user