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 | |
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')
-rw-r--r-- | examples/opengl/hellogl2/logo.h | 4 | ||||
-rw-r--r-- | examples/opengl/hellowindow/hellowindow.h | 4 | ||||
-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 | ||||
-rw-r--r-- | examples/opengl/textures/glwidget.cpp | 2 | ||||
-rw-r--r-- | examples/opengl/threadedqopenglwidget/glwidget.h | 4 |
7 files changed, 13 insertions, 13 deletions
diff --git a/examples/opengl/hellogl2/logo.h b/examples/opengl/hellogl2/logo.h index 2f3dc7e649..5b6c3973f7 100644 --- a/examples/opengl/hellogl2/logo.h +++ b/examples/opengl/hellogl2/logo.h @@ -52,7 +52,7 @@ #define LOGO_H #include <qopengl.h> -#include <QVector> +#include <QList> #include <QVector3D> class Logo @@ -68,7 +68,7 @@ private: void extrude(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); void add(const QVector3D &v, const QVector3D &n); - QVector<GLfloat> m_data; + QList<GLfloat> m_data; int m_count = 0; }; diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h index 76f2afb549..d4dcbcf3db 100644 --- a/examples/opengl/hellowindow/hellowindow.h +++ b/examples/opengl/hellowindow/hellowindow.h @@ -83,8 +83,8 @@ private: void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4); void extrude(qreal x1, qreal y1, qreal x2, qreal y2); - QVector<QVector3D> vertices; - QVector<QVector3D> normals; + QList<QVector3D> vertices; + QList<QVector3D> normals; int vertexAttr; int normalAttr; int matrixUniform; 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 diff --git a/examples/opengl/textures/glwidget.cpp b/examples/opengl/textures/glwidget.cpp index be5a46e532..2ef17c511c 100644 --- a/examples/opengl/textures/glwidget.cpp +++ b/examples/opengl/textures/glwidget.cpp @@ -199,7 +199,7 @@ void GLWidget::makeObject() for (int j = 0; j < 6; ++j) textures[j] = new QOpenGLTexture(QImage(QString(":/images/side%1.png").arg(j + 1)).mirrored()); - QVector<GLfloat> vertData; + QList<GLfloat> vertData; for (int i = 0; i < 6; ++i) { for (int j = 0; j < 4; ++j) { // vertex position diff --git a/examples/opengl/threadedqopenglwidget/glwidget.h b/examples/opengl/threadedqopenglwidget/glwidget.h index 8dc84dd0b1..2bff56c471 100644 --- a/examples/opengl/threadedqopenglwidget/glwidget.h +++ b/examples/opengl/threadedqopenglwidget/glwidget.h @@ -91,8 +91,8 @@ private: bool m_inited = false; qreal m_fAngle = 0; qreal m_fScale = 1; - QVector<QVector3D> vertices; - QVector<QVector3D> normals; + QList<QVector3D> vertices; + QList<QVector3D> normals; QOpenGLShaderProgram program; QOpenGLBuffer vbo; int vertexAttr = 0; |