forked from qt-creator/qt-creator
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:
@@ -207,7 +207,7 @@ StateListener::StateListener(QObject *parent) :
|
||||
{
|
||||
connect(Core::ICore::editorManager(), SIGNAL(currentEditorChanged(Core::IEditor*)),
|
||||
this, SLOT(slotStateChanged()));
|
||||
connect(Core::ICore::editorManager(), SIGNAL(currentEditorStateChanged(Core::IEditor*)),
|
||||
connect(Core::ICore::editorManager(), SIGNAL(currentDocumentStateChanged()),
|
||||
this, SLOT(slotStateChanged()));
|
||||
connect(Core::ICore::vcsManager(), SIGNAL(repositoryChanged(QString)),
|
||||
this, SLOT(slotStateChanged()));
|
||||
@@ -221,7 +221,7 @@ static inline QString displayNameOfEditor(const QString &fileName)
|
||||
{
|
||||
const QList<Core::IEditor*> editors = Core::EditorManager::instance()->editorsForFileName(fileName);
|
||||
if (!editors.isEmpty())
|
||||
return editors.front()->displayName();
|
||||
return editors.front()->document()->displayName();
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user