diff options
author | Eike Ziller <[email protected]> | 2013-07-15 15:14:10 +0200 |
---|---|---|
committer | Eike Ziller <[email protected]> | 2013-07-17 09:00:17 +0200 |
commit | fade19a9bfb89b791d9a64dd3e43441a5861e40c (patch) | |
tree | e691329773e462f851480ac92f75a0c9ce43284f /src/plugins/cvs/cvsplugin.cpp | |
parent | 0ba2b9b37d745107926e13cf7e241c5351229966 (diff) |
Move IEditor::createNew to IDocument::setContents
The method is for setting the contents, so it belongs to the document,
and should be named correspondingly.
Change-Id: I40363dc08f11268f530885b512e4a88e8b10d096
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/cvs/cvsplugin.cpp')
-rw-r--r-- | src/plugins/cvs/cvsplugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index 75e49af81f0..d29efd5af6b 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -591,7 +591,7 @@ void CvsPlugin::cvsDiff(const CvsDiffParameters &p) // Show in the same editor if diff has been executed before const QString tag = VcsBaseEditorWidget::editorTag(DiffOutput, p.workingDir, p.files); if (IEditor *existingEditor = VcsBaseEditorWidget::locateEditorByTag(tag)) { - existingEditor->createNew(output); + existingEditor->document()->setContents(output.toUtf8()); EditorManager::activateEditor(existingEditor); setDiffBaseDirectory(existingEditor, p.workingDir); return; @@ -859,7 +859,7 @@ void CvsPlugin::filelog(const QString &workingDir, // the common usage pattern of continuously changing and diffing a file const QString tag = VcsBaseEditorWidget::editorTag(LogOutput, workingDir, files); if (Core::IEditor *editor = VcsBaseEditorWidget::locateEditorByTag(tag)) { - editor->createNew(response.stdOut); + editor->document()->setContents(response.stdOut.toUtf8()); Core::EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("cvs log %1").arg(id); @@ -1001,7 +1001,7 @@ void CvsPlugin::annotate(const QString &workingDir, const QString &file, const QString tag = VcsBaseEditorWidget::editorTag(AnnotateOutput, workingDir, QStringList(file), revision); if (IEditor *editor = VcsBaseEditorWidget::locateEditorByTag(tag)) { - editor->createNew(response.stdOut); + editor->document()->setContents(response.stdOut.toUtf8()); VcsBaseEditorWidget::gotoLineOfEditor(editor, lineNumber); EditorManager::activateEditor(editor); } else { @@ -1197,7 +1197,7 @@ bool CvsPlugin::describe(const QString &repositoryPath, // the common usage pattern of continuously changing and diffing a file const QString commitId = entries.front().revisions.front().commitId; if (IEditor *editor = VcsBaseEditorWidget::locateEditorByTag(commitId)) { - editor->createNew(output); + editor->document()->setContents(output.toUtf8()); EditorManager::activateEditor(editor); setDiffBaseDirectory(editor, repositoryPath); } else { @@ -1270,7 +1270,7 @@ IEditor *CvsPlugin::showOutputInEditor(const QString& title, const QString &outp qDebug() << "CVSPlugin::showOutputInEditor" << title << id.name() << "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec); QString s = title; - IEditor *editor = EditorManager::openEditorWithContents(id, &s, output); + IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8()); connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,int)), this, SLOT(vcsAnnotate(QString,QString,int))); CvsEditor *e = qobject_cast<CvsEditor*>(editor->widget()); |