forked from qt-creator/qt-creator
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:
@@ -45,14 +45,10 @@ FormEditorFactory::FormEditorFactory()
|
||||
setId(K_DESIGNER_XML_EDITOR_ID);
|
||||
setDisplayName(QCoreApplication::translate("Designer", C_DESIGNER_XML_DISPLAY_NAME));
|
||||
addMimeType(FORM_MIMETYPE);
|
||||
setEditorCreator([] { return FormEditorW::createEditor(); });
|
||||
|
||||
FileIconProvider::registerIconOverlayForSuffix(ProjectExplorer::Constants::FILEOVERLAY_UI, "ui");
|
||||
}
|
||||
|
||||
IEditor *FormEditorFactory::createEditor()
|
||||
{
|
||||
return FormEditorW::createEditor();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Designer
|
||||
|
||||
@@ -30,14 +30,10 @@
|
||||
namespace Designer {
|
||||
namespace Internal {
|
||||
|
||||
class FormEditorFactory : public Core::IEditorFactory
|
||||
class FormEditorFactory final : public Core::IEditorFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FormEditorFactory();
|
||||
|
||||
Core::IEditor *createEditor() override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user