summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-06-24 10:25:01 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-06-25 10:11:51 +0200
commit3c7d4de151d0d87b687644381c5d8aaef06f21b2 (patch)
tree12c688048acac5f817b68dfbef088544a8ae946a /tests/manual
parentfcb44309e4cd228245d310bdbd622e7a2ff98283 (diff)
Use QList instead of QVector
Task-number: QTBUG-84469 Change-Id: I4dc064b70adb054ca4add2dd662e7227255ff970 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/galaxy/cumulativedistributor.h14
-rw-r--r--tests/manual/qmlvolume/datasource.cpp4
-rw-r--r--tests/manual/volumetrictest/volumetrictest.cpp18
-rw-r--r--tests/manual/volumetrictest/volumetrictest.h2
4 files changed, 19 insertions, 19 deletions
diff --git a/tests/manual/galaxy/cumulativedistributor.h b/tests/manual/galaxy/cumulativedistributor.h
index 59610953..56276e98 100644
--- a/tests/manual/galaxy/cumulativedistributor.h
+++ b/tests/manual/galaxy/cumulativedistributor.h
@@ -38,8 +38,8 @@
#define CUMULATIVEDISTRIBUTOR_H
#include <QtCore/qglobal.h>
+#include <QtCore/QList>
#include <QtGui/QVector2D>
-#include <QtCore/QVector>
class CumulativeDistributor
{
@@ -69,13 +69,13 @@ private:
qreal m_a;
qreal m_RBulge;
- QVector<qreal> m_vM1;
- QVector<qreal> m_vY1;
- QVector<qreal> m_vX1;
+ QList<qreal> m_vM1;
+ QList<qreal> m_vY1;
+ QList<qreal> m_vX1;
- QVector<qreal> m_vM2;
- QVector<qreal> m_vY2;
- QVector<qreal> m_vX2;
+ QList<qreal> m_vM2;
+ QList<qreal> m_vY2;
+ QList<qreal> m_vX2;
void buildCDF(int nSteps);
diff --git a/tests/manual/qmlvolume/datasource.cpp b/tests/manual/qmlvolume/datasource.cpp
index 6f3d8c15..a06ea6d9 100644
--- a/tests/manual/qmlvolume/datasource.cpp
+++ b/tests/manual/qmlvolume/datasource.cpp
@@ -57,7 +57,7 @@ void DataSource::fillVolume(QCustom3DVolume *volumeItem)
float(textureSize) / 2.0f,
float(textureSize) / 2.0f);
- QVector<uchar> *textureData = new QVector<uchar>(textureSize * textureSize * textureSize / 2);
+ QList<uchar> *textureData = new QList<uchar>(textureSize * textureSize * textureSize / 2);
for (int i = 0; i < textureSize; i++) {
for (int j = 0; j < textureSize / 2; j++) {
for (int k = 0; k < textureSize; k++) {
@@ -82,7 +82,7 @@ void DataSource::fillVolume(QCustom3DVolume *volumeItem)
volumeItem->setTextureFormat(QImage::Format_Indexed8);
volumeItem->setTextureData(textureData);
- QVector<QRgb> colorTable(256);
+ QList<QRgb> colorTable(256);
for (int i = 1; i < 256; i++) {
if (i < 15)
diff --git a/tests/manual/volumetrictest/volumetrictest.cpp b/tests/manual/volumetrictest/volumetrictest.cpp
index 6b2a57a8..a60c55bc 100644
--- a/tests/manual/volumetrictest/volumetrictest.cpp
+++ b/tests/manual/volumetrictest/volumetrictest.cpp
@@ -251,7 +251,7 @@ void VolumetricModifier::handleFpsChange()
void VolumetricModifier::testSubtextureSetting()
{
// Setting the rendered Slice as subtexture should result in identical volume
- QVector<uchar> dataBefore = *m_volumeItem->textureData();
+ QList<uchar> dataBefore = *m_volumeItem->textureData();
dataBefore[0] = dataBefore.at(0); // Make sure we are detached
checkRenderCase(1, Qt::XAxis, 56, dataBefore, m_volumeItem);
@@ -355,7 +355,7 @@ void VolumetricModifier::testBoundsSetting()
}
void VolumetricModifier::checkRenderCase(int id, Qt::Axis axis, int index,
- const QVector<uchar> &dataBefore,
+ const QList<uchar> &dataBefore,
QCustom3DVolume *volumeItem)
{
QImage slice = volumeItem->renderSlice(axis, index);
@@ -384,7 +384,7 @@ void VolumetricModifier::createVolume()
<< logo.sizeInBytes() << (logo.width() * logo.height())
<< logo.bytesPerLine();
- QVector<QImage *> imageArray(imageCount);
+ QList<QImage *> imageArray(imageCount);
for (int i = 0; i < imageCount; i++) {
QImage *newImage = new QImage(logo);
imageArray[i] = newImage;
@@ -399,7 +399,7 @@ void VolumetricModifier::createVolume()
m_sliceIndexY = m_volumeItem->textureWidth() / 2;
m_sliceIndexZ = m_volumeItem->textureWidth() / 2;
- QVector<QRgb> colorTable = m_volumeItem->colorTable();
+ QList<QRgb> colorTable = m_volumeItem->colorTable();
// Hack some alpha to the picture
for (int i = 0; i < colorTable.size(); i++) {
@@ -540,7 +540,7 @@ void VolumetricModifier::createAnotherVolume()
logo.save("d:/qt/goobar.png");
- QVector<QImage *> imageArray(imageCount);
+ QList<QImage *> imageArray(imageCount);
for (int i = 0; i < imageCount; i++) {
QImage *newImage = new QImage(logo);
imageArray[i] = newImage;
@@ -582,9 +582,9 @@ void VolumetricModifier::createYetAnotherVolume()
// m_volumeItem->textureDepth());
m_volumeItem3->setTextureDimensions(200, 200, 200);
- QVector<uchar> *tdata = new QVector<uchar>(m_volumeItem3->textureDataWidth()
- * m_volumeItem3->textureHeight()
- * m_volumeItem3->textureDepth());
+ QList<uchar> *tdata =
+ new QList<uchar>(m_volumeItem3->textureDataWidth() * m_volumeItem3->textureHeight()
+ * m_volumeItem3->textureDepth());
tdata->fill(0);
m_volumeItem3->setTextureData(tdata);
@@ -592,7 +592,7 @@ void VolumetricModifier::createYetAnotherVolume()
m_sliceIndexY = m_volumeItem3->textureWidth() / 2;
m_sliceIndexZ = m_volumeItem3->textureWidth() / 2;
- QVector<QRgb> colorTable = m_volumeItem->colorTable();
+ QList<QRgb> colorTable = m_volumeItem->colorTable();
colorTable[0] = qRgba(0, 0, 0, 0);
m_volumeItem3->setColorTable(colorTable);
int redIndex = colorTable.size() - 3;
diff --git a/tests/manual/volumetrictest/volumetrictest.h b/tests/manual/volumetrictest/volumetrictest.h
index 2e4309a6..83e0d01a 100644
--- a/tests/manual/volumetrictest/volumetrictest.h
+++ b/tests/manual/volumetrictest/volumetrictest.h
@@ -67,7 +67,7 @@ private:
void createVolume();
void createAnotherVolume();
void createYetAnotherVolume();
- void checkRenderCase(int id, Qt::Axis axis, int index, const QVector<uchar> &dataBefore,
+ void checkRenderCase(int id, Qt::Axis axis, int index, const QList<uchar> &dataBefore,
QCustom3DVolume *volumeItem);
QAbstract3DGraph *m_graph;