summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/editormanager/editormanager.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@digia.com>2014-03-06 15:44:13 +0100
committerEike Ziller <eike.ziller@digia.com>2014-03-07 15:56:43 +0100
commitc9b6897e787a7f8d9cbbc6636aa2e053fa638090 (patch)
treef8db167acc16e8f29094f5397f75ab76c1d0fd7a /src/plugins/coreplugin/editormanager/editormanager.cpp
parentd52ee686d1ae63090e066faf4e2b66b90620b774 (diff)
downloadqt-creator-c9b6897e787a7f8d9cbbc6636aa2e053fa638090.tar.gz
EditorManager: Add OpenEditorFlags to openEditorWithContents
This requires moving the activateEditor call into openEditorWithContents. Remove that line elsewhere when editors are constructed. Keep it when reusing an existing editor though. Change-Id: I872f03e16fde42f3b8adec2cf2344b7cc495cd08 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/coreplugin/editormanager/editormanager.cpp')
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 20c853e39b..51cec16c32 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -1657,11 +1657,15 @@ QStringList EditorManager::getOpenFileNames()
IEditor *EditorManager::openEditorWithContents(const Id &editorId,
QString *titlePattern,
- const QByteArray &contents)
+ const QByteArray &contents,
+ OpenEditorFlags flags)
{
if (debugEditorManager)
qDebug() << Q_FUNC_INFO << editorId.name() << titlePattern << contents;
+ if (flags & EditorManager::OpenInOtherSplit)
+ m_instance->gotoOtherSplit();
+
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
QString title;
@@ -1712,6 +1716,7 @@ IEditor *EditorManager::openEditorWithContents(const Id &editorId,
m_instance->addEditor(edt);
QApplication::restoreOverrideCursor();
+ activateEditor(edt, flags);
return edt;
}