Make 'open in other split' a flag instead of another method.

Change-Id: I1acafd85ec7a87ba2ac61240f30c329d56461118
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Eike Ziller
2013-05-31 13:56:14 +02:00
parent 55e087ab05
commit 97915bbcea
3 changed files with 6 additions and 11 deletions

View File

@@ -1413,13 +1413,8 @@ Core::Id EditorManager::getOpenWithEditorId(const QString &fileName,
IEditor *EditorManager::openEditor(const QString &fileName, const Id &editorId,
OpenEditorFlags flags, bool *newEditor)
{
return m_instance->openEditor(m_instance->currentEditorView(),
fileName, editorId, flags, newEditor);
}
IEditor *EditorManager::openEditorInOtherSplit(const QString &fileName, const Id &editorId, OpenEditorFlags flags, bool *newEditor)
{
m_instance->gotoOtherSplit();
if (flags & EditorManager::OpenInOtherSplit)
m_instance->gotoOtherSplit();
return m_instance->openEditor(m_instance->currentEditorView(),
fileName, editorId, flags, newEditor);
}

View File

@@ -110,15 +110,14 @@ public:
NoActivate = 1,
IgnoreNavigationHistory = 2,
ModeSwitch = 4,
CanContainLineNumber = 8
CanContainLineNumber = 8,
OpenInOtherSplit = 16
};
Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag)
static QString splitLineNumber(QString *fileName);
static IEditor *openEditor(const QString &fileName, const Id &editorId = Id(),
OpenEditorFlags flags = 0, bool *newEditor = 0);
static IEditor *openEditorInOtherSplit(const QString &fileName, const Id &editorId = Id(),
OpenEditorFlags flags = 0, bool *newEditor = 0);
static IEditor *openEditorWithContents(const Id &editorId,
QString *titlePattern = 0, const QString &contents = QString());