Revert "VCS: Open diff/blame editors in other split"

This change has lead to complaints about diff views opening
in apparently random places for users with several splits.

This reverts commit 02b3a79c5f.

Conflicts:
	src/plugins/diffeditor/diffeditorplugin.cpp
	src/plugins/subversion/subversionplugin.cpp

Change-Id: I2eab8ff2d88a9e12f4dc7ec3a9ca65455daf15e2
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Tobias Hunger
2014-06-17 14:41:59 +02:00
committed by Eike Ziller
parent 5a9c1bfafa
commit 836e17a57c
7 changed files with 8 additions and 24 deletions

View File

@@ -1522,9 +1522,7 @@ IEditor *ClearCasePlugin::showOutputInEditor(const QString& title, const QString
qDebug() << "ClearCasePlugin::showOutputInEditor" << title << id.name() qDebug() << "ClearCasePlugin::showOutputInEditor" << title << id.name()
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec); << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title; 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)), connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,QString,int))); this, SLOT(annotateVersion(QString,QString,QString,int)));
ClearCaseEditor *e = qobject_cast<ClearCaseEditor*>(editor->widget()); ClearCaseEditor *e = qobject_cast<ClearCaseEditor*>(editor->widget());

View File

@@ -1170,9 +1170,7 @@ IEditor *CvsPlugin::showOutputInEditor(const QString& title, const QString &outp
qDebug() << "CVSPlugin::showOutputInEditor" << title << id.name() qDebug() << "CVSPlugin::showOutputInEditor" << title << id.name()
<< "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec); << "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title; 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)), connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(vcsAnnotate(QString,QString,QString,int))); this, SLOT(vcsAnnotate(QString,QString,QString,int)));
CvsEditor *e = qobject_cast<CvsEditor*>(editor->widget()); CvsEditor *e = qobject_cast<CvsEditor*>(editor->widget());

View File

@@ -100,9 +100,7 @@ DiffEditorDocument *DiffEditorManager::findOrCreate(const QString &documentId, c
const QString msgWait = tr("Waiting for data..."); const QString msgWait = tr("Waiting for data...");
DiffEditor *diffEditor = qobject_cast<DiffEditor *>( DiffEditor *diffEditor = qobject_cast<DiffEditor *>(
Core::EditorManager::openEditorWithContents(Constants::DIFF_EDITOR_ID, Core::EditorManager::openEditorWithContents(Constants::DIFF_EDITOR_ID,
0, msgWait.toUtf8(), 0, msgWait.toUtf8()));
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits)));
QTC_ASSERT(diffEditor, return 0); QTC_ASSERT(diffEditor, return 0);
document = qobject_cast<DiffEditorDocument *>(diffEditor->document()); document = qobject_cast<DiffEditorDocument *>(diffEditor->document());

View File

@@ -915,10 +915,8 @@ VcsBase::VcsBaseEditorWidget *GitClient::createVcsEditor(
QTC_CHECK(!findExistingVCSEditor(registerDynamicProperty, dynamicPropertyValue)); QTC_CHECK(!findExistingVCSEditor(registerDynamicProperty, dynamicPropertyValue));
// Create new, set wait message, set up with source and codec // Create new, set wait message, set up with source and codec
Core::IEditor *outputEditor Core::IEditor *outputEditor = Core::EditorManager::openEditorWithContents(id, &title,
= Core::EditorManager::openEditorWithContents(id, &title, m_msgWait.toUtf8(), m_msgWait.toUtf8());
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits));
outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue); outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue);
rc = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor); rc = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor);
connect(rc, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)), connect(rc, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),

View File

@@ -1182,10 +1182,7 @@ Core::IEditor *PerforcePlugin::showOutputInEditor(const QString &title,
qDebug() << "PerforcePlugin::showOutputInEditor" << title << id.name() qDebug() << "PerforcePlugin::showOutputInEditor" << title << id.name()
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec); << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title; QString s = title;
Core::IEditor *editor Core::IEditor *editor = Core::EditorManager::openEditorWithContents(id, &s, output.toUtf8());
= Core::EditorManager::openEditorWithContents(id, &s, output.toUtf8(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits));
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)), connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(vcsAnnotate(QString,QString,QString,int))); this, SLOT(vcsAnnotate(QString,QString,QString,int)));
PerforceEditor *e = qobject_cast<PerforceEditor*>(editor->widget()); PerforceEditor *e = qobject_cast<PerforceEditor*>(editor->widget());

View File

@@ -1032,9 +1032,7 @@ IEditor *SubversionPlugin::showOutputInEditor(const QString &title, const QStrin
qDebug() << "SubversionPlugin::showOutputInEditor" << title << id.name() qDebug() << "SubversionPlugin::showOutputInEditor" << title << id.name()
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec); << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title; 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)), connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,QString,int))); this, SLOT(annotateVersion(QString,QString,QString,int)));
SubversionEditor *e = qobject_cast<SubversionEditor*>(editor->widget()); SubversionEditor *e = qobject_cast<SubversionEditor*>(editor->widget());

View File

@@ -576,10 +576,7 @@ VcsBase::VcsBaseEditorWidget *VcsBaseClient::createVcsEditor(Core::Id kind, QStr
QTC_ASSERT(baseEditor, return 0); QTC_ASSERT(baseEditor, return 0);
Core::EditorManager::activateEditor(outputEditor); Core::EditorManager::activateEditor(outputEditor);
} else { } else {
outputEditor outputEditor = Core::EditorManager::openEditorWithContents(kind, &title, progressMsg.toUtf8());
= Core::EditorManager::openEditorWithContents(kind, &title, progressMsg.toUtf8(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits));
outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue); outputEditor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue);
baseEditor = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor); baseEditor = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor);
connect(baseEditor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)), connect(baseEditor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),