forked from qt-creator/qt-creator
EditorManager: Add NoFlags as 0-option
Add NoFlags as 0 option to OpenEditorFlags. Change-Id: I33fca771b6c51442febff8a4bb3c06c844147758 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Eike Ziller
parent
bf75e5c085
commit
11cc292da6
@@ -98,6 +98,7 @@ public:
|
|||||||
static EditorToolBar *createToolBar(QWidget *parent = 0);
|
static EditorToolBar *createToolBar(QWidget *parent = 0);
|
||||||
|
|
||||||
enum OpenEditorFlag {
|
enum OpenEditorFlag {
|
||||||
|
NoFlags = 0,
|
||||||
DoNotChangeCurrentEditor = 1,
|
DoNotChangeCurrentEditor = 1,
|
||||||
IgnoreNavigationHistory = 2,
|
IgnoreNavigationHistory = 2,
|
||||||
DoNotMakeVisible = 4,
|
DoNotMakeVisible = 4,
|
||||||
@@ -108,9 +109,9 @@ public:
|
|||||||
|
|
||||||
static QString splitLineNumber(QString *fileName);
|
static QString splitLineNumber(QString *fileName);
|
||||||
static IEditor *openEditor(const QString &fileName, const Id &editorId = Id(),
|
static IEditor *openEditor(const QString &fileName, const Id &editorId = Id(),
|
||||||
OpenEditorFlags flags = 0, bool *newEditor = 0);
|
OpenEditorFlags flags = NoFlags, bool *newEditor = 0);
|
||||||
static IEditor *openEditorAt(const QString &fileName, int line, int column = 0,
|
static IEditor *openEditorAt(const QString &fileName, int line, int column = 0,
|
||||||
const Id &editorId = Id(), OpenEditorFlags flags = 0,
|
const Id &editorId = Id(), OpenEditorFlags flags = NoFlags,
|
||||||
bool *newEditor = 0);
|
bool *newEditor = 0);
|
||||||
static IEditor *openEditorWithContents(const Id &editorId,
|
static IEditor *openEditorWithContents(const Id &editorId,
|
||||||
QString *titlePattern = 0, const QByteArray &contents = QByteArray());
|
QString *titlePattern = 0, const QByteArray &contents = QByteArray());
|
||||||
@@ -259,11 +260,12 @@ private:
|
|||||||
|
|
||||||
static IEditor *placeEditor(Internal::EditorView *view, IEditor *editor);
|
static IEditor *placeEditor(Internal::EditorView *view, IEditor *editor);
|
||||||
static IEditor *duplicateEditor(IEditor *editor);
|
static IEditor *duplicateEditor(IEditor *editor);
|
||||||
static IEditor *activateEditor(Internal::EditorView *view, IEditor *editor, OpenEditorFlags flags = 0);
|
static IEditor *activateEditor(Internal::EditorView *view, IEditor *editor, OpenEditorFlags flags = NoFlags);
|
||||||
static void activateEditorForEntry(Internal::EditorView *view, DocumentModel::Entry *entry, OpenEditorFlags flags = 0);
|
static void activateEditorForEntry(Internal::EditorView *view, DocumentModel::Entry *entry,
|
||||||
|
OpenEditorFlags flags = NoFlags);
|
||||||
static void activateView(Internal::EditorView *view);
|
static void activateView(Internal::EditorView *view);
|
||||||
static IEditor *openEditor(Internal::EditorView *view, const QString &fileName,
|
static IEditor *openEditor(Internal::EditorView *view, const QString &fileName,
|
||||||
const Id &id = Id(), OpenEditorFlags flags = 0, bool *newEditor = 0);
|
const Id &id = Id(), OpenEditorFlags flags = NoFlags, bool *newEditor = 0);
|
||||||
static int visibleDocumentsCount();
|
static int visibleDocumentsCount();
|
||||||
|
|
||||||
static void setCurrentEditor(IEditor *editor, bool ignoreNavigationHistory = false);
|
static void setCurrentEditor(IEditor *editor, bool ignoreNavigationHistory = false);
|
||||||
|
@@ -44,7 +44,7 @@ void VirtualFunctionProposalItem::apply(TextEditor::BaseTextEditor *, int) const
|
|||||||
if (!m_link.hasValidTarget())
|
if (!m_link.hasValidTarget())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Core::EditorManager::OpenEditorFlags flags;
|
Core::EditorManager::OpenEditorFlags flags = Core::EditorManager::NoFlags;
|
||||||
if (m_openInSplit)
|
if (m_openInSplit)
|
||||||
flags |= Core::EditorManager::OpenInOtherSplit;
|
flags |= Core::EditorManager::OpenInOtherSplit;
|
||||||
Core::EditorManager::openEditorAt(m_link.targetFileName,
|
Core::EditorManager::openEditorAt(m_link.targetFileName,
|
||||||
|
Reference in New Issue
Block a user