EditorManager: Use static pattern, adjust surrounding code

Change-Id: I3255a0150cd9a730336456c5a9f986eb74fefbff
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
hjk
2013-08-29 15:46:04 +02:00
parent e1823072a1
commit 4a24df38a3
61 changed files with 245 additions and 294 deletions

View File

@@ -43,9 +43,9 @@ using namespace TextEditor::Internal;
FindInOpenFiles::FindInOpenFiles()
{
connect(Core::ICore::instance()->editorManager(), SIGNAL(editorOpened(Core::IEditor*)),
connect(Core::EditorManager::instance(), SIGNAL(editorOpened(Core::IEditor*)),
this, SLOT(updateEnabledState()));
connect(Core::ICore::instance()->editorManager(), SIGNAL(editorsClosed(QList<Core::IEditor*>)),
connect(Core::EditorManager::instance(), SIGNAL(editorsClosed(QList<Core::IEditor*>)),
this, SLOT(updateEnabledState()));
}
@@ -74,7 +74,7 @@ Utils::FileIterator *FindInOpenFiles::files(const QStringList &nameFilters,
fileNames.append(fileName);
QTextCodec *codec = openEditorEncodings.value(fileName);
if (!codec)
codec = Core::EditorManager::instance()->defaultTextCodec();
codec = Core::EditorManager::defaultTextCodec();
codecs.append(codec);
}
}