Tracing: Wrap pointers we don't own in QPointer

The notes model might get deleted before the renderer.

Change-Id: Ic7b0ee73bd96e63b19e05b1a374baaf28c6f47fc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-08-27 15:34:15 +02:00
parent 3008255bb5
commit 75db89d92e

View File

@@ -27,6 +27,8 @@
#include "timelineabstractrenderer.h" #include "timelineabstractrenderer.h"
#include <QPointer>
namespace Timeline { namespace Timeline {
class TRACING_EXPORT TimelineAbstractRenderer::TimelineAbstractRendererPrivate { class TRACING_EXPORT TimelineAbstractRenderer::TimelineAbstractRendererPrivate {
@@ -36,9 +38,9 @@ public:
int selectedItem; int selectedItem;
bool selectionLocked; bool selectionLocked;
TimelineModel *model; QPointer<TimelineModel> model;
TimelineNotesModel *notes; QPointer<TimelineNotesModel> notes;
TimelineZoomControl *zoomer; QPointer<TimelineZoomControl> zoomer;
bool modelDirty; bool modelDirty;
bool rowHeightsDirty; bool rowHeightsDirty;