forked from qt-creator/qt-creator
Vcs: Move responsibility to set editor parameters to editor factory
So it doesn't need to be named twice in the editor factory setup. This intentially includes a de-optimiztion: storing the parameters by value, not by pointer. That's more natural, does not need to keep the parameters alive on the caller side, and it's uncritical in this context. Change-Id: I92867d3f2f75c38911ae82d3eeb4759cba71b723 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -42,13 +42,10 @@ using namespace Utils;
|
||||
submit editor files.
|
||||
*/
|
||||
|
||||
SubmitEditorFile::SubmitEditorFile(const VcsBaseSubmitEditorParameters *parameters, VcsBaseSubmitEditor *parent) :
|
||||
Core::IDocument(parent),
|
||||
SubmitEditorFile::SubmitEditorFile(VcsBaseSubmitEditor *editor) :
|
||||
m_modified(false),
|
||||
m_editor(parent)
|
||||
m_editor(editor)
|
||||
{
|
||||
setId(parameters->id);
|
||||
setMimeType(QLatin1String(parameters->mimeType));
|
||||
setTemporary(true);
|
||||
connect(m_editor, &VcsBaseSubmitEditor::fileContentsChanged,
|
||||
this, &Core::IDocument::contentsChanged);
|
||||
|
||||
Reference in New Issue
Block a user