Core: Make IEditorFactory::createEditor use a function object

Also, replace or remove unneeded Q_OBJECTs, and make base
setters and adders protected.

Change-Id: I212257ef53984d8852dc8c478537199fc9483486
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2020-02-04 18:16:57 +01:00
parent ccc2a347a7
commit d7ae3b79f8
24 changed files with 104 additions and 175 deletions

View File

@@ -62,11 +62,8 @@ DiffEditorFactory::DiffEditorFactory(QObject *parent)
rightHandler->setTextEditorWidgetResolver([](Core::IEditor *e) {
return static_cast<DiffEditor *>(e)->rightEditorWidget();
});
}
Core::IEditor *DiffEditorFactory::createEditor()
{
return new DiffEditor(new DiffEditorDocument);
setEditorCreator([] { return new DiffEditor(new DiffEditorDocument); });
}
} // namespace Internal