summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-07 14:02:36 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-07 19:32:07 +0200
commit8a59b2ebf081af5bb9698281420d0ce59405712d (patch)
tree354f5ca9f897667c8ee9b0765c32a1f2daabcd92 /src/render/frontend
parent858e0ce0ef39e3094e09c19fa27a896be4abfe74 (diff)
Use QList instead of QVector
Task-number: QTBUG-84469 Change-Id: Ic726ce85e01190dbc64426388fd454c54ae3c3e3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/frontend')
-rw-r--r--src/render/frontend/qlevelofdetail.cpp8
-rw-r--r--src/render/frontend/qlevelofdetail.h8
-rw-r--r--src/render/frontend/qrendertarget.cpp2
-rw-r--r--src/render/frontend/qrendertarget.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/render/frontend/qlevelofdetail.cpp b/src/render/frontend/qlevelofdetail.cpp
index 9b54e832e..d3b1e3d30 100644
--- a/src/render/frontend/qlevelofdetail.cpp
+++ b/src/render/frontend/qlevelofdetail.cpp
@@ -99,7 +99,7 @@ void QLevelOfDetailPrivate::setCurrentIndex(int currentIndex)
Qt3DRender::QGeometryRenderer *geometryRenderer = new Qt3DCore::QGeometryRenderer(renderableEntity);
renderableEntity->addComponent(geometryRenderer);
Qt3DRender::QLevelOfDetail* lod = new Qt3Render::QLevelOfDetail(renderableEntity);
- QVector<qreal> thresholds = {20, 35, 50, 65};
+ QList<qreal> thresholds = {20, 35, 50, 65};
lod->setThresholds(thresholds);
lod->setCamera(mainCamera);
renderableEntity->addComponent(lod);
@@ -232,7 +232,7 @@ void QLevelOfDetailPrivate::setCurrentIndex(int currentIndex)
*/
/*!
- * \qmlproperty QVector<qreal> LevelOfDetail::thresholds
+ * \qmlproperty QList<qreal> LevelOfDetail::thresholds
*
* Array of range values as float point numbers. The value for the most detailed representation
* should be specified first.
@@ -368,7 +368,7 @@ void QLevelOfDetail::setThresholdType(QLevelOfDetail::ThresholdType thresholdTyp
}
}
-QVector<qreal> QLevelOfDetail::thresholds() const
+QList<qreal> QLevelOfDetail::thresholds() const
{
Q_D(const QLevelOfDetail);
return d->m_thresholds;
@@ -383,7 +383,7 @@ QLevelOfDetailBoundingSphere QLevelOfDetail::createBoundingSphere(const QVector3
* Sets the range values in \a thresholds.
* \sa Qt3DRender::QLevelOfDetail::thresholdType
*/
-void QLevelOfDetail::setThresholds(const QVector<qreal> &thresholds)
+void QLevelOfDetail::setThresholds(const QList<qreal> &thresholds)
{
Q_D(QLevelOfDetail);
if (d->m_thresholds != thresholds) {
diff --git a/src/render/frontend/qlevelofdetail.h b/src/render/frontend/qlevelofdetail.h
index f31c90db7..1edd83b3b 100644
--- a/src/render/frontend/qlevelofdetail.h
+++ b/src/render/frontend/qlevelofdetail.h
@@ -59,7 +59,7 @@ class Q_3DRENDERSHARED_EXPORT QLevelOfDetail : public Qt3DCore::QComponent
Q_PROPERTY(Qt3DRender::QCamera *camera READ camera WRITE setCamera NOTIFY cameraChanged)
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
Q_PROPERTY(ThresholdType thresholdType READ thresholdType WRITE setThresholdType NOTIFY thresholdTypeChanged)
- Q_PROPERTY(QVector<qreal> thresholds READ thresholds WRITE setThresholds NOTIFY thresholdsChanged)
+ Q_PROPERTY(QList<qreal> thresholds READ thresholds WRITE setThresholds NOTIFY thresholdsChanged)
Q_PROPERTY(Qt3DRender::QLevelOfDetailBoundingSphere volumeOverride READ volumeOverride WRITE setVolumeOverride NOTIFY volumeOverrideChanged)
public:
@@ -75,7 +75,7 @@ public:
QCamera *camera() const;
int currentIndex() const;
ThresholdType thresholdType() const;
- QVector<qreal> thresholds() const;
+ QList<qreal> thresholds() const;
QLevelOfDetailBoundingSphere volumeOverride() const;
Q_INVOKABLE Qt3DRender::QLevelOfDetailBoundingSphere createBoundingSphere(const QVector3D &center, float radius);
@@ -84,14 +84,14 @@ public Q_SLOTS:
void setCamera(QCamera *camera);
void setCurrentIndex(int currentIndex);
void setThresholdType(ThresholdType thresholdType);
- void setThresholds(const QVector<qreal> &thresholds);
+ void setThresholds(const QList<qreal> &thresholds);
void setVolumeOverride(const QLevelOfDetailBoundingSphere &volumeOverride);
Q_SIGNALS:
void cameraChanged(QCamera *camera);
void currentIndexChanged(int currentIndex);
void thresholdTypeChanged(ThresholdType thresholdType);
- void thresholdsChanged(const QVector<qreal> &thresholds);
+ void thresholdsChanged(const QList<qreal> &thresholds);
void volumeOverrideChanged(const QLevelOfDetailBoundingSphere &volumeOverride);
protected:
diff --git a/src/render/frontend/qrendertarget.cpp b/src/render/frontend/qrendertarget.cpp
index e359d9bdd..1abc0fca6 100644
--- a/src/render/frontend/qrendertarget.cpp
+++ b/src/render/frontend/qrendertarget.cpp
@@ -144,7 +144,7 @@ void QRenderTarget::removeOutput(QRenderTargetOutput *output)
/*!
\return the chosen outputs.
*/
-QVector<QRenderTargetOutput *> QRenderTarget::outputs() const
+QList<QRenderTargetOutput *> QRenderTarget::outputs() const
{
Q_D(const QRenderTarget);
return d->m_outputs;
diff --git a/src/render/frontend/qrendertarget.h b/src/render/frontend/qrendertarget.h
index 7c339d2c8..2ace857da 100644
--- a/src/render/frontend/qrendertarget.h
+++ b/src/render/frontend/qrendertarget.h
@@ -59,7 +59,7 @@ public:
void addOutput(QRenderTargetOutput *output);
void removeOutput(QRenderTargetOutput *output);
- QVector<QRenderTargetOutput *> outputs() const;
+ QList<QRenderTargetOutput *> outputs() const;
protected:
explicit QRenderTarget(QRenderTargetPrivate &dd, Qt3DCore::QNode *parent = nullptr);