From 333cf897359eab1eb37e1f60dd681b00e6a5d135 Mon Sep 17 00:00:00 2001 From: Sami Varanka Date: Thu, 23 Sep 2021 08:52:53 +0300 Subject: Add hasSeries method to Abstract3D graph MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a hasSeries method to Abstract3Dgraph. The method can be used to check whether a series has already been added to the graph. In addition, modified cpp and qml autotests to test the added method. Fixes: QTBUG-96683 Change-Id: I91f70ca15b6c5fbaa7691cd17bbfc2ef460c3d37 Reviewed-by: Miikka Heikkinen Reviewed-by: Tomi Korpipää --- tests/auto/qmltest/surface3d/tst_surface.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/auto/qmltest/surface3d/tst_surface.qml') diff --git a/tests/auto/qmltest/surface3d/tst_surface.qml b/tests/auto/qmltest/surface3d/tst_surface.qml index 2ec96007..e112295f 100644 --- a/tests/auto/qmltest/surface3d/tst_surface.qml +++ b/tests/auto/qmltest/surface3d/tst_surface.qml @@ -28,7 +28,7 @@ ****************************************************************************/ import QtQuick 2.0 -import QtDataVisualization 1.2 +import QtDataVisualization import QtTest 1.0 Item { @@ -67,5 +67,11 @@ Item { series.seriesList[0].selectedPoint = Qt.point(0, 0) compare(series.selectedSeries, series1) } + + function test_5_has_series() { + series.seriesList = [series1] + compare(series.hasSeries(series1), true) + compare(series.hasSeries(series2), false) + } } } -- cgit v1.2.3