forked from qt-creator/qt-creator
API naming.
Reviewed-by: hjk
This commit is contained in:
@@ -1189,7 +1189,7 @@ void EditorManager::ensureEditorManagerVisible()
|
|||||||
m_d->m_core->modeManager()->activateMode(Constants::MODE_EDIT);
|
m_d->m_core->modeManager()->activateMode(Constants::MODE_EDIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
IEditor *EditorManager::newFile(const QString &editorKind,
|
IEditor *EditorManager::openEditorWithContents(const QString &editorKind,
|
||||||
QString *titlePattern,
|
QString *titlePattern,
|
||||||
const QString &contents)
|
const QString &contents)
|
||||||
{
|
{
|
||||||
|
@@ -113,6 +113,9 @@ public:
|
|||||||
IEditor *openEditor(const QString &fileName,
|
IEditor *openEditor(const QString &fileName,
|
||||||
const QString &editorKind = QString(),
|
const QString &editorKind = QString(),
|
||||||
OpenEditorFlags flags = 0);
|
OpenEditorFlags flags = 0);
|
||||||
|
IEditor *openEditorWithContents(const QString &editorKind,
|
||||||
|
QString *titlePattern = 0,
|
||||||
|
const QString &contents = QString());
|
||||||
|
|
||||||
bool openExternalEditor(const QString &fileName, const QString &editorKind);
|
bool openExternalEditor(const QString &fileName, const QString &editorKind);
|
||||||
|
|
||||||
@@ -120,9 +123,6 @@ public:
|
|||||||
QString getOpenWithEditorKind(const QString &fileName, bool *isExternalEditor = 0) const;
|
QString getOpenWithEditorKind(const QString &fileName, bool *isExternalEditor = 0) const;
|
||||||
|
|
||||||
void ensureEditorManagerVisible();
|
void ensureEditorManagerVisible();
|
||||||
IEditor *newFile(const QString &editorKind,
|
|
||||||
QString *titlePattern = 0,
|
|
||||||
const QString &contents = QString());
|
|
||||||
bool hasEditor(const QString &fileName) const;
|
bool hasEditor(const QString &fileName) const;
|
||||||
QList<IEditor *> editorsForFileName(const QString &filename) const;
|
QList<IEditor *> editorsForFileName(const QString &filename) const;
|
||||||
QList<IEditor *> editorsForFile(IFile *file) 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)
|
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)
|
int EditorManagerPrototype::makeEditorWritable(Core::IEditor *editor)
|
||||||
|
@@ -263,7 +263,7 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
|
|||||||
ICore::instance()->messageManager()->printToOutputPane(content, true);
|
ICore::instance()->messageManager()->printToOutputPane(content, true);
|
||||||
} else {
|
} else {
|
||||||
EditorManager* manager = EditorManager::instance();
|
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);
|
manager->activateEditor(editor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1134,7 +1134,7 @@ Core::IEditor * CVSPlugin::showOutputInEditor(const QString& title, const QStrin
|
|||||||
if (CVS::Constants::debug)
|
if (CVS::Constants::debug)
|
||||||
qDebug() << "CVSPlugin::showOutputInEditor" << title << kind << "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
qDebug() << "CVSPlugin::showOutputInEditor" << title << kind << "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||||
QString s = title;
|
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());
|
CVSEditor *e = qobject_cast<CVSEditor*>(editor->widget());
|
||||||
if (!e)
|
if (!e)
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -173,7 +173,7 @@ VCSBase::VCSBaseEditor
|
|||||||
QTC_ASSERT(rc, return 0);
|
QTC_ASSERT(rc, return 0);
|
||||||
} else {
|
} else {
|
||||||
// Create new, set wait message, set up with source and codec
|
// 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);
|
outputEditor->file()->setProperty(registerDynamicProperty, dynamicPropertyValue);
|
||||||
rc = VCSBase::VCSBaseEditor::getVcsBaseEditor(outputEditor);
|
rc = VCSBase::VCSBaseEditor::getVcsBaseEditor(outputEditor);
|
||||||
QTC_ASSERT(rc, return 0);
|
QTC_ASSERT(rc, return 0);
|
||||||
|
@@ -884,7 +884,7 @@ Core::IEditor * PerforcePlugin::showOutputInEditor(const QString& title, const Q
|
|||||||
if (Perforce::Constants::debug)
|
if (Perforce::Constants::debug)
|
||||||
qDebug() << "PerforcePlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
qDebug() << "PerforcePlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||||
QString s = title;
|
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());
|
PerforceEditor *e = qobject_cast<PerforceEditor*>(editor->widget());
|
||||||
if (!e)
|
if (!e)
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -979,7 +979,7 @@ Core::IEditor * SubversionPlugin::showOutputInEditor(const QString& title, const
|
|||||||
if (Subversion::Constants::debug)
|
if (Subversion::Constants::debug)
|
||||||
qDebug() << "SubversionPlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
qDebug() << "SubversionPlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||||
QString s = title;
|
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());
|
SubversionEditor *e = qobject_cast<SubversionEditor*>(editor->widget());
|
||||||
if (!e)
|
if (!e)
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user