From d7878dad36e176ef0e2e1c54db891e115d29b489 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 13 Jan 2021 14:56:48 +0100 Subject: statistics: pass view to series The series were passed a pointer to the QGraphicsScene to add their item. In the future these items will be replaced by QSGNodes. To add these, the series need a reference to the StatsView. Therefore pass it in the constructor. Once everything is replaces by QSGNodes, remove the QGraphicsScene member. Signed-off-by: Berthold Stoeger --- stats/statsview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stats/statsview.cpp') diff --git a/stats/statsview.cpp b/stats/statsview.cpp index 5f9f51f6d..e97510087 100644 --- a/stats/statsview.cpp +++ b/stats/statsview.cpp @@ -246,7 +246,7 @@ void StatsView::hoverMoveEvent(QHoverEvent *event) template T *StatsView::createSeries(Args&&... args) { - T *res = new T(&scene, xAxis, yAxis, std::forward(args)...); + T *res = new T(&scene, *this, xAxis, yAxis, std::forward(args)...); series.emplace_back(res); series.back()->updatePositions(); return res; -- cgit v1.2.3-70-g09d2