summaryrefslogtreecommitdiffstats
path: root/src/quick3d/quick3drender/items
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick3d/quick3drender/items')
-rw-r--r--src/quick3d/quick3drender/items/items.pri44
-rw-r--r--src/quick3d/quick3drender/items/quick3deffect.cpp10
-rw-r--r--src/quick3d/quick3drender/items/quick3dlayerfilter.cpp5
-rw-r--r--src/quick3d/quick3drender/items/quick3dmaterial.cpp5
-rw-r--r--src/quick3d/quick3drender/items/quick3dparameter.cpp6
-rw-r--r--src/quick3d/quick3drender/items/quick3draycaster.cpp5
-rw-r--r--src/quick3d/quick3drender/items/quick3drenderpass.cpp15
-rw-r--r--src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp8
-rw-r--r--src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp5
-rw-r--r--src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp5
-rw-r--r--src/quick3d/quick3drender/items/quick3dshaderdata.cpp4
-rw-r--r--src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp5
-rw-r--r--src/quick3d/quick3drender/items/quick3dstateset.cpp5
-rw-r--r--src/quick3d/quick3drender/items/quick3dtechnique.cpp15
-rw-r--r--src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp10
-rw-r--r--src/quick3d/quick3drender/items/quick3dtexture.cpp5
16 files changed, 4 insertions, 148 deletions
diff --git a/src/quick3d/quick3drender/items/items.pri b/src/quick3d/quick3drender/items/items.pri
deleted file mode 100644
index 06732cf33..000000000
--- a/src/quick3d/quick3drender/items/items.pri
+++ /dev/null
@@ -1,44 +0,0 @@
-HEADERS += \
- $$PWD/quick3dtechniquefilter_p.h \
- $$PWD/quick3deffect_p.h \
- $$PWD/quick3dlayerfilter_p.h \
- $$PWD/quick3dmaterial_p.h \
- $$PWD/quick3drenderpass_p.h \
- $$PWD/quick3drenderpassfilter_p.h \
- $$PWD/quick3dscene_p.h \
- $$PWD/quick3dshaderdata_p.h \
- $$PWD/quick3dshaderdataarray_p.h \
- $$PWD/quick3dstateset_p.h \
- $$PWD/quick3dtechnique_p.h \
- $$PWD/quick3dtexture_p.h \
- $$PWD/quick3dviewport_p.h \
- $$PWD/quick3dparameter_p_p.h \
- $$PWD/quick3dparameter_p.h \
- $$PWD/quick3drendertargetoutput_p.h \
- $$PWD/quick3dmemorybarrier_p.h \
- $$PWD/quick3draycaster_p.h \
- $$PWD/quick3draycaster_p_p.h \
- $$PWD/quick3dscreenraycaster_p.h \
- $$PWD/quick3dscreenraycaster_p_p.h
-
-SOURCES += \
- $$PWD/quick3drenderpassfilter.cpp \
- $$PWD/quick3dtechniquefilter.cpp \
- $$PWD/quick3dviewport.cpp \
- $$PWD/quick3dlayerfilter.cpp \
- $$PWD/quick3dmaterial.cpp \
- $$PWD/quick3dtechnique.cpp \
- $$PWD/quick3deffect.cpp \
- $$PWD/quick3dscene.cpp \
- $$PWD/quick3dtexture.cpp \
- $$PWD/quick3drenderpass.cpp \
- $$PWD/quick3dparameter.cpp \
- $$PWD/quick3dshaderdata.cpp \
- $$PWD/quick3dshaderdataarray.cpp \
- $$PWD/quick3dstateset.cpp \
- $$PWD/quick3drendertargetoutput.cpp \
- $$PWD/quick3dmemorybarrier.cpp \
- $$PWD/quick3draycaster.cpp \
- $$PWD/quick3dscreenraycaster.cpp
-
-INCLUDEPATH += $$PWD
diff --git a/src/quick3d/quick3drender/items/quick3deffect.cpp b/src/quick3d/quick3drender/items/quick3deffect.cpp
index a38dddb47..f94166498 100644
--- a/src/quick3d/quick3drender/items/quick3deffect.cpp
+++ b/src/quick3d/quick3drender/items/quick3deffect.cpp
@@ -18,12 +18,7 @@ Quick3DEffect::Quick3DEffect(QObject *parent)
QQmlListProperty<QTechnique> Quick3DEffect::techniqueList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QTechnique;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *bar) {
Quick3DEffect *eff = qobject_cast<Quick3DEffect*>(list->object);
@@ -59,12 +54,7 @@ QQmlListProperty<QTechnique> Quick3DEffect::techniqueList()
QQmlListProperty<QParameter> Quick3DEffect::parameterList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QParameter;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *param) {
Quick3DEffect *effect = qobject_cast<Quick3DEffect *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp b/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp
index 2ad597294..1768604d8 100644
--- a/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp
+++ b/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp
@@ -20,12 +20,7 @@ Quick3DLayerFilter::Quick3DLayerFilter(QObject *parent)
QQmlListProperty<QLayer> Quick3DLayerFilter::qmlLayers()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QLayer;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *layer) {
Quick3DLayerFilter *filter = qobject_cast<Quick3DLayerFilter *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dmaterial.cpp b/src/quick3d/quick3drender/items/quick3dmaterial.cpp
index 9f8fed800..05f55844a 100644
--- a/src/quick3d/quick3drender/items/quick3dmaterial.cpp
+++ b/src/quick3d/quick3drender/items/quick3dmaterial.cpp
@@ -20,12 +20,7 @@ Quick3DMaterial::Quick3DMaterial(QObject *parent)
QQmlListProperty<QParameter> Quick3DMaterial::qmlParameters()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QParameter;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *param) {
Quick3DMaterial *mat = qobject_cast<Quick3DMaterial *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dparameter.cpp b/src/quick3d/quick3drender/items/quick3dparameter.cpp
index 7f4147ef1..6fb1f144e 100644
--- a/src/quick3d/quick3drender/items/quick3dparameter.cpp
+++ b/src/quick3d/quick3drender/items/quick3dparameter.cpp
@@ -12,10 +12,6 @@ namespace Qt3DRender {
namespace Render {
namespace Quick {
-namespace {
-const int qjsValueTypeId = qMetaTypeId<QJSValue>();
-}
-
Quick3DParameterPrivate::Quick3DParameterPrivate()
: QParameterPrivate()
{
@@ -23,6 +19,8 @@ Quick3DParameterPrivate::Quick3DParameterPrivate()
void Quick3DParameterPrivate::setValue(const QVariant &value)
{
+ static const int qjsValueTypeId = qMetaTypeId<QJSValue>();
+
if (value.userType() == qjsValueTypeId) {
QJSValue v = value.value<QJSValue>();
if (v.isArray())
diff --git a/src/quick3d/quick3drender/items/quick3draycaster.cpp b/src/quick3d/quick3drender/items/quick3draycaster.cpp
index ad924e8d9..4a1c570a4 100644
--- a/src/quick3d/quick3drender/items/quick3draycaster.cpp
+++ b/src/quick3d/quick3drender/items/quick3draycaster.cpp
@@ -20,12 +20,7 @@ Quick3DRayCaster::Quick3DRayCaster(QObject *parent)
QQmlListProperty<Qt3DRender::QLayer> Qt3DRender::Render::Quick::Quick3DRayCaster::qmlLayers()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DRender::QLayer;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *layer) {
QAbstractRayCaster *filter = qobject_cast<QAbstractRayCaster *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3drenderpass.cpp b/src/quick3d/quick3drender/items/quick3drenderpass.cpp
index 5bc50673a..c77751f80 100644
--- a/src/quick3d/quick3drender/items/quick3drenderpass.cpp
+++ b/src/quick3d/quick3drender/items/quick3drenderpass.cpp
@@ -17,12 +17,7 @@ Quick3DRenderPass::Quick3DRenderPass(QObject *parent)
QQmlListProperty<QFilterKey> Quick3DRenderPass::filterKeyList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QFilterKey;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *filterKey) {
Quick3DRenderPass *rPass = qobject_cast<Quick3DRenderPass *>(list->object);
@@ -48,12 +43,7 @@ QQmlListProperty<QFilterKey> Quick3DRenderPass::filterKeyList()
QQmlListProperty<QRenderState> Quick3DRenderPass::renderStateList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QRenderState;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *state) {
Quick3DRenderPass *rPass = qobject_cast<Quick3DRenderPass *>(list->object);
@@ -79,12 +69,7 @@ QQmlListProperty<QRenderState> Quick3DRenderPass::renderStateList()
QQmlListProperty<QParameter> Quick3DRenderPass::parameterList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QParameter;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *param) {
Quick3DRenderPass *rPass = qobject_cast<Quick3DRenderPass *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp b/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp
index 7c6249298..ade8f6ca7 100644
--- a/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp
+++ b/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp
@@ -16,11 +16,7 @@ Quick3DRenderPassFilter::Quick3DRenderPassFilter(QObject *parent)
QQmlListProperty<QFilterKey> Quick3DRenderPassFilter::includeList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
auto appendFunction = [](QQmlListProperty<QFilterKey> *list, QFilterKey *v) {
auto self = qobject_cast<Quick3DRenderPassFilter *>(list->object);
@@ -55,11 +51,7 @@ QQmlListProperty<QFilterKey> Quick3DRenderPassFilter::includeList()
QQmlListProperty<QParameter> Quick3DRenderPassFilter::parameterList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
auto appendFunction = [](QQmlListProperty<QParameter> *list, QParameter *v) {
auto self = qobject_cast<Quick3DRenderPassFilter *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp b/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
index 9ede43513..534e69ad6 100644
--- a/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
+++ b/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
@@ -16,12 +16,7 @@ Quick3DRenderTargetOutput::Quick3DRenderTargetOutput(QObject * parent)
QQmlListProperty<QRenderTargetOutput> Quick3DRenderTargetOutput::qmlAttachments()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QRenderTargetOutput;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *output) {
Quick3DRenderTargetOutput *rT = qobject_cast<Quick3DRenderTargetOutput *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp b/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp
index a28884c85..153d35f42 100644
--- a/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp
+++ b/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp
@@ -24,12 +24,7 @@ Quick3DScreenRayCaster::Quick3DScreenRayCaster(QObject *parent)
QQmlListProperty<Qt3DRender::QLayer> Qt3DRender::Render::Quick::Quick3DScreenRayCaster::qmlLayers()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DRender::QLayer;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *layer) {
QAbstractRayCaster *filter = qobject_cast<QAbstractRayCaster *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dshaderdata.cpp b/src/quick3d/quick3drender/items/quick3dshaderdata.cpp
index d03c900c1..8f92fb8f3 100644
--- a/src/quick3d/quick3drender/items/quick3dshaderdata.cpp
+++ b/src/quick3d/quick3drender/items/quick3dshaderdata.cpp
@@ -14,8 +14,6 @@ namespace Render {
namespace Quick {
namespace {
-
-const int qjsValueTypeId = qMetaTypeId<QJSValue>();
const int quick3DShaderDataArrayTypeId = qMetaTypeId<Quick3DShaderDataArray*>();
Q_DECL_UNUSED const int quick3DShaderDataTypeId = qMetaTypeId<Quick3DShaderData*>();
@@ -30,6 +28,8 @@ public:
QVariant readProperty(const QVariant &v) override
{
+ static const int qjsValueTypeId = qMetaTypeId<QJSValue>();
+
// qjsValueTypeId are not compile time constant (no switch)
if (v.userType() == qjsValueTypeId) {
QJSValue jsValue = v.value<QJSValue>();
diff --git a/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp b/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp
index 76f1948b4..725dd6c6d 100644
--- a/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp
+++ b/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp
@@ -27,12 +27,7 @@ Quick3DShaderDataArray::Quick3DShaderDataArray(QNode *parent)
QQmlListProperty<QShaderData> Quick3DShaderDataArray::valuesList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QShaderData;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *bar) {
Quick3DShaderDataArray *self = static_cast<Quick3DShaderDataArray *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dstateset.cpp b/src/quick3d/quick3drender/items/quick3dstateset.cpp
index 0c37c529f..020462fab 100644
--- a/src/quick3d/quick3drender/items/quick3dstateset.cpp
+++ b/src/quick3d/quick3drender/items/quick3dstateset.cpp
@@ -20,12 +20,7 @@ Quick3DStateSet::~Quick3DStateSet()
QQmlListProperty<QRenderState> Quick3DStateSet::renderStateList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QRenderState;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *state) {
Quick3DStateSet *stateSet = qobject_cast<Quick3DStateSet *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dtechnique.cpp b/src/quick3d/quick3drender/items/quick3dtechnique.cpp
index d7ebfc9fe..5d871893f 100644
--- a/src/quick3d/quick3drender/items/quick3dtechnique.cpp
+++ b/src/quick3d/quick3drender/items/quick3dtechnique.cpp
@@ -16,12 +16,7 @@ Quick3DTechnique::Quick3DTechnique(QObject *parent)
QQmlListProperty<QRenderPass> Quick3DTechnique::renderPassList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QRenderPass;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *renderPass) {
Quick3DTechnique *technique = qobject_cast<Quick3DTechnique *>(list->object);
@@ -54,12 +49,7 @@ QQmlListProperty<QRenderPass> Quick3DTechnique::renderPassList()
QQmlListProperty<QParameter> Quick3DTechnique::parameterList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QParameter;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *param) {
Quick3DTechnique *technique = qobject_cast<Quick3DTechnique *>(list->object);
@@ -85,12 +75,7 @@ QQmlListProperty<QParameter> Quick3DTechnique::parameterList()
QQmlListProperty<QFilterKey> Quick3DTechnique::filterKeyList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QFilterKey;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *filterKey) {
Quick3DTechnique *technique = qobject_cast<Quick3DTechnique *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp b/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp
index 37ac4045f..da651cf59 100644
--- a/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp
+++ b/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp
@@ -16,12 +16,7 @@ Quick3DTechniqueFilter::Quick3DTechniqueFilter(QObject *parent)
QQmlListProperty<QFilterKey> Quick3DTechniqueFilter::matchList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QFilterKey;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *criterion) {
Quick3DTechniqueFilter *filter = qobject_cast<Quick3DTechniqueFilter *>(list->object);
@@ -56,12 +51,7 @@ QQmlListProperty<QFilterKey> Quick3DTechniqueFilter::matchList()
QQmlListProperty<QParameter> Quick3DTechniqueFilter::parameterList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QParameter;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *param) {
Quick3DTechniqueFilter *techniqueFilter = qobject_cast<Quick3DTechniqueFilter *>(list->object);
diff --git a/src/quick3d/quick3drender/items/quick3dtexture.cpp b/src/quick3d/quick3drender/items/quick3dtexture.cpp
index 2929ff4d4..0acd6fc2f 100644
--- a/src/quick3d/quick3drender/items/quick3dtexture.cpp
+++ b/src/quick3d/quick3drender/items/quick3dtexture.cpp
@@ -18,12 +18,7 @@ Quick3DTextureExtension::Quick3DTextureExtension(QObject *parent)
QQmlListProperty<QAbstractTextureImage> Quick3DTextureExtension::textureImages()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAbstractTextureImage;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *textureImage) {
Quick3DTextureExtension *self = qobject_cast<Quick3DTextureExtension *>(list->object);