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
|
} /// namespace Internal
|
||||||
|
|
||||||
TextEditorFactory::TextEditorFactory(QObject *parent)
|
TextEditorFactory::TextEditorFactory()
|
||||||
: IEditorFactory(parent), d(new TextEditorFactoryPrivate(this))
|
: d(new TextEditorFactoryPrivate(this))
|
||||||
{
|
{
|
||||||
setEditorCreator([]() { return new BaseTextEditor; });
|
setEditorCreator([]() { return new BaseTextEditor; });
|
||||||
}
|
}
|
||||||
|
@@ -636,7 +636,7 @@ class TEXTEDITOR_EXPORT TextEditorFactory : public Core::IEditorFactory
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TextEditorFactory(QObject *parent = nullptr);
|
TextEditorFactory();
|
||||||
~TextEditorFactory() override;
|
~TextEditorFactory() override;
|
||||||
|
|
||||||
using EditorCreator = std::function<BaseTextEditor *()>;
|
using EditorCreator = std::function<BaseTextEditor *()>;
|
||||||
|
@@ -52,8 +52,7 @@ namespace VcsBase {
|
|||||||
VcsEditorFactory::VcsEditorFactory(const VcsBaseEditorParameters *parameters,
|
VcsEditorFactory::VcsEditorFactory(const VcsBaseEditorParameters *parameters,
|
||||||
// Force copy, see QTCREATORBUG-13218
|
// Force copy, see QTCREATORBUG-13218
|
||||||
const EditorWidgetCreator editorWidgetCreator,
|
const EditorWidgetCreator editorWidgetCreator,
|
||||||
std::function<void(const QString &, const QString &)> describeFunc, QObject *parent)
|
std::function<void(const QString &, const QString &)> describeFunc)
|
||||||
: TextEditorFactory(parent)
|
|
||||||
{
|
{
|
||||||
setProperty("VcsEditorFactoryName", QByteArray(parameters->id));
|
setProperty("VcsEditorFactoryName", QByteArray(parameters->id));
|
||||||
setId(parameters->id);
|
setId(parameters->id);
|
||||||
|
@@ -42,8 +42,7 @@ class VCSBASE_EXPORT VcsEditorFactory : public TextEditor::TextEditorFactory
|
|||||||
public:
|
public:
|
||||||
VcsEditorFactory(const VcsBaseEditorParameters *parameters,
|
VcsEditorFactory(const VcsBaseEditorParameters *parameters,
|
||||||
const EditorWidgetCreator editorWidgetCreator,
|
const EditorWidgetCreator editorWidgetCreator,
|
||||||
std::function<void(const QString &, const QString &)> describeFunc,
|
std::function<void(const QString &, const QString &)> describeFunc);
|
||||||
QObject *parent = nullptr);
|
|
||||||
|
|
||||||
static VcsBaseEditor *createEditorById(const char *id);
|
static VcsBaseEditor *createEditorById(const char *id);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user