Start on some cleanup of EditorManager API and usage.

This commit is contained in:
con
2010-12-17 13:14:01 +01:00
parent 12f2a0fbda
commit 793d1cba77
12 changed files with 42 additions and 69 deletions

View File

@@ -344,10 +344,9 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
tempFile = TemporaryFilePtr();
m_fetchedSnippets.push_back(fileName);
// Open editor with title.
Core::IEditor* editor = EditorManager::instance()->openEditor(fileName);
Core::IEditor* editor = EditorManager::instance()->openEditor(fileName, QString(), EditorManager::ModeSwitch);
QTC_ASSERT(editor, return)
editor->setDisplayName(titleDescription);
EditorManager::instance()->activateEditor(editor, Core::EditorManager::ModeSwitch);
}
Q_EXPORT_PLUGIN(CodepasterPlugin)