summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-02-11 17:55:15 +0100
committerhjk <hjk@qt.io>2020-02-13 12:57:56 +0000
commit7a08a3a4b9ea26677f40cb0dc8a98b23542e49fa (patch)
treed647a3389174916556f8b85d561270856af2bea3 /src
parentafd8bc2c9e81ff437e47726f2be49692ef38bf29 (diff)
downloadqt-creator-7a08a3a4b9ea26677f40cb0dc8a98b23542e49fa.tar.gz
ScxmlEditor: Make ScxmlEditorFactory independent of QObject inheritance
Change-Id: I11412b850869c8295e9eed9ed74ff4f7dcbcf8b2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/scxmleditor/scxmleditordata.cpp3
-rw-r--r--src/plugins/scxmleditor/scxmleditordata.h2
-rw-r--r--src/plugins/scxmleditor/scxmleditorfactory.cpp7
-rw-r--r--src/plugins/scxmleditor/scxmleditorfactory.h1
4 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/scxmleditor/scxmleditordata.cpp b/src/plugins/scxmleditor/scxmleditordata.cpp
index 394b00533c..14d9c26e18 100644
--- a/src/plugins/scxmleditor/scxmleditordata.cpp
+++ b/src/plugins/scxmleditor/scxmleditordata.cpp
@@ -87,8 +87,7 @@ public:
}
};
-ScxmlEditorData::ScxmlEditorData(QObject *parent)
- : QObject(parent)
+ScxmlEditorData::ScxmlEditorData()
{
m_contexts.add(ScxmlEditor::Constants::C_SCXMLEDITOR);
diff --git a/src/plugins/scxmleditor/scxmleditordata.h b/src/plugins/scxmleditor/scxmleditordata.h
index 25054ecb3a..0cd4bf7119 100644
--- a/src/plugins/scxmleditor/scxmleditordata.h
+++ b/src/plugins/scxmleditor/scxmleditordata.h
@@ -46,7 +46,7 @@ class ScxmlEditorData : public QObject
{
Q_OBJECT
public:
- ScxmlEditorData(QObject *parent = nullptr);
+ ScxmlEditorData();
~ScxmlEditorData() override;
void fullInit();
diff --git a/src/plugins/scxmleditor/scxmleditorfactory.cpp b/src/plugins/scxmleditor/scxmleditorfactory.cpp
index a18132f984..56d707173e 100644
--- a/src/plugins/scxmleditor/scxmleditorfactory.cpp
+++ b/src/plugins/scxmleditor/scxmleditorfactory.cpp
@@ -48,7 +48,7 @@ ScxmlEditorFactory::ScxmlEditorFactory()
setEditorCreator([this] {
if (!m_editorData) {
- m_editorData = new ScxmlEditorData(this);
+ m_editorData = new ScxmlEditorData;
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
m_editorData->fullInit();
QGuiApplication::restoreOverrideCursor();
@@ -56,3 +56,8 @@ ScxmlEditorFactory::ScxmlEditorFactory()
return m_editorData->createEditor();
});
}
+
+ScxmlEditorFactory::~ScxmlEditorFactory()
+{
+ delete m_editorData;
+}
diff --git a/src/plugins/scxmleditor/scxmleditorfactory.h b/src/plugins/scxmleditor/scxmleditorfactory.h
index f4424f613c..7dd3393da5 100644
--- a/src/plugins/scxmleditor/scxmleditorfactory.h
+++ b/src/plugins/scxmleditor/scxmleditorfactory.h
@@ -36,6 +36,7 @@ class ScxmlEditorFactory final : public Core::IEditorFactory
{
public:
ScxmlEditorFactory();
+ ~ScxmlEditorFactory();
private:
ScxmlEditorData* m_editorData = nullptr;