aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/timelineeditor
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2020-03-06 16:38:47 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2020-03-09 11:37:42 +0000
commitdc2abffe6023dfa99a6d9725e129eeeabaa3b5ab (patch)
tree985f4ac3659fb3ef6dc233b95bc8a0a77400f9d3 /src/plugins/qmldesigner/components/timelineeditor
parentce3103194f3f08c0482e47ce599234db04f93a14 (diff)
QmlDesigner: Fix crash on shutdown
Task-number: QDS-1749 Change-Id: I0ddfcc98080de0bdf2f620fdad387b3a4a582c4e Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/timelineeditor')
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp8
-rw-r--r--src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
index 4c4e1e38f0..ea065e49a1 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.cpp
@@ -104,10 +104,10 @@ QAction *createAction(const Core::Id &id,
TimelineToolBar::TimelineToolBar(QWidget *parent)
: QToolBar(parent)
, m_grp()
- , m_dialog(Core::ICore::dialogParent())
+ , m_dialog(new AnimationCurveDialog(Core::ICore::dialogParent()))
, m_curveModel(new AnimationCurveEditorModel(0., 500.))
{
- m_dialog.setModel(m_curveModel);
+ m_dialog->setModel(m_curveModel);
connect(m_curveModel,
&AnimationCurveEditorModel::currentFrameChanged,
this,
@@ -232,9 +232,9 @@ void TimelineToolBar::openAnimationCurveEditor()
timeline = tlv->timelineForState(tlv->currentState());
}
- m_dialog.refresh();
+ m_dialog->refresh();
m_curveModel->setTimeline(timeline);
- m_dialog.show();
+ m_dialog->show();
}
void TimelineToolBar::updateCurve(DesignTools::PropertyTreeItem *item)
diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.h b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.h
index a95af873da..6f275484b4 100644
--- a/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.h
+++ b/src/plugins/qmldesigner/components/timelineeditor/timelinetoolbar.h
@@ -105,7 +105,7 @@ private:
QList<QObject *> m_grp;
- AnimationCurveDialog m_dialog;
+ AnimationCurveDialog *m_dialog = nullptr;
AnimationCurveEditorModel *m_curveModel = nullptr;