QmlDesigner: Remove parent from abstract view

We apply not very often the parent to views. So it can lead to dangling
pointer if the parent is used by other objects and does not handle the
null pointer case. It can lead to double deletion if the parent is
deleted before the object when it is on the stack or handled by smart
pointer.

If you really want to use it there is still setParent.

Change-Id: I1fc6b145a50f037a0e9d415fb36e7970ea7296ed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2022-09-15 13:07:45 +02:00
committed by Tim Jenssen
parent 4bb4e07ad8
commit 0be4de69d8
55 changed files with 254 additions and 280 deletions

View File

@@ -31,8 +31,7 @@
namespace QmlDesigner {
Edit3DView::Edit3DView(QObject *parent)
: AbstractView(parent)
Edit3DView::Edit3DView()
{
m_compressionTimer.setInterval(1000);
m_compressionTimer.setSingleShot(true);