diff options
Diffstat (limited to 'tests/qmldynamicdata')
-rw-r--r-- | tests/qmldynamicdata/main.cpp | 12 | ||||
-rw-r--r-- | tests/qmldynamicdata/qml/qmldynamicdata/main.qml | 24 | ||||
-rw-r--r-- | tests/qmldynamicdata/qml/qmldynamicdata/newbutton.qml | 2 | ||||
-rw-r--r-- | tests/qmldynamicdata/qmldynamicdata.pro | 2 |
4 files changed, 26 insertions, 14 deletions
diff --git a/tests/qmldynamicdata/main.cpp b/tests/qmldynamicdata/main.cpp index aedc026e..7c9bcf86 100644 --- a/tests/qmldynamicdata/main.cpp +++ b/tests/qmldynamicdata/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** @@ -16,6 +16,7 @@ ** ****************************************************************************/ +#include <QtDataVisualization/qutils.h> #include <QtGui/QGuiApplication> #include "qtquick2applicationviewer.h" #ifdef Q_OS_ANDROID @@ -30,15 +31,8 @@ int main(int argc, char *argv[]) QtQuick2ApplicationViewer viewer; -#if !defined(QT_OPENGL_ES_2) // Enable antialiasing - QSurfaceFormat surfaceFormat; - surfaceFormat.setDepthBufferSize(24); - surfaceFormat.setSamples(8); - surfaceFormat.setRenderableType(QSurfaceFormat::OpenGL); - surfaceFormat.setSwapBehavior(QSurfaceFormat::DoubleBuffer); - viewer.setFormat(surfaceFormat); -#endif + viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat()); #ifdef Q_OS_ANDROID viewer.addImportPath(QString::fromLatin1("assets:/qml")); diff --git a/tests/qmldynamicdata/qml/qmldynamicdata/main.qml b/tests/qmldynamicdata/qml/qmldynamicdata/main.qml index 4ed3b8ae..6f0032ac 100644 --- a/tests/qmldynamicdata/qml/qmldynamicdata/main.qml +++ b/tests/qmldynamicdata/qml/qmldynamicdata/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** @@ -34,7 +34,7 @@ Item { Timer { id: dataTimer - interval: 20 + interval: 1 running: true repeat: true property bool isIncreasing: true @@ -42,7 +42,16 @@ Item { onTriggered: { if (isIncreasing) { graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); - if (graphModel.count == 500) { + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + graphModel.append({"xPos": Math.random(), "yPos": Math.random(), "zPos": Math.random()}); + if (graphModel.count > 5000) { scatterGraph.theme.type = Theme3D.ThemeIsabelle; isIncreasing = false; } @@ -50,6 +59,15 @@ Item { // TODO: Once QTRD-2645 is fixed, change this to remove from // random index to add coverage. graphModel.remove(2); + graphModel.remove(2); + graphModel.remove(2); + graphModel.remove(2); + graphModel.remove(2); + graphModel.remove(2); + graphModel.remove(2); + graphModel.remove(2); + graphModel.remove(2); + graphModel.remove(2); if (graphModel.count == 2) { scatterGraph.theme.type = Theme3D.ThemeDigia; isIncreasing = true; diff --git a/tests/qmldynamicdata/qml/qmldynamicdata/newbutton.qml b/tests/qmldynamicdata/qml/qmldynamicdata/newbutton.qml index 895db183..0b792dbf 100644 --- a/tests/qmldynamicdata/qml/qmldynamicdata/newbutton.qml +++ b/tests/qmldynamicdata/qml/qmldynamicdata/newbutton.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/tests/qmldynamicdata/qmldynamicdata.pro b/tests/qmldynamicdata/qmldynamicdata.pro index da987ff0..b95f1577 100644 --- a/tests/qmldynamicdata/qmldynamicdata.pro +++ b/tests/qmldynamicdata/qmldynamicdata.pro @@ -1,5 +1,5 @@ !include( ../tests.pri ) { - error( "Couldn't find the examples.pri file!" ) + error( "Couldn't find the tests.pri file!" ) } QT += widgets |