forked from qt-creator/qt-creator
EditorManager: Use static pattern, adjust surrounding code
Change-Id: I3255a0150cd9a730336456c5a9f986eb74fefbff Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -110,7 +110,7 @@ void MemoryAgent::closeEditors()
|
||||
foreach (QPointer<IEditor> editor, m_editors)
|
||||
if (editor)
|
||||
editors.append(editor.data());
|
||||
EditorManager::instance()->closeEditors(editors);
|
||||
EditorManager::closeEditors(editors);
|
||||
m_editors.clear();
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ void MemoryAgent::updateContents()
|
||||
|
||||
bool MemoryAgent::hasVisibleEditor() const
|
||||
{
|
||||
QList<IEditor *> visible = EditorManager::instance()->visibleEditors();
|
||||
QList<IEditor *> visible = EditorManager::visibleEditors();
|
||||
foreach (QPointer<IEditor> editor, m_editors)
|
||||
if (visible.contains(editor.data()))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user