diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-22 10:12:38 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-23 14:01:11 +0200 |
commit | 29c99bddbf48f97b054a34354f55b36a3f84a62c (patch) | |
tree | ca0116c45cc3cb04e13a953316f468012d3dc2d2 /examples/opengl/qopenglwidget | |
parent | d7efb2a419a88c8f512b98194c8f7bc81dbe942b (diff) |
Use QList instead of QVector in examples
Task-number: QTBUG-84469
Change-Id: Id14119168bb1bf11f99bda7ef6ee9cf51bcfab2e
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'examples/opengl/qopenglwidget')
-rw-r--r-- | examples/opengl/qopenglwidget/glwidget.cpp | 2 | ||||
-rw-r--r-- | examples/opengl/qopenglwidget/glwidget.h | 8 | ||||
-rw-r--r-- | examples/opengl/qopenglwidget/mainwindow.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/opengl/qopenglwidget/glwidget.cpp b/examples/opengl/qopenglwidget/glwidget.cpp index 89c8469662..a480fe5726 100644 --- a/examples/opengl/qopenglwidget/glwidget.cpp +++ b/examples/opengl/qopenglwidget/glwidget.cpp @@ -319,7 +319,7 @@ void GLWidget::initializeGL() // let's do something different and potentially more efficient: create a // properly interleaved data set. const int vertexCount = m_vertices.count(); - QVector<GLfloat> buf; + QList<GLfloat> buf; buf.resize(vertexCount * 3 * 2); GLfloat *p = buf.data(); for (int i = 0; i < vertexCount; ++i) { diff --git a/examples/opengl/qopenglwidget/glwidget.h b/examples/opengl/qopenglwidget/glwidget.h index 99288261c0..50f8aa9be5 100644 --- a/examples/opengl/qopenglwidget/glwidget.h +++ b/examples/opengl/qopenglwidget/glwidget.h @@ -57,7 +57,7 @@ #include <QVector3D> #include <QMatrix4x4> #include <QElapsedTimer> -#include <QVector> +#include <QList> #include <QPushButton> class Bubble; @@ -101,10 +101,10 @@ private: qreal m_fAngle = 0; qreal m_fScale = 1; bool m_showBubbles = true; - QVector<QVector3D> m_vertices; - QVector<QVector3D> m_normals; + QList<QVector3D> m_vertices; + QList<QVector3D> m_normals; bool m_qtLogo = true; - QVector<Bubble *> m_bubbles; + QList<Bubble *> m_bubbles; int m_frames = 0; QElapsedTimer m_time; QOpenGLShader *m_vshader1 = nullptr; diff --git a/examples/opengl/qopenglwidget/mainwindow.h b/examples/opengl/qopenglwidget/mainwindow.h index bec1a563e0..43cc55100e 100644 --- a/examples/opengl/qopenglwidget/mainwindow.h +++ b/examples/opengl/qopenglwidget/mainwindow.h @@ -77,7 +77,7 @@ private: QGridLayout *m_layout; int m_nextX; int m_nextY; - QVector<QOpenGLWidget *> m_glWidgets; + QList<QOpenGLWidget *> m_glWidgets; }; #endif |