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:
Eike Ziller
2014-09-26 12:03:20 +02:00
parent d008779bf7
commit 6daeaf3bd6
6 changed files with 16 additions and 41 deletions

View File

@@ -5334,16 +5334,18 @@ bool BaseTextEditorWidget::openLink(const Link &link, bool inNextSplit)
if (!link.hasValidTarget())
return false;
if (inNextSplit) {
EditorManager::gotoOtherSplit();
} else if (textDocument()->filePath() == link.targetFileName) {
if (!inNextSplit && textDocument()->filePath() == link.targetFileName) {
EditorManager::addCurrentPositionToNavigationHistory();
gotoLine(link.targetLine, link.targetColumn);
setFocus();
return true;
}
EditorManager::OpenEditorFlags flags;
if (inNextSplit)
flags |= EditorManager::OpenInOtherSplit;
return EditorManager::openEditorAt(link.targetFileName, link.targetLine, link.targetColumn);
return EditorManager::openEditorAt(link.targetFileName, link.targetLine, link.targetColumn,
Id(), flags);
}
void BaseTextEditorWidgetPrivate::updateLink(QMouseEvent *e)