Move displayName from IEditor to IDocument

The display name is not editor instance specific, but belongs to the
document.

Change-Id: I3c936f04a86e10e6ca30063d85036d85b4b5880e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2013-07-04 22:25:15 +02:00
parent 81eba6f984
commit 113c5600c9
57 changed files with 177 additions and 325 deletions

View File

@@ -110,6 +110,8 @@ void DiffShowEditorWidget::setDisplaySettings(const DisplaySettings &ds)
DiffShowEditor::DiffShowEditor(DiffEditorWidget *editorWidget)
: DiffEditor(editorWidget)
{
document()->setDisplayName(QCoreApplication::translate("DiffShowEditor",
Constants::DIFF_SHOW_EDITOR_DISPLAY_NAME));
QSplitter *splitter = new Core::MiniSplitter(Qt::Vertical);
m_diffShowWidget = new Internal::DiffShowEditorWidget(splitter);
m_diffShowWidget->setReadOnly(true);
@@ -136,19 +138,6 @@ void DiffShowEditor::setDescription(const QString &description)
m_diffShowWidget->setPlainText(description);
}
QString DiffShowEditor::displayName() const
{
if (m_displayName.isEmpty())
m_displayName = QCoreApplication::translate("DiffShowEditor", Constants::DIFF_SHOW_EDITOR_DISPLAY_NAME);
return m_displayName;
}
void DiffShowEditor::setDisplayName(const QString &title)
{
m_displayName = title;
emit changed();
}
Core::Id DiffShowEditor::id() const
{
return Constants::DIFF_SHOW_EDITOR_ID;