QmlProfiler: Clear the model manager before deleting it

We cannot have the model manager clear itself from the dtor, as the
order of deletion between the various other objects parented to the tool
is undefined. Make sure we get into a clean state before the model
manager disappears.

This fixes the soft asserts when the tests shut down.

Change-Id: I8fcd52a7c2d0703cbdd215d85aa1d80c2e3296a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Ulf Hermann
2018-05-28 14:15:51 +02:00
parent 491b057d14
commit bd659b2b99

View File

@@ -320,6 +320,7 @@ QmlProfilerTool::QmlProfilerTool()
QmlProfilerTool::~QmlProfilerTool()
{
d->m_profilerModelManager->clearAll();
delete d;
}