Commit 02b3a79c authored by Tobias Hunger's avatar Tobias Hunger Committed by Eike Ziller

VCS: Open diff/blame editors in other split

... if there are other splits that is.

Task-number: QTCREATORBUG-11623
Change-Id: Icb3b1c86c39d88e90916079e8ab347574ae9a361
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent f6f8e56c
......@@ -1517,7 +1517,9 @@ IEditor *ClearCasePlugin::showOutputInEditor(const QString& title, const QString
qDebug() << "ClearCasePlugin::showOutputInEditor" << title << id.name()
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8());
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8(),
(EditorManager::OpenInOtherSplit
| EditorManager::NoNewSplits));
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,QString,int)));
ClearCaseEditor *e = qobject_cast<ClearCaseEditor*>(editor->widget());
......
......@@ -1169,7 +1169,9 @@ IEditor *CvsPlugin::showOutputInEditor(const QString& title, const QString &outp
qDebug() << "CVSPlugin::showOutputInEditor" << title << id.name()
<< "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8());
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8(),
(EditorManager::OpenInOtherSplit
| EditorManager::NoNewSplits));
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(vcsAnnotate(QString,QString,QString,int)));
CvsEditor *e = qobject_cast<CvsEditor*>(editor->widget());
......
......@@ -100,7 +100,9 @@ DiffEditorDocument *DiffEditorManager::findOrCreate(const QString &documentId, c
const QString msgWait = tr("Waiting for data...");
DiffEditor *diffEditor = qobject_cast<DiffEditor *>(
Core::EditorManager::openEditorWithContents(Constants::DIFF_EDITOR_ID,
0, msgWait.toUtf8()));
0, msgWait.toUtf8(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits)));
QTC_ASSERT(diffEditor, return 0);
document = qobject_cast<DiffEditorDocument *>(diffEditor->document());
......
......@@ -102,8 +102,9 @@ void DiffEditorPlugin::diff()
//: Editor title
QString title = tr("Diff \"%1\", \"%2\"").arg(fileName1).arg(fileName2);
DiffEditor *editor = qobject_cast<DiffEditor *>
(Core::EditorManager::openEditorWithContents(editorId, &title));
(Core::EditorManager::openEditorWithContents(editorId, &title, QByteArray(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits)));
if (!editor)
return;
......
......@@ -1122,8 +1122,10 @@ VcsBase::VcsBaseEditorWidget *GitClient::createVcsEditor(
QTC_CHECK(!findExistingVCSEditor(registerDynamicProperty, dynamicPropertyValue));
// Create new, set wait message, set up with source and codec
Core::IEditor *outputEditor = Core::EditorManager::openEditorWithContents(id, &title,
m_msgWait.toUtf8());
Core::IEditor *outputEditor
= Core::EditorManager::openEditorWithContents(id, &title, m_msgWait.toUtf8(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits));
outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue);
rc = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor);
connect(rc, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
......
......@@ -1182,7 +1182,10 @@ Core::IEditor *PerforcePlugin::showOutputInEditor(const QString &title, const QS
qDebug() << "PerforcePlugin::showOutputInEditor" << title << id.name()
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
Core::IEditor *editor = Core::EditorManager::openEditorWithContents(id, &s, output.toUtf8());
Core::IEditor *editor
= Core::EditorManager::openEditorWithContents(id, &s, output.toUtf8(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits));
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(vcsAnnotate(QString,QString,QString,int)));
PerforceEditor *e = qobject_cast<PerforceEditor*>(editor->widget());
......
......@@ -1023,7 +1023,10 @@ Core::IEditor *SubversionPlugin::showOutputInEditor(const QString &title, const
qDebug() << "SubversionPlugin::showOutputInEditor" << title << id.name()
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
Core::IEditor *editor = Core::EditorManager::openEditorWithContents(id, &s, output.toUtf8());
Core::IEditor *editor
= Core::EditorManager::openEditorWithContents(id, &s, output.toUtf8(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits));
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,QString,int)));
SubversionEditor *e = qobject_cast<SubversionEditor*>(editor->widget());
......
......@@ -576,7 +576,10 @@ VcsBase::VcsBaseEditorWidget *VcsBaseClient::createVcsEditor(Core::Id kind, QStr
QTC_ASSERT(baseEditor, return 0);
Core::EditorManager::activateEditor(outputEditor);
} else {
outputEditor = Core::EditorManager::openEditorWithContents(kind, &title, progressMsg.toUtf8());
outputEditor
= Core::EditorManager::openEditorWithContents(kind, &title, progressMsg.toUtf8(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits));
outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue);
baseEditor = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor);
connect(baseEditor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment