forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user