aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-08-27 15:34:15 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-08-28 08:57:54 +0000
commit75db89d92e8dbba8114b1b905242e3638ddcdce9 (patch)
treee288469021e3d4f1a2b1d12a2fa9826be4530e7c
parent3008255bb54819f1549066667cbbe3265af1bc15 (diff)
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>
-rw-r--r--src/libs/tracing/timelineabstractrenderer_p.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libs/tracing/timelineabstractrenderer_p.h b/src/libs/tracing/timelineabstractrenderer_p.h
index 0626710cd8..98d97004a3 100644
--- a/src/libs/tracing/timelineabstractrenderer_p.h
+++ b/src/libs/tracing/timelineabstractrenderer_p.h
@@ -27,6 +27,8 @@
#include "timelineabstractrenderer.h"
+#include <QPointer>
+
namespace Timeline {
class TRACING_EXPORT TimelineAbstractRenderer::TimelineAbstractRendererPrivate {
@@ -36,9 +38,9 @@ public:
int selectedItem;
bool selectionLocked;
- TimelineModel *model;
- TimelineNotesModel *notes;
- TimelineZoomControl *zoomer;
+ QPointer<TimelineModel> model;
+ QPointer<TimelineNotesModel> notes;
+ QPointer<TimelineZoomControl> zoomer;
bool modelDirty;
bool rowHeightsDirty;