Commit 188dbc3a authored by con's avatar con

API naming.

Reviewed-by: hjk
parent 0d4a4c03
......@@ -1189,7 +1189,7 @@ void EditorManager::ensureEditorManagerVisible()
m_d->m_core->modeManager()->activateMode(Constants::MODE_EDIT);
}
IEditor *EditorManager::newFile(const QString &editorKind,
IEditor *EditorManager::openEditorWithContents(const QString &editorKind,
QString *titlePattern,
const QString &contents)
{
......
......@@ -113,6 +113,9 @@ public:
IEditor *openEditor(const QString &fileName,
const QString &editorKind = QString(),
OpenEditorFlags flags = 0);
IEditor *openEditorWithContents(const QString &editorKind,
QString *titlePattern = 0,
const QString &contents = QString());
bool openExternalEditor(const QString &fileName, const QString &editorKind);
......@@ -120,9 +123,6 @@ public:
QString getOpenWithEditorKind(const QString &fileName, bool *isExternalEditor = 0) const;
void ensureEditorManagerVisible();
IEditor *newFile(const QString &editorKind,
QString *titlePattern = 0,
const QString &contents = QString());
bool hasEditor(const QString &fileName) const;
QList<IEditor *> editorsForFileName(const QString &filename) const;
QList<IEditor *> editorsForFile(IFile *file) const;
......
......@@ -273,7 +273,7 @@ Core::IEditor *EditorManagerPrototype::openEditor(const QString &fileName, const
Core::IEditor *EditorManagerPrototype::newFile(const QString &editorKind, QString titlePattern, const QString &contents)
{
return callee()->newFile(editorKind, &titlePattern, contents);
return callee()->openEditorWithContents(editorKind, &titlePattern, contents);
}
int EditorManagerPrototype::makeEditorWritable(Core::IEditor *editor)
......
......@@ -263,7 +263,7 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
ICore::instance()->messageManager()->printToOutputPane(content, true);
} else {
EditorManager* manager = EditorManager::instance();
IEditor* editor = manager->newFile(Core::Constants::K_DEFAULT_TEXT_EDITOR, &title, content);
IEditor* editor = manager->openEditorWithContents(Core::Constants::K_DEFAULT_TEXT_EDITOR, &title, content);
manager->activateEditor(editor);
}
}
......
......@@ -1134,7 +1134,7 @@ Core::IEditor * CVSPlugin::showOutputInEditor(const QString& title, const QStrin
if (CVS::Constants::debug)
qDebug() << "CVSPlugin::showOutputInEditor" << title << kind << "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
Core::IEditor *editor = Core::EditorManager::instance()->newFile(kind, &s, output.toLocal8Bit());
Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(kind, &s, output.toLocal8Bit());
CVSEditor *e = qobject_cast<CVSEditor*>(editor->widget());
if (!e)
return 0;
......
......@@ -173,7 +173,7 @@ VCSBase::VCSBaseEditor
QTC_ASSERT(rc, return 0);
} else {
// Create new, set wait message, set up with source and codec
outputEditor = m_core->editorManager()->newFile(kind, &title, m_msgWait);
outputEditor = m_core->editorManager()->openEditorWithContents(kind, &title, m_msgWait);
outputEditor->file()->setProperty(registerDynamicProperty, dynamicPropertyValue);
rc = VCSBase::VCSBaseEditor::getVcsBaseEditor(outputEditor);
QTC_ASSERT(rc, return 0);
......
......@@ -884,7 +884,7 @@ Core::IEditor * PerforcePlugin::showOutputInEditor(const QString& title, const Q
if (Perforce::Constants::debug)
qDebug() << "PerforcePlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
Core::IEditor *editor = Core::EditorManager::instance()->newFile(kind, &s, output);
Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(kind, &s, output);
PerforceEditor *e = qobject_cast<PerforceEditor*>(editor->widget());
if (!e)
return 0;
......
......@@ -979,7 +979,7 @@ Core::IEditor * SubversionPlugin::showOutputInEditor(const QString& title, const
if (Subversion::Constants::debug)
qDebug() << "SubversionPlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
Core::IEditor *editor = Core::EditorManager::instance()->newFile(kind, &s, output);
Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(kind, &s, output);
SubversionEditor *e = qobject_cast<SubversionEditor*>(editor->widget());
if (!e)
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment