forked from qt-creator/qt-creator
TextEditor/Vcs: Remove use of QObject parent for editor factories
Change-Id: I1b3d8b49649401c7bb03c0415f886530416afa2c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -8538,8 +8538,8 @@ public:
|
||||
|
||||
} /// namespace Internal
|
||||
|
||||
TextEditorFactory::TextEditorFactory(QObject *parent)
|
||||
: IEditorFactory(parent), d(new TextEditorFactoryPrivate(this))
|
||||
TextEditorFactory::TextEditorFactory()
|
||||
: d(new TextEditorFactoryPrivate(this))
|
||||
{
|
||||
setEditorCreator([]() { return new BaseTextEditor; });
|
||||
}
|
||||
|
@@ -636,7 +636,7 @@ class TEXTEDITOR_EXPORT TextEditorFactory : public Core::IEditorFactory
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TextEditorFactory(QObject *parent = nullptr);
|
||||
TextEditorFactory();
|
||||
~TextEditorFactory() override;
|
||||
|
||||
using EditorCreator = std::function<BaseTextEditor *()>;
|
||||
|
@@ -52,8 +52,7 @@ namespace VcsBase {
|
||||
VcsEditorFactory::VcsEditorFactory(const VcsBaseEditorParameters *parameters,
|
||||
// Force copy, see QTCREATORBUG-13218
|
||||
const EditorWidgetCreator editorWidgetCreator,
|
||||
std::function<void(const QString &, const QString &)> describeFunc, QObject *parent)
|
||||
: TextEditorFactory(parent)
|
||||
std::function<void(const QString &, const QString &)> describeFunc)
|
||||
{
|
||||
setProperty("VcsEditorFactoryName", QByteArray(parameters->id));
|
||||
setId(parameters->id);
|
||||
|
@@ -42,8 +42,7 @@ class VCSBASE_EXPORT VcsEditorFactory : public TextEditor::TextEditorFactory
|
||||
public:
|
||||
VcsEditorFactory(const VcsBaseEditorParameters *parameters,
|
||||
const EditorWidgetCreator editorWidgetCreator,
|
||||
std::function<void(const QString &, const QString &)> describeFunc,
|
||||
QObject *parent = nullptr);
|
||||
std::function<void(const QString &, const QString &)> describeFunc);
|
||||
|
||||
static VcsBaseEditor *createEditorById(const char *id);
|
||||
};
|
||||
|
Reference in New Issue
Block a user