summaryrefslogtreecommitdiffstats
path: root/src/quick3d
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick3d')
-rw-r--r--src/quick3d/imports/scene3d/scene3drenderer.cpp30
-rw-r--r--src/quick3d/imports/scene3d/scene3drenderer_p.h2
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgmaterial.cpp6
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgmaterial_p.h4
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp97
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgmaterialshader_p.h15
-rw-r--r--src/quick3d/quick3d/items/quick3dbuffer.cpp5
-rw-r--r--src/quick3d/quick3d/items/quick3dentity.cpp5
-rw-r--r--src/quick3d/quick3d/items/quick3dgeometry.cpp5
-rw-r--r--src/quick3d/quick3d/items/quick3djoint.cpp5
-rw-r--r--src/quick3d/quick3d/items/quick3dnode.cpp10
-rw-r--r--src/quick3d/quick3d/qt3dquick_global_p.h4
-rw-r--r--src/quick3d/quick3d/qt3dquicknodefactory.cpp4
-rw-r--r--src/quick3d/quick3d/qt3dquickvaluetypes.cpp26
-rw-r--r--src/quick3d/quick3d/qt3dquickvaluetypes_p.h10
-rw-r--r--src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp5
-rw-r--r--src/quick3d/quick3danimation/items/quick3danimationgroup.cpp5
-rw-r--r--src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp5
-rw-r--r--src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp5
-rw-r--r--src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp5
-rw-r--r--src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp5
-rw-r--r--src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp5
-rw-r--r--src/quick3d/quick3danimation/qt3dquickanimationnodefactory.cpp4
-rw-r--r--src/quick3d/quick3dextras/items/quick3dspritesheet.cpp5
-rw-r--r--src/quick3d/quick3dextras/qt3dquickextrasnodefactory.cpp4
-rw-r--r--src/quick3d/quick3dinput/items/quick3daction.cpp5
-rw-r--r--src/quick3d/quick3dinput/items/quick3daxis.cpp5
-rw-r--r--src/quick3d/quick3dinput/items/quick3dinputchord.cpp5
-rw-r--r--src/quick3d/quick3dinput/items/quick3dinputsequence.cpp5
-rw-r--r--src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp10
-rw-r--r--src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp5
-rw-r--r--src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp4
-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/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/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
-rw-r--r--src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp4
-rw-r--r--src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp5
-rw-r--r--src/quick3d/quick3dscene2d/items/scene2d.cpp6
-rw-r--r--src/quick3d/quick3dscene2d/qt3dquickscene2dnodefactory.cpp4
49 files changed, 0 insertions, 432 deletions
diff --git a/src/quick3d/imports/scene3d/scene3drenderer.cpp b/src/quick3d/imports/scene3d/scene3drenderer.cpp
index 49f15d6ca..d9b292cc2 100644
--- a/src/quick3d/imports/scene3d/scene3drenderer.cpp
+++ b/src/quick3d/imports/scene3d/scene3drenderer.cpp
@@ -9,9 +9,7 @@
#include <qopenglcontext.h>
#include <qopenglframebufferobject.h>
#include <QtQuick/qquickwindow.h>
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <private/qrhi_p.h>
-#endif
#include <Qt3DRender/private/qrenderaspect_p.h>
#include <Qt3DRender/private/abstractrenderer_p.h>
@@ -127,12 +125,10 @@ void Scene3DRenderer::init(Qt3DCore::QAspectEngine *aspectEngine,
Qt3DRender::QRenderAspectPrivate *aspectPriv = static_cast<QRenderAspectPrivate*>(QRenderAspectPrivate::get(m_renderAspect));
Qt3DRender::Render::AbstractRenderer *renderer = aspectPriv->m_renderer;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const bool isRHI = renderer->api() == API::RHI;
if (isRHI)
m_quickRenderer = new Scene3DRenderer::RHIRenderer;
else
-#endif
m_quickRenderer = new Scene3DRenderer::GLRenderer;
m_quickRenderer->initialize(this, renderer);
}
@@ -146,15 +142,10 @@ void Scene3DRenderer::setWindow(QQuickWindow *window)
m_window = window;
if (m_window) {
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QObject::connect(m_window, &QQuickWindow::beforeRendering, this,
[this] () { m_quickRenderer->beforeRendering(this); }, Qt::DirectConnection);
QObject::connect(m_window, &QQuickWindow::beforeRenderPassRecording, this,
[this] () { m_quickRenderer->beforeRenderPassRecording(this); }, Qt::DirectConnection);
-#else
- QObject::connect(m_window, &QQuickWindow::beforeRendering, this,
- [this] () { m_quickRenderer->beforeRenderPassRecording(this); }, Qt::DirectConnection);
-#endif
} else {
shutdown();
}
@@ -311,12 +302,7 @@ void Scene3DRenderer::GLRenderer::beforeSynchronize(Scene3DRenderer *scene3DRend
if (generateNewTexture) {
m_finalFBO.reset(createFramebufferObject(m_lastSize));
m_textureId = m_finalFBO->texture();
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
m_texture.reset(QNativeInterface::QSGOpenGLTexture::fromNative(m_textureId, window, m_finalFBO->size(), QQuickWindow::TextureHasAlphaChannel));
-#else
- m_texture.reset(window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, &m_textureId,
- 0, m_finalFBO->size(), QQuickWindow::TextureHasAlphaChannel));
-#endif
}
// Set texture on node
@@ -349,12 +335,6 @@ void Scene3DRenderer::GLRenderer::beforeRenderPassRecording(Scene3DRenderer *sce
scene3DRenderer->m_shouldRender = false;
ContextSaver saver;
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- // The OpenGL state may be dirty from the previous QtQuick nodes, so reset
- // it here to give Qt3D the clean state it expects
- scene3DRenderer->m_window->resetOpenGLState();
-#endif
-
// Create and bind FBO if using the FBO compositing mode
const bool usesFBO = scene3DRenderer->m_compositingMode == Scene3DItem::FBO;
if (usesFBO) {
@@ -395,12 +375,6 @@ void Scene3DRenderer::GLRenderer::beforeRenderPassRecording(Scene3DRenderer *sce
if (scene3DRenderer->m_node)
scene3DRenderer->m_node->show();
}
-
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- // Reset the state used by the QtQuick scenegraph to avoid any
- // interference when rendering the rest of the UI
- scene3DRenderer->m_window->resetOpenGLState();
-#endif
}
void Scene3DRenderer::GLRenderer::shutdown(Scene3DRenderer *sceneRenderer)
@@ -414,8 +388,6 @@ void Scene3DRenderer::GLRenderer::shutdown(Scene3DRenderer *sceneRenderer)
m_multisampledFBO.reset();
}
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
-
void Scene3DRenderer::RHIRenderer::initialize(Scene3DRenderer *scene3DRenderer,
Qt3DRender::Render::AbstractRenderer *renderer)
{
@@ -619,8 +591,6 @@ void Scene3DRenderer::RHIRenderer::releaseRHIResources()
m_rhiRenderTargetPassDescriptor = nullptr;
}
-#endif
-
Scene3DRenderer::QuickRenderer::QuickRenderer() {}
Scene3DRenderer::QuickRenderer::~QuickRenderer() {}
diff --git a/src/quick3d/imports/scene3d/scene3drenderer_p.h b/src/quick3d/imports/scene3d/scene3drenderer_p.h
index c6f5b7c31..f131c7525 100644
--- a/src/quick3d/imports/scene3d/scene3drenderer_p.h
+++ b/src/quick3d/imports/scene3d/scene3drenderer_p.h
@@ -123,7 +123,6 @@ private:
quint32 m_textureId = 0;
};
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
class RHIRenderer : public QuickRenderer
{
public:
@@ -146,7 +145,6 @@ private:
QRhiRenderPassDescriptor *m_rhiRenderTargetPassDescriptor = nullptr;
QRhi *m_rhi = nullptr;
};
-#endif
Qt3DCore::QAspectEngine *m_aspectEngine; // Will be released by the Scene3DItem
QRenderAspect *m_renderAspect; // Will be released by the aspectEngine
diff --git a/src/quick3d/imports/scene3d/scene3dsgmaterial.cpp b/src/quick3d/imports/scene3d/scene3dsgmaterial.cpp
index 02f306a99..0d1ea7384 100644
--- a/src/quick3d/imports/scene3d/scene3dsgmaterial.cpp
+++ b/src/quick3d/imports/scene3d/scene3dsgmaterial.cpp
@@ -28,15 +28,9 @@ Scene3DSGMaterial::Scene3DSGMaterial()
{
}
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QSGMaterialShader *Scene3DSGMaterial::createShader(QSGRendererInterface::RenderMode renderMode) const
-#else
-QSGMaterialShader *Scene3DSGMaterial::createShader() const
-#endif
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Q_UNUSED(renderMode);
-#endif
return new Scene3DSGMaterialShader();
}
diff --git a/src/quick3d/imports/scene3d/scene3dsgmaterial_p.h b/src/quick3d/imports/scene3d/scene3dsgmaterial_p.h
index 605bba9b3..b84f55f26 100644
--- a/src/quick3d/imports/scene3d/scene3dsgmaterial_p.h
+++ b/src/quick3d/imports/scene3d/scene3dsgmaterial_p.h
@@ -37,11 +37,7 @@ public:
QSGTexture *texture() const noexcept { return m_texture; }
QSGMaterialType *type() const final { return &Scene3DSGMaterialShader::type; }
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const final;
-#else
- QSGMaterialShader *createShader() const final;
-#endif
void show() { m_visible = true; }
bool visible() const { return m_visible; }
diff --git a/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp b/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
index 8d8ae04e7..12d396735 100644
--- a/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
+++ b/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
@@ -42,13 +42,10 @@ Scene3DSGMaterialShader::Scene3DSGMaterialShader()
// Generated with qsb, we target all GL version Qt3D can handle
// qsb -b --glsl "460,450,440,430,420,410,400,330,150,120,320 es,300 es,100 es" --hlsl 50 --msl 12 -o scene3dmaterial.vert.qsb scene3dmaterial.vert
// qsb --glsl "460,450,440,430,420,410,400,330,150,120,320 es,300 es,100 es" --hlsl 50 --msl 12 -o scene3dmaterial.frag.qsb scene3dmaterial.frag
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
setShaderFileName(VertexStage, QLatin1String(":/shaders/scene3dmaterial.vert.qsb"));
setShaderFileName(FragmentStage, QLatin1String(":/shaders/scene3dmaterial.frag.qsb"));
-#endif
}
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool Scene3DSGMaterialShader::updateUniformData(QSGMaterialShader::RenderState &state,
QSGMaterial *newMaterial,
QSGMaterial *oldMaterial)
@@ -118,100 +115,6 @@ void Scene3DSGMaterialShader::updateSampledImage(QSGMaterialShader::RenderState
}
}
-#else
-
-const char * const *Qt3DRender::Scene3DSGMaterialShader::attributeNames() const
-{
- static char const *const attr[] = { "qt_VertexPosition", "qt_VertexTexCoord", nullptr };
- return attr;
-}
-
-const char *Scene3DSGMaterialShader::vertexShader() const
-{
- QOpenGLContext *ctx = QOpenGLContext::currentContext();
- if (ctx->format().version() >= qMakePair(3, 2) && ctx->format().profile() == QSurfaceFormat::CoreProfile) {
- return ""
- "#version 150 core \n"
- "uniform mat4 qt_Matrix; \n"
- "in vec4 qt_VertexPosition; \n"
- "in vec2 qt_VertexTexCoord; \n"
- "out vec2 qt_TexCoord; \n"
- "void main() { \n"
- " qt_TexCoord = qt_VertexTexCoord; \n"
- " gl_Position = qt_Matrix * qt_VertexPosition; \n"
- "}";
- } else {
- return ""
- "uniform highp mat4 qt_Matrix; \n"
- "attribute highp vec4 qt_VertexPosition; \n"
- "attribute highp vec2 qt_VertexTexCoord; \n"
- "varying highp vec2 qt_TexCoord; \n"
- "void main() { \n"
- " qt_TexCoord = qt_VertexTexCoord; \n"
- " gl_Position = qt_Matrix * qt_VertexPosition; \n"
- "}";
- }
-}
-const char *Scene3DSGMaterialShader::fragmentShader() const
-{
- QOpenGLContext *ctx = QOpenGLContext::currentContext();
- if (ctx->format().version() >= qMakePair(3, 2) && ctx->format().profile() == QSurfaceFormat::CoreProfile) {
- return ""
- "#version 150 core \n"
- "uniform sampler2D source; \n"
- "uniform float qt_Opacity; \n"
- "in vec2 qt_TexCoord; \n"
- "out vec4 fragColor; \n"
- "void main() { \n"
- " vec4 p = texture(source, qt_TexCoord); \n"
- " float a = qt_Opacity * p.a; \n"
- " fragColor = vec4(p.rgb * a, a); \n"
- "}";
- } else {
- return ""
- "uniform highp sampler2D source; \n"
- "uniform highp float qt_Opacity; \n"
- "varying highp vec2 qt_TexCoord; \n"
- "void main() { \n"
- " highp vec4 p = texture2D(source, qt_TexCoord); \n"
- " highp float a = qt_Opacity * p.a; \n"
- " gl_FragColor = vec4(p.rgb * a, a); \n"
- "}";
- }
-}
-void Scene3DSGMaterialShader::initialize()
-{
- m_matrixId = program()->uniformLocation("qt_Matrix");
- m_opacityId = program()->uniformLocation("qt_Opacity");
-}
-void Scene3DSGMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect)
-{
- Q_ASSERT(oldEffect == 0 || newEffect->type() == oldEffect->type());
- Scene3DSGMaterial *tx = static_cast<Scene3DSGMaterial *>(newEffect);
- Scene3DSGMaterial *oldTx = static_cast<Scene3DSGMaterial *>(oldEffect);
- QSGTexture *t = tx->texture();
- bool npotSupported = const_cast<QOpenGLContext *>(state.context())
- ->functions()->hasOpenGLFeature(QOpenGLFunctions::NPOTTextureRepeat);
- if (!npotSupported) {
- QSize size = t->textureSize();
- const bool isNpot = !isPowerOfTwo(size.width()) || !isPowerOfTwo(size.height());
- if (isNpot) {
- t->setHorizontalWrapMode(QSGTexture::ClampToEdge);
- t->setVerticalWrapMode(QSGTexture::ClampToEdge);
- }
- }
- if (oldTx == 0 || oldTx->texture()->textureId() != t->textureId())
- t->bind();
- else
- t->updateBindOptions();
- if (state.isMatrixDirty())
- program()->setUniformValue(m_matrixId, state.combinedMatrix());
- if (state.isOpacityDirty())
- program()->setUniformValue(m_opacityId, state.opacity());
-}
-
-#endif
-
} // namespace Qt3DRender
QT_END_NAMESPACE
diff --git a/src/quick3d/imports/scene3d/scene3dsgmaterialshader_p.h b/src/quick3d/imports/scene3d/scene3dsgmaterialshader_p.h
index 64984f32b..ce02a8608 100644
--- a/src/quick3d/imports/scene3d/scene3dsgmaterialshader_p.h
+++ b/src/quick3d/imports/scene3d/scene3dsgmaterialshader_p.h
@@ -29,23 +29,8 @@ public:
protected:
// QSGMaterialShader interface
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) final;
void updateSampledImage(RenderState &state, int binding, QSGTexture **texture, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) final;
-#else
-public:
- char const *const *attributeNames() const final;
- void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) final;
-
-protected:
- const char *vertexShader() const final;
- const char *fragmentShader() const final;
- void initialize() final;
-
-private:
- int m_matrixId = -1;
- int m_opacityId = -1;
-#endif
};
} // namespace Qt3DRender
diff --git a/src/quick3d/quick3d/items/quick3dbuffer.cpp b/src/quick3d/quick3d/items/quick3dbuffer.cpp
index bc2c6d6df..0fa8ada23 100644
--- a/src/quick3d/quick3d/items/quick3dbuffer.cpp
+++ b/src/quick3d/quick3d/items/quick3dbuffer.cpp
@@ -35,13 +35,8 @@ QByteArray Quick3DBuffer::convertToRawData(const QJSValue &jsValue)
Q_ASSERT(m_v4engine);
QV4::Scope scope(m_v4engine);
QV4::Scoped<QV4::TypedArray> typedArray(scope,
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QJSValuePrivate::convertToReturnedValue(m_v4engine, jsValue));
char *dataPtr = reinterpret_cast<char *>(typedArray->arrayData());
-#else
- QJSValuePrivate::convertedToValue(m_v4engine, jsValue));
- char *dataPtr = reinterpret_cast<char *>(typedArray->arrayData()->data());
-#endif
if (!typedArray)
return QByteArray();
diff --git a/src/quick3d/quick3d/items/quick3dentity.cpp b/src/quick3d/quick3d/items/quick3dentity.cpp
index d7487b716..b1cdfb4ab 100644
--- a/src/quick3d/quick3d/items/quick3dentity.cpp
+++ b/src/quick3d/quick3d/items/quick3dentity.cpp
@@ -45,12 +45,7 @@ Quick3DEntity::Quick3DEntity(QObject *parent)
QQmlListProperty<QComponent> Quick3DEntity::componentList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DCore::QComponent;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *comp) {
if (comp == nullptr)
diff --git a/src/quick3d/quick3d/items/quick3dgeometry.cpp b/src/quick3d/quick3d/items/quick3dgeometry.cpp
index 0a4912df1..5a71de7a4 100644
--- a/src/quick3d/quick3d/items/quick3dgeometry.cpp
+++ b/src/quick3d/quick3d/items/quick3dgeometry.cpp
@@ -15,12 +15,7 @@ Quick3DGeometry::Quick3DGeometry(QObject *parent)
QQmlListProperty<Qt3DCore::QAttribute> Quick3DGeometry::attributeList()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DCore::QAttribute;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *attribute) {
Quick3DGeometry *geometry = static_cast<Quick3DGeometry *>(list->object);
diff --git a/src/quick3d/quick3d/items/quick3djoint.cpp b/src/quick3d/quick3d/items/quick3djoint.cpp
index baa79dd56..ac277ee35 100644
--- a/src/quick3d/quick3d/items/quick3djoint.cpp
+++ b/src/quick3d/quick3d/items/quick3djoint.cpp
@@ -20,12 +20,7 @@ Quick3DJoint::Quick3DJoint(QObject *parent)
*/
QQmlListProperty<QJoint> Quick3DJoint::childJoints()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QJoint;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *joint) {
Quick3DJoint *jointExtension = qobject_cast<Quick3DJoint *>(list->object);
diff --git a/src/quick3d/quick3d/items/quick3dnode.cpp b/src/quick3d/quick3d/items/quick3dnode.cpp
index 969874136..917819e26 100644
--- a/src/quick3d/quick3d/items/quick3dnode.cpp
+++ b/src/quick3d/quick3d/items/quick3dnode.cpp
@@ -31,12 +31,7 @@ Quick3DNode::Quick3DNode(QObject *parent)
QQmlListProperty<QObject> Quick3DNode::data()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QObject;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *obj) {
if (!obj)
@@ -69,12 +64,7 @@ QQmlListProperty<QObject> Quick3DNode::data()
QQmlListProperty<QNode> Quick3DNode::childNodes()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QNode;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *obj) {
if (!obj)
diff --git a/src/quick3d/quick3d/qt3dquick_global_p.h b/src/quick3d/quick3d/qt3dquick_global_p.h
index b266c320d..324bf02ea 100644
--- a/src/quick3d/quick3d/qt3dquick_global_p.h
+++ b/src/quick3d/quick3d/qt3dquick_global_p.h
@@ -25,10 +25,6 @@
#define Q_3DQUICKSHARED_PRIVATE_EXPORT Q_3DQUICKSHARED_EXPORT
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-#define QML_ADDED_IN_VERSION(major, minor) QML_ADDED_IN_MINOR_VERSION(minor)
-#endif
-
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/quick3d/quick3d/qt3dquicknodefactory.cpp b/src/quick3d/quick3d/qt3dquicknodefactory.cpp
index 3dce09fc6..12a3f67ae 100644
--- a/src/quick3d/quick3d/qt3dquicknodefactory.cpp
+++ b/src/quick3d/quick3d/qt3dquicknodefactory.cpp
@@ -28,11 +28,7 @@ QNode *QuickNodeFactory::createNode(const char *type)
if (!typeInfo.resolved) {
typeInfo.resolved = true;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), QTypeRevision::fromVersion(typeInfo.version.first, typeInfo.version.second));
-#else
- typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
-#endif
}
return typeInfo.t.isValid() ? qobject_cast<QNode *>(typeInfo.t.create()) : nullptr;
diff --git a/src/quick3d/quick3d/qt3dquickvaluetypes.cpp b/src/quick3d/quick3d/qt3dquickvaluetypes.cpp
index 89f47c8ae..2902c6abd 100644
--- a/src/quick3d/quick3d/qt3dquickvaluetypes.cpp
+++ b/src/quick3d/quick3d/qt3dquickvaluetypes.cpp
@@ -61,7 +61,6 @@ QString QQuick3DColorValueType::toString() const
return v.name(v.alpha() != 255 ? QColor::HexArgb : QColor::HexRgb);
}
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QVariant QQuick3DColorValueType::lighter(qreal factor) const
{
return QQml_colorProvider()->lighter(this->v, factor);
@@ -81,7 +80,6 @@ QVariant QQuick3DColorValueType::tint(QVariant tintColor) const
{
return QQml_colorProvider()->tint(this->v, tintColor);
}
-#endif
qreal QQuick3DColorValueType::r() const
{
@@ -160,66 +158,42 @@ void QQuick3DColorValueType::setA(qreal a)
void QQuick3DColorValueType::setHsvHue(qreal hsvHue)
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
float hue, saturation, value, alpha;
-#else
- qreal hue, saturation, value, alpha;
-#endif
v.getHsvF(&hue, &saturation, &value, &alpha);
v.setHsvF(hsvHue, saturation, value, alpha);
}
void QQuick3DColorValueType::setHsvSaturation(qreal hsvSaturation)
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
float hue, saturation, value, alpha;
-#else
- qreal hue, saturation, value, alpha;
-#endif
v.getHsvF(&hue, &saturation, &value, &alpha);
v.setHsvF(hue, hsvSaturation, value, alpha);
}
void QQuick3DColorValueType::setHsvValue(qreal hsvValue)
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
float hue, saturation, value, alpha;
-#else
- qreal hue, saturation, value, alpha;
-#endif
v.getHsvF(&hue, &saturation, &value, &alpha);
v.setHsvF(hue, saturation, hsvValue, alpha);
}
void QQuick3DColorValueType::setHslHue(qreal hslHue)
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
float hue, saturation, lightness, alpha;
-#else
- qreal hue, saturation, lightness, alpha;
-#endif
v.getHslF(&hue, &saturation, &lightness, &alpha);
v.setHslF(hslHue, saturation, lightness, alpha);
}
void QQuick3DColorValueType::setHslSaturation(qreal hslSaturation)
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
float hue, saturation, lightness, alpha;
-#else
- qreal hue, saturation, lightness, alpha;
-#endif
v.getHslF(&hue, &saturation, &lightness, &alpha);
v.setHslF(hue, hslSaturation, lightness, alpha);
}
void QQuick3DColorValueType::setHslLightness(qreal hslLightness)
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
float hue, saturation, lightness, alpha;
-#else
- qreal hue, saturation, lightness, alpha;
-#endif
v.getHslF(&hue, &saturation, &lightness, &alpha);
v.setHslF(hue, saturation, hslLightness, alpha);
}
diff --git a/src/quick3d/quick3d/qt3dquickvaluetypes_p.h b/src/quick3d/quick3d/qt3dquickvaluetypes_p.h
index 43292f26f..8bf3cd0b2 100644
--- a/src/quick3d/quick3d/qt3dquickvaluetypes_p.h
+++ b/src/quick3d/quick3d/qt3dquickvaluetypes_p.h
@@ -31,10 +31,6 @@ QT_BEGIN_NAMESPACE
namespace Qt3DCore {
namespace Quick {
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-#define QML_VALUE_TYPE(v)
-#endif
-
class Q_3DQUICKSHARED_PRIVATE_EXPORT QQuick3DColorValueType
{
QColor v;
@@ -60,12 +56,10 @@ public:
Q_INVOKABLE QString toString() const;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Q_INVOKABLE QVariant alpha(qreal value) const;
Q_INVOKABLE QVariant lighter(qreal factor = 1.5) const;
Q_INVOKABLE QVariant darker(qreal factor = 2.0) const;
Q_INVOKABLE QVariant tint(QVariant factor) const;
-#endif
qreal r() const;
qreal g() const;
@@ -319,10 +313,6 @@ public:
void setZ(qreal);
};
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-#undef QML_VALUE_TYPE
-#endif
-
} // namespace Quick
} // namespace Qt3DCore
diff --git a/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp b/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp
index cae8c4971..77b25ae4a 100644
--- a/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp
+++ b/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp
@@ -15,12 +15,7 @@ QQuick3DAnimationController::QQuick3DAnimationController(QObject *parent)
QQmlListProperty<QAnimationGroup> QQuick3DAnimationController::animationGroups()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAnimationGroup;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *bar) {
QQuick3DAnimationController *controller = qobject_cast<QQuick3DAnimationController *>(list->object);
diff --git a/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp b/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp
index 383cdada4..d2bee0d7b 100644
--- a/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp
+++ b/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp
@@ -17,12 +17,7 @@ QQuick3DAnimationGroup::QQuick3DAnimationGroup(QObject *parent)
QQmlListProperty<Qt3DAnimation::QAbstractAnimation> QQuick3DAnimationGroup::animations()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DAnimation::QAbstractAnimation;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *animation) {
QQuick3DAnimationGroup *animationGroup = qobject_cast<QQuick3DAnimationGroup *>(list->object);
diff --git a/src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp b/src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp
index 49dcb73da..16ea417d9 100644
--- a/src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp
+++ b/src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp
@@ -16,12 +16,7 @@ Quick3DChannelMapper::Quick3DChannelMapper(QObject *parent)
QQmlListProperty<QAbstractChannelMapping> Quick3DChannelMapper::qmlMappings()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAbstractChannelMapping;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *mapping) {
Quick3DChannelMapper *extension = qobject_cast<Quick3DChannelMapper *>(list->object);
diff --git a/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp b/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp
index 2d3542eaf..8bdeac896 100644
--- a/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp
+++ b/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp
@@ -15,12 +15,7 @@ QQuick3DKeyframeAnimation::QQuick3DKeyframeAnimation(QObject *parent)
QQmlListProperty<Qt3DCore::QTransform> QQuick3DKeyframeAnimation::keyframes()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DCore::QTransform;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *transform) {
QQuick3DKeyframeAnimation *keyframeAnimation
diff --git a/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp b/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp
index 409e210d9..b35fef14a 100644
--- a/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp
+++ b/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp
@@ -15,12 +15,7 @@ QQuick3DMorphingAnimation::QQuick3DMorphingAnimation(QObject *parent)
QQmlListProperty<Qt3DAnimation::QMorphTarget> QQuick3DMorphingAnimation::morphTargets()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DAnimation::QMorphTarget;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *morphTarget) {
QQuick3DMorphingAnimation *animation = qobject_cast<QQuick3DMorphingAnimation *>(list->object);
diff --git a/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp b/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp
index 5abc874a5..c6c779077 100644
--- a/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp
+++ b/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp
@@ -15,12 +15,7 @@ QQuick3DMorphTarget::QQuick3DMorphTarget(QObject *parent)
QQmlListProperty<Qt3DCore::QAttribute> QQuick3DMorphTarget::attributes()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DCore::QAttribute;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *bar) {
QQuick3DMorphTarget *target = qobject_cast<QQuick3DMorphTarget *>(list->object);
diff --git a/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp b/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp
index c9f264ea0..9eef6740d 100644
--- a/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp
+++ b/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp
@@ -15,12 +15,7 @@ QQuick3DVertexBlendAnimation::QQuick3DVertexBlendAnimation(QObject *parent)
QQmlListProperty<Qt3DAnimation::QMorphTarget> QQuick3DVertexBlendAnimation::morphTargets()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DAnimation::QMorphTarget;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *morphTarget) {
QQuick3DVertexBlendAnimation *animation
diff --git a/src/quick3d/quick3danimation/qt3dquickanimationnodefactory.cpp b/src/quick3d/quick3danimation/qt3dquickanimationnodefactory.cpp
index 706e55881..0c0d52ae1 100644
--- a/src/quick3d/quick3danimation/qt3dquickanimationnodefactory.cpp
+++ b/src/quick3d/quick3danimation/qt3dquickanimationnodefactory.cpp
@@ -28,11 +28,7 @@ Qt3DCore::QNode *QuickAnimationNodeFactory::createNode(const char *type)
if (!typeInfo.resolved) {
typeInfo.resolved = true;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), QTypeRevision::fromVersion(typeInfo.version.first, typeInfo.version.second));
-#else
- typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
-#endif
}
return typeInfo.t.isValid() ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t.create()) : nullptr;
diff --git a/src/quick3d/quick3dextras/items/quick3dspritesheet.cpp b/src/quick3d/quick3dextras/items/quick3dspritesheet.cpp
index facdf9a01..1dd2a22b6 100644
--- a/src/quick3d/quick3dextras/items/quick3dspritesheet.cpp
+++ b/src/quick3d/quick3dextras/items/quick3dspritesheet.cpp
@@ -21,12 +21,7 @@ Quick3DSpriteSheet::~Quick3DSpriteSheet()
QQmlListProperty<Qt3DExtras::QSpriteSheetItem> Quick3DSpriteSheet::sprites()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DExtras::QSpriteSheetItem;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *sprite) {
Quick3DSpriteSheet *spritesheet = qobject_cast<Quick3DSpriteSheet *>(list->object);
diff --git a/src/quick3d/quick3dextras/qt3dquickextrasnodefactory.cpp b/src/quick3d/quick3dextras/qt3dquickextrasnodefactory.cpp
index 33b6810ea..81e0f251c 100644
--- a/src/quick3d/quick3dextras/qt3dquickextrasnodefactory.cpp
+++ b/src/quick3d/quick3dextras/qt3dquickextrasnodefactory.cpp
@@ -28,11 +28,7 @@ Qt3DCore::QNode *QuickExtrasNodeFactory::createNode(const char *type)
if (!typeInfo.resolved) {
typeInfo.resolved = true;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), QTypeRevision::fromVersion(typeInfo.version.first, typeInfo.version.second));
-#else
- typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
-#endif
}
return typeInfo.t.isValid() ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t.create()) : nullptr;
diff --git a/src/quick3d/quick3dinput/items/quick3daction.cpp b/src/quick3d/quick3dinput/items/quick3daction.cpp
index bb6e89e69..9bc23e194 100644
--- a/src/quick3d/quick3dinput/items/quick3daction.cpp
+++ b/src/quick3d/quick3dinput/items/quick3daction.cpp
@@ -16,12 +16,7 @@ Quick3DAction::Quick3DAction(QObject *parent)
QQmlListProperty<QAbstractActionInput> Quick3DAction::qmlActionInputs()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
auto appendFunction = [](QQmlListProperty<QAbstractActionInput> *list, QAbstractActionInput *input) {
Quick3DAction *action = qobject_cast<Quick3DAction *>(list->object);
action->parentAction()->addInput(input);
diff --git a/src/quick3d/quick3dinput/items/quick3daxis.cpp b/src/quick3d/quick3dinput/items/quick3daxis.cpp
index 9b830e440..48e0dc6b0 100644
--- a/src/quick3d/quick3dinput/items/quick3daxis.cpp
+++ b/src/quick3d/quick3dinput/items/quick3daxis.cpp
@@ -16,12 +16,7 @@ Quick3DAxis::Quick3DAxis(QObject *parent)
QQmlListProperty<QAbstractAxisInput> Quick3DAxis::qmlAxisInputs()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAbstractAxisInput;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *input) {
Quick3DAxis *axis = qobject_cast<Quick3DAxis *>(list->object);
diff --git a/src/quick3d/quick3dinput/items/quick3dinputchord.cpp b/src/quick3d/quick3dinput/items/quick3dinputchord.cpp
index 7cadb5799..7b4885c1d 100644
--- a/src/quick3d/quick3dinput/items/quick3dinputchord.cpp
+++ b/src/quick3d/quick3dinput/items/quick3dinputchord.cpp
@@ -16,12 +16,7 @@ Quick3DInputChord::Quick3DInputChord(QObject *parent)
QQmlListProperty<QAbstractActionInput> Quick3DInputChord::qmlActionInputs()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAbstractActionInput;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *input) {
Quick3DInputChord *action = qobject_cast<Quick3DInputChord *>(list->object);
diff --git a/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp b/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp
index 9e09d7eeb..05eff2f60 100644
--- a/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp
+++ b/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp
@@ -16,12 +16,7 @@ Quick3DInputSequence::Quick3DInputSequence(QObject *parent)
QQmlListProperty<QAbstractActionInput> Quick3DInputSequence::qmlActionInputs()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAbstractActionInput;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *input) {
Quick3DInputSequence *action = qobject_cast<Quick3DInputSequence *>(list->object);
diff --git a/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp b/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp
index 5097ef024..ff3c33198 100644
--- a/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp
+++ b/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp
@@ -16,12 +16,7 @@ Quick3DLogicalDevice::Quick3DLogicalDevice(QObject *parent)
QQmlListProperty<QAxis> Quick3DLogicalDevice::qmlAxes()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAxis;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *axes) {
Quick3DLogicalDevice *device = qobject_cast<Quick3DLogicalDevice *>(list->object);
@@ -47,12 +42,7 @@ QQmlListProperty<QAxis> Quick3DLogicalDevice::qmlAxes()
QQmlListProperty<QAction> Quick3DLogicalDevice::qmlActions()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAction;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *action) {
Quick3DLogicalDevice *device = qobject_cast<Quick3DLogicalDevice *>(list->object);
diff --git a/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp b/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp
index ef5c46042..4cf2ef839 100644
--- a/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp
+++ b/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp
@@ -16,12 +16,7 @@ Quick3DPhysicalDevice::Quick3DPhysicalDevice(QObject *parent) : QObject(parent)
QQmlListProperty<QAxisSetting> Quick3DPhysicalDevice::axisSettings()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = QAxisSetting;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *axisSetting) {
Quick3DPhysicalDevice *device = qobject_cast<Quick3DPhysicalDevice *>(list->object);
diff --git a/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp b/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
index 6c19918f7..5bd79e7b0 100644
--- a/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
+++ b/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
@@ -28,11 +28,7 @@ Qt3DCore::QNode *QuickInputNodeFactory::createNode(const char *type)
if (!typeInfo.resolved) {
typeInfo.resolved = true;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), QTypeRevision::fromVersion(typeInfo.version.first, typeInfo.version.second));
-#else
- typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
-#endif
}
return typeInfo.t.isValid() ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t.create()) : nullptr;
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/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/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);
diff --git a/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp b/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
index 15e287caa..12acb32a1 100644
--- a/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
+++ b/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
@@ -28,11 +28,7 @@ Qt3DCore::QNode *QuickRenderNodeFactory::createNode(const char *type)
if (!typeInfo.resolved) {
typeInfo.resolved = true;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), QTypeRevision::fromVersion(typeInfo.version.first, typeInfo.version.second));
-#else
- typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
-#endif
}
return typeInfo.t.isValid() ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t.create()) : nullptr;
diff --git a/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp b/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp
index e4b76765d..9da79b4c0 100644
--- a/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp
+++ b/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp
@@ -17,12 +17,7 @@ QQuick3DScene2D::QQuick3DScene2D(QObject *parent)
QQmlListProperty<Qt3DCore::QEntity> QQuick3DScene2D::entities()
{
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using qt_size_type = qsizetype;
-#else
- using qt_size_type = int;
-#endif
-
using ListContentType = Qt3DCore::QEntity;
auto appendFunction = [](QQmlListProperty<ListContentType> *list, ListContentType *entity) {
QQuick3DScene2D *scene2d = qobject_cast<QQuick3DScene2D *>(list->object);
diff --git a/src/quick3d/quick3dscene2d/items/scene2d.cpp b/src/quick3d/quick3dscene2d/items/scene2d.cpp
index e679d56af..4afe04382 100644
--- a/src/quick3d/quick3dscene2d/items/scene2d.cpp
+++ b/src/quick3d/quick3dscene2d/items/scene2d.cpp
@@ -10,9 +10,7 @@
#include <QtCore/qatomic.h>
#include <QtGui/qevent.h>
#include <QtGui/QOpenGLFunctions>
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QQuickRenderTarget>
-#endif
#include <private/qscene2d_p.h>
#include <private/scene2d_p.h>
@@ -214,11 +212,7 @@ void Scene2D::initializeRender()
m_context->create();
m_context->makeCurrent(m_sharedObject->m_surface);
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
m_sharedObject->m_renderControl->initialize();
-#else
- m_sharedObject->m_renderControl->initialize(m_context);
-#endif
m_context->doneCurrent();
QCoreApplication::postEvent(m_sharedObject->m_renderManager,
diff --git a/src/quick3d/quick3dscene2d/qt3dquickscene2dnodefactory.cpp b/src/quick3d/quick3dscene2d/qt3dquickscene2dnodefactory.cpp
index c2a1b3bcd..1b090663d 100644
--- a/src/quick3d/quick3dscene2d/qt3dquickscene2dnodefactory.cpp
+++ b/src/quick3d/quick3dscene2d/qt3dquickscene2dnodefactory.cpp
@@ -40,11 +40,7 @@ Qt3DCore::QNode *QuickScene2DNodeFactory::createNode(const char *type)
if (!typeInfo.resolved) {
typeInfo.resolved = true;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), QTypeRevision::fromVersion(typeInfo.version.first, typeInfo.version.second));
-#else
- typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
-#endif
}
return typeInfo.t.isValid() ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t.create()) : nullptr;