diff options
383 files changed, 1044 insertions, 135 deletions
diff --git a/.cmake.conf b/.cmake.conf index ac3b6f4ad..e62fae5ef 100644 --- a/.cmake.conf +++ b/.cmake.conf @@ -1,2 +1,2 @@ -set(QT_REPO_MODULE_VERSION "6.2.4") +set(QT_REPO_MODULE_VERSION "6.2.8") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "") diff --git a/.qmake.conf b/.qmake.conf index 16e7a9220..0f4b9bb42 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -6,4 +6,4 @@ load(qt_build_config) DEFINES += QT_NO_FOREACH DEFINES += QT_NO_JAVA_STYLE_ITERATORS -MODULE_VERSION = 6.2.4 +MODULE_VERSION = 6.2.8 diff --git a/coin/module_config.yaml b/coin/module_config.yaml index 16d158c6b..1eba98723 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -1,9 +1,16 @@ version: 2 +alias: qt3d accept_configuration: condition: property property: features not_contains_value: Disable +machine_type: + Build: + cores: 4 + Test: + cores: 4 + instructions: Build: - !include "{{qt/qtbase}}/coin_module_build_template_v2.yaml" diff --git a/dependencies.yaml b/dependencies.yaml index bff960476..9c05d0905 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -1,10 +1,10 @@ dependencies: - ../qtbase: - ref: f99872ba5db54475cf0974b181dcdefb2acd8dad + ../tqtc-qtbase: + ref: 4c1c38dede55565afa846685b3e19cf8f1cfed0c required: true - ../qtdeclarative: - ref: 62c6002129f2dc9c72c6308cfdfbebe914751fbe + ../tqtc-qtdeclarative: + ref: 9919f58fce6329a233ca885188d0aba5f484e546 required: false - ../qtshadertools: - ref: 8a0d58fed58ede9c3d64ac892c21362bf3d9d3f9 + ../tqtc-qtshadertools: + ref: 754297822b244b98494e5ab09ca024a2e7acb54a required: false diff --git a/examples/qt3d/audio-visualizer-qml/Visualizer.qml b/examples/qt3d/audio-visualizer-qml/Visualizer.qml index 42373f950..412b90855 100644 --- a/examples/qt3d/audio-visualizer-qml/Visualizer.qml +++ b/examples/qt3d/audio-visualizer-qml/Visualizer.qml @@ -57,9 +57,10 @@ Entity { id: sceneRoot property int barRotationTimeMs: 1 property int numberOfBars: 1 - property string animationState: "stopped" + property string animationState property real titleStartAngle: 95 property real titleStopAngle: 5 + property bool started: false onAnimationStateChanged: { if (animationState == "playing") { @@ -120,6 +121,7 @@ Entity { progressTransformAnimation.duration = mediaPlayer.duration mainview.state = "playing" progressTransformAnimation.start() + started = true } //![0] diff --git a/examples/qt3d/audio-visualizer-qml/main.cpp b/examples/qt3d/audio-visualizer-qml/main.cpp index 2a6fdfa69..7977b40ae 100644 --- a/examples/qt3d/audio-visualizer-qml/main.cpp +++ b/examples/qt3d/audio-visualizer-qml/main.cpp @@ -57,6 +57,7 @@ int main(int argc, char* argv[]) { + qputenv("QML_XHR_ALLOW_FILE_READ", "1"); #ifdef Q_OS_ANDROID QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif diff --git a/examples/qt3d/audio-visualizer-qml/main.qml b/examples/qt3d/audio-visualizer-qml/main.qml index c1d433d69..122c8a64b 100644 --- a/examples/qt3d/audio-visualizer-qml/main.qml +++ b/examples/qt3d/audio-visualizer-qml/main.qml @@ -48,10 +48,10 @@ ** ****************************************************************************/ -import QtQuick 2.0 -import QtQuick.Scene3D 2.0 -import QtQuick.Layouts 1.2 -import QtMultimedia 5.0 +import QtQuick +import QtQuick.Scene3D +import QtQuick.Layouts +import QtMultimedia Item { id: mainview @@ -117,30 +117,25 @@ Item { //![0] MediaPlayer { id: mediaPlayer - autoPlay: true - volume: 0.5 source: "qrc:/music/tiltshifted_lost_neon_sun.mp3" + audioOutput: AudioOutput {} //![0] - onStatusChanged: { - if (status == MediaPlayer.EndOfMedia) //{ - state = "stopped" - } - - onError: console.error("error with audio " + mediaPlayer.error) - - onDurationChanged: { - // Load the pre-calculated magnitude data for the visualizer - var request = new XMLHttpRequest() - request.responseType = 'arraybuffer' - request.onreadystatechange = function() { + onMediaStatusChanged: { + if (mediaStatus == MediaPlayer.EndOfMedia) { + mainview.state = "stopped" + } else if (mediaStatus == MediaPlayer.LoadedMedia && !visualizer.started) { + // Load the pre-calculated magnitude data for the visualizer + var request = new XMLHttpRequest() + request.responseType = 'arraybuffer' + request.onreadystatechange = function() { if (request.readyState === XMLHttpRequest.DONE) { if (request.status == 200 || request.status == 0) { var arrayBuffer = request.response if (arrayBuffer) { magnitudeArray = new Uint16Array(arrayBuffer) visualizer.startVisualization() - } + } } else { console.warn("Couldn't load magnitude data for bars.") } @@ -148,10 +143,13 @@ Item { } }; - request.open('GET', magnitudeDataSourceFile, true) - request.send(null) + request.open('GET', magnitudeDataSourceFile, true) + request.send(null) + } } + onErrorStringChanged: console.error("error with audio " + errorString) + function getNextAudioLevel(offsetMs) { if (magnitudeArray === null) return 0.0; diff --git a/src/3rdparty/imgui/qt_attribution.json b/src/3rdparty/imgui/qt_attribution.json index c5599b70e..a42f91b37 100644 --- a/src/3rdparty/imgui/qt_attribution.json +++ b/src/3rdparty/imgui/qt_attribution.json @@ -33,7 +33,7 @@ "QDocModule": "qt3d", "Description": "Single-file public domain (or MIT licensed) libraries for C/C++", "QtUsage": "Used in tests to demonstrate and verify the integration of an external GUI library.", - "Files": "imstb_rectpack.h,imstb_textedit.h,imstb_truetype.h", + "Files": "imstb_rectpack.h imstb_textedit.h imstb_truetype.h", "Homepage": "https://github.com/nothings/stb/", "License": "MIT License or Public Domain", diff --git a/src/animation/frontend/qabstractanimation.cpp b/src/animation/frontend/qabstractanimation.cpp index 4eee6ebac..0c04780c1 100644 --- a/src/animation/frontend/qabstractanimation.cpp +++ b/src/animation/frontend/qabstractanimation.cpp @@ -190,3 +190,5 @@ void QAbstractAnimation::setDuration(float duration) } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qabstractanimation.cpp" diff --git a/src/animation/frontend/qabstractanimationclip.cpp b/src/animation/frontend/qabstractanimationclip.cpp index 27618cd7e..98bd45324 100644 --- a/src/animation/frontend/qabstractanimationclip.cpp +++ b/src/animation/frontend/qabstractanimationclip.cpp @@ -158,3 +158,5 @@ float QAbstractAnimationClip::duration() const } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qabstractanimationclip.cpp" diff --git a/src/animation/frontend/qabstractchannelmapping.cpp b/src/animation/frontend/qabstractchannelmapping.cpp index e1ea7f047..3e5e6a9fa 100644 --- a/src/animation/frontend/qabstractchannelmapping.cpp +++ b/src/animation/frontend/qabstractchannelmapping.cpp @@ -68,3 +68,5 @@ QAbstractChannelMapping::~QAbstractChannelMapping() } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qabstractchannelmapping.cpp" diff --git a/src/animation/frontend/qabstractclipanimator.cpp b/src/animation/frontend/qabstractclipanimator.cpp index cb4621182..6f3baa634 100644 --- a/src/animation/frontend/qabstractclipanimator.cpp +++ b/src/animation/frontend/qabstractclipanimator.cpp @@ -337,3 +337,5 @@ void QAbstractClipAnimator::stop() } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qabstractclipanimator.cpp" diff --git a/src/animation/frontend/qabstractclipblendnode.cpp b/src/animation/frontend/qabstractclipblendnode.cpp index de5084b35..ae03c3197 100644 --- a/src/animation/frontend/qabstractclipblendnode.cpp +++ b/src/animation/frontend/qabstractclipblendnode.cpp @@ -137,3 +137,5 @@ QAbstractClipBlendNode::~QAbstractClipBlendNode() } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qabstractclipblendnode.cpp" diff --git a/src/animation/frontend/qadditiveclipblend.cpp b/src/animation/frontend/qadditiveclipblend.cpp index ca49beb32..ceb2073e7 100644 --- a/src/animation/frontend/qadditiveclipblend.cpp +++ b/src/animation/frontend/qadditiveclipblend.cpp @@ -243,3 +243,5 @@ void QAdditiveClipBlend::setAdditiveClip(QAbstractClipBlendNode *additiveClip) } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qadditiveclipblend.cpp" diff --git a/src/animation/frontend/qanimationaspect.cpp b/src/animation/frontend/qanimationaspect.cpp index 351569190..d5d079bb1 100644 --- a/src/animation/frontend/qanimationaspect.cpp +++ b/src/animation/frontend/qanimationaspect.cpp @@ -150,3 +150,5 @@ std::vector<QAspectJobPtr> QAnimationAspect::jobsToExecute(qint64 time) QT_END_NAMESPACE QT3D_REGISTER_NAMESPACED_ASPECT("animation", QT_PREPEND_NAMESPACE(Qt3DAnimation), QAnimationAspect) + +#include "moc_qanimationaspect.cpp" diff --git a/src/animation/frontend/qanimationclip.cpp b/src/animation/frontend/qanimationclip.cpp index 8dfbf2a1f..9f15e3474 100644 --- a/src/animation/frontend/qanimationclip.cpp +++ b/src/animation/frontend/qanimationclip.cpp @@ -95,3 +95,5 @@ void QAnimationClip::setClipData(const Qt3DAnimation::QAnimationClipData &clipDa } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qanimationclip.cpp" diff --git a/src/animation/frontend/qanimationcliploader.cpp b/src/animation/frontend/qanimationcliploader.cpp index 25cb7253d..b2f4dcd8e 100644 --- a/src/animation/frontend/qanimationcliploader.cpp +++ b/src/animation/frontend/qanimationcliploader.cpp @@ -147,3 +147,5 @@ void QAnimationClipLoader::setSource(const QUrl &source) } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qanimationcliploader.cpp" diff --git a/src/animation/frontend/qanimationcontroller.cpp b/src/animation/frontend/qanimationcontroller.cpp index fef8ad084..98a6a751d 100644 --- a/src/animation/frontend/qanimationcontroller.cpp +++ b/src/animation/frontend/qanimationcontroller.cpp @@ -391,3 +391,5 @@ QAnimationGroup *QAnimationController::getGroup(int index) const } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qanimationcontroller.cpp" diff --git a/src/animation/frontend/qanimationgroup.cpp b/src/animation/frontend/qanimationgroup.cpp index 6c669106e..24ac1b396 100644 --- a/src/animation/frontend/qanimationgroup.cpp +++ b/src/animation/frontend/qanimationgroup.cpp @@ -213,3 +213,5 @@ void QAnimationGroup::setPosition(float position) } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qanimationgroup.cpp" diff --git a/src/animation/frontend/qblendedclipanimator.cpp b/src/animation/frontend/qblendedclipanimator.cpp index e6c5caead..02d9981fc 100644 --- a/src/animation/frontend/qblendedclipanimator.cpp +++ b/src/animation/frontend/qblendedclipanimator.cpp @@ -309,3 +309,5 @@ void QBlendedClipAnimator::setBlendTree(QAbstractClipBlendNode *blendTree) } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qblendedclipanimator.cpp" diff --git a/src/animation/frontend/qcallbackmapping.cpp b/src/animation/frontend/qcallbackmapping.cpp index 972ae73aa..af765378e 100644 --- a/src/animation/frontend/qcallbackmapping.cpp +++ b/src/animation/frontend/qcallbackmapping.cpp @@ -144,3 +144,5 @@ void QCallbackMapping::setCallback(int type, QAnimationCallback *callback, QAnim } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qcallbackmapping.cpp" diff --git a/src/animation/frontend/qchannelmapper.cpp b/src/animation/frontend/qchannelmapper.cpp index 334208238..1ad88941c 100644 --- a/src/animation/frontend/qchannelmapper.cpp +++ b/src/animation/frontend/qchannelmapper.cpp @@ -112,3 +112,5 @@ QList<QAbstractChannelMapping *> QChannelMapper::mappings() const } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qchannelmapper.cpp" diff --git a/src/animation/frontend/qchannelmapping.cpp b/src/animation/frontend/qchannelmapping.cpp index c2c6ade38..340cf309f 100644 --- a/src/animation/frontend/qchannelmapping.cpp +++ b/src/animation/frontend/qchannelmapping.cpp @@ -252,3 +252,5 @@ void QChannelMapping::setProperty(const QString &property) } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qchannelmapping.cpp" diff --git a/src/animation/frontend/qclipanimator.cpp b/src/animation/frontend/qclipanimator.cpp index 1f1d05a1b..f511b526e 100644 --- a/src/animation/frontend/qclipanimator.cpp +++ b/src/animation/frontend/qclipanimator.cpp @@ -166,3 +166,5 @@ void QClipAnimator::setClip(QAbstractAnimationClip *clip) } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qclipanimator.cpp" diff --git a/src/animation/frontend/qclipblendvalue.cpp b/src/animation/frontend/qclipblendvalue.cpp index e7e8a8898..0f6e0207c 100644 --- a/src/animation/frontend/qclipblendvalue.cpp +++ b/src/animation/frontend/qclipblendvalue.cpp @@ -122,3 +122,5 @@ void QClipBlendValue::setClip(Qt3DAnimation::QAbstractAnimationClip *clip) } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qclipblendvalue.cpp" diff --git a/src/animation/frontend/qclock.cpp b/src/animation/frontend/qclock.cpp index 5f9214419..0fa792158 100644 --- a/src/animation/frontend/qclock.cpp +++ b/src/animation/frontend/qclock.cpp @@ -90,3 +90,5 @@ void QClock::setPlaybackRate(double playbackRate) } QT_END_NAMESPACE + +#include "moc_qclock.cpp" diff --git a/src/animation/frontend/qkeyframeanimation.cpp b/src/animation/frontend/qkeyframeanimation.cpp index 08bd584f2..4f208de4d 100644 --- a/src/animation/frontend/qkeyframeanimation.cpp +++ b/src/animation/frontend/qkeyframeanimation.cpp @@ -416,3 +416,5 @@ Qt3DCore::QTransform *QKeyframeAnimation::target() const } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qkeyframeanimation.cpp" diff --git a/src/animation/frontend/qlerpclipblend.cpp b/src/animation/frontend/qlerpclipblend.cpp index 9ee95ccdb..891c6433e 100644 --- a/src/animation/frontend/qlerpclipblend.cpp +++ b/src/animation/frontend/qlerpclipblend.cpp @@ -218,3 +218,5 @@ void QLerpClipBlend::setEndClip(Qt3DAnimation::QAbstractClipBlendNode *endClip) } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qlerpclipblend.cpp" diff --git a/src/animation/frontend/qmorphinganimation.cpp b/src/animation/frontend/qmorphinganimation.cpp index df7b7b209..622f86eb1 100644 --- a/src/animation/frontend/qmorphinganimation.cpp +++ b/src/animation/frontend/qmorphinganimation.cpp @@ -454,3 +454,5 @@ void QMorphingAnimation::updateAnimation(float position) } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qmorphinganimation.cpp" diff --git a/src/animation/frontend/qmorphtarget.cpp b/src/animation/frontend/qmorphtarget.cpp index 1108bf45b..61386b77a 100644 --- a/src/animation/frontend/qmorphtarget.cpp +++ b/src/animation/frontend/qmorphtarget.cpp @@ -190,3 +190,5 @@ QMorphTarget *QMorphTarget::fromGeometry(Qt3DCore::QGeometry *geometry, const QS } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qmorphtarget.cpp" diff --git a/src/animation/frontend/qskeletonmapping.cpp b/src/animation/frontend/qskeletonmapping.cpp index e13cd87ec..90c5ddea9 100644 --- a/src/animation/frontend/qskeletonmapping.cpp +++ b/src/animation/frontend/qskeletonmapping.cpp @@ -95,3 +95,5 @@ void QSkeletonMapping::setSkeleton(Qt3DCore::QAbstractSkeleton *skeleton) } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qskeletonmapping.cpp" diff --git a/src/animation/frontend/qvertexblendanimation.cpp b/src/animation/frontend/qvertexblendanimation.cpp index 58e85581b..1b3b8e2eb 100644 --- a/src/animation/frontend/qvertexblendanimation.cpp +++ b/src/animation/frontend/qvertexblendanimation.cpp @@ -340,3 +340,5 @@ void QVertexBlendAnimation::updateAnimation(float position) } // Qt3DAnimation QT_END_NAMESPACE + +#include "moc_qvertexblendanimation.cpp" diff --git a/src/core/aspect/qcoreaspect.cpp b/src/core/aspect/qcoreaspect.cpp index b9aae3324..0a5999e51 100644 --- a/src/core/aspect/qcoreaspect.cpp +++ b/src/core/aspect/qcoreaspect.cpp @@ -153,3 +153,5 @@ void QCoreAspect::frameDone() QT_END_NAMESPACE QT3D_REGISTER_NAMESPACED_ASPECT("core", QT_PREPEND_NAMESPACE(Qt3DCore), QCoreAspect) + +#include "moc_qcoreaspect.cpp" diff --git a/src/core/aspect/qcoresettings.cpp b/src/core/aspect/qcoresettings.cpp index 81415de7e..39469e24b 100644 --- a/src/core/aspect/qcoresettings.cpp +++ b/src/core/aspect/qcoresettings.cpp @@ -135,3 +135,5 @@ void QCoreSettings::setBoundingVolumesEnabled(bool boundingVolumesEnabled) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qcoresettings.cpp" diff --git a/src/core/aspects/aspectcommanddebugger.cpp b/src/core/aspects/aspectcommanddebugger.cpp index 7635f44c0..1e4d7bd54 100644 --- a/src/core/aspects/aspectcommanddebugger.cpp +++ b/src/core/aspects/aspectcommanddebugger.cpp @@ -204,3 +204,5 @@ void AspectCommandDebugger::executeCommand(const QString &command, } // Qt3DCore QT_END_NAMESPACE + +#include "moc_aspectcommanddebugger_p.cpp" diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp index 4c42b5093..f50c88df8 100644 --- a/src/core/aspects/qabstractaspect.cpp +++ b/src/core/aspects/qabstractaspect.cpp @@ -456,3 +456,7 @@ void AsynchronousCommandReply::setData(const QByteArray &data) } // of namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qabstractaspect_p.cpp" + +#include "moc_qabstractaspect.cpp" diff --git a/src/core/aspects/qabstractaspect_p.h b/src/core/aspects/qabstractaspect_p.h index f3878ed55..fea5dc311 100644 --- a/src/core/aspects/qabstractaspect_p.h +++ b/src/core/aspects/qabstractaspect_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <QtCore/QHash> #include <Qt3DCore/qabstractaspect.h> #include <Qt3DCore/private/qaspectjobproviderinterface_p.h> diff --git a/src/core/aspects/qaspectengine.cpp b/src/core/aspects/qaspectengine.cpp index c75bb150e..4a1ec0aeb 100644 --- a/src/core/aspects/qaspectengine.cpp +++ b/src/core/aspects/qaspectengine.cpp @@ -541,3 +541,5 @@ QAspectEngine::RunMode QAspectEngine::runMode() const } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qaspectengine.cpp" diff --git a/src/core/aspects/qaspectmanager.cpp b/src/core/aspects/qaspectmanager.cpp index 28f689c3c..72661aaa4 100644 --- a/src/core/aspects/qaspectmanager.cpp +++ b/src/core/aspects/qaspectmanager.cpp @@ -573,3 +573,5 @@ void QAspectManager::processFrame() } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qaspectmanager_p.cpp" diff --git a/src/core/doc/src/qmlextracontrollers.qdoc b/src/core/doc/src/qmlextracontrollers.qdoc index f02f4b29f..a1c3cb0a6 100644 --- a/src/core/doc/src/qmlextracontrollers.qdoc +++ b/src/core/doc/src/qmlextracontrollers.qdoc @@ -151,7 +151,7 @@ of the camera pan and tilt. */ /*! - \qmlproperty real OrbitCameraController::zoomLimit + \qmlproperty real OrbitCameraController::zoomInLimit Holds the current zoom-in limit. The zoom-in limit determines how close to the view center the camera can be zoomed. diff --git a/src/core/doc/src/qt3drender-porting-to-rhi.qdoc b/src/core/doc/src/qt3drender-porting-to-rhi.qdoc index 4f1709872..c0a23861b 100644 --- a/src/core/doc/src/qt3drender-porting-to-rhi.qdoc +++ b/src/core/doc/src/qt3drender-porting-to-rhi.qdoc @@ -69,7 +69,7 @@ \badcode Material { Effect { - technique: [ + techniques: [ Technique { id: gl3Technique graphicsApiFilter { diff --git a/src/core/geometry/qattribute.cpp b/src/core/geometry/qattribute.cpp index d3a564b66..7a5f529e5 100644 --- a/src/core/geometry/qattribute.cpp +++ b/src/core/geometry/qattribute.cpp @@ -503,3 +503,5 @@ The signal is emitted with \a vertexBaseType when the dataType changed. } // Qt3DCore QT_END_NAMESPACE + +#include "moc_qattribute.cpp" diff --git a/src/core/geometry/qboundingvolume.cpp b/src/core/geometry/qboundingvolume.cpp index 54bf9ffa8..8ecdbd3e9 100644 --- a/src/core/geometry/qboundingvolume.cpp +++ b/src/core/geometry/qboundingvolume.cpp @@ -390,3 +390,5 @@ bool QBoundingVolume::updateImplicitBounds() } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qboundingvolume.cpp" diff --git a/src/core/geometry/qbuffer.cpp b/src/core/geometry/qbuffer.cpp index 9169442f1..ad4eca85b 100644 --- a/src/core/geometry/qbuffer.cpp +++ b/src/core/geometry/qbuffer.cpp @@ -266,3 +266,5 @@ QBuffer::AccessType QBuffer::accessType() const } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qbuffer.cpp" diff --git a/src/core/geometry/qgeometryview.cpp b/src/core/geometry/qgeometryview.cpp index 6effa1d28..72c2f3c06 100644 --- a/src/core/geometry/qgeometryview.cpp +++ b/src/core/geometry/qgeometryview.cpp @@ -615,3 +615,5 @@ void QGeometryView::setPrimitiveType(QGeometryView::PrimitiveType primitiveType) } QT_END_NAMESPACE + +#include "moc_qgeometryview.cpp" diff --git a/src/core/jobs/qabstractaspectjobmanager.cpp b/src/core/jobs/qabstractaspectjobmanager.cpp index 5d921c778..c790cf47b 100644 --- a/src/core/jobs/qabstractaspectjobmanager.cpp +++ b/src/core/jobs/qabstractaspectjobmanager.cpp @@ -57,3 +57,5 @@ QAbstractAspectJobManager::QAbstractAspectJobManager(QObject *parent) } QT_END_NAMESPACE + +#include "moc_qabstractaspectjobmanager_p.cpp" diff --git a/src/core/jobs/qaspectjobmanager.cpp b/src/core/jobs/qaspectjobmanager.cpp index e352536cd..2d1106260 100644 --- a/src/core/jobs/qaspectjobmanager.cpp +++ b/src/core/jobs/qaspectjobmanager.cpp @@ -152,3 +152,5 @@ int QAspectJobManager::idealThreadCount() } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qaspectjobmanager_p.cpp" diff --git a/src/core/jobs/qthreadpooler.cpp b/src/core/jobs/qthreadpooler.cpp index b2f53b7e7..6dfd9f320 100644 --- a/src/core/jobs/qthreadpooler.cpp +++ b/src/core/jobs/qthreadpooler.cpp @@ -50,7 +50,7 @@ QThreadPooler::QThreadPooler(QObject *parent) , m_futureInterface(nullptr) , m_mutex() , m_taskCount(0) - , m_threadPool(QThreadPool::globalInstance()) + , m_threadPool(new QThreadPool(this)) , m_totalRunJobs(0) { m_threadPool->setMaxThreadCount(QAspectJobManager::idealThreadCount()); @@ -203,3 +203,5 @@ int QThreadPooler::currentCount() const } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qthreadpooler_p.cpp" diff --git a/src/core/jobs/qthreadpooler_p.h b/src/core/jobs/qthreadpooler_p.h index 058da2fc9..8d8be8d23 100644 --- a/src/core/jobs/qthreadpooler_p.h +++ b/src/core/jobs/qthreadpooler_p.h @@ -77,8 +77,6 @@ public: void taskFinished(RunnableInterface *task); QFuture<void> future(); - static int maxThreadCount(); - private: void enqueueTasks(const QList<RunnableInterface *> &tasks); void skipTask(RunnableInterface *task); diff --git a/src/core/nodes/propertychangehandler.cpp b/src/core/nodes/propertychangehandler.cpp index 0a1d59932..3d58b5f0f 100644 --- a/src/core/nodes/propertychangehandler.cpp +++ b/src/core/nodes/propertychangehandler.cpp @@ -84,3 +84,5 @@ void PropertyChangeHandlerBase::disconnectFromPropertyChange(const QObject *obje } QT_END_NAMESPACE + +#include "moc_propertychangehandler_p.cpp" diff --git a/src/core/nodes/qcomponent.cpp b/src/core/nodes/qcomponent.cpp index 5e41e2f67..21fb20a50 100644 --- a/src/core/nodes/qcomponent.cpp +++ b/src/core/nodes/qcomponent.cpp @@ -190,3 +190,5 @@ QComponent::QComponent(QComponentPrivate &dd, QNode *parent) */ QT_END_NAMESPACE + +#include "moc_qcomponent.cpp" diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp index 25ec4434c..7685f0984 100644 --- a/src/core/nodes/qentity.cpp +++ b/src/core/nodes/qentity.cpp @@ -329,3 +329,5 @@ void QEntity::onParentChanged(QObject *) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qentity.cpp" diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp index d9ab8f0dc..dd623995a 100644 --- a/src/core/nodes/qnode.cpp +++ b/src/core/nodes/qnode.cpp @@ -924,4 +924,6 @@ void NodePostConstructorInit::processNodes() QT_END_NAMESPACE +#include "moc_qnode_p.cpp" + #include "moc_qnode.cpp" diff --git a/src/core/qchangearbiter.cpp b/src/core/qchangearbiter.cpp index add672d1f..78b22eebc 100644 --- a/src/core/qchangearbiter.cpp +++ b/src/core/qchangearbiter.cpp @@ -113,3 +113,5 @@ QList<ComponentRelationshipChange> QChangeArbiter::takeDirtyEntityComponentNodes } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qchangearbiter_p.cpp" diff --git a/src/core/qscheduler.cpp b/src/core/qscheduler.cpp index c982e39ca..c72a3c48e 100644 --- a/src/core/qscheduler.cpp +++ b/src/core/qscheduler.cpp @@ -157,3 +157,5 @@ int QScheduler::scheduleAndWaitForFrameAspectJobs(qint64 time, bool dumpJobs) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qscheduler_p.cpp" diff --git a/src/core/services/qabstractframeadvanceservice.cpp b/src/core/services/qabstractframeadvanceservice.cpp index 15bf46afa..fc4752c62 100644 --- a/src/core/services/qabstractframeadvanceservice.cpp +++ b/src/core/services/qabstractframeadvanceservice.cpp @@ -91,3 +91,5 @@ QAbstractFrameAdvanceService::QAbstractFrameAdvanceService(QAbstractFrameAdvance } // Qt3D QT_END_NAMESPACE + +#include "moc_qabstractframeadvanceservice_p.cpp" diff --git a/src/core/services/qdownloadnetworkworker.cpp b/src/core/services/qdownloadnetworkworker.cpp index e1f806e92..ffc44b2a6 100644 --- a/src/core/services/qdownloadnetworkworker.cpp +++ b/src/core/services/qdownloadnetworkworker.cpp @@ -146,3 +146,5 @@ void QDownloadNetworkWorker::onDownloadProgressed(qint64 bytesReceived, qint64 b QT_END_NAMESPACE +#include "moc_qdownloadnetworkworker_p.cpp" + diff --git a/src/core/services/qeventfilterservice.cpp b/src/core/services/qeventfilterservice.cpp index 59b4eedb3..254a2d31e 100644 --- a/src/core/services/qeventfilterservice.cpp +++ b/src/core/services/qeventfilterservice.cpp @@ -189,4 +189,6 @@ bool InternalEventListener::eventFilter(QObject *obj, QEvent *e) QT_END_NAMESPACE +#include "moc_qeventfilterservice_p.cpp" + #include "qeventfilterservice.moc" diff --git a/src/core/services/qopenglinformationservice.cpp b/src/core/services/qopenglinformationservice.cpp index c1c05018e..76b4fa690 100644 --- a/src/core/services/qopenglinformationservice.cpp +++ b/src/core/services/qopenglinformationservice.cpp @@ -84,3 +84,5 @@ QOpenGLInformationService::QOpenGLInformationService(QOpenGLInformationServicePr } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qopenglinformationservice_p.cpp" diff --git a/src/core/services/qservicelocator.cpp b/src/core/services/qservicelocator.cpp index 73a40c2e4..2f8117bb4 100644 --- a/src/core/services/qservicelocator.cpp +++ b/src/core/services/qservicelocator.cpp @@ -267,3 +267,5 @@ QAbstractServiceProvider *QServiceLocator::_q_getServiceHelper(int type) } QT_END_NAMESPACE + +#include "moc_qservicelocator_p.cpp" diff --git a/src/core/services/qsysteminformationservice.cpp b/src/core/services/qsysteminformationservice.cpp index 02571482f..882aef15d 100644 --- a/src/core/services/qsysteminformationservice.cpp +++ b/src/core/services/qsysteminformationservice.cpp @@ -436,3 +436,5 @@ void QSystemInformationService::dumpCommand(const QString &command) } QT_END_NAMESPACE + +#include "moc_qsysteminformationservice_p.cpp" diff --git a/src/core/services/qtickclockservice.cpp b/src/core/services/qtickclockservice.cpp index 225e70ec2..f3f67ab4c 100644 --- a/src/core/services/qtickclockservice.cpp +++ b/src/core/services/qtickclockservice.cpp @@ -98,3 +98,5 @@ void QTickClockService::stop() } // Qt3D QT_END_NAMESPACE + +#include "moc_qtickclockservice_p.cpp" diff --git a/src/core/transforms/qabstractskeleton.cpp b/src/core/transforms/qabstractskeleton.cpp index cdda89418..8d30b27da 100644 --- a/src/core/transforms/qabstractskeleton.cpp +++ b/src/core/transforms/qabstractskeleton.cpp @@ -130,3 +130,5 @@ void QAbstractSkeletonPrivate::setJointCount(int jointCount) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qabstractskeleton.cpp" diff --git a/src/core/transforms/qarmature.cpp b/src/core/transforms/qarmature.cpp index 56d310152..528827e7f 100644 --- a/src/core/transforms/qarmature.cpp +++ b/src/core/transforms/qarmature.cpp @@ -160,3 +160,5 @@ void QArmature::setSkeleton(Qt3DCore::QAbstractSkeleton *skeleton) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qarmature.cpp" diff --git a/src/core/transforms/qjoint.cpp b/src/core/transforms/qjoint.cpp index 1c0233f49..2df5b9b96 100644 --- a/src/core/transforms/qjoint.cpp +++ b/src/core/transforms/qjoint.cpp @@ -391,3 +391,5 @@ QString QJoint::name() const } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qjoint.cpp" diff --git a/src/core/transforms/qskeleton.cpp b/src/core/transforms/qskeleton.cpp index 751daaabe..a268378a8 100644 --- a/src/core/transforms/qskeleton.cpp +++ b/src/core/transforms/qskeleton.cpp @@ -139,3 +139,5 @@ void QSkeleton::setRootJoint(Qt3DCore::QJoint *rootJoint) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qskeleton.cpp" diff --git a/src/core/transforms/qskeletonloader.cpp b/src/core/transforms/qskeletonloader.cpp index e86c72fbf..6197f1ad1 100644 --- a/src/core/transforms/qskeletonloader.cpp +++ b/src/core/transforms/qskeletonloader.cpp @@ -242,3 +242,5 @@ void QSkeletonLoader::setRootJoint(QJoint *rootJoint) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qskeletonloader.cpp" diff --git a/src/extras/3dtext/qextrudedtextgeometry.cpp b/src/extras/3dtext/qextrudedtextgeometry.cpp index 1c9208ea9..4ff4533c9 100644 --- a/src/extras/3dtext/qextrudedtextgeometry.cpp +++ b/src/extras/3dtext/qextrudedtextgeometry.cpp @@ -512,3 +512,5 @@ Qt3DCore::QAttribute *QExtrudedTextGeometry::indexAttribute() const } // Qt3DExtras QT_END_NAMESPACE + +#include "moc_qextrudedtextgeometry.cpp" diff --git a/src/extras/3dtext/qextrudedtextmesh.cpp b/src/extras/3dtext/qextrudedtextmesh.cpp index fc93726d2..d6555b52b 100644 --- a/src/extras/3dtext/qextrudedtextmesh.cpp +++ b/src/extras/3dtext/qextrudedtextmesh.cpp @@ -167,3 +167,5 @@ float QExtrudedTextMesh::depth() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qextrudedtextmesh.cpp" diff --git a/src/extras/defaults/qabstractcameracontroller.cpp b/src/extras/defaults/qabstractcameracontroller.cpp index dafe1fde8..f50b8c987 100644 --- a/src/extras/defaults/qabstractcameracontroller.cpp +++ b/src/extras/defaults/qabstractcameracontroller.cpp @@ -288,7 +288,8 @@ QAbstractCameraController::QAbstractCameraController(QAbstractCameraControllerPr d->init(); QObject::connect(d->m_frameAction, &Qt3DLogic::QFrameAction::triggered, - this, [=] (float dt) { + this, [this] (float dt) { + Q_D(const QAbstractCameraController); InputState state; state.rxAxisValue = d->m_rxAxis->value(); diff --git a/src/extras/defaults/qabstractspritesheet.cpp b/src/extras/defaults/qabstractspritesheet.cpp index 2cf134f7c..d70e924c4 100644 --- a/src/extras/defaults/qabstractspritesheet.cpp +++ b/src/extras/defaults/qabstractspritesheet.cpp @@ -141,3 +141,5 @@ void QAbstractSpriteSheet::setCurrentIndex(int currentIndex) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qabstractspritesheet.cpp" diff --git a/src/extras/defaults/qdiffusemapmaterial.cpp b/src/extras/defaults/qdiffusemapmaterial.cpp index bd9785e2e..ce3726454 100644 --- a/src/extras/defaults/qdiffusemapmaterial.cpp +++ b/src/extras/defaults/qdiffusemapmaterial.cpp @@ -359,3 +359,5 @@ void QDiffuseMapMaterial::setTextureScale(float textureScale) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qdiffusemapmaterial.cpp" diff --git a/src/extras/defaults/qdiffusespecularmapmaterial.cpp b/src/extras/defaults/qdiffusespecularmapmaterial.cpp index 8f1dd66e1..1d9f6e54c 100644 --- a/src/extras/defaults/qdiffusespecularmapmaterial.cpp +++ b/src/extras/defaults/qdiffusespecularmapmaterial.cpp @@ -378,3 +378,5 @@ void QDiffuseSpecularMapMaterial::setTextureScale(float textureScale) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qdiffusespecularmapmaterial.cpp" diff --git a/src/extras/defaults/qdiffusespecularmaterial.cpp b/src/extras/defaults/qdiffusespecularmaterial.cpp index 2a1139aef..db44fcb8d 100644 --- a/src/extras/defaults/qdiffusespecularmaterial.cpp +++ b/src/extras/defaults/qdiffusespecularmaterial.cpp @@ -539,3 +539,5 @@ void QDiffuseSpecularMaterial::setAlphaBlendingEnabled(bool enabled) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qdiffusespecularmaterial.cpp" diff --git a/src/extras/defaults/qforwardrenderer.cpp b/src/extras/defaults/qforwardrenderer.cpp index 71d99d84b..42283e88f 100644 --- a/src/extras/defaults/qforwardrenderer.cpp +++ b/src/extras/defaults/qforwardrenderer.cpp @@ -394,3 +394,5 @@ bool QForwardRenderer::showDebugOverlay() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qforwardrenderer.cpp" diff --git a/src/extras/defaults/qgoochmaterial.cpp b/src/extras/defaults/qgoochmaterial.cpp index b5665d776..a0088c80a 100644 --- a/src/extras/defaults/qgoochmaterial.cpp +++ b/src/extras/defaults/qgoochmaterial.cpp @@ -377,3 +377,5 @@ void QGoochMaterial::setShininess(float shininess) } QT_END_NAMESPACE + +#include "moc_qgoochmaterial.cpp" diff --git a/src/extras/defaults/qmetalroughmaterial.cpp b/src/extras/defaults/qmetalroughmaterial.cpp index 79ff94337..0e3cab916 100644 --- a/src/extras/defaults/qmetalroughmaterial.cpp +++ b/src/extras/defaults/qmetalroughmaterial.cpp @@ -505,3 +505,5 @@ void QMetalRoughMaterial::setTextureScale(float textureScale) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qmetalroughmaterial.cpp" diff --git a/src/extras/defaults/qmorphphongmaterial.cpp b/src/extras/defaults/qmorphphongmaterial.cpp index e5b94837c..8a4be35b1 100644 --- a/src/extras/defaults/qmorphphongmaterial.cpp +++ b/src/extras/defaults/qmorphphongmaterial.cpp @@ -333,3 +333,5 @@ void QMorphPhongMaterial::setInterpolator(float interpolator) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qmorphphongmaterial.cpp" diff --git a/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp b/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp index b618742a0..031e0552e 100644 --- a/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp +++ b/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp @@ -219,3 +219,5 @@ QNormalDiffuseMapAlphaMaterial::~QNormalDiffuseMapAlphaMaterial() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qnormaldiffusemapalphamaterial.cpp" diff --git a/src/extras/defaults/qnormaldiffusemapmaterial.cpp b/src/extras/defaults/qnormaldiffusemapmaterial.cpp index 95e031233..5044c58c6 100644 --- a/src/extras/defaults/qnormaldiffusemapmaterial.cpp +++ b/src/extras/defaults/qnormaldiffusemapmaterial.cpp @@ -408,3 +408,5 @@ void QNormalDiffuseMapMaterial::setTextureScale(float textureScale) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qnormaldiffusemapmaterial.cpp" diff --git a/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp b/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp index 69fd34e19..84f206a06 100644 --- a/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp +++ b/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp @@ -425,3 +425,5 @@ void QNormalDiffuseSpecularMapMaterial::setTextureScale(float textureScale) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qnormaldiffusespecularmapmaterial.cpp" diff --git a/src/extras/defaults/qpervertexcolormaterial.cpp b/src/extras/defaults/qpervertexcolormaterial.cpp index ef41cbce7..53ea83a7d 100644 --- a/src/extras/defaults/qpervertexcolormaterial.cpp +++ b/src/extras/defaults/qpervertexcolormaterial.cpp @@ -175,3 +175,5 @@ void QPerVertexColorMaterialPrivate::init() } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qpervertexcolormaterial.cpp" diff --git a/src/extras/defaults/qphongalphamaterial.cpp b/src/extras/defaults/qphongalphamaterial.cpp index 57c81b721..573b3f8e5 100644 --- a/src/extras/defaults/qphongalphamaterial.cpp +++ b/src/extras/defaults/qphongalphamaterial.cpp @@ -470,3 +470,5 @@ void QPhongAlphaMaterial::setBlendFunctionArg(QBlendEquation::BlendFunction blen } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qphongalphamaterial.cpp" diff --git a/src/extras/defaults/qphongmaterial.cpp b/src/extras/defaults/qphongmaterial.cpp index 465db7a5c..6240f60ba 100644 --- a/src/extras/defaults/qphongmaterial.cpp +++ b/src/extras/defaults/qphongmaterial.cpp @@ -310,3 +310,5 @@ void QPhongMaterial::setShininess(float shininess) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qphongmaterial.cpp" diff --git a/src/extras/defaults/qskyboxentity.cpp b/src/extras/defaults/qskyboxentity.cpp index 163cf63a4..89d6d7973 100644 --- a/src/extras/defaults/qskyboxentity.cpp +++ b/src/extras/defaults/qskyboxentity.cpp @@ -384,3 +384,5 @@ bool QSkyboxEntity::isGammaCorrectEnabled() const \since 5.9 */ QT_END_NAMESPACE + +#include "moc_qskyboxentity.cpp" diff --git a/src/extras/defaults/qspritegrid.cpp b/src/extras/defaults/qspritegrid.cpp index 15016a891..0e4ab20ab 100644 --- a/src/extras/defaults/qspritegrid.cpp +++ b/src/extras/defaults/qspritegrid.cpp @@ -154,3 +154,5 @@ void QSpriteGrid::setColumns(int columns) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qspritegrid.cpp" diff --git a/src/extras/defaults/qspritesheet.cpp b/src/extras/defaults/qspritesheet.cpp index 94f608f4a..020362a0e 100644 --- a/src/extras/defaults/qspritesheet.cpp +++ b/src/extras/defaults/qspritesheet.cpp @@ -171,3 +171,5 @@ void QSpriteSheet::setSprites(QList<QSpriteSheetItem *> sprites) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qspritesheet.cpp" diff --git a/src/extras/defaults/qspritesheetitem.cpp b/src/extras/defaults/qspritesheetitem.cpp index b4e096ae9..e05e41bef 100644 --- a/src/extras/defaults/qspritesheetitem.cpp +++ b/src/extras/defaults/qspritesheetitem.cpp @@ -125,3 +125,5 @@ void QSpriteSheetItem::setHeight(int height) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qspritesheetitem.cpp" diff --git a/src/extras/defaults/qt3dwindow.cpp b/src/extras/defaults/qt3dwindow.cpp index 04a0c5b5a..85ca73cca 100644 --- a/src/extras/defaults/qt3dwindow.cpp +++ b/src/extras/defaults/qt3dwindow.cpp @@ -363,3 +363,5 @@ void setupWindowSurface(QWindow *window, Qt3DRender::API api) noexcept } // Qt3DExtras QT_END_NAMESPACE + +#include "moc_qt3dwindow.cpp" diff --git a/src/extras/defaults/qtexturematerial.cpp b/src/extras/defaults/qtexturematerial.cpp index b38d6551d..f3a63ce6f 100644 --- a/src/extras/defaults/qtexturematerial.cpp +++ b/src/extras/defaults/qtexturematerial.cpp @@ -302,3 +302,5 @@ void QTextureMaterial::setAlphaBlendingEnabled(bool enabled) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qtexturematerial.cpp" diff --git a/src/extras/geometries/qconegeometry.cpp b/src/extras/geometries/qconegeometry.cpp index e2165e6f8..258d85bb7 100644 --- a/src/extras/geometries/qconegeometry.cpp +++ b/src/extras/geometries/qconegeometry.cpp @@ -673,3 +673,5 @@ QAttribute *QConeGeometry::indexAttribute() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qconegeometry.cpp" diff --git a/src/extras/geometries/qconegeometryview.cpp b/src/extras/geometries/qconegeometryview.cpp index 28707d043..519c488f0 100644 --- a/src/extras/geometries/qconegeometryview.cpp +++ b/src/extras/geometries/qconegeometryview.cpp @@ -238,3 +238,5 @@ float QConeGeometryView::length() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qconegeometryview.cpp" diff --git a/src/extras/geometries/qconemesh.cpp b/src/extras/geometries/qconemesh.cpp index 5f4ebd369..6b391b1d3 100644 --- a/src/extras/geometries/qconemesh.cpp +++ b/src/extras/geometries/qconemesh.cpp @@ -238,3 +238,5 @@ float QConeMesh::length() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qconemesh.cpp" diff --git a/src/extras/geometries/qcuboidgeometry.cpp b/src/extras/geometries/qcuboidgeometry.cpp index 87707eefd..978670cd7 100644 --- a/src/extras/geometries/qcuboidgeometry.cpp +++ b/src/extras/geometries/qcuboidgeometry.cpp @@ -838,3 +838,5 @@ QAttribute *QCuboidGeometry::indexAttribute() const } // Qt3DExtras QT_END_NAMESPACE + +#include "moc_qcuboidgeometry.cpp" diff --git a/src/extras/geometries/qcuboidgeometryview.cpp b/src/extras/geometries/qcuboidgeometryview.cpp index ee0977b71..ee21f3526 100644 --- a/src/extras/geometries/qcuboidgeometryview.cpp +++ b/src/extras/geometries/qcuboidgeometryview.cpp @@ -225,3 +225,5 @@ QSize QCuboidGeometryView::xyMeshResolution() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qcuboidgeometryview.cpp" diff --git a/src/extras/geometries/qcuboidmesh.cpp b/src/extras/geometries/qcuboidmesh.cpp index 5440ef0ba..78f742424 100644 --- a/src/extras/geometries/qcuboidmesh.cpp +++ b/src/extras/geometries/qcuboidmesh.cpp @@ -225,3 +225,5 @@ QSize QCuboidMesh::xyMeshResolution() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qcuboidmesh.cpp" diff --git a/src/extras/geometries/qcylindergeometry.cpp b/src/extras/geometries/qcylindergeometry.cpp index 5d37b5ac8..f16705c77 100644 --- a/src/extras/geometries/qcylindergeometry.cpp +++ b/src/extras/geometries/qcylindergeometry.cpp @@ -546,3 +546,5 @@ QAttribute *QCylinderGeometry::indexAttribute() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qcylindergeometry.cpp" diff --git a/src/extras/geometries/qcylindergeometryview.cpp b/src/extras/geometries/qcylindergeometryview.cpp index 9347f1134..6bedb4756 100644 --- a/src/extras/geometries/qcylindergeometryview.cpp +++ b/src/extras/geometries/qcylindergeometryview.cpp @@ -182,3 +182,5 @@ float QCylinderGeometryView::length() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qcylindergeometryview.cpp" diff --git a/src/extras/geometries/qcylindermesh.cpp b/src/extras/geometries/qcylindermesh.cpp index 2c2bb4d81..31a633e55 100644 --- a/src/extras/geometries/qcylindermesh.cpp +++ b/src/extras/geometries/qcylindermesh.cpp @@ -182,3 +182,5 @@ float QCylinderMesh::length() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qcylindermesh.cpp" diff --git a/src/extras/geometries/qplanegeometry.cpp b/src/extras/geometries/qplanegeometry.cpp index e83548ad5..41d7ed4b9 100644 --- a/src/extras/geometries/qplanegeometry.cpp +++ b/src/extras/geometries/qplanegeometry.cpp @@ -517,3 +517,5 @@ QByteArray QPlaneGeometryPrivate::generateIndexData() const } // Qt3DExtras QT_END_NAMESPACE + +#include "moc_qplanegeometry.cpp" diff --git a/src/extras/geometries/qplanegeometryview.cpp b/src/extras/geometries/qplanegeometryview.cpp index dd1544b3b..e4e1f6295 100644 --- a/src/extras/geometries/qplanegeometryview.cpp +++ b/src/extras/geometries/qplanegeometryview.cpp @@ -173,3 +173,5 @@ bool QPlaneGeometryView::mirrored() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qplanegeometryview.cpp" diff --git a/src/extras/geometries/qplanemesh.cpp b/src/extras/geometries/qplanemesh.cpp index ebcaa1d9c..78714ddaf 100644 --- a/src/extras/geometries/qplanemesh.cpp +++ b/src/extras/geometries/qplanemesh.cpp @@ -175,3 +175,5 @@ bool QPlaneMesh::mirrored() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qplanemesh.cpp" diff --git a/src/extras/geometries/qspheregeometry.cpp b/src/extras/geometries/qspheregeometry.cpp index c780ba83c..61ab08f4c 100644 --- a/src/extras/geometries/qspheregeometry.cpp +++ b/src/extras/geometries/qspheregeometry.cpp @@ -541,3 +541,5 @@ QAttribute *QSphereGeometry::indexAttribute() const QT_END_NAMESPACE +#include "moc_qspheregeometry.cpp" + diff --git a/src/extras/geometries/qspheregeometryview.cpp b/src/extras/geometries/qspheregeometryview.cpp index 6ac72ad82..f3cb83b94 100644 --- a/src/extras/geometries/qspheregeometryview.cpp +++ b/src/extras/geometries/qspheregeometryview.cpp @@ -172,3 +172,5 @@ float QSphereGeometryView::radius() const } // Qt3DExtras QT_END_NAMESPACE + +#include "moc_qspheregeometryview.cpp" diff --git a/src/extras/geometries/qspheremesh.cpp b/src/extras/geometries/qspheremesh.cpp index fa2b795c8..11aa38aec 100644 --- a/src/extras/geometries/qspheremesh.cpp +++ b/src/extras/geometries/qspheremesh.cpp @@ -172,3 +172,5 @@ float QSphereMesh::radius() const } // Qt3DExtras QT_END_NAMESPACE + +#include "moc_qspheremesh.cpp" diff --git a/src/extras/geometries/qtorusgeometry.cpp b/src/extras/geometries/qtorusgeometry.cpp index c9b430043..5a0bdd820 100644 --- a/src/extras/geometries/qtorusgeometry.cpp +++ b/src/extras/geometries/qtorusgeometry.cpp @@ -501,3 +501,5 @@ QAttribute *QTorusGeometry::indexAttribute() const } // Qt3DExtras QT_END_NAMESPACE + +#include "moc_qtorusgeometry.cpp" diff --git a/src/extras/geometries/qtorusgeometryview.cpp b/src/extras/geometries/qtorusgeometryview.cpp index 958d17974..907e5596c 100644 --- a/src/extras/geometries/qtorusgeometryview.cpp +++ b/src/extras/geometries/qtorusgeometryview.cpp @@ -175,3 +175,5 @@ float QTorusGeometryView::minorRadius() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qtorusgeometryview.cpp" diff --git a/src/extras/geometries/qtorusmesh.cpp b/src/extras/geometries/qtorusmesh.cpp index ddcec3ece..16add5779 100644 --- a/src/extras/geometries/qtorusmesh.cpp +++ b/src/extras/geometries/qtorusmesh.cpp @@ -176,3 +176,5 @@ float QTorusMesh::minorRadius() const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qtorusmesh.cpp" diff --git a/src/extras/text/distancefieldtextrenderer.cpp b/src/extras/text/distancefieldtextrenderer.cpp index 3cafd93df..8a4c192d2 100644 --- a/src/extras/text/distancefieldtextrenderer.cpp +++ b/src/extras/text/distancefieldtextrenderer.cpp @@ -154,3 +154,5 @@ void DistanceFieldTextRenderer::setColor(const QColor &color) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_distancefieldtextrenderer_p.cpp" diff --git a/src/extras/text/qdistancefieldglyphcache.cpp b/src/extras/text/qdistancefieldglyphcache.cpp index d367410c8..72f47024c 100644 --- a/src/extras/text/qdistancefieldglyphcache.cpp +++ b/src/extras/text/qdistancefieldglyphcache.cpp @@ -162,6 +162,7 @@ DistanceFieldFont::DistanceFieldFont(const QRawFont &font, bool doubleRes, Qt3DC , m_doubleGlyphResolution(doubleRes) , m_parentNode(parent) { + Q_ASSERT(m_parentNode); } DistanceFieldFont::~DistanceFieldFont() @@ -198,13 +199,14 @@ StoredGlyph DistanceFieldFont::refGlyph(quint32 glyph) // scenarios const int size = m_doubleGlyphResolution ? 512 : 256; - QTextureAtlas *atlas = new QTextureAtlas(m_parentNode); + QTextureAtlas *atlas = new QTextureAtlas(); atlas->setWidth(size); atlas->setHeight(size); atlas->setFormat(Qt3DRender::QAbstractTexture::R8_UNorm); atlas->setPixelFormat(QOpenGLTexture::Red); atlas->setMinificationFilter(Qt3DRender::QAbstractTexture::Linear); atlas->setMagnificationFilter(Qt3DRender::QAbstractTexture::Linear); + atlas->setParent(m_parentNode); m_atlasses << atlas; if (!storedGlyph.addToTextureAtlas(atlas)) @@ -237,7 +239,12 @@ void DistanceFieldFont::derefGlyph(quint32 glyph) Q_ASSERT(m_atlasses.contains(atlas)); m_atlasses.removeAll(atlas); - delete atlas; + + // This function might have been called as a result of destroying + // the scene root which traverses the entire scene tree. Calling + // delete on the atlas here could lead to dangling pointers in the + // least of children being traversed for destruction. + atlas->deleteLater(); } m_glyphs.erase(it); @@ -288,7 +295,8 @@ DistanceFieldFont* QDistanceFieldGlyphCache::getOrCreateDistanceFieldFont(const // create new font cache // we set the parent node to nullptr, since the parent node of QTextureAtlasses // will be set when we pass them to QText2DMaterial later - DistanceFieldFont *dff = new DistanceFieldFont(actualFont, useDoubleRes, nullptr); + Q_ASSERT(m_rootNode); + DistanceFieldFont *dff = new DistanceFieldFont(actualFont, useDoubleRes, m_rootNode); m_fonts.insert(key, dff); return dff; } @@ -325,11 +333,10 @@ QDistanceFieldGlyphCache::Glyph refAndGetGlyph(DistanceFieldFont *dff, quint32 g if (dff) { const auto entry = dff->refGlyph(glyph); - if (entry.atlas()) { - ret.glyphPathBoundingRect = entry.glyphPathBoundingRect(); - ret.texCoords = entry.texCoords(); - ret.texture = entry.atlas(); - } + Q_ASSERT(entry.atlas()); + ret.glyphPathBoundingRect = entry.glyphPathBoundingRect(); + ret.texCoords = entry.texCoords(); + ret.texture = entry.atlas(); } return ret; diff --git a/src/extras/text/qtext2dentity.cpp b/src/extras/text/qtext2dentity.cpp index f9edbe090..f25bef18e 100644 --- a/src/extras/text/qtext2dentity.cpp +++ b/src/extras/text/qtext2dentity.cpp @@ -310,8 +310,9 @@ void QText2DEntityPrivate::setCurrentGlyphRuns(const QList<QGlyphRun> &runs) delete m_renderers.takeLast(); while (m_renderers.size() < renderData.size()) { - DistanceFieldTextRenderer *renderer = new DistanceFieldTextRenderer(q_func()); + DistanceFieldTextRenderer *renderer = new DistanceFieldTextRenderer(); renderer->setColor(m_color); + renderer->setParent(q_func()); m_renderers << renderer; } @@ -490,3 +491,5 @@ void QText2DEntity::setHeight(float height) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qtext2dentity.cpp" diff --git a/src/extras/text/qtext2dmaterial.cpp b/src/extras/text/qtext2dmaterial.cpp index 2070bf15f..8df65d069 100644 --- a/src/extras/text/qtext2dmaterial.cpp +++ b/src/extras/text/qtext2dmaterial.cpp @@ -195,3 +195,5 @@ void QText2DMaterial::setDistanceFieldTexture(Qt3DRender::QAbstractTexture *tex) } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qtext2dmaterial_p.cpp" diff --git a/src/extras/text/qtextureatlas.cpp b/src/extras/text/qtextureatlas.cpp index 97f9845e0..ef2035a68 100644 --- a/src/extras/text/qtextureatlas.cpp +++ b/src/extras/text/qtextureatlas.cpp @@ -297,3 +297,5 @@ int QTextureAtlas::imagePadding(TextureId id) const } // namespace Qt3DExtras QT_END_NAMESPACE + +#include "moc_qtextureatlas_p.cpp" diff --git a/src/input/backend/keyboardmousegenericdeviceintegration.cpp b/src/input/backend/keyboardmousegenericdeviceintegration.cpp index fdbd10e30..e1b5c6eae 100644 --- a/src/input/backend/keyboardmousegenericdeviceintegration.cpp +++ b/src/input/backend/keyboardmousegenericdeviceintegration.cpp @@ -100,3 +100,5 @@ QStringList KeyboardMouseGenericDeviceIntegration::deviceNames() const } // Qt3DInput QT_END_NAMESPACE + +#include "moc_keyboardmousegenericdeviceintegration_p.cpp" diff --git a/src/input/frontend/qabstractactioninput.cpp b/src/input/frontend/qabstractactioninput.cpp index 5d7af72f8..6da0ab59d 100644 --- a/src/input/frontend/qabstractactioninput.cpp +++ b/src/input/frontend/qabstractactioninput.cpp @@ -81,3 +81,5 @@ QAbstractActionInput::~QAbstractActionInput() } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qabstractactioninput.cpp" diff --git a/src/input/frontend/qabstractaxisinput.cpp b/src/input/frontend/qabstractaxisinput.cpp index d7022835d..b4b0ba3ef 100644 --- a/src/input/frontend/qabstractaxisinput.cpp +++ b/src/input/frontend/qabstractaxisinput.cpp @@ -120,3 +120,5 @@ QAbstractPhysicalDevice *QAbstractAxisInput::sourceDevice() const } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qabstractaxisinput.cpp" diff --git a/src/input/frontend/qabstractphysicaldevice.cpp b/src/input/frontend/qabstractphysicaldevice.cpp index 3a7eaf0dd..a5dc8e29b 100644 --- a/src/input/frontend/qabstractphysicaldevice.cpp +++ b/src/input/frontend/qabstractphysicaldevice.cpp @@ -211,3 +211,5 @@ void QAbstractPhysicalDevicePrivate::postButtonEvent(int button, qreal value) } QT_END_NAMESPACE + +#include "moc_qabstractphysicaldevice.cpp" diff --git a/src/input/frontend/qabstractphysicaldeviceproxy.cpp b/src/input/frontend/qabstractphysicaldeviceproxy.cpp index ae1401921..8622187a4 100644 --- a/src/input/frontend/qabstractphysicaldeviceproxy.cpp +++ b/src/input/frontend/qabstractphysicaldeviceproxy.cpp @@ -210,3 +210,5 @@ void QAbstractPhysicalDeviceProxyPrivate::resetDevice(QAbstractPhysicalDevice *d } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qabstractphysicaldeviceproxy_p.cpp" diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp index 51f375fb5..527f5306d 100644 --- a/src/input/frontend/qaction.cpp +++ b/src/input/frontend/qaction.cpp @@ -150,3 +150,5 @@ QList<QAbstractActionInput *> QAction::inputs() const } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qaction.cpp" diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp index 1b4834d7f..0aea536fa 100644 --- a/src/input/frontend/qactioninput.cpp +++ b/src/input/frontend/qactioninput.cpp @@ -200,3 +200,5 @@ void QActionInput::setButtons(const QList<int> &buttons) } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qactioninput.cpp" diff --git a/src/input/frontend/qanalogaxisinput.cpp b/src/input/frontend/qanalogaxisinput.cpp index 8503fe4db..846f2f9be 100644 --- a/src/input/frontend/qanalogaxisinput.cpp +++ b/src/input/frontend/qanalogaxisinput.cpp @@ -112,3 +112,5 @@ int QAnalogAxisInput::axis() const } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qanalogaxisinput.cpp" diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp index d19b0f08e..e8287fb86 100644 --- a/src/input/frontend/qaxis.cpp +++ b/src/input/frontend/qaxis.cpp @@ -169,3 +169,5 @@ float QAxis::value() const } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qaxis.cpp" diff --git a/src/input/frontend/qaxisaccumulator.cpp b/src/input/frontend/qaxisaccumulator.cpp index 94942126e..9de06e9bd 100644 --- a/src/input/frontend/qaxisaccumulator.cpp +++ b/src/input/frontend/qaxisaccumulator.cpp @@ -291,3 +291,5 @@ void QAxisAccumulator::setScale(float scale) } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_qaxisaccumulator.cpp" diff --git a/src/input/frontend/qaxissetting.cpp b/src/input/frontend/qaxissetting.cpp index 70f8120b7..d217921ae 100644 --- a/src/input/frontend/qaxissetting.cpp +++ b/src/input/frontend/qaxissetting.cpp @@ -227,3 +227,5 @@ void QAxisSetting::setSmoothEnabled(bool enabled) } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_qaxissetting.cpp" diff --git a/src/input/frontend/qbuttonaxisinput.cpp b/src/input/frontend/qbuttonaxisinput.cpp index 0149766f6..15bfea5e3 100644 --- a/src/input/frontend/qbuttonaxisinput.cpp +++ b/src/input/frontend/qbuttonaxisinput.cpp @@ -179,3 +179,5 @@ void QButtonAxisInput::setDeceleration(float deceleration) } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qbuttonaxisinput.cpp" diff --git a/src/input/frontend/qgenericinputdevice.cpp b/src/input/frontend/qgenericinputdevice.cpp index 84a1699fc..c9796a9cb 100644 --- a/src/input/frontend/qgenericinputdevice.cpp +++ b/src/input/frontend/qgenericinputdevice.cpp @@ -98,3 +98,5 @@ void QGenericInputDevice::setButtonsMap(const QVariantMap &buttonsMap) } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qgenericinputdevice_p.cpp" diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp index 0f95f93a3..9ad3245ab 100644 --- a/src/input/frontend/qinputaspect.cpp +++ b/src/input/frontend/qinputaspect.cpp @@ -325,3 +325,5 @@ void QInputAspect::jobsDone() QT_END_NAMESPACE QT3D_REGISTER_NAMESPACED_ASPECT("input", QT_PREPEND_NAMESPACE(Qt3DInput), QInputAspect) + +#include "moc_qinputaspect.cpp" diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp index 3e470f8bb..811b66e3a 100644 --- a/src/input/frontend/qinputchord.cpp +++ b/src/input/frontend/qinputchord.cpp @@ -193,3 +193,5 @@ QInputChordPrivate::QInputChordPrivate() } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qinputchord.cpp" diff --git a/src/input/frontend/qinputdeviceintegration.cpp b/src/input/frontend/qinputdeviceintegration.cpp index 29691531f..a08a4b9f4 100644 --- a/src/input/frontend/qinputdeviceintegration.cpp +++ b/src/input/frontend/qinputdeviceintegration.cpp @@ -127,3 +127,5 @@ QInputAspect *QInputDeviceIntegration::inputAspect() const */ QT_END_NAMESPACE + +#include "moc_qinputdeviceintegration_p.cpp" diff --git a/src/input/frontend/qinputdeviceplugin.cpp b/src/input/frontend/qinputdeviceplugin.cpp index 6ac8b3a0c..96acab467 100644 --- a/src/input/frontend/qinputdeviceplugin.cpp +++ b/src/input/frontend/qinputdeviceplugin.cpp @@ -62,3 +62,5 @@ QInputDeviceIntegration *QInputDevicePlugin::create(const QString &key, const QS } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qinputdeviceplugin_p.cpp" diff --git a/src/input/frontend/qinputsequence.cpp b/src/input/frontend/qinputsequence.cpp index 7fa701749..df694202d 100644 --- a/src/input/frontend/qinputsequence.cpp +++ b/src/input/frontend/qinputsequence.cpp @@ -240,3 +240,5 @@ QList<QAbstractActionInput *> QInputSequence::sequences() const } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qinputsequence.cpp" diff --git a/src/input/frontend/qinputsettings.cpp b/src/input/frontend/qinputsettings.cpp index 8ed302ac9..e386b9619 100644 --- a/src/input/frontend/qinputsettings.cpp +++ b/src/input/frontend/qinputsettings.cpp @@ -134,3 +134,5 @@ void QInputSettings::eventSourceDestroyed() QT_END_NAMESPACE + +#include "moc_qinputsettings.cpp" diff --git a/src/input/frontend/qkeyboarddevice.cpp b/src/input/frontend/qkeyboarddevice.cpp index 0fe3a1338..0708d9275 100644 --- a/src/input/frontend/qkeyboarddevice.cpp +++ b/src/input/frontend/qkeyboarddevice.cpp @@ -324,3 +324,5 @@ void QKeyboardDevice::setActiveInput(QKeyboardHandler *activeInput) } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_qkeyboarddevice.cpp" diff --git a/src/input/frontend/qkeyboardhandler.cpp b/src/input/frontend/qkeyboardhandler.cpp index 5126c4692..a30a4b1ad 100644 --- a/src/input/frontend/qkeyboardhandler.cpp +++ b/src/input/frontend/qkeyboardhandler.cpp @@ -721,3 +721,5 @@ void QKeyboardHandler::setFocus(bool focus) } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_qkeyboardhandler.cpp" diff --git a/src/input/frontend/qkeyevent.cpp b/src/input/frontend/qkeyevent.cpp index 6df197321..5065882b2 100644 --- a/src/input/frontend/qkeyevent.cpp +++ b/src/input/frontend/qkeyevent.cpp @@ -253,3 +253,5 @@ QKeyEvent::~QKeyEvent() } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_qkeyevent.cpp" diff --git a/src/input/frontend/qlogicaldevice.cpp b/src/input/frontend/qlogicaldevice.cpp index eb1eaf350..35656625b 100644 --- a/src/input/frontend/qlogicaldevice.cpp +++ b/src/input/frontend/qlogicaldevice.cpp @@ -255,3 +255,5 @@ QList<QAxis *> QLogicalDevice::axes() const } // Qt3DInput QT_END_NAMESPACE + +#include "moc_qlogicaldevice.cpp" diff --git a/src/input/frontend/qmousedevice.cpp b/src/input/frontend/qmousedevice.cpp index 49427c5a8..1e1cb7756 100644 --- a/src/input/frontend/qmousedevice.cpp +++ b/src/input/frontend/qmousedevice.cpp @@ -261,3 +261,5 @@ void QMouseDevice::setUpdateAxesContinuously(bool updateAxesContinuously) } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_qmousedevice.cpp" diff --git a/src/input/frontend/qmouseevent.cpp b/src/input/frontend/qmouseevent.cpp index b0c7427b1..3bdce834d 100644 --- a/src/input/frontend/qmouseevent.cpp +++ b/src/input/frontend/qmouseevent.cpp @@ -515,3 +515,5 @@ QWheelEvent::Modifiers QWheelEvent::modifiers() const } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_qmouseevent.cpp" diff --git a/src/input/frontend/qmousehandler.cpp b/src/input/frontend/qmousehandler.cpp index 6c354d55d..313ef67ff 100644 --- a/src/input/frontend/qmousehandler.cpp +++ b/src/input/frontend/qmousehandler.cpp @@ -339,3 +339,5 @@ void QMouseHandler::setContainsMouse(bool contains) } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_qmousehandler.cpp" diff --git a/src/logic/executor.cpp b/src/logic/executor.cpp index b12c54ebe..66b9fd9f9 100644 --- a/src/logic/executor.cpp +++ b/src/logic/executor.cpp @@ -78,3 +78,5 @@ void Executor::processLogicFrameUpdates(const QList<QNodeId> &nodeIds, float dt) } // namespace Qt3DLogic QT_END_NAMESPACE + +#include "moc_executor_p.cpp" diff --git a/src/logic/qframeaction.cpp b/src/logic/qframeaction.cpp index a3ae748be..b23cd9797 100644 --- a/src/logic/qframeaction.cpp +++ b/src/logic/qframeaction.cpp @@ -137,3 +137,5 @@ void QFrameAction::onTriggered(float dt) } // namespace Qt3DLogic QT_END_NAMESPACE + +#include "moc_qframeaction.cpp" diff --git a/src/logic/qlogicaspect.cpp b/src/logic/qlogicaspect.cpp index cd9b3e47a..dc665201c 100644 --- a/src/logic/qlogicaspect.cpp +++ b/src/logic/qlogicaspect.cpp @@ -70,7 +70,6 @@ namespace Qt3DLogic { QLogicAspectPrivate::QLogicAspectPrivate() : QAbstractAspectPrivate() , m_time(0) - , m_initialized(false) , m_manager(new Logic::Manager) , m_executor(new Logic::Executor) , m_callbackJob(new Logic::CallbackJob) @@ -145,3 +144,4 @@ QT_END_NAMESPACE QT3D_REGISTER_NAMESPACED_ASPECT("logic", QT_PREPEND_NAMESPACE(Qt3DLogic), QLogicAspect) +#include "moc_qlogicaspect.cpp" diff --git a/src/logic/qlogicaspect_p.h b/src/logic/qlogicaspect_p.h index 2a6a7259a..d3388c72c 100644 --- a/src/logic/qlogicaspect_p.h +++ b/src/logic/qlogicaspect_p.h @@ -75,7 +75,6 @@ class QLogicAspectPrivate : public Qt3DCore::QAbstractAspectPrivate void registerBackendTypes(); qint64 m_time; - bool m_initialized; QScopedPointer<Logic::Manager> m_manager; QScopedPointer<Logic::Executor> m_executor; QSharedPointer<Logic::CallbackJob> m_callbackJob; diff --git a/src/plugins/geometryloaders/default/basegeometryloader.cpp b/src/plugins/geometryloaders/default/basegeometryloader.cpp index 33e68db82..1d25c8de6 100644 --- a/src/plugins/geometryloaders/default/basegeometryloader.cpp +++ b/src/plugins/geometryloaders/default/basegeometryloader.cpp @@ -280,3 +280,5 @@ void BaseGeometryLoader::center(std::vector<QVector3D> &points) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_basegeometryloader_p.cpp" diff --git a/src/plugins/geometryloaders/default/objgeometryloader.cpp b/src/plugins/geometryloaders/default/objgeometryloader.cpp index 14a2b588e..8515b2ffa 100644 --- a/src/plugins/geometryloaders/default/objgeometryloader.cpp +++ b/src/plugins/geometryloaders/default/objgeometryloader.cpp @@ -39,6 +39,7 @@ #include "objgeometryloader.h" +#include <QtCore/QHash> #include <QtCore/QLoggingCategory> #include <QtCore/QRegularExpression> #include <QtCore/QIODevice> diff --git a/src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp b/src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp index 9f13ca2c6..0962e47ce 100644 --- a/src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp +++ b/src/plugins/geometryloaders/gltf/gltfgeometryloader.cpp @@ -626,3 +626,5 @@ uint GLTFGeometryLoader::accessorDataSizeFromJson(const QString &type) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_gltfgeometryloader.cpp" diff --git a/src/plugins/geometryloaders/gltf/gltfgeometryloader.h b/src/plugins/geometryloaders/gltf/gltfgeometryloader.h index 36ac0f174..f3a0961ab 100644 --- a/src/plugins/geometryloaders/gltf/gltfgeometryloader.h +++ b/src/plugins/geometryloaders/gltf/gltfgeometryloader.h @@ -51,6 +51,7 @@ // We mean it. // +#include <QtCore/QHash> #include <QtCore/QJsonDocument> #include <Qt3DRender/private/qgeometryloaderinterface_p.h> diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3.cpp index 8a516c110..c0498a123 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3.cpp @@ -263,6 +263,17 @@ void GraphicsHelperES3::drawArraysInstanced(GLenum primitiveType, GLint first, G instances); } +void GraphicsHelperES3::drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance) +{ + if (baseInstance != 0) + qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL ES 3"; + + m_extraFuncs->glDrawArraysInstanced(primitiveType, + first, + count, + instances); +} + void GraphicsHelperES3::readBuffer(GLenum mode) { m_extraFuncs->glReadBuffer(mode); diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3_2.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3_2.cpp index 3eac571a0..9a74e736b 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3_2.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3_2.cpp @@ -140,7 +140,7 @@ void GraphicsHelperES3_2::setVerticesPerPatch(GLint verticesPerPatch) void GraphicsHelperES3_2::drawElementsInstancedBaseVertexBaseInstance(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex, GLint baseInstance) { if (baseInstance != 0) - qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL ES 2"; + qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL ES 3.2"; m_extraFuncs->glDrawElementsInstancedBaseVertex(primitiveType, primitiveCount, diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3_p.h b/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3_p.h index 66c674421..f444d7cc5 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3_p.h +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicshelperes3_p.h @@ -76,6 +76,7 @@ public: void buildUniformBuffer(const QVariant &v, const ShaderUniform &description, QByteArray &buffer) override; void drawBuffers(GLsizei n, const int *bufs) override; void drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances) override; + void drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance) override; void drawElementsInstancedBaseVertexBaseInstance(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0) override; void readBuffer(GLenum mode) override; void drawBuffer(GLenum mode) override; diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl3_2.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl3_2.cpp index 0eb0a9818..2e3a728a0 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl3_2.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl3_2.cpp @@ -99,7 +99,7 @@ void GraphicsHelperGL3_2::drawElementsInstancedBaseVertexBaseInstance(GLenum pri GLint baseInstance) { if (baseInstance != 0) - qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL ES 2"; + qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL 3.2"; // glDrawElements OpenGL 3.1 or greater m_funcs->glDrawElementsInstancedBaseVertex(primitiveType, diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp index 370533197..2a5974b78 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl3_3.cpp @@ -98,7 +98,7 @@ void GraphicsHelperGL3_3::drawElementsInstancedBaseVertexBaseInstance(GLenum pri GLint baseInstance) { if (baseInstance != 0) - qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL 3"; + qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL 3.3"; // glDrawElements OpenGL 3.1 or greater m_funcs->glDrawElementsInstancedBaseVertex(primitiveType, diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp index 435ac7a03..a739ea8f2 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicshelpergl4.cpp @@ -187,16 +187,13 @@ void GraphicsHelperGL4::drawElementsInstancedBaseVertexBaseInstance(GLenum primi GLint baseVertex, GLint baseInstance) { - if (baseInstance != 0) - qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL ES 2"; - - // glDrawElements OpenGL 3.1 or greater - m_funcs->glDrawElementsInstancedBaseVertex(primitiveType, + m_funcs->glDrawElementsInstancedBaseVertexBaseInstance(primitiveType, primitiveCount, indexType, indices, instances, - baseVertex); + baseVertex, + baseInstance); } void GraphicsHelperGL4::drawArraysInstanced(GLenum primitiveType, diff --git a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp index 4861390fe..6421733ab 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp @@ -487,6 +487,10 @@ bool SubmissionContext::beginDrawing(QSurface *surface) } m_boundArrayBuffer = nullptr; + + // Record the default FBO value as there's no guarantee it remains constant over time + m_defaultFBO = m_gl->defaultFramebufferObject(); + return true; } diff --git a/src/plugins/renderers/opengl/renderer/renderer.cpp b/src/plugins/renderers/opengl/renderer/renderer.cpp index e09423005..355556225 100644 --- a/src/plugins/renderers/opengl/renderer/renderer.cpp +++ b/src/plugins/renderers/opengl/renderer/renderer.cpp @@ -1640,6 +1640,7 @@ Renderer::ViewSubmissionResultData Renderer::submitRenderViews(const std::vector static_cast<Render::RenderCapture*>(m_nodesManager->frameGraphManager()->lookupNode(renderView->renderCaptureNodeId())); renderCapture->addRenderCapture(request.captureId, image); const QNodeId renderCaptureId = renderView->renderCaptureNodeId(); + QMutexLocker lock(&m_pendingRenderCaptureSendRequestsMutex); if (!Qt3DCore::contains(m_pendingRenderCaptureSendRequests, renderCaptureId)) m_pendingRenderCaptureSendRequests.push_back(renderView->renderCaptureNodeId()); } @@ -1750,7 +1751,9 @@ void Renderer::jobsDone(Qt3DCore::QAspectManager *manager) // called in main thread once all jobs are done running // sync captured renders to frontend + QMutexLocker lock(&m_pendingRenderCaptureSendRequestsMutex); const std::vector<Qt3DCore::QNodeId> pendingCaptureIds = Qt3DCore::moveAndClear(m_pendingRenderCaptureSendRequests); + lock.unlock(); for (const Qt3DCore::QNodeId &id : pendingCaptureIds) { auto *backend = static_cast<Qt3DRender::Render::RenderCapture *> (m_nodesManager->frameGraphManager()->lookupNode(id)); diff --git a/src/plugins/renderers/opengl/renderer/renderer_p.h b/src/plugins/renderers/opengl/renderer/renderer_p.h index 78dfbe2a5..151d2a5cf 100644 --- a/src/plugins/renderers/opengl/renderer/renderer_p.h +++ b/src/plugins/renderers/opengl/renderer/renderer_p.h @@ -359,6 +359,7 @@ private: RenderableEntityFilterPtr m_renderableEntityFilterJob; ComputableEntityFilterPtr m_computableEntityFilterJob; + QMutex m_pendingRenderCaptureSendRequestsMutex; std::vector<Qt3DCore::QNodeId> m_pendingRenderCaptureSendRequests; void performDraw(const RenderCommand *command); diff --git a/src/plugins/renderers/opengl/renderer/renderview.cpp b/src/plugins/renderers/opengl/renderer/renderview.cpp index 055e19b7a..a751a7695 100644 --- a/src/plugins/renderers/opengl/renderer/renderview.cpp +++ b/src/plugins/renderers/opengl/renderer/renderview.cpp @@ -677,6 +677,10 @@ struct SubRangeSorter<QSortPolicy::Texture> return identicalTextureCount < smallestVector.size(); }); +#else + Q_UNUSED(view); + Q_UNUSED(begin); + Q_UNUSED(end); #endif } }; @@ -1210,11 +1214,11 @@ void RenderView::setShaderStorageValue(ShaderParameterPack &uniformPack, } void RenderView::setDefaultUniformBlockShaderDataValue(ShaderParameterPack &uniformPack, - const GLShader *shader, + const std::vector<int> &uniformsNamesIds, ShaderData *shaderData, const QString &structName) const { - UniformBlockValueBuilder builder(shader->uniformsNamesIds(), + UniformBlockValueBuilder builder(uniformsNamesIds, m_manager->shaderDataManager(), m_manager->textureManager(), m_viewMatrix); @@ -1258,7 +1262,7 @@ void RenderView::applyParameter(const Parameter *param, if (uniformValue.valueType() == UniformValue::NodeId && (shaderData = m_manager->shaderDataManager()->lookupResource(*uniformValue.constData<Qt3DCore::QNodeId>())) != nullptr) { // Try to check if we have a struct or array matching a QShaderData parameter - setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader, shaderData, StringToInt::lookupString(nameId)); + setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader->uniformsNamesIds(), shaderData, StringToInt::lookupString(nameId)); } break; } @@ -1414,8 +1418,8 @@ void RenderView::updateLightUniforms(RenderCommand *command, const Entity *entit if (worldTransform) shaderData->updateWorldTransform(*worldTransform); - setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader, shaderData, GLLights::LIGHT_STRUCT_NAMES[lightIdx]); - setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader, shaderData, GLLights::LIGHT_STRUCT_UNROLL_NAMES[lightIdx]); + setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader->lightUniformsNamesIds(), shaderData, GLLights::LIGHT_STRUCT_NAMES[lightIdx]); + setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader->lightUniformsNamesIds(), shaderData, GLLights::LIGHT_STRUCT_UNROLL_NAMES[lightIdx]); ++lightIdx; } } @@ -1448,7 +1452,8 @@ void RenderView::updateLightUniforms(RenderCommand *command, const Entity *entit if (m_environmentLight && m_environmentLight->isEnabled()) { ShaderData *shaderData = m_manager->shaderDataManager()->lookupResource(m_environmentLight->shaderData()); if (shaderData) { - setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader, shaderData, QStringLiteral("envLight")); + // EnvLight isn't part of the light uniform name ids + setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader->uniformsNamesIds(), shaderData, QStringLiteral("envLight")); auto irr = shaderData->properties()["irradiance"].value.value<Qt3DCore::QNodeId>(); auto spec = diff --git a/src/plugins/renderers/opengl/renderer/renderview_p.h b/src/plugins/renderers/opengl/renderer/renderview_p.h index d67a04b8c..b2fb7c69f 100644 --- a/src/plugins/renderers/opengl/renderer/renderview_p.h +++ b/src/plugins/renderers/opengl/renderer/renderview_p.h @@ -392,7 +392,7 @@ private: const ShaderStorageBlock &block, const UniformValue &value) const; void setDefaultUniformBlockShaderDataValue(ShaderParameterPack &uniformPack, - const GLShader *shader, + const std::vector<int> &uniformsNamesIds, ShaderData *shaderData, const QString &structName) const; void applyParameter(const Parameter *param, diff --git a/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp b/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp index d21c205c3..7715e26bf 100644 --- a/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp +++ b/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp @@ -40,8 +40,7 @@ #include "renderviewbuilder_p.h" #include <Qt3DRender/private/qrenderaspect_p.h> #include <Qt3DRender/private/rendersyncjobs_p.h> - -#include <QThread> +#include <Qt3DCore/private/qaspectjobmanager_p.h> QT_BEGIN_NAMESPACE @@ -90,7 +89,7 @@ RenderViewBuilder::RenderViewBuilder(Render::FrameGraphNode *leafNode, int rende // In some cases having less jobs is better (especially on fast cpus where // splitting just adds more overhead). Ideally, we should try to set the value // depending on the platform/CPU/nbr of cores - m_optimalParallelJobCount = QThread::idealThreadCount(); + m_optimalParallelJobCount = Qt3DCore::QAspectJobManager::idealThreadCount(); } RenderViewInitializerJobPtr RenderViewBuilder::renderViewJob() const diff --git a/src/plugins/renderers/opengl/renderer/shaderparameterpack.cpp b/src/plugins/renderers/opengl/renderer/shaderparameterpack.cpp index 6eaaaa84a..17b61c6af 100644 --- a/src/plugins/renderers/opengl/renderer/shaderparameterpack.cpp +++ b/src/plugins/renderers/opengl/renderer/shaderparameterpack.cpp @@ -98,12 +98,28 @@ void ShaderParameterPack::setImage(const int glslNameId, int uniformArrayIndex, // Contains Uniform Block Index and QNodeId of the ShaderData (UBO) void ShaderParameterPack::setUniformBuffer(BlockToUBO blockToUBO) { - m_uniformBuffers.push_back(std::move(blockToUBO)); + const auto uEnd = m_uniformBuffers.end(); + auto it = std::find_if(m_uniformBuffers.begin(), uEnd, [&] (const BlockToUBO &block) { + return blockToUBO.m_blockIndex == block.m_blockIndex; + }); + + if (it == uEnd) + m_uniformBuffers.push_back(std::move(blockToUBO)); + else + *it = std::move(blockToUBO); } void ShaderParameterPack::setShaderStorageBuffer(BlockToSSBO blockToSSBO) { - m_shaderStorageBuffers.push_back(std::move(blockToSSBO)); + const auto uEnd = m_shaderStorageBuffers.end(); + auto it = std::find_if(m_shaderStorageBuffers.begin(), uEnd, [&] (const BlockToSSBO &block) { + return blockToSSBO.m_blockIndex == block.m_blockIndex; + }); + + if (it == uEnd) + m_shaderStorageBuffers.push_back(std::move(blockToSSBO)); + else + *it = std::move(blockToSSBO); } void ShaderParameterPack::setSubmissionUniformIndex(const int uniformIdx) diff --git a/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp b/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp index ce53de1ab..c219c91e5 100644 --- a/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp +++ b/src/plugins/renderers/rhi/renderer/pipelineuboset.cpp @@ -620,29 +620,34 @@ void PipelineUBOSet::uploadUBOsForCommand(const RenderCommand &command, for (const RHIShader::UBO_Member &member : qAsConst(uboBlock.members)) { const QShaderDescription::BlockVariable &blockVariable = member.blockVariable; + + // Array if (!blockVariable.arrayDims.empty()) { - if (!blockVariable.structMembers.empty()) { - const int arr0 = blockVariable.arrayDims[0]; - for (int i = 0; i < arr0; i++) { - for (const RHIShader::UBO_Member &structMember : member.structMembers) { + if (!blockVariable.structMembers.empty()) { // Array of structs + // we treat structMembers as arrayMembers when we are dealing with an array of structs´ + const size_t arr0 = size_t(blockVariable.arrayDims[0]); + const size_t m = std::max(arr0, member.structMembers.size()); + for (size_t i = 0; i < m; ++i) { + const RHIShader::UBO_Member &arrayMember = member.structMembers[i]; + for (const RHIShader::UBO_Member &arrayStructMember : arrayMember.structMembers) { uploadUniform(uniforms, ubo, - structMember, + arrayStructMember, distanceToCommand, i * blockVariable.size / arr0); } } - } else { + } else { // Array of scalars uploadUniform(uniforms, ubo, member, distanceToCommand); } } else { - if (!blockVariable.structMembers.empty()) { + if (!blockVariable.structMembers.empty()) { // Struct for (const RHIShader::UBO_Member &structMember : member.structMembers) { uploadUniform(uniforms, ubo, structMember, distanceToCommand); } - } else { + } else { // Scalar uploadUniform(uniforms, ubo, member, distanceToCommand); } diff --git a/src/plugins/renderers/rhi/renderer/renderer.cpp b/src/plugins/renderers/rhi/renderer/renderer.cpp index 47839b5b2..b5cc62ff1 100644 --- a/src/plugins/renderers/rhi/renderer/renderer.cpp +++ b/src/plugins/renderers/rhi/renderer/renderer.cpp @@ -2199,8 +2199,10 @@ void Renderer::jobsDone(Qt3DCore::QAspectManager *manager) // called in main thread once all jobs are done running // sync captured renders to frontend + QMutexLocker lock(&m_pendingRenderCaptureSendRequestsMutex); const std::vector<Qt3DCore::QNodeId> pendingCaptureIds = Qt3DCore::moveAndClear(m_pendingRenderCaptureSendRequests); + lock.unlock(); for (const Qt3DCore::QNodeId &id : qAsConst(pendingCaptureIds)) { auto *backend = static_cast<Qt3DRender::Render::RenderCapture *>( m_nodesManager->frameGraphManager()->lookupNode(id)); @@ -2774,20 +2776,21 @@ bool Renderer::executeCommandsSubmission(const RHIPassInfo &passInfo) QRect rect(QPoint(0, 0), size); if (!request.rect.isEmpty()) rect = rect.intersected(request.rect); - QImage image; if (!rect.isEmpty()) { // Bind fbo as read framebuffer QRhiReadbackResult *readBackResult = new QRhiReadbackResult; readBackResult->completed = [this, readBackResult, renderCaptureId, request] () { const QImage::Format fmt = QImage::Format_RGBA8888_Premultiplied; // fits QRhiTexture::RGBA8 const uchar *p = reinterpret_cast<const uchar *>(readBackResult->data.constData()); - const QImage image(p, readBackResult->pixelSize.width(), readBackResult->pixelSize.height(), fmt); + const QImage image(p, readBackResult->pixelSize.width(), readBackResult->pixelSize.height(), fmt, [] (void *ptr) { + delete static_cast<QRhiReadbackResult *>(ptr); + }, readBackResult); Render::RenderCapture *renderCapture = static_cast<Render::RenderCapture*>(m_nodesManager->frameGraphManager()->lookupNode(renderCaptureId)); renderCapture->addRenderCapture(request.captureId, image); + QMutexLocker lock(&m_pendingRenderCaptureSendRequestsMutex); if (!Qt3DCore::contains(m_pendingRenderCaptureSendRequests, renderCaptureId)) m_pendingRenderCaptureSendRequests.push_back(renderCaptureId); - delete readBackResult; }; QRhiReadbackDescription readbackDesc; diff --git a/src/plugins/renderers/rhi/renderer/renderer.pri b/src/plugins/renderers/rhi/renderer/renderer.pri index 761a6ce9b..5ff7d9d44 100644 --- a/src/plugins/renderers/rhi/renderer/renderer.pri +++ b/src/plugins/renderers/rhi/renderer/renderer.pri @@ -6,6 +6,7 @@ SOURCES += \ $$PWD/renderview.cpp \ $$PWD/renderviewbuilder.cpp \ $$PWD/rhigraphicspipeline.cpp \ + $$PWD/rhirendertarget.cpp \ $$PWD/rhishader.cpp \ $$PWD/shaderparameterpack.cpp \ $$PWD/logging.cpp \ @@ -18,6 +19,7 @@ HEADERS += \ $$PWD/renderview_p.h \ $$PWD/renderviewbuilder_p.h \ $$PWD/rhigraphicspipeline_p.h \ + $$PWD/rhirendertarget_p.h \ $$PWD/rhishader_p.h \ $$PWD/shaderparameterpack_p.h \ $$PWD/shadervariables_p.h \ diff --git a/src/plugins/renderers/rhi/renderer/renderer_p.h b/src/plugins/renderers/rhi/renderer/renderer_p.h index cb2137d95..281cbe533 100644 --- a/src/plugins/renderers/rhi/renderer/renderer_p.h +++ b/src/plugins/renderers/rhi/renderer/renderer_p.h @@ -360,6 +360,7 @@ private: RenderableEntityFilterPtr m_renderableEntityFilterJob; ComputableEntityFilterPtr m_computableEntityFilterJob; + QMutex m_pendingRenderCaptureSendRequestsMutex; std::vector<Qt3DCore::QNodeId> m_pendingRenderCaptureSendRequests; SynchronizerJobPtr m_bufferGathererJob; diff --git a/src/plugins/renderers/rhi/renderer/renderview.cpp b/src/plugins/renderers/rhi/renderer/renderview.cpp index cf8d27871..1cfb2a5a8 100644 --- a/src/plugins/renderers/rhi/renderer/renderview.cpp +++ b/src/plugins/renderers/rhi/renderer/renderview.cpp @@ -605,6 +605,10 @@ struct SubRangeSorter<QSortPolicy::Texture> return identicalTextureCount < smallestVector.size(); }); +#else + Q_UNUSED(view); + Q_UNUSED(begin); + Q_UNUSED(end); #endif } }; diff --git a/src/plugins/renderers/rhi/renderer/renderviewbuilder.cpp b/src/plugins/renderers/rhi/renderer/renderviewbuilder.cpp index 832f550eb..c69fd762b 100644 --- a/src/plugins/renderers/rhi/renderer/renderviewbuilder.cpp +++ b/src/plugins/renderers/rhi/renderer/renderviewbuilder.cpp @@ -39,8 +39,7 @@ #include "renderviewbuilder_p.h" #include <Qt3DRender/private/qrenderaspect_p.h> - -#include <QThread> +#include <Qt3DCore/private/qaspectjobmanager_p.h> QT_BEGIN_NAMESPACE @@ -63,7 +62,7 @@ RenderViewBuilder::RenderViewBuilder(Render::FrameGraphNode *leafNode, int rende // In some cases having less jobs is better (especially on fast cpus where // splitting just adds more overhead). Ideally, we should try to set the value // depending on the platform/CPU/nbr of cores - m_optimalParallelJobCount = QThread::idealThreadCount(); + m_optimalParallelJobCount = Qt3DCore::QAspectJobManager::idealThreadCount(); } RenderViewInitializerJobPtr RenderViewBuilder::renderViewJob() const diff --git a/src/plugins/renderers/rhi/renderer/rhishader.cpp b/src/plugins/renderers/rhi/renderer/rhishader.cpp index 5684e27ce..be15f0f91 100644 --- a/src/plugins/renderers/rhi/renderer/rhishader.cpp +++ b/src/plugins/renderers/rhi/renderer/rhishader.cpp @@ -332,7 +332,14 @@ void RHIShader::recordAllUniforms(UBO_Member &uboMember, // We iterate through all the [l][n][m] by building [0][0][0] and incrementing forEachArrayAccessor(member.arrayDims, [&](const QString &str) { // "foo.bar[1][2]" - m_unqualifiedUniformNames << (fullMemberName + str); + const QString unqualifiedMemberName = (fullMemberName + str); + m_unqualifiedUniformNames << unqualifiedMemberName; + + // Record as an individual uniform + m_uniformsNames.push_back(unqualifiedMemberName); + const int nameId = StringToInt::lookupId(unqualifiedMemberName); + m_uniformsNamesIds.push_back(nameId); + // Question : does it make sense to also record foo[0], foo[0][0], etc... // if there are e.g. 3 dimensions ? }); @@ -344,20 +351,29 @@ void RHIShader::recordAllUniforms(UBO_Member &uboMember, m_structNamesIds.push_back(StringToInt::lookupId(m_structNames.back())); }); - // Record the struct members - for (const QShaderDescription::BlockVariable& bv : member.structMembers) { - forEachArrayAccessor(member.arrayDims, [&] (const QString& str) { + // Record the array times the struct members => entry[i].struct_member + forEachArrayAccessor(member.arrayDims, [&] (const QString& str) { + UBO_Member arrayMember {StringToInt::lookupId(fullMemberName + str), {}, {}}; + // Record all struct member into the array member[i] + for (const QShaderDescription::BlockVariable& bv : member.structMembers) { //recordAllUniforms("baz", "foo.bar[1][2].") const QString structMemberNamePrefix = fullMemberName + str + QLatin1Char('.'); UBO_Member innerMember {StringToInt::lookupId(structMemberNamePrefix), bv, {}}; recordAllUniforms(innerMember, structMemberNamePrefix); - uboMember.structMembers.push_back(innerMember); - }); - } + arrayMember.structMembers.push_back(innerMember); + } + // When dealing with an array of structs, we treat structMembers as arrayMembers + uboMember.structMembers.push_back(arrayMember); + }); } else { // Final member (not array or struct) // Replace nameId with final nameId name uboMember.nameId = StringToInt::lookupId(fullMemberName); + + // Record as an individual uniform + m_uniformsNames.push_back(fullMemberName); + const int nameId = StringToInt::lookupId(fullMemberName); + m_uniformsNamesIds.push_back(nameId); } } diff --git a/src/plugins/sceneparsers/assimp/assimphelpers.cpp b/src/plugins/sceneparsers/assimp/assimphelpers.cpp index 77209a7a9..2f81e460c 100644 --- a/src/plugins/sceneparsers/assimp/assimphelpers.cpp +++ b/src/plugins/sceneparsers/assimp/assimphelpers.cpp @@ -45,6 +45,8 @@ #include <QtCore/QDir> #include <QtCore/QDebug> +#include <memory> + QT_BEGIN_NAMESPACE namespace Qt3DRender { @@ -208,9 +210,9 @@ Assimp::IOStream *AssimpIOSystem::Open(const char *pFile, const char *pMode) const QLatin1String cleanedMode = QLatin1String{pMode}.trimmed(); if (const QIODevice::OpenMode openMode = openModeFromText(cleanedMode.data())) { - QScopedPointer<QFile> file(new QFile(fileName)); + auto file = std::make_unique<QFile>(fileName); if (file->open(openMode)) - return new AssimpIOStream(file.take()); + return new AssimpIOStream(file.release()); } return nullptr; } diff --git a/src/plugins/sceneparsers/assimp/assimpimporter.cpp b/src/plugins/sceneparsers/assimp/assimpimporter.cpp index 1a775d888..8e21a7dbd 100644 --- a/src/plugins/sceneparsers/assimp/assimpimporter.cpp +++ b/src/plugins/sceneparsers/assimp/assimpimporter.cpp @@ -1402,4 +1402,6 @@ AssimpImporter::SceneImporter::~SceneImporter() QT_END_NAMESPACE +#include "moc_assimpimporter.cpp" + #include "assimpimporter.moc" diff --git a/src/plugins/sceneparsers/assimp/assimpimporter.h b/src/plugins/sceneparsers/assimp/assimpimporter.h index c1c8537cc..0488ec652 100644 --- a/src/plugins/sceneparsers/assimp/assimpimporter.h +++ b/src/plugins/sceneparsers/assimp/assimpimporter.h @@ -58,6 +58,7 @@ #include <assimp/DefaultLogger.hpp> #include <QtCore/QDir> +#include <QtCore/QHash> #include <QtCore/QList> #include <QtCore/QLoggingCategory> diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.cpp b/src/plugins/sceneparsers/gltf/gltfimporter.cpp index 67510486a..eff2a5ecf 100644 --- a/src/plugins/sceneparsers/gltf/gltfimporter.cpp +++ b/src/plugins/sceneparsers/gltf/gltfimporter.cpp @@ -2630,4 +2630,5 @@ bool GLTFRawTextureImage::GLTFRawTextureImageFunctor::operator ==(const QTexture QT_END_NAMESPACE +#include "moc_gltfimporter.cpp" #include "gltfimporter.moc" diff --git a/src/plugins/sceneparsers/gltfexport/gltfexporter.h b/src/plugins/sceneparsers/gltfexport/gltfexporter.h index 0d30a2064..254bc2e2a 100644 --- a/src/plugins/sceneparsers/gltfexport/gltfexporter.h +++ b/src/plugins/sceneparsers/gltfexport/gltfexporter.h @@ -54,6 +54,7 @@ #include <QtCore/qjsondocument.h> #include <QtCore/qjsonobject.h> #include <QtCore/qhash.h> +#include <QtCore/qset.h> #include <QtGui/qvector3d.h> #include <Qt3DRender/qabstractlight.h> diff --git a/src/quick3d/imports/animation/CMakeLists.txt b/src/quick3d/imports/animation/CMakeLists.txt index 1301b7abd..06308275e 100644 --- a/src/quick3d/imports/animation/CMakeLists.txt +++ b/src/quick3d/imports/animation/CMakeLists.txt @@ -8,6 +8,9 @@ qt_internal_add_qml_module(quick3danimationplugin URI "Qt3D.Animation" VERSION "2.${PROJECT_VERSION_MINOR}" CLASS_NAME Qt3DQuick3DAnimationPlugin + DEPENDENCIES + QtQml/auto + Qt3D.Render/auto PLUGIN_TARGET quick3danimationplugin NO_PLUGIN_OPTIONAL NO_GENERATE_PLUGIN_SOURCE diff --git a/src/quick3d/imports/animation/qt3dquick3danimationplugin.cpp b/src/quick3d/imports/animation/qt3dquick3danimationplugin.cpp index 0ece3c88a..a6ebf39ea 100644 --- a/src/quick3d/imports/animation/qt3dquick3danimationplugin.cpp +++ b/src/quick3d/imports/animation/qt3dquick3danimationplugin.cpp @@ -106,3 +106,5 @@ void Qt3DQuick3DAnimationPlugin::registerTypes(const char *uri) } QT_END_NAMESPACE + +#include "moc_qt3dquick3danimationplugin.cpp" diff --git a/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp b/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp index 14987e764..95b1c4153 100644 --- a/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp +++ b/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp @@ -62,8 +62,18 @@ #include <QtQml/qqml.h> +extern void qml_register_types_Qt3D_Core(); +Q_GHS_KEEP_REFERENCE(qml_register_types_Qt3D_Core); + QT_BEGIN_NAMESPACE +Qt3DQuick3DCorePlugin::Qt3DQuick3DCorePlugin(QObject *parent) + : QQmlExtensionPlugin(parent) +{ + volatile auto registration = &qml_register_types_Qt3D_Core; + Q_UNUSED(registration); +} + void Qt3DQuick3DCorePlugin::registerTypes(const char *uri) { Q_UNUSED(uri); @@ -79,3 +89,5 @@ Qt3DQuick3DCorePlugin::~Qt3DQuick3DCorePlugin() } QT_END_NAMESPACE + +#include "moc_qt3dquick3dcoreplugin.cpp" diff --git a/src/quick3d/imports/core/qt3dquick3dcoreplugin.h b/src/quick3d/imports/core/qt3dquick3dcoreplugin.h index afc092bbb..ebedb22a4 100644 --- a/src/quick3d/imports/core/qt3dquick3dcoreplugin.h +++ b/src/quick3d/imports/core/qt3dquick3dcoreplugin.h @@ -49,7 +49,7 @@ class Qt3DQuick3DCorePlugin : public QQmlExtensionPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - Qt3DQuick3DCorePlugin(QObject *parent = nullptr) : QQmlExtensionPlugin(parent) { } + Qt3DQuick3DCorePlugin(QObject *parent = nullptr); ~Qt3DQuick3DCorePlugin(); void registerTypes(const char *uri) override; }; diff --git a/src/quick3d/imports/extras/CMakeLists.txt b/src/quick3d/imports/extras/CMakeLists.txt index 9263f632b..98be63038 100644 --- a/src/quick3d/imports/extras/CMakeLists.txt +++ b/src/quick3d/imports/extras/CMakeLists.txt @@ -14,7 +14,8 @@ qt_internal_add_qml_module(quick3dextrasplugin NO_GENERATE_QMLTYPES INSTALL_SOURCE_QMLTYPES "plugins.qmltypes" DEPENDENCIES - Qt3D.Logic/2.0 + QtQuick/auto + Qt3D.Logic/auto SOURCES qt3dquick3dextrasplugin.cpp qt3dquick3dextrasplugin.h LIBRARIES diff --git a/src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp b/src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp index a7bdd62db..5492b4788 100644 --- a/src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp +++ b/src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp @@ -159,3 +159,5 @@ void Qt3DQuick3DExtrasPlugin::registerTypes(const char *uri) QT_END_NAMESPACE + +#include "moc_qt3dquick3dextrasplugin.cpp" diff --git a/src/quick3d/imports/input/CMakeLists.txt b/src/quick3d/imports/input/CMakeLists.txt index 3742a6ed7..6df18be17 100644 --- a/src/quick3d/imports/input/CMakeLists.txt +++ b/src/quick3d/imports/input/CMakeLists.txt @@ -8,6 +8,8 @@ qt_internal_add_qml_module(quick3dinputplugin URI "Qt3D.Input" VERSION "2.${PROJECT_VERSION_MINOR}" CLASS_NAME Qt3DQuick3DInputPlugin + DEPENDENCIES + QtQml/auto PLUGIN_TARGET quick3dinputplugin NO_PLUGIN_OPTIONAL NO_GENERATE_PLUGIN_SOURCE diff --git a/src/quick3d/imports/input/qt3dquick3dinputplugin.cpp b/src/quick3d/imports/input/qt3dquick3dinputplugin.cpp index 3ea731885..d8c6c4ec1 100644 --- a/src/quick3d/imports/input/qt3dquick3dinputplugin.cpp +++ b/src/quick3d/imports/input/qt3dquick3dinputplugin.cpp @@ -112,3 +112,5 @@ void Qt3DQuick3DInputPlugin::registerTypes(const char *uri) } QT_END_NAMESPACE + +#include "moc_qt3dquick3dinputplugin.cpp" diff --git a/src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp b/src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp index 969b28a0d..ad6e1881e 100644 --- a/src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp +++ b/src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp @@ -54,3 +54,5 @@ void Qt3DQuick3DLogicPlugin::registerTypes(const char *uri) } QT_END_NAMESPACE + +#include "moc_qt3dquick3dlogicplugin.cpp" diff --git a/src/quick3d/imports/render/CMakeLists.txt b/src/quick3d/imports/render/CMakeLists.txt index e37a04912..7cd7df848 100644 --- a/src/quick3d/imports/render/CMakeLists.txt +++ b/src/quick3d/imports/render/CMakeLists.txt @@ -8,6 +8,8 @@ qt_internal_add_qml_module(quick3drenderplugin URI "Qt3D.Render" VERSION "2.${PROJECT_VERSION_MINOR}" CLASS_NAME Qt3DQuick3DRenderPlugin + DEPENDENCIES + QtQml/auto PLUGIN_TARGET quick3drenderplugin NO_PLUGIN_OPTIONAL NO_GENERATE_PLUGIN_SOURCE diff --git a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp index 59fcfa6d6..d329a0762 100644 --- a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp +++ b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp @@ -321,4 +321,6 @@ void Qt3DQuick3DRenderPlugin::registerTypes(const char *uri) QT_END_NAMESPACE +#include "moc_qt3dquick3drenderplugin.cpp" + diff --git a/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp b/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp index 0ddb9eb0c..4693f21b8 100644 --- a/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp +++ b/src/quick3d/imports/scene2d/qtquickscene2dplugin.cpp @@ -63,3 +63,5 @@ void QtQuickScene2DPlugin::registerTypes(const char *uri) } QT_END_NAMESPACE + +#include "moc_qtquickscene2dplugin.cpp" diff --git a/src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp b/src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp index fa79af1cd..338a7ef7f 100644 --- a/src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp +++ b/src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp @@ -56,3 +56,5 @@ void QtQuickScene3DPlugin::registerTypes(const char *uri) } QT_END_NAMESPACE + +#include "moc_qtquickscene3dplugin.cpp" diff --git a/src/quick3d/imports/scene3d/scene3ditem.cpp b/src/quick3d/imports/scene3d/scene3ditem.cpp index 6f84fff7e..f6bcb63a7 100644 --- a/src/quick3d/imports/scene3d/scene3ditem.cpp +++ b/src/quick3d/imports/scene3d/scene3ditem.cpp @@ -908,4 +908,5 @@ void Scene3DItem::mousePressEvent(QMouseEvent *event) QT_END_NAMESPACE +#include "moc_scene3ditem_p.cpp" #include "scene3ditem.moc" diff --git a/src/quick3d/imports/scene3d/scene3drenderer.cpp b/src/quick3d/imports/scene3d/scene3drenderer.cpp index e99705006..7c6a925fe 100644 --- a/src/quick3d/imports/scene3d/scene3drenderer.cpp +++ b/src/quick3d/imports/scene3d/scene3drenderer.cpp @@ -663,3 +663,5 @@ Scene3DRenderer::QuickRenderer::~QuickRenderer() {} } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_scene3drenderer_p.cpp" diff --git a/src/quick3d/quick3d/CMakeLists.txt b/src/quick3d/quick3d/CMakeLists.txt index 99aba2615..2f243a877 100644 --- a/src/quick3d/quick3d/CMakeLists.txt +++ b/src/quick3d/quick3d/CMakeLists.txt @@ -9,6 +9,8 @@ qt_internal_add_qml_module(3DQuick VERSION "${PROJECT_VERSION}" PAST_MAJOR_VERSIONS 2 CLASS_NAME Qt3DQuick3DCorePlugin + DEPENDENCIES + QtQuick/auto PLUGIN_TARGET quick3dcoreplugin NO_PLUGIN_OPTIONAL NO_GENERATE_PLUGIN_SOURCE diff --git a/src/quick3d/quick3d/items/quick3dbuffer.cpp b/src/quick3d/quick3d/items/quick3dbuffer.cpp index 159eb1017..e9ace7349 100644 --- a/src/quick3d/quick3d/items/quick3dbuffer.cpp +++ b/src/quick3d/quick3d/items/quick3dbuffer.cpp @@ -141,3 +141,5 @@ void Quick3DBuffer::initEngines() } // Qt3DCore QT_END_NAMESPACE + +#include "moc_quick3dbuffer_p.cpp" diff --git a/src/quick3d/quick3d/items/quick3dentity.cpp b/src/quick3d/quick3d/items/quick3dentity.cpp index 0ef1f8863..0ee35e07e 100644 --- a/src/quick3d/quick3d/items/quick3dentity.cpp +++ b/src/quick3d/quick3d/items/quick3dentity.cpp @@ -118,3 +118,5 @@ QQmlListProperty<QComponent> Quick3DEntity::componentList() } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_quick3dentity_p.cpp" diff --git a/src/quick3d/quick3d/items/quick3dgeometry.cpp b/src/quick3d/quick3d/items/quick3dgeometry.cpp index bcd25731d..03a30615c 100644 --- a/src/quick3d/quick3d/items/quick3dgeometry.cpp +++ b/src/quick3d/quick3d/items/quick3dgeometry.cpp @@ -85,3 +85,5 @@ QQmlListProperty<Qt3DCore::QAttribute> Quick3DGeometry::attributeList() } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_quick3dgeometry_p.cpp" diff --git a/src/quick3d/quick3d/items/quick3djoint.cpp b/src/quick3d/quick3d/items/quick3djoint.cpp index 91f84c5e1..00026460f 100644 --- a/src/quick3d/quick3d/items/quick3djoint.cpp +++ b/src/quick3d/quick3d/items/quick3djoint.cpp @@ -89,3 +89,5 @@ QQmlListProperty<QJoint> Quick3DJoint::childJoints() } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_quick3djoint_p.cpp" diff --git a/src/quick3d/quick3d/items/quick3dnode.cpp b/src/quick3d/quick3d/items/quick3dnode.cpp index 7642fe4c7..9b48ac713 100644 --- a/src/quick3d/quick3d/items/quick3dnode.cpp +++ b/src/quick3d/quick3d/items/quick3dnode.cpp @@ -162,3 +162,6 @@ void Quick3DNode::childRemoved(int, QObject *obj) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_quick3dnode_p.cpp" +#include "moc_qt3dquickforeign_p.cpp" diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp index 6df66acf5..ef3b01054 100644 --- a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp +++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp @@ -73,6 +73,7 @@ public: #endif void _q_createdItem(int, QObject *); void _q_modelUpdated(const QQmlChangeSet &, bool); + QObject *modelObject(int index, bool async); bool m_componentComplete:1; bool m_effectiveReset:1; @@ -81,6 +82,7 @@ public: #if QT_CONFIG(qml_delegate_model) bool m_ownModel:1; #endif + int m_requestedIndex; QVariant m_model; QQmlInstanceModel *m_instanceModel; QQmlComponent *m_delegate; @@ -99,6 +101,7 @@ Quick3DNodeInstantiatorPrivate::Quick3DNodeInstantiatorPrivate() #if QT_CONFIG(qml_delegate_model) , m_ownModel(false) #endif + , m_requestedIndex(-1) , m_model(QVariant(1)) , m_instanceModel(0) , m_delegate(0) @@ -129,6 +132,14 @@ void Quick3DNodeInstantiatorPrivate::clear() emit q->objectChanged(); } +QObject *Quick3DNodeInstantiatorPrivate::modelObject(int index, bool async) +{ + m_requestedIndex = index; + QObject *o = m_instanceModel->object(index, async ? QQmlIncubator::Asynchronous : QQmlIncubator::AsynchronousIfNested); + m_requestedIndex = -1; + return o; +} + void Quick3DNodeInstantiatorPrivate::regenerate() { Q_Q(Quick3DNodeInstantiator); @@ -146,8 +157,7 @@ void Quick3DNodeInstantiatorPrivate::regenerate() } for (int i = 0; i < m_instanceModel->count(); i++) { - QObject *object = m_instanceModel->object(i, m_async ? - QQmlIncubator::Asynchronous : QQmlIncubator::AsynchronousIfNested); + QObject *object = modelObject(i, m_async); // If the item was already created we won't get a createdItem if (object) _q_createdItem(i, object); @@ -161,8 +171,19 @@ void Quick3DNodeInstantiatorPrivate::_q_createdItem(int idx, QObject *item) Q_Q(Quick3DNodeInstantiator); if (m_objects.contains(item)) //Case when it was created synchronously in regenerate return; + if (m_requestedIndex != idx) // Asynchronous creation, reference the object | + (void)m_instanceModel->object(idx); static_cast<QNode *>(item)->setParent(q->parentNode()); - m_objects.insert(idx, item); + if (m_objects.size() < idx + 1) { + int modelCount = m_instanceModel->count(); + if (m_objects.capacity() < modelCount) + m_objects.reserve(modelCount); + m_objects.resize(idx + 1); + } + if (QObject *o = m_objects.at(idx)) + m_instanceModel->release(o); + m_objects.replace(idx, item); + if (m_objects.count() == 1) emit q->objectChanged(); emit q->objectAdded(idx, item); @@ -213,11 +234,14 @@ void Quick3DNodeInstantiatorPrivate::_q_modelUpdated(const QQmlChangeSet &change QList<QPointer<QObject>> movedObjects = moved.value(insert.moveId); m_objects = m_objects.mid(0, index) + movedObjects + m_objects.mid(index); } else for (int i = 0; i < insert.count; ++i) { - int modelIndex = index + i; - QObject *obj = m_instanceModel->object(modelIndex, m_async ? - QQmlIncubator::Asynchronous : QQmlIncubator::AsynchronousIfNested); - if (obj) - _q_createdItem(modelIndex, obj); + if (insert.index <= m_objects.count()) + m_objects.insert(insert.index, insert.count, nullptr); + for (int i = 0; i < insert.count; ++i) { + int modelIndex = index + i; + QObject *obj = modelObject(modelIndex, m_async); + if (obj) + _q_createdItem(modelIndex, obj); + } } difference += insert.count; } diff --git a/src/quick3d/quick3d/qquaternionanimation.cpp b/src/quick3d/quick3d/qquaternionanimation.cpp index 933a08ee4..78e07ea6a 100644 --- a/src/quick3d/quick3d/qquaternionanimation.cpp +++ b/src/quick3d/quick3d/qquaternionanimation.cpp @@ -257,3 +257,5 @@ void QQuaternionAnimation::setToZRotation(float f) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qquaternionanimation_p.cpp" diff --git a/src/quick3d/quick3d/qt3dquickvaluetypes.cpp b/src/quick3d/quick3d/qt3dquickvaluetypes.cpp index a4084fec3..cc20d3834 100644 --- a/src/quick3d/quick3d/qt3dquickvaluetypes.cpp +++ b/src/quick3d/quick3d/qt3dquickvaluetypes.cpp @@ -765,3 +765,5 @@ void QQuick3DQuaternionValueType::setZ(qreal z) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qt3dquickvaluetypes_p.cpp" diff --git a/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp b/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp index 1f655dd36..012408d2d 100644 --- a/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp +++ b/src/quick3d/quick3danimation/items/quick3danimationcontroller.cpp @@ -89,3 +89,5 @@ QQmlListProperty<QAnimationGroup> QQuick3DAnimationController::animationGroups() } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_quick3danimationcontroller_p.cpp" diff --git a/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp b/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp index e07a195f1..df9187ba3 100644 --- a/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp +++ b/src/quick3d/quick3danimation/items/quick3danimationgroup.cpp @@ -95,3 +95,5 @@ QQmlListProperty<Qt3DAnimation::QAbstractAnimation> QQuick3DAnimationGroup::anim } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_quick3danimationgroup_p.cpp" diff --git a/src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp b/src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp index 3c62ae03b..534e7ff9b 100644 --- a/src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp +++ b/src/quick3d/quick3danimation/items/quick3dchannelmapper.cpp @@ -86,3 +86,5 @@ QQmlListProperty<QAbstractChannelMapping> Quick3DChannelMapper::qmlMappings() } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_quick3dchannelmapper_p.cpp" diff --git a/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp b/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp index 0a57f61c6..dea6117a6 100644 --- a/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp +++ b/src/quick3d/quick3danimation/items/quick3dkeyframeanimation.cpp @@ -94,3 +94,5 @@ QQmlListProperty<Qt3DCore::QTransform> QQuick3DKeyframeAnimation::keyframes() } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_quick3dkeyframeanimation_p.cpp" diff --git a/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp b/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp index f1e88f5ef..532890b73 100644 --- a/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp +++ b/src/quick3d/quick3danimation/items/quick3dmorphinganimation.cpp @@ -90,3 +90,5 @@ QQmlListProperty<Qt3DAnimation::QMorphTarget> QQuick3DMorphingAnimation::morphTa } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_quick3dmorphinganimation_p.cpp" diff --git a/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp b/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp index c960a9904..a216e7d14 100644 --- a/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp +++ b/src/quick3d/quick3danimation/items/quick3dmorphtarget.cpp @@ -90,3 +90,5 @@ QQmlListProperty<Qt3DCore::QAttribute> QQuick3DMorphTarget::attributes() } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_quick3dmorphtarget_p.cpp" diff --git a/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp b/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp index bf172580c..446f6d377 100644 --- a/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp +++ b/src/quick3d/quick3danimation/items/quick3dvertexblendanimation.cpp @@ -94,3 +94,5 @@ QQmlListProperty<Qt3DAnimation::QMorphTarget> QQuick3DVertexBlendAnimation::morp } // namespace Qt3DAnimation QT_END_NAMESPACE + +#include "moc_quick3dvertexblendanimation_p.cpp" diff --git a/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader.cpp b/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader.cpp index ee505b1cf..d2766d8c9 100644 --- a/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader.cpp +++ b/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader.cpp @@ -191,4 +191,6 @@ QUrl Quick3DLevelOfDetailLoader::source() const QT_END_NAMESPACE +#include "moc_quick3dlevelofdetailloader_p.cpp" + diff --git a/src/quick3d/quick3dextras/items/quick3dspritesheet.cpp b/src/quick3d/quick3dextras/items/quick3dspritesheet.cpp index 361295382..182e80906 100644 --- a/src/quick3d/quick3dextras/items/quick3dspritesheet.cpp +++ b/src/quick3d/quick3dextras/items/quick3dspritesheet.cpp @@ -92,3 +92,5 @@ QQmlListProperty<Qt3DExtras::QSpriteSheetItem> Quick3DSpriteSheet::sprites() QT_END_NAMESPACE +#include "moc_quick3dspritesheet_p.cpp" + diff --git a/src/quick3d/quick3dextras/qt3dquickwindow.cpp b/src/quick3d/quick3dextras/qt3dquickwindow.cpp index 336e7b966..f03c52e16 100644 --- a/src/quick3d/quick3dextras/qt3dquickwindow.cpp +++ b/src/quick3d/quick3dextras/qt3dquickwindow.cpp @@ -276,4 +276,5 @@ void Qt3DQuickWindow::updateCameraAspectRatio() QT_END_NAMESPACE +#include "moc_qt3dquickwindow.cpp" #include "qt3dquickwindow.moc" diff --git a/src/quick3d/quick3dinput/items/quick3daction.cpp b/src/quick3d/quick3dinput/items/quick3daction.cpp index 10c1b5a56..2422cc20e 100644 --- a/src/quick3d/quick3dinput/items/quick3daction.cpp +++ b/src/quick3d/quick3dinput/items/quick3daction.cpp @@ -86,3 +86,5 @@ QQmlListProperty<QAbstractActionInput> Quick3DAction::qmlActionInputs() } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_quick3daction_p.cpp" diff --git a/src/quick3d/quick3dinput/items/quick3daxis.cpp b/src/quick3d/quick3dinput/items/quick3daxis.cpp index 115fa4b78..592fb1e7b 100644 --- a/src/quick3d/quick3dinput/items/quick3daxis.cpp +++ b/src/quick3d/quick3dinput/items/quick3daxis.cpp @@ -87,3 +87,5 @@ QQmlListProperty<QAbstractAxisInput> Quick3DAxis::qmlAxisInputs() } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_quick3daxis_p.cpp" diff --git a/src/quick3d/quick3dinput/items/quick3dinputchord.cpp b/src/quick3d/quick3dinput/items/quick3dinputchord.cpp index 669c251d2..ba83affb3 100644 --- a/src/quick3d/quick3dinput/items/quick3dinputchord.cpp +++ b/src/quick3d/quick3dinput/items/quick3dinputchord.cpp @@ -86,3 +86,5 @@ QQmlListProperty<QAbstractActionInput> Quick3DInputChord::qmlActionInputs() } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_quick3dinputchord_p.cpp" diff --git a/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp b/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp index 4d637c18b..f5eadbc19 100644 --- a/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp +++ b/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp @@ -87,3 +87,5 @@ QQmlListProperty<QAbstractActionInput> Quick3DInputSequence::qmlActionInputs() } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_quick3dinputsequence_p.cpp" diff --git a/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp b/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp index 061fe1433..b50dc5786 100644 --- a/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp +++ b/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp @@ -118,3 +118,5 @@ QQmlListProperty<QAction> Quick3DLogicalDevice::qmlActions() } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_quick3dlogicaldevice_p.cpp" diff --git a/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp b/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp index 07b017735..1680e7465 100644 --- a/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp +++ b/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp @@ -86,3 +86,5 @@ QQmlListProperty<QAxisSetting> Quick3DPhysicalDevice::axisSettings() } // namespace Qt3DInput QT_END_NAMESPACE + +#include "moc_quick3dphysicaldevice_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3deffect.cpp b/src/quick3d/quick3drender/items/quick3deffect.cpp index 09045011b..d4fa51dfc 100644 --- a/src/quick3d/quick3drender/items/quick3deffect.cpp +++ b/src/quick3d/quick3drender/items/quick3deffect.cpp @@ -129,3 +129,5 @@ QQmlListProperty<QParameter> Quick3DEffect::parameterList() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3deffect_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp b/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp index 431391af6..8f279d02a 100644 --- a/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp +++ b/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp @@ -100,3 +100,5 @@ QQmlListProperty<QLayer> Quick3DLayerFilter::qmlLayers() } // Qt3D QT_END_NAMESPACE + +#include "moc_quick3dlayerfilter_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dmaterial.cpp b/src/quick3d/quick3drender/items/quick3dmaterial.cpp index 0e1528fe2..50e7afe45 100644 --- a/src/quick3d/quick3drender/items/quick3dmaterial.cpp +++ b/src/quick3d/quick3drender/items/quick3dmaterial.cpp @@ -101,3 +101,5 @@ QQmlListProperty<QParameter> Quick3DMaterial::qmlParameters() } // Qt3D QT_END_NAMESPACE + +#include "moc_quick3dmaterial_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dmemorybarrier.cpp b/src/quick3d/quick3drender/items/quick3dmemorybarrier.cpp index 0754a0cf5..504ff3af9 100644 --- a/src/quick3d/quick3drender/items/quick3dmemorybarrier.cpp +++ b/src/quick3d/quick3drender/items/quick3dmemorybarrier.cpp @@ -72,3 +72,5 @@ int Quick3DMemoryBarrier::waitFor() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dmemorybarrier_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dparameter.cpp b/src/quick3d/quick3drender/items/quick3dparameter.cpp index 2ef95a4d4..a4e6178e1 100644 --- a/src/quick3d/quick3drender/items/quick3dparameter.cpp +++ b/src/quick3d/quick3drender/items/quick3dparameter.cpp @@ -85,4 +85,6 @@ Quick3DParameter::Quick3DParameter(Quick3DParameterPrivate &dd, QNode *parent) QT_END_NAMESPACE +#include "moc_quick3dparameter_p.cpp" + diff --git a/src/quick3d/quick3drender/items/quick3draycaster.cpp b/src/quick3d/quick3drender/items/quick3draycaster.cpp index 4e901c82b..d227ff0ce 100644 --- a/src/quick3d/quick3drender/items/quick3draycaster.cpp +++ b/src/quick3d/quick3drender/items/quick3draycaster.cpp @@ -97,3 +97,5 @@ QQmlListProperty<Qt3DRender::QLayer> Qt3DRender::Render::Quick::Quick3DRayCaster } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3draycaster_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3drenderpass.cpp b/src/quick3d/quick3drender/items/quick3drenderpass.cpp index 0006191a5..49887f4d7 100644 --- a/src/quick3d/quick3drender/items/quick3drenderpass.cpp +++ b/src/quick3d/quick3drender/items/quick3drenderpass.cpp @@ -149,3 +149,5 @@ QQmlListProperty<QParameter> Quick3DRenderPass::parameterList() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3drenderpass_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp b/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp index 6323911b4..7974ba81e 100644 --- a/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp +++ b/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp @@ -132,3 +132,5 @@ QQmlListProperty<QParameter> Quick3DRenderPassFilter::parameterList() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3drenderpassfilter_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp b/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp index 810ded8b0..87cd2be29 100644 --- a/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp +++ b/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp @@ -93,3 +93,5 @@ QQmlListProperty<QRenderTargetOutput> Quick3DRenderTargetOutput::qmlAttachments( } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3drendertargetoutput_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dscene.cpp b/src/quick3d/quick3drender/items/quick3dscene.cpp index af4f44f0e..d118fa51d 100644 --- a/src/quick3d/quick3drender/items/quick3dscene.cpp +++ b/src/quick3d/quick3drender/items/quick3dscene.cpp @@ -55,3 +55,5 @@ Quick3DScene::Quick3DScene(QObject *parent) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dscene_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp b/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp index 206073426..5023bd197 100644 --- a/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp +++ b/src/quick3d/quick3drender/items/quick3dscreenraycaster.cpp @@ -101,3 +101,5 @@ QQmlListProperty<Qt3DRender::QLayer> Qt3DRender::Render::Quick::Quick3DScreenRay } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dscreenraycaster_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dshaderdata.cpp b/src/quick3d/quick3drender/items/quick3dshaderdata.cpp index 539391da9..0cc669e44 100644 --- a/src/quick3d/quick3drender/items/quick3dshaderdata.cpp +++ b/src/quick3d/quick3drender/items/quick3dshaderdata.cpp @@ -104,3 +104,5 @@ Quick3DShaderData::Quick3DShaderData(QNode *parent) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dshaderdata_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp b/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp index 146a17477..868546c2e 100644 --- a/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp +++ b/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp @@ -110,3 +110,5 @@ QList<QShaderData *> Quick3DShaderDataArray::values() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dshaderdataarray_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dstateset.cpp b/src/quick3d/quick3drender/items/quick3dstateset.cpp index 396fab309..252c793ca 100644 --- a/src/quick3d/quick3drender/items/quick3dstateset.cpp +++ b/src/quick3d/quick3drender/items/quick3dstateset.cpp @@ -91,3 +91,5 @@ QQmlListProperty<QRenderState> Quick3DStateSet::renderStateList() QT_END_NAMESPACE +#include "moc_quick3dstateset_p.cpp" + diff --git a/src/quick3d/quick3drender/items/quick3dtechnique.cpp b/src/quick3d/quick3drender/items/quick3dtechnique.cpp index edc6f3da2..380f9f3a0 100644 --- a/src/quick3d/quick3drender/items/quick3dtechnique.cpp +++ b/src/quick3d/quick3drender/items/quick3dtechnique.cpp @@ -165,3 +165,5 @@ QQmlListProperty<QFilterKey> Quick3DTechnique::filterKeyList() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dtechnique_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp b/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp index 0de7fe5ba..645206d20 100644 --- a/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp +++ b/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp @@ -126,3 +126,5 @@ QQmlListProperty<QParameter> Quick3DTechniqueFilter::parameterList() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dtechniquefilter_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dtexture.cpp b/src/quick3d/quick3drender/items/quick3dtexture.cpp index 8e1deed1c..d2d75edb9 100644 --- a/src/quick3d/quick3drender/items/quick3dtexture.cpp +++ b/src/quick3d/quick3drender/items/quick3dtexture.cpp @@ -94,3 +94,5 @@ QQmlListProperty<QAbstractTextureImage> Quick3DTextureExtension::textureImages() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dtexture_p.cpp" diff --git a/src/quick3d/quick3drender/items/quick3dviewport.cpp b/src/quick3d/quick3drender/items/quick3dviewport.cpp index 3b4bf33f5..855b631eb 100644 --- a/src/quick3d/quick3drender/items/quick3dviewport.cpp +++ b/src/quick3d/quick3drender/items/quick3dviewport.cpp @@ -55,3 +55,5 @@ Quick3DViewport::Quick3DViewport(QObject *parent) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_quick3dviewport_p.cpp" diff --git a/src/quick3d/quick3dscene2d/items/qscene2d.cpp b/src/quick3d/quick3dscene2d/items/qscene2d.cpp index 55aba62ad..993a5ecfd 100644 --- a/src/quick3d/quick3dscene2d/items/qscene2d.cpp +++ b/src/quick3d/quick3dscene2d/items/qscene2d.cpp @@ -349,3 +349,5 @@ void QScene2D::setMouseEnabled(bool enabled) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qscene2d.cpp" diff --git a/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp b/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp index 5b8ee1896..4c5ab90d2 100644 --- a/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp +++ b/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d.cpp @@ -96,3 +96,5 @@ QQmlListProperty<Qt3DCore::QEntity> QQuick3DScene2D::entities() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qt3dquick3dscene2d_p.cpp" diff --git a/src/quick3d/quick3dscene2d/items/scene2d.cpp b/src/quick3d/quick3dscene2d/items/scene2d.cpp index 2ad32e755..c2ca79df3 100644 --- a/src/quick3d/quick3dscene2d/items/scene2d.cpp +++ b/src/quick3d/quick3dscene2d/items/scene2d.cpp @@ -503,3 +503,5 @@ void Scene2D::handlePickEvent(int type, const Qt3DRender::QPickEvent *ev) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_scene2d_p.cpp" diff --git a/src/quick3d/quick3dscene2d/items/scene2dmanager.cpp b/src/quick3d/quick3dscene2d/items/scene2dmanager.cpp index f4ec3aec8..65dbf2a98 100644 --- a/src/quick3d/quick3dscene2d/items/scene2dmanager.cpp +++ b/src/quick3d/quick3dscene2d/items/scene2dmanager.cpp @@ -258,3 +258,5 @@ void Scene2DManager::cleanup() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_scene2dmanager_p.cpp" diff --git a/src/render/backend/offscreensurfacehelper.cpp b/src/render/backend/offscreensurfacehelper.cpp index 38558d484..60c80d7b5 100644 --- a/src/render/backend/offscreensurfacehelper.cpp +++ b/src/render/backend/offscreensurfacehelper.cpp @@ -80,3 +80,5 @@ void OffscreenSurfaceHelper::createOffscreenSurface() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_offscreensurfacehelper_p.cpp" diff --git a/src/render/backend/platformsurfacefilter.cpp b/src/render/backend/platformsurfacefilter.cpp index 115fb637f..8004bf2e4 100644 --- a/src/render/backend/platformsurfacefilter.cpp +++ b/src/render/backend/platformsurfacefilter.cpp @@ -168,3 +168,5 @@ bool SurfaceLocker::isSurfaceValid() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_platformsurfacefilter_p.cpp" diff --git a/src/render/backend/uniform_p.h b/src/render/backend/uniform_p.h index 24bbcd76c..8dedf6d63 100644 --- a/src/render/backend/uniform_p.h +++ b/src/render/backend/uniform_p.h @@ -58,6 +58,7 @@ #include <Qt3DCore/private/vector4d_p.h> #include <Qt3DRender/private/qt3drender_global_p.h> #include <QMatrix4x4> +#include <QVarLengthArray> #include <QVector2D> #include <QVector3D> #include <QColor> diff --git a/src/render/configure.cmake b/src/render/configure.cmake index 9fb7183d9..ffa34c1f4 100644 --- a/src/render/configure.cmake +++ b/src/render/configure.cmake @@ -29,7 +29,7 @@ qt_feature("qt3d-rhi-renderer" PUBLIC ) qt_feature("qt3d-vulkan" PUBLIC LABEL "Vulkan" - CONDITION Vulkan_FOUND AND QT_FEATURE_qt3d_rhi_renderer + CONDITION Vulkan_FOUND AND QT_FEATURE_qt3d_rhi_renderer AND QT_FEATURE_vulkan ) qt_configure_add_summary_section(NAME "Qt 3D APIs") qt_configure_add_summary_entry(ARGS "qt3d-vulkan") diff --git a/src/render/framegraph/qblitframebuffer.cpp b/src/render/framegraph/qblitframebuffer.cpp index 356b2db06..2e9f9a2c3 100644 --- a/src/render/framegraph/qblitframebuffer.cpp +++ b/src/render/framegraph/qblitframebuffer.cpp @@ -435,3 +435,5 @@ void QBlitFramebuffer::setInterpolationMethod(QBlitFramebuffer::InterpolationMet } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qblitframebuffer.cpp" diff --git a/src/render/framegraph/qbuffercapture.cpp b/src/render/framegraph/qbuffercapture.cpp index 49b923534..3c18e31ba 100644 --- a/src/render/framegraph/qbuffercapture.cpp +++ b/src/render/framegraph/qbuffercapture.cpp @@ -81,3 +81,5 @@ QBufferCapture::~QBufferCapture() } //Qt3DRender QT_END_NAMESPACE + +#include "moc_qbuffercapture.cpp" diff --git a/src/render/framegraph/qcameraselector.cpp b/src/render/framegraph/qcameraselector.cpp index f9deba592..dec88c392 100644 --- a/src/render/framegraph/qcameraselector.cpp +++ b/src/render/framegraph/qcameraselector.cpp @@ -141,3 +141,5 @@ Qt3DCore::QEntity *QCameraSelector::camera() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qcameraselector.cpp" diff --git a/src/render/framegraph/qclearbuffers.cpp b/src/render/framegraph/qclearbuffers.cpp index 177f6f097..f24a46874 100644 --- a/src/render/framegraph/qclearbuffers.cpp +++ b/src/render/framegraph/qclearbuffers.cpp @@ -234,3 +234,5 @@ void QClearBuffers::setColorBuffer(QRenderTargetOutput *buffer) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qclearbuffers.cpp" diff --git a/src/render/framegraph/qdebugoverlay.cpp b/src/render/framegraph/qdebugoverlay.cpp index da0401b1b..ad7ddc1f4 100644 --- a/src/render/framegraph/qdebugoverlay.cpp +++ b/src/render/framegraph/qdebugoverlay.cpp @@ -97,3 +97,5 @@ QDebugOverlay::QDebugOverlay(Qt3DCore::QNode *parent) } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qdebugoverlay.cpp" diff --git a/src/render/framegraph/qdispatchcompute.cpp b/src/render/framegraph/qdispatchcompute.cpp index f9d1df621..13498e50e 100644 --- a/src/render/framegraph/qdispatchcompute.cpp +++ b/src/render/framegraph/qdispatchcompute.cpp @@ -165,3 +165,5 @@ void QDispatchCompute::setWorkGroupZ(int workGroupZ) QT_END_NAMESPACE +#include "moc_qdispatchcompute.cpp" + diff --git a/src/render/framegraph/qframegraphnode.cpp b/src/render/framegraph/qframegraphnode.cpp index 2a2bda3f2..3b1a7c902 100644 --- a/src/render/framegraph/qframegraphnode.cpp +++ b/src/render/framegraph/qframegraphnode.cpp @@ -435,3 +435,5 @@ void QFrameGraphNode::onParentChanged(QObject *) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qframegraphnode.cpp" diff --git a/src/render/framegraph/qfrustumculling.cpp b/src/render/framegraph/qfrustumculling.cpp index c34d666b5..d86044725 100644 --- a/src/render/framegraph/qfrustumculling.cpp +++ b/src/render/framegraph/qfrustumculling.cpp @@ -96,3 +96,5 @@ QFrustumCulling::~QFrustumCulling() QT_END_NAMESPACE +#include "moc_qfrustumculling.cpp" + diff --git a/src/render/framegraph/qlayerfilter.cpp b/src/render/framegraph/qlayerfilter.cpp index d7285fad0..e4eab2261 100644 --- a/src/render/framegraph/qlayerfilter.cpp +++ b/src/render/framegraph/qlayerfilter.cpp @@ -247,3 +247,5 @@ void QLayerFilter::setFilterMode(QLayerFilter::FilterMode filterMode) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qlayerfilter.cpp" diff --git a/src/render/framegraph/qmemorybarrier.cpp b/src/render/framegraph/qmemorybarrier.cpp index 1b44fac79..77b5602ea 100644 --- a/src/render/framegraph/qmemorybarrier.cpp +++ b/src/render/framegraph/qmemorybarrier.cpp @@ -157,3 +157,5 @@ QMemoryBarrier::QMemoryBarrier(QMemoryBarrierPrivate &dd, Qt3DCore::QNode *paren } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qmemorybarrier.cpp" diff --git a/src/render/framegraph/qnodraw.cpp b/src/render/framegraph/qnodraw.cpp index 46756557e..bd77727ed 100644 --- a/src/render/framegraph/qnodraw.cpp +++ b/src/render/framegraph/qnodraw.cpp @@ -140,3 +140,5 @@ QNoDraw::~QNoDraw() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qnodraw.cpp" diff --git a/src/render/framegraph/qnopicking.cpp b/src/render/framegraph/qnopicking.cpp index 069560175..f7bfe6d47 100644 --- a/src/render/framegraph/qnopicking.cpp +++ b/src/render/framegraph/qnopicking.cpp @@ -137,3 +137,5 @@ QNoPicking::~QNoPicking() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qnopicking.cpp" diff --git a/src/render/framegraph/qproximityfilter.cpp b/src/render/framegraph/qproximityfilter.cpp index 6836956a4..f17eee20c 100644 --- a/src/render/framegraph/qproximityfilter.cpp +++ b/src/render/framegraph/qproximityfilter.cpp @@ -183,3 +183,5 @@ void QProximityFilter::setDistanceThreshold(float distanceThreshold) } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qproximityfilter.cpp" diff --git a/src/render/framegraph/qrendercapture.cpp b/src/render/framegraph/qrendercapture.cpp index 97a71cbed..cac563549 100644 --- a/src/render/framegraph/qrendercapture.cpp +++ b/src/render/framegraph/qrendercapture.cpp @@ -351,3 +351,5 @@ Qt3DRender::QRenderCaptureReply *QRenderCapture::requestCapture() } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qrendercapture.cpp" diff --git a/src/render/framegraph/qrenderpassfilter.cpp b/src/render/framegraph/qrenderpassfilter.cpp index 378ff63a6..44fa91a02 100644 --- a/src/render/framegraph/qrenderpassfilter.cpp +++ b/src/render/framegraph/qrenderpassfilter.cpp @@ -211,3 +211,5 @@ QList<QParameter *> QRenderPassFilter::parameters() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrenderpassfilter.cpp" diff --git a/src/render/framegraph/qrenderstateset.cpp b/src/render/framegraph/qrenderstateset.cpp index 6e8700695..ba499f919 100644 --- a/src/render/framegraph/qrenderstateset.cpp +++ b/src/render/framegraph/qrenderstateset.cpp @@ -221,3 +221,5 @@ QList<QRenderState *> QRenderStateSet::renderStates() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrenderstateset.cpp" diff --git a/src/render/framegraph/qrendersurfaceselector.cpp b/src/render/framegraph/qrendersurfaceselector.cpp index 3b8eb0ae8..c0d0fb8aa 100644 --- a/src/render/framegraph/qrendersurfaceselector.cpp +++ b/src/render/framegraph/qrendersurfaceselector.cpp @@ -256,7 +256,7 @@ void QRenderSurfaceSelector::setSurface(QObject *surfaceObject) d->m_heightConn = QObject::connect(window, &QWindow::heightChanged, [=] (int) { d->update(); }); - d->m_screenConn = QObject::connect(window, &QWindow::screenChanged, [=] (QScreen *screen) { + d->m_screenConn = QObject::connect(window, &QWindow::screenChanged, [this] (QScreen *screen) { if (screen && !qFuzzyCompare(surfacePixelRatio(), float(screen->devicePixelRatio()))) setSurfacePixelRatio(float(screen->devicePixelRatio())); }); @@ -317,3 +317,5 @@ void QRenderSurfaceSelector::setExternalRenderTargetSize(const QSize &size) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrendersurfaceselector.cpp" diff --git a/src/render/framegraph/qrendertargetselector.cpp b/src/render/framegraph/qrendertargetselector.cpp index 5004df234..9f38602d7 100644 --- a/src/render/framegraph/qrendertargetselector.cpp +++ b/src/render/framegraph/qrendertargetselector.cpp @@ -137,3 +137,5 @@ QRenderTargetSelector::QRenderTargetSelector(QRenderTargetSelectorPrivate &dd, Q } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrendertargetselector.cpp" diff --git a/src/render/framegraph/qsetfence.cpp b/src/render/framegraph/qsetfence.cpp index ae25ba80f..1583c30e9 100644 --- a/src/render/framegraph/qsetfence.cpp +++ b/src/render/framegraph/qsetfence.cpp @@ -151,3 +151,5 @@ void QSetFencePrivate::setHandle(QVariant handle) } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qsetfence.cpp" diff --git a/src/render/framegraph/qsortpolicy.cpp b/src/render/framegraph/qsortpolicy.cpp index d3d7fe58f..0d4e65474 100644 --- a/src/render/framegraph/qsortpolicy.cpp +++ b/src/render/framegraph/qsortpolicy.cpp @@ -189,3 +189,5 @@ void QSortPolicy::setSortTypes(const QList<int> &sortTypesInt) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qsortpolicy.cpp" diff --git a/src/render/framegraph/qsubtreeenabler.cpp b/src/render/framegraph/qsubtreeenabler.cpp index d37cc37e8..422aa8eb2 100644 --- a/src/render/framegraph/qsubtreeenabler.cpp +++ b/src/render/framegraph/qsubtreeenabler.cpp @@ -173,3 +173,5 @@ void QSubtreeEnabler::requestUpdate() } //Qt3DRender QT_END_NAMESPACE + +#include "moc_qsubtreeenabler.cpp" diff --git a/src/render/framegraph/qtechniquefilter.cpp b/src/render/framegraph/qtechniquefilter.cpp index 8bcc8af0f..02a6b8e11 100644 --- a/src/render/framegraph/qtechniquefilter.cpp +++ b/src/render/framegraph/qtechniquefilter.cpp @@ -213,3 +213,5 @@ QList<QParameter *> QTechniqueFilter::parameters() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qtechniquefilter.cpp" diff --git a/src/render/framegraph/qviewport.cpp b/src/render/framegraph/qviewport.cpp index fa04c647a..4ee1bf372 100644 --- a/src/render/framegraph/qviewport.cpp +++ b/src/render/framegraph/qviewport.cpp @@ -156,3 +156,5 @@ void QViewport::setGamma(float gamma) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qviewport.cpp" diff --git a/src/render/framegraph/qwaitfence.cpp b/src/render/framegraph/qwaitfence.cpp index 4cd1bea61..e626b17d3 100644 --- a/src/render/framegraph/qwaitfence.cpp +++ b/src/render/framegraph/qwaitfence.cpp @@ -204,3 +204,5 @@ void QWaitFence::setHandle(QVariant handle) } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qwaitfence.cpp" diff --git a/src/render/frontend/qcamera.cpp b/src/render/frontend/qcamera.cpp index 4d4e5bf4d..c721ee728 100644 --- a/src/render/frontend/qcamera.cpp +++ b/src/render/frontend/qcamera.cpp @@ -1127,3 +1127,5 @@ QMatrix4x4 QCamera::viewMatrix() const } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qcamera.cpp" diff --git a/src/render/frontend/qcameralens.cpp b/src/render/frontend/qcameralens.cpp index a7b1d8be6..4669c17aa 100644 --- a/src/render/frontend/qcameralens.cpp +++ b/src/render/frontend/qcameralens.cpp @@ -620,3 +620,5 @@ float QCameraLens::exposure() const } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qcameralens.cpp" diff --git a/src/render/frontend/qcomputecommand.cpp b/src/render/frontend/qcomputecommand.cpp index 9dda7f596..e2db004eb 100644 --- a/src/render/frontend/qcomputecommand.cpp +++ b/src/render/frontend/qcomputecommand.cpp @@ -279,3 +279,5 @@ void QComputeCommand::trigger(int workGroupX, int workGroupY, int workGroupZ, in } // Render QT_END_NAMESPACE + +#include "moc_qcomputecommand.cpp" diff --git a/src/render/frontend/qlayer.cpp b/src/render/frontend/qlayer.cpp index 61fdbf4b3..c8b1d3007 100644 --- a/src/render/frontend/qlayer.cpp +++ b/src/render/frontend/qlayer.cpp @@ -190,3 +190,5 @@ QLayer::QLayer(QLayerPrivate &dd, QNode *parent) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qlayer.cpp" diff --git a/src/render/frontend/qlevelofdetailboundingsphere.cpp b/src/render/frontend/qlevelofdetailboundingsphere.cpp index 8354365d8..ce9688e38 100644 --- a/src/render/frontend/qlevelofdetailboundingsphere.cpp +++ b/src/render/frontend/qlevelofdetailboundingsphere.cpp @@ -155,3 +155,5 @@ bool QLevelOfDetailBoundingSphere::operator !=(const QLevelOfDetailBoundingSpher } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qlevelofdetailboundingsphere.cpp" diff --git a/src/render/frontend/qlevelofdetailswitch.cpp b/src/render/frontend/qlevelofdetailswitch.cpp index c0bbdc0f8..5220eb006 100644 --- a/src/render/frontend/qlevelofdetailswitch.cpp +++ b/src/render/frontend/qlevelofdetailswitch.cpp @@ -136,3 +136,5 @@ QLevelOfDetailSwitch::QLevelOfDetailSwitch(QLevelOfDetailPrivate &dd, QNode *par } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qlevelofdetailswitch.cpp" diff --git a/src/render/frontend/qpickingsettings.cpp b/src/render/frontend/qpickingsettings.cpp index 0c858aef2..e176f0329 100644 --- a/src/render/frontend/qpickingsettings.cpp +++ b/src/render/frontend/qpickingsettings.cpp @@ -308,3 +308,5 @@ void QPickingSettings::setWorldSpaceTolerance(float worldSpaceTolerance) } // namespace Qt3Drender QT_END_NAMESPACE + +#include "moc_qpickingsettings.cpp" diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp index 2bc31506f..0c0851a97 100644 --- a/src/render/frontend/qrenderaspect.cpp +++ b/src/render/frontend/qrenderaspect.cpp @@ -1010,3 +1010,5 @@ void QRenderAspectPrivate::configurePlugin(const QString &plugin) QT_END_NAMESPACE QT3D_REGISTER_NAMESPACED_ASPECT("render", QT_PREPEND_NAMESPACE(Qt3DRender), QRenderAspect) + +#include "moc_qrenderaspect.cpp" diff --git a/src/render/frontend/qrendercapabilities.cpp b/src/render/frontend/qrendercapabilities.cpp index afe5d04a8..f1b8dfefb 100644 --- a/src/render/frontend/qrendercapabilities.cpp +++ b/src/render/frontend/qrendercapabilities.cpp @@ -876,3 +876,5 @@ int QRenderCapabilities::maxComputeSharedMemorySize() const } // namespace Qt3Drender QT_END_NAMESPACE + +#include "moc_qrendercapabilities.cpp" diff --git a/src/render/frontend/qrenderpluginfactoryif.cpp b/src/render/frontend/qrenderpluginfactoryif.cpp index 2bdd39090..00620fcf5 100644 --- a/src/render/frontend/qrenderpluginfactoryif.cpp +++ b/src/render/frontend/qrenderpluginfactoryif.cpp @@ -66,3 +66,5 @@ QRenderPlugin *QRenderPluginFactoryIf::create(const QString &key, const QStringL } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrenderpluginfactoryif_p.cpp" diff --git a/src/render/frontend/qrendertarget.cpp b/src/render/frontend/qrendertarget.cpp index 1abc0fca6..65f0fc005 100644 --- a/src/render/frontend/qrendertarget.cpp +++ b/src/render/frontend/qrendertarget.cpp @@ -153,3 +153,5 @@ QList<QRenderTargetOutput *> QRenderTarget::outputs() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrendertarget.cpp" diff --git a/src/render/frontend/qrendertargetoutput.cpp b/src/render/frontend/qrendertargetoutput.cpp index 9d6600233..f5f811503 100644 --- a/src/render/frontend/qrendertargetoutput.cpp +++ b/src/render/frontend/qrendertargetoutput.cpp @@ -303,3 +303,5 @@ QAbstractTexture::CubeMapFace QRenderTargetOutput::face() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrendertargetoutput.cpp" diff --git a/src/render/geometry/qgeometryrenderer.cpp b/src/render/geometry/qgeometryrenderer.cpp index 036235624..ea7e47abd 100644 --- a/src/render/geometry/qgeometryrenderer.cpp +++ b/src/render/geometry/qgeometryrenderer.cpp @@ -254,6 +254,7 @@ void QGeometryRendererPrivate::setView(QGeometryView *view) QGeometryRenderer::QGeometryRenderer(QNode *parent) : Qt3DCore::QBoundingVolume(*new QGeometryRendererPrivate(), parent) { + Q_UNUSED(m_sortIndex) } /*! @@ -555,3 +556,5 @@ void QGeometryRenderer::setSortIndex(float sortIndex) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qgeometryrenderer.cpp" diff --git a/src/render/geometry/qgeometryrenderer.h b/src/render/geometry/qgeometryrenderer.h index c0e14eaaf..65eba247e 100644 --- a/src/render/geometry/qgeometryrenderer.h +++ b/src/render/geometry/qgeometryrenderer.h @@ -136,7 +136,7 @@ protected: private: Q_DECLARE_PRIVATE(QGeometryRenderer) - float m_sortIndex; + float m_sortIndex; // TODO Remove in Qt 7 }; } // namespace Qt3DRender diff --git a/src/render/geometry/qmesh.cpp b/src/render/geometry/qmesh.cpp index 9bcad868d..ae017b51d 100644 --- a/src/render/geometry/qmesh.cpp +++ b/src/render/geometry/qmesh.cpp @@ -442,3 +442,5 @@ void MeshDownloadRequest::onCompleted() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qmesh.cpp" diff --git a/src/render/geometry/qpickingproxy.cpp b/src/render/geometry/qpickingproxy.cpp index d9c2d264e..0427170af 100644 --- a/src/render/geometry/qpickingproxy.cpp +++ b/src/render/geometry/qpickingproxy.cpp @@ -154,3 +154,5 @@ QPickingProxy::QPickingProxy(QPickingProxyPrivate &dd, QNode *parent) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qpickingproxy.cpp" diff --git a/src/render/io/qgeometryloaderfactory.cpp b/src/render/io/qgeometryloaderfactory.cpp index c34469dc1..d33fa8ae3 100644 --- a/src/render/io/qgeometryloaderfactory.cpp +++ b/src/render/io/qgeometryloaderfactory.cpp @@ -56,3 +56,5 @@ QGeometryLoaderFactory::~QGeometryLoaderFactory() QT_END_NAMESPACE +#include "moc_qgeometryloaderfactory_p.cpp" + diff --git a/src/render/io/qsceneexporter.cpp b/src/render/io/qsceneexporter.cpp index 71a0120c0..fcc9f93c0 100644 --- a/src/render/io/qsceneexporter.cpp +++ b/src/render/io/qsceneexporter.cpp @@ -72,3 +72,5 @@ void QSceneExporter::logInfo(const QString &info) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qsceneexporter_p.cpp" diff --git a/src/render/io/qsceneexportplugin.cpp b/src/render/io/qsceneexportplugin.cpp index 9ba2a6298..fa0232aef 100644 --- a/src/render/io/qsceneexportplugin.cpp +++ b/src/render/io/qsceneexportplugin.cpp @@ -64,3 +64,5 @@ QSceneExporter *QSceneExportPlugin::create(const QString &key, const QStringList QT_END_NAMESPACE +#include "moc_qsceneexportplugin_p.cpp" + diff --git a/src/render/io/qsceneimporter.cpp b/src/render/io/qsceneimporter.cpp index f58a435eb..8c8633eea 100644 --- a/src/render/io/qsceneimporter.cpp +++ b/src/render/io/qsceneimporter.cpp @@ -86,3 +86,5 @@ void QSceneImporter::logInfo(const QString &info) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qsceneimporter_p.cpp" diff --git a/src/render/io/qsceneimportplugin.cpp b/src/render/io/qsceneimportplugin.cpp index 8cafdd25a..37b2a7f07 100644 --- a/src/render/io/qsceneimportplugin.cpp +++ b/src/render/io/qsceneimportplugin.cpp @@ -64,3 +64,5 @@ QSceneImporter *QSceneImportPlugin::create(const QString &key, const QStringList QT_END_NAMESPACE +#include "moc_qsceneimportplugin_p.cpp" + diff --git a/src/render/io/qsceneloader.cpp b/src/render/io/qsceneloader.cpp index 5dd690b49..cbbda235d 100644 --- a/src/render/io/qsceneloader.cpp +++ b/src/render/io/qsceneloader.cpp @@ -373,3 +373,5 @@ QComponent *QSceneLoader::component(const QString &entityName, } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qsceneloader.cpp" diff --git a/src/render/lights/qabstractlight.cpp b/src/render/lights/qabstractlight.cpp index 83ac9e28b..3a8df3df0 100644 --- a/src/render/lights/qabstractlight.cpp +++ b/src/render/lights/qabstractlight.cpp @@ -175,3 +175,5 @@ void QAbstractLight::setIntensity(float value) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qabstractlight.cpp" diff --git a/src/render/lights/qdirectionallight.cpp b/src/render/lights/qdirectionallight.cpp index 51827b644..1ab43704c 100644 --- a/src/render/lights/qdirectionallight.cpp +++ b/src/render/lights/qdirectionallight.cpp @@ -146,3 +146,5 @@ QVector3D QDirectionalLight::worldDirection() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qdirectionallight.cpp" diff --git a/src/render/lights/qpointlight.cpp b/src/render/lights/qpointlight.cpp index c16291709..2a14a2d40 100644 --- a/src/render/lights/qpointlight.cpp +++ b/src/render/lights/qpointlight.cpp @@ -226,3 +226,5 @@ void QPointLight::setQuadraticAttenuation(float value) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qpointlight.cpp" diff --git a/src/render/lights/qspotlight.cpp b/src/render/lights/qspotlight.cpp index c725a6baf..5b650dfe0 100644 --- a/src/render/lights/qspotlight.cpp +++ b/src/render/lights/qspotlight.cpp @@ -292,3 +292,5 @@ void QSpotLight::setCutOffAngle(float value) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qspotlight.cpp" diff --git a/src/render/materialsystem/filterkey.cpp b/src/render/materialsystem/filterkey.cpp index 778a9ee75..572d11e57 100644 --- a/src/render/materialsystem/filterkey.cpp +++ b/src/render/materialsystem/filterkey.cpp @@ -83,7 +83,7 @@ void FilterKey::syncFromFrontEnd(const QNode *frontEnd, bool firstTime) } } -bool FilterKey::operator ==(const FilterKey &other) +bool FilterKey::equals(const FilterKey &other) const { if (&other == this) return true; @@ -101,11 +101,6 @@ bool FilterKey::operator ==(const FilterKey &other) other.value() == value()); } -bool FilterKey::operator !=(const FilterKey &other) -{ - return !operator ==(other); -} - } // namespace Render } // namespace Qt3DRender diff --git a/src/render/materialsystem/filterkey_p.h b/src/render/materialsystem/filterkey_p.h index 91d0ba1f0..1fe6bba7b 100644 --- a/src/render/materialsystem/filterkey_p.h +++ b/src/render/materialsystem/filterkey_p.h @@ -72,10 +72,15 @@ public: const QVariant &value() const { return m_value; } const QString &name() const { return m_name; } void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; - bool operator ==(const FilterKey &other); - bool operator !=(const FilterKey &other); + + friend bool operator==(const FilterKey &lhs, const FilterKey &rhs) + { return lhs.equals(rhs); } + friend bool operator !=(const FilterKey &lhs, const FilterKey &rhs) + { return !lhs.equals(rhs); } private: + bool equals(const FilterKey &other) const; + QVariant m_value; QString m_name; }; diff --git a/src/render/materialsystem/prototypes/default.json b/src/render/materialsystem/prototypes/default.json index 16a3288ac..f92172d5d 100644 --- a/src/render/materialsystem/prototypes/default.json +++ b/src/render/materialsystem/prototypes/default.json @@ -21,6 +21,9 @@ "headerSnippets": [ "attribute highp $type $name;" ], + "headerSnippetsFrag": [ + "varying highp $type $name;" + ], "substitution": "highp $type $value = $name;" }, { diff --git a/src/render/materialsystem/qeffect.cpp b/src/render/materialsystem/qeffect.cpp index 2baeb4512..ebed36dd5 100644 --- a/src/render/materialsystem/qeffect.cpp +++ b/src/render/materialsystem/qeffect.cpp @@ -121,7 +121,7 @@ QEffectPrivate::QEffectPrivate() Effect { id: effect - technique: [ + techniques: [ Technique { id: gl3Technique graphicsApiFilter { @@ -270,3 +270,5 @@ QList<QTechnique *> QEffect::techniques() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qeffect.cpp" diff --git a/src/render/materialsystem/qfilterkey.cpp b/src/render/materialsystem/qfilterkey.cpp index a98dc2b4f..981e66521 100644 --- a/src/render/materialsystem/qfilterkey.cpp +++ b/src/render/materialsystem/qfilterkey.cpp @@ -145,3 +145,5 @@ QString QFilterKey::name() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qfilterkey.cpp" diff --git a/src/render/materialsystem/qgraphicsapifilter.cpp b/src/render/materialsystem/qgraphicsapifilter.cpp index ae85af6b2..9d998efcc 100644 --- a/src/render/materialsystem/qgraphicsapifilter.cpp +++ b/src/render/materialsystem/qgraphicsapifilter.cpp @@ -373,3 +373,5 @@ bool operator !=(const QGraphicsApiFilter &reference, const QGraphicsApiFilter & } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qgraphicsapifilter.cpp" diff --git a/src/render/materialsystem/qmaterial.cpp b/src/render/materialsystem/qmaterial.cpp index 7111dba23..8c85d7293 100644 --- a/src/render/materialsystem/qmaterial.cpp +++ b/src/render/materialsystem/qmaterial.cpp @@ -73,7 +73,7 @@ Effect { id: effect - technique: [ + techniques: [ Technique { id: gl3Technique graphicsApiFilter { @@ -302,3 +302,5 @@ QList<QParameter *> QMaterial::parameters() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qmaterial.cpp" diff --git a/src/render/materialsystem/qparameter.cpp b/src/render/materialsystem/qparameter.cpp index fc74155dc..14d67be8f 100644 --- a/src/render/materialsystem/qparameter.cpp +++ b/src/render/materialsystem/qparameter.cpp @@ -326,3 +326,5 @@ QVariant QParameter::value() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qparameter.cpp" diff --git a/src/render/materialsystem/qrenderpass.cpp b/src/render/materialsystem/qrenderpass.cpp index 282324915..242c070ae 100644 --- a/src/render/materialsystem/qrenderpass.cpp +++ b/src/render/materialsystem/qrenderpass.cpp @@ -401,3 +401,5 @@ ParameterList QRenderPass::parameters() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrenderpass.cpp" diff --git a/src/render/materialsystem/qshaderdata.cpp b/src/render/materialsystem/qshaderdata.cpp index 34aee02fb..1620b3578 100644 --- a/src/render/materialsystem/qshaderdata.cpp +++ b/src/render/materialsystem/qshaderdata.cpp @@ -134,3 +134,5 @@ bool QShaderData::event(QEvent *event) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qshaderdata.cpp" diff --git a/src/render/materialsystem/qshaderimage.cpp b/src/render/materialsystem/qshaderimage.cpp index d8bcb41ac..f34732a0d 100644 --- a/src/render/materialsystem/qshaderimage.cpp +++ b/src/render/materialsystem/qshaderimage.cpp @@ -974,3 +974,5 @@ void QShaderImage::setFormat(QShaderImage::ImageFormat format) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qshaderimage.cpp" diff --git a/src/render/materialsystem/qshaderprogram.cpp b/src/render/materialsystem/qshaderprogram.cpp index a43ddba9e..21c7303b6 100644 --- a/src/render/materialsystem/qshaderprogram.cpp +++ b/src/render/materialsystem/qshaderprogram.cpp @@ -974,3 +974,5 @@ QByteArray QShaderProgram::loadSource(const QUrl &sourceUrl) } // of namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qshaderprogram.cpp" diff --git a/src/render/materialsystem/qshaderprogrambuilder.cpp b/src/render/materialsystem/qshaderprogrambuilder.cpp index ed08af56f..75827df36 100644 --- a/src/render/materialsystem/qshaderprogrambuilder.cpp +++ b/src/render/materialsystem/qshaderprogrambuilder.cpp @@ -493,3 +493,5 @@ QByteArray QShaderProgramBuilder::computeShaderCode() const } // of namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qshaderprogrambuilder.cpp" diff --git a/src/render/picking/pickeventfilter.cpp b/src/render/picking/pickeventfilter.cpp index a41ed6c1e..7c87ba7bf 100644 --- a/src/render/picking/pickeventfilter.cpp +++ b/src/render/picking/pickeventfilter.cpp @@ -96,3 +96,5 @@ bool PickEventFilter::eventFilter(QObject *obj, QEvent *e) } // Qt3DRender QT_END_NAMESPACE + +#include "moc_pickeventfilter_p.cpp" diff --git a/src/render/picking/qabstractraycaster.cpp b/src/render/picking/qabstractraycaster.cpp index 473a0d3e3..568ba59ff 100644 --- a/src/render/picking/qabstractraycaster.cpp +++ b/src/render/picking/qabstractraycaster.cpp @@ -386,3 +386,5 @@ QList<QLayer *> QAbstractRayCaster::layers() const } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qabstractraycaster.cpp" diff --git a/src/render/picking/qobjectpicker.cpp b/src/render/picking/qobjectpicker.cpp index 498b0d97a..8f00d2c4d 100644 --- a/src/render/picking/qobjectpicker.cpp +++ b/src/render/picking/qobjectpicker.cpp @@ -124,14 +124,6 @@ namespace Qt3DRender { */ /*! - \qmlsignal Qt3D.Render::ObjectPicker::clicked(PickEvent pick) - - This signal is emitted when the bounding volume defined by the pickAttribute - property intersects with a ray on a mouse click the PickEvent \a pick contains - details of the event. -*/ - -/*! \qmlsignal Qt3D.Render::ObjectPicker::pressed(PickEvent pick) This signal is emitted when the bounding volume defined by the @@ -476,3 +468,5 @@ void QObjectPickerPrivate::releasedEvent(QPickEvent *event) } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qobjectpicker.cpp" diff --git a/src/render/picking/qpickevent.cpp b/src/render/picking/qpickevent.cpp index ae5748082..180925faf 100644 --- a/src/render/picking/qpickevent.cpp +++ b/src/render/picking/qpickevent.cpp @@ -353,3 +353,5 @@ Qt3DCore::QEntity *QPickEvent::entity() const QT_END_NAMESPACE +#include "moc_qpickevent.cpp" + diff --git a/src/render/picking/qpicklineevent.cpp b/src/render/picking/qpicklineevent.cpp index a079fb557..50b8e7803 100644 --- a/src/render/picking/qpicklineevent.cpp +++ b/src/render/picking/qpicklineevent.cpp @@ -171,3 +171,5 @@ uint QPickLineEvent::vertex2Index() const QT_END_NAMESPACE +#include "moc_qpicklineevent.cpp" + diff --git a/src/render/picking/qpickpointevent.cpp b/src/render/picking/qpickpointevent.cpp index 2e035d3f2..76680ff92 100644 --- a/src/render/picking/qpickpointevent.cpp +++ b/src/render/picking/qpickpointevent.cpp @@ -129,3 +129,5 @@ uint QPickPointEvent::pointIndex() const QT_END_NAMESPACE +#include "moc_qpickpointevent.cpp" + diff --git a/src/render/picking/qpicktriangleevent.cpp b/src/render/picking/qpicktriangleevent.cpp index b33c7c0dd..e5ae699b6 100644 --- a/src/render/picking/qpicktriangleevent.cpp +++ b/src/render/picking/qpicktriangleevent.cpp @@ -273,3 +273,5 @@ QVector3D QPickTriangleEvent::uvw() const QT_END_NAMESPACE +#include "moc_qpicktriangleevent.cpp" + diff --git a/src/render/picking/qraycaster.cpp b/src/render/picking/qraycaster.cpp index 1f418b4c8..c31a8f1b6 100644 --- a/src/render/picking/qraycaster.cpp +++ b/src/render/picking/qraycaster.cpp @@ -216,3 +216,5 @@ QAbstractRayCaster::Hits QRayCaster::pick(const QVector3D &origin, const QVector } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qraycaster.cpp" diff --git a/src/render/picking/qraycasterhit.cpp b/src/render/picking/qraycasterhit.cpp index 1a253dfb5..a1a6faad3 100644 --- a/src/render/picking/qraycasterhit.cpp +++ b/src/render/picking/qraycasterhit.cpp @@ -267,3 +267,5 @@ void QRayCasterHit::setEntity(Qt3DCore::QEntity *entity) const } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qraycasterhit.cpp" diff --git a/src/render/picking/qscreenraycaster.cpp b/src/render/picking/qscreenraycaster.cpp index a8535187f..cfd4ed400 100644 --- a/src/render/picking/qscreenraycaster.cpp +++ b/src/render/picking/qscreenraycaster.cpp @@ -151,3 +151,5 @@ QAbstractRayCaster::Hits QScreenRayCaster::pick(const QPoint &position) } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qscreenraycaster.cpp" diff --git a/src/render/qrendererplugin.cpp b/src/render/qrendererplugin.cpp index edd4b1bf0..a267ff8f3 100644 --- a/src/render/qrendererplugin.cpp +++ b/src/render/qrendererplugin.cpp @@ -65,3 +65,5 @@ AbstractRenderer *QRendererPlugin::create(const QString &key) } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qrendererplugin_p.cpp" diff --git a/src/render/raycasting/qabstractcollisionqueryservice.cpp b/src/render/raycasting/qabstractcollisionqueryservice.cpp index 5148df911..852c11794 100644 --- a/src/render/raycasting/qabstractcollisionqueryservice.cpp +++ b/src/render/raycasting/qabstractcollisionqueryservice.cpp @@ -72,3 +72,5 @@ void QAbstractCollisionQueryService::addEntityHit(QCollisionQueryResult &result, } // Qt3DRender QT_END_NAMESPACE + +#include "moc_qabstractcollisionqueryservice_p.cpp" diff --git a/src/render/renderstates/qalphacoverage.cpp b/src/render/renderstates/qalphacoverage.cpp index 785e79057..6b372860f 100644 --- a/src/render/renderstates/qalphacoverage.cpp +++ b/src/render/renderstates/qalphacoverage.cpp @@ -161,3 +161,5 @@ QAlphaCoverage::~QAlphaCoverage() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qalphacoverage.cpp" diff --git a/src/render/renderstates/qalphatest.cpp b/src/render/renderstates/qalphatest.cpp index ebc455111..111e8addf 100644 --- a/src/render/renderstates/qalphatest.cpp +++ b/src/render/renderstates/qalphatest.cpp @@ -162,3 +162,5 @@ void QAlphaTest::setReferenceValue(float referenceValue) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qalphatest.cpp" diff --git a/src/render/renderstates/qblendequation.cpp b/src/render/renderstates/qblendequation.cpp index de7cb4a25..af0d7d37f 100644 --- a/src/render/renderstates/qblendequation.cpp +++ b/src/render/renderstates/qblendequation.cpp @@ -124,3 +124,5 @@ void QBlendEquation::setBlendFunction(QBlendEquation::BlendFunction blendFunctio } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qblendequation.cpp" diff --git a/src/render/renderstates/qblendequationarguments.cpp b/src/render/renderstates/qblendequationarguments.cpp index 0e8b5d9aa..8a4ce8262 100644 --- a/src/render/renderstates/qblendequationarguments.cpp +++ b/src/render/renderstates/qblendequationarguments.cpp @@ -206,7 +206,7 @@ void QBlendEquationArguments::setSourceAlpha(QBlendEquationArguments::Blending s } /*! - \qmlproperty enumeration BlendEquationArguments::DestinationAlpha + \qmlproperty enumeration BlendEquationArguments::destinationAlpha */ @@ -293,3 +293,5 @@ void QBlendEquationArguments::setBufferIndex(int bufferIndex) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qblendequationarguments.cpp" diff --git a/src/render/renderstates/qclipplane.cpp b/src/render/renderstates/qclipplane.cpp index 0771e01d5..b1bd7d765 100644 --- a/src/render/renderstates/qclipplane.cpp +++ b/src/render/renderstates/qclipplane.cpp @@ -166,3 +166,5 @@ void QClipPlane::setDistance(float distance) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qclipplane.cpp" diff --git a/src/render/renderstates/qcolormask.cpp b/src/render/renderstates/qcolormask.cpp index 0e1711671..f1f724b90 100644 --- a/src/render/renderstates/qcolormask.cpp +++ b/src/render/renderstates/qcolormask.cpp @@ -186,3 +186,5 @@ void QColorMask::setAlphaMasked(bool alphaMasked) QT_END_NAMESPACE +#include "moc_qcolormask.cpp" + diff --git a/src/render/renderstates/qcullface.cpp b/src/render/renderstates/qcullface.cpp index b5138e53a..e903af8a3 100644 --- a/src/render/renderstates/qcullface.cpp +++ b/src/render/renderstates/qcullface.cpp @@ -192,3 +192,5 @@ void QCullFace::setMode(QCullFace::CullingMode mode) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qcullface.cpp" diff --git a/src/render/renderstates/qdepthrange.cpp b/src/render/renderstates/qdepthrange.cpp index e2f1c5473..be4647e8b 100644 --- a/src/render/renderstates/qdepthrange.cpp +++ b/src/render/renderstates/qdepthrange.cpp @@ -143,3 +143,5 @@ void QDepthRange::setFarValue(double value) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qdepthrange.cpp" diff --git a/src/render/renderstates/qdepthtest.cpp b/src/render/renderstates/qdepthtest.cpp index 16b7ad588..4e1cac358 100644 --- a/src/render/renderstates/qdepthtest.cpp +++ b/src/render/renderstates/qdepthtest.cpp @@ -148,3 +148,5 @@ void QDepthTest::setDepthFunction(QDepthTest::DepthFunction depthFunction) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qdepthtest.cpp" diff --git a/src/render/renderstates/qdithering.cpp b/src/render/renderstates/qdithering.cpp index a449be508..409e3c9c3 100644 --- a/src/render/renderstates/qdithering.cpp +++ b/src/render/renderstates/qdithering.cpp @@ -99,3 +99,5 @@ QDithering::~QDithering() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qdithering.cpp" diff --git a/src/render/renderstates/qfrontface.cpp b/src/render/renderstates/qfrontface.cpp index b13f901d9..b913e7b1f 100644 --- a/src/render/renderstates/qfrontface.cpp +++ b/src/render/renderstates/qfrontface.cpp @@ -121,3 +121,5 @@ void QFrontFace::setDirection(QFrontFace::WindingDirection direction) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qfrontface.cpp" diff --git a/src/render/renderstates/qlinewidth.cpp b/src/render/renderstates/qlinewidth.cpp index abda5ef62..95ad63914 100644 --- a/src/render/renderstates/qlinewidth.cpp +++ b/src/render/renderstates/qlinewidth.cpp @@ -111,3 +111,5 @@ void QLineWidth::setSmooth(bool enabled) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qlinewidth.cpp" diff --git a/src/render/renderstates/qmultisampleantialiasing.cpp b/src/render/renderstates/qmultisampleantialiasing.cpp index 249dcd4bd..303474fbb 100644 --- a/src/render/renderstates/qmultisampleantialiasing.cpp +++ b/src/render/renderstates/qmultisampleantialiasing.cpp @@ -203,3 +203,5 @@ QMultiSampleAntiAliasing::~QMultiSampleAntiAliasing() QT_END_NAMESPACE +#include "moc_qmultisampleantialiasing.cpp" + diff --git a/src/render/renderstates/qnodepthmask.cpp b/src/render/renderstates/qnodepthmask.cpp index 241751a26..bd1af22f0 100644 --- a/src/render/renderstates/qnodepthmask.cpp +++ b/src/render/renderstates/qnodepthmask.cpp @@ -100,3 +100,5 @@ QNoDepthMask::~QNoDepthMask() } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qnodepthmask.cpp" diff --git a/src/render/renderstates/qpointsize.cpp b/src/render/renderstates/qpointsize.cpp index 7e085c723..1fee39c24 100644 --- a/src/render/renderstates/qpointsize.cpp +++ b/src/render/renderstates/qpointsize.cpp @@ -140,3 +140,5 @@ void QPointSize::setValue(float size) QT_END_NAMESPACE +#include "moc_qpointsize.cpp" + diff --git a/src/render/renderstates/qpolygonoffset.cpp b/src/render/renderstates/qpolygonoffset.cpp index d310c9c01..4b06b4846 100644 --- a/src/render/renderstates/qpolygonoffset.cpp +++ b/src/render/renderstates/qpolygonoffset.cpp @@ -141,3 +141,5 @@ void QPolygonOffset::setDepthSteps(float depthSteps) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qpolygonoffset.cpp" diff --git a/src/render/renderstates/qrastermode.cpp b/src/render/renderstates/qrastermode.cpp index 2ac14470c..b34ac7096 100644 --- a/src/render/renderstates/qrastermode.cpp +++ b/src/render/renderstates/qrastermode.cpp @@ -182,3 +182,5 @@ void QRasterMode::setFaceMode(QRasterMode::FaceMode faceMode) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrastermode.cpp" diff --git a/src/render/renderstates/qrenderstate.cpp b/src/render/renderstates/qrenderstate.cpp index c23c45319..23e887823 100644 --- a/src/render/renderstates/qrenderstate.cpp +++ b/src/render/renderstates/qrenderstate.cpp @@ -107,3 +107,5 @@ QRenderState::QRenderState(QRenderStatePrivate &dd, QNode *parent) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qrenderstate.cpp" diff --git a/src/render/renderstates/qscissortest.cpp b/src/render/renderstates/qscissortest.cpp index ee12d0c71..a8364838a 100644 --- a/src/render/renderstates/qscissortest.cpp +++ b/src/render/renderstates/qscissortest.cpp @@ -190,3 +190,5 @@ void QScissorTest::setHeight(int height) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qscissortest.cpp" diff --git a/src/render/renderstates/qseamlesscubemap.cpp b/src/render/renderstates/qseamlesscubemap.cpp index 8458aded8..b05e4b9ca 100644 --- a/src/render/renderstates/qseamlesscubemap.cpp +++ b/src/render/renderstates/qseamlesscubemap.cpp @@ -97,3 +97,5 @@ QSeamlessCubemap::~QSeamlessCubemap() QT_END_NAMESPACE +#include "moc_qseamlesscubemap.cpp" + diff --git a/src/render/renderstates/qstencilmask.cpp b/src/render/renderstates/qstencilmask.cpp index 9e664ebe2..c1c716920 100644 --- a/src/render/renderstates/qstencilmask.cpp +++ b/src/render/renderstates/qstencilmask.cpp @@ -144,3 +144,5 @@ uint QStencilMask::backOutputMask() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qstencilmask.cpp" diff --git a/src/render/renderstates/qstenciloperation.cpp b/src/render/renderstates/qstenciloperation.cpp index 720de88a9..5405a88aa 100644 --- a/src/render/renderstates/qstenciloperation.cpp +++ b/src/render/renderstates/qstenciloperation.cpp @@ -152,3 +152,5 @@ QStencilOperationArguments *QStencilOperation::back() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qstenciloperation.cpp" diff --git a/src/render/renderstates/qstenciloperationarguments.cpp b/src/render/renderstates/qstenciloperationarguments.cpp index d062203f5..d477f2bac 100644 --- a/src/render/renderstates/qstenciloperationarguments.cpp +++ b/src/render/renderstates/qstenciloperationarguments.cpp @@ -229,3 +229,5 @@ QStencilOperationArguments::Operation QStencilOperationArguments::allTestsPassOp } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qstenciloperationarguments.cpp" diff --git a/src/render/renderstates/qstenciltest.cpp b/src/render/renderstates/qstenciltest.cpp index 200d4461c..f680b5b11 100644 --- a/src/render/renderstates/qstenciltest.cpp +++ b/src/render/renderstates/qstenciltest.cpp @@ -153,3 +153,5 @@ QStencilTestArguments *QStencilTest::back() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qstenciltest.cpp" diff --git a/src/render/renderstates/qstenciltestarguments.cpp b/src/render/renderstates/qstenciltestarguments.cpp index dc8ff7292..9aeb0c5ac 100644 --- a/src/render/renderstates/qstenciltestarguments.cpp +++ b/src/render/renderstates/qstenciltestarguments.cpp @@ -217,3 +217,5 @@ QStencilTestArguments::StencilFaceMode QStencilTestArguments::faceMode() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qstenciltestarguments.cpp" diff --git a/src/render/shadergraph/qshaderlanguage.cpp b/src/render/shadergraph/qshaderlanguage.cpp index 1630e3de8..25c19cb18 100644 --- a/src/render/shadergraph/qshaderlanguage.cpp +++ b/src/render/shadergraph/qshaderlanguage.cpp @@ -55,3 +55,5 @@ void qt_register_ShaderLanguage_enums() } QT_END_NAMESPACE + +#include "moc_qshaderlanguage_p.cpp" diff --git a/src/render/shadergraph/qshadernodesloader.cpp b/src/render/shadergraph/qshadernodesloader.cpp index e20e4e3bc..6df9f1b69 100644 --- a/src/render/shadergraph/qshadernodesloader.cpp +++ b/src/render/shadergraph/qshadernodesloader.cpp @@ -280,7 +280,13 @@ void QShaderNodesLoader::load(const QJsonObject &prototypesObject) const QByteArray substitution = substitutionValue.toString().toUtf8(); - const QJsonValue snippetsValue = ruleObject.value(QStringLiteral("headerSnippets")); + // WA for QTBUG-99019 + const auto wIt = (format.shaderType() == QShaderFormat::Fragment) + ? ruleObject.constFind(QStringLiteral("headerSnippetsFrag")) + : ruleObject.constEnd(); + const QJsonValue snippetsValue = (wIt != ruleObject.constEnd()) + ? *wIt + : ruleObject.value(QStringLiteral("headerSnippets")); const QJsonArray snippetsArray = snippetsValue.toArray(); auto snippets = QByteArrayList(); std::transform(snippetsArray.constBegin(), snippetsArray.constEnd(), diff --git a/src/render/texture/qabstracttexture.cpp b/src/render/texture/qabstracttexture.cpp index 506627105..98e6a3db4 100644 --- a/src/render/texture/qabstracttexture.cpp +++ b/src/render/texture/qabstracttexture.cpp @@ -1125,3 +1125,5 @@ void QAbstractTexture::updateData(const QTextureDataUpdate &update) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qabstracttexture.cpp" diff --git a/src/render/texture/qabstracttextureimage.cpp b/src/render/texture/qabstracttextureimage.cpp index 2d41af8e2..97b60566d 100644 --- a/src/render/texture/qabstracttextureimage.cpp +++ b/src/render/texture/qabstracttextureimage.cpp @@ -274,3 +274,5 @@ QAbstractTextureImage::QAbstractTextureImage(QAbstractTextureImagePrivate &dd, Q } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qabstracttextureimage.cpp" diff --git a/src/render/texture/qpaintedtextureimage.cpp b/src/render/texture/qpaintedtextureimage.cpp index a741205af..147f6c4c4 100644 --- a/src/render/texture/qpaintedtextureimage.cpp +++ b/src/render/texture/qpaintedtextureimage.cpp @@ -264,3 +264,5 @@ bool QPaintedTextureImageDataGenerator::operator ==(const QTextureImageDataGener QT_END_NAMESPACE +#include "moc_qpaintedtextureimage.cpp" + diff --git a/src/render/texture/qtexture.cpp b/src/render/texture/qtexture.cpp index 10e6c327e..b91398168 100644 --- a/src/render/texture/qtexture.cpp +++ b/src/render/texture/qtexture.cpp @@ -1514,8 +1514,8 @@ QTextureLoader::QTextureLoader(QNode *parent) // Regenerate the texture functor when properties we support overriding // from QAbstractTexture get changed. - Q_D(QTextureLoader); - auto regenerate = [=] () { + auto regenerate = [this] () { + Q_D(QTextureLoader); if (!notificationsBlocked()) // check the change doesn't come from the backend d->updateGenerator(); }; @@ -1775,3 +1775,5 @@ void QSharedGLTexture::setTextureId(int id) } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qtexture.cpp" diff --git a/src/render/texture/qtexturedataupdate.h b/src/render/texture/qtexturedataupdate.h index f222fd6ec..69715888f 100644 --- a/src/render/texture/qtexturedataupdate.h +++ b/src/render/texture/qtexturedataupdate.h @@ -65,7 +65,7 @@ public: { swap(other); return *this; } ~QTextureDataUpdate(); - void swap(QTextureDataUpdate &other) noexcept { qSwap(d_ptr, other.d_ptr); } + void swap(QTextureDataUpdate &other) noexcept { d_ptr.swap(other.d_ptr); } int x() const; int y() const; diff --git a/src/render/texture/qtextureimage.cpp b/src/render/texture/qtextureimage.cpp index c2d2308af..3f2f892e4 100644 --- a/src/render/texture/qtextureimage.cpp +++ b/src/render/texture/qtextureimage.cpp @@ -319,3 +319,5 @@ bool QImageTextureDataFunctor::isMirrored() const QT_END_NAMESPACE +#include "moc_qtextureimage.cpp" + diff --git a/src/render/texture/qtexturewrapmode.cpp b/src/render/texture/qtexturewrapmode.cpp index cb9272895..18a7f78a1 100644 --- a/src/render/texture/qtexturewrapmode.cpp +++ b/src/render/texture/qtexturewrapmode.cpp @@ -182,3 +182,5 @@ QTextureWrapMode::WrapMode QTextureWrapMode::z() const } // namespace Qt3DRender QT_END_NAMESPACE + +#include "moc_qtexturewrapmode.cpp" diff --git a/tests/auto/core/common/qbackendnodetester.cpp b/tests/auto/core/common/qbackendnodetester.cpp index 0f13b481f..fe752adba 100644 --- a/tests/auto/core/common/qbackendnodetester.cpp +++ b/tests/auto/core/common/qbackendnodetester.cpp @@ -58,3 +58,5 @@ void QBackendNodeTester::setPeerId(QBackendNode *backend, QNodeId id) } // namespace Qt3DCore QT_END_NAMESPACE + +#include "moc_qbackendnodetester.cpp" diff --git a/tests/auto/core/nodes/tst_nodes.cpp b/tests/auto/core/nodes/tst_nodes.cpp index 1edaf42ce..b5458e2e7 100644 --- a/tests/auto/core/nodes/tst_nodes.cpp +++ b/tests/auto/core/nodes/tst_nodes.cpp @@ -40,6 +40,7 @@ #include <Qt3DCore/private/qnode_p.h> #include <Qt3DCore/private/qcomponent_p.h> #include <Qt3DCore/private/vector_helper_p.h> +#include <QSet> #include <QSignalSpy> #include <testarbiter.h> #include <vector> diff --git a/tests/auto/core/qaspectjob/tst_qaspectjob.cpp b/tests/auto/core/qaspectjob/tst_qaspectjob.cpp index 43c511100..5f44b0b55 100644 --- a/tests/auto/core/qaspectjob/tst_qaspectjob.cpp +++ b/tests/auto/core/qaspectjob/tst_qaspectjob.cpp @@ -79,7 +79,7 @@ private Q_SLOTS: job1->removeDependency(job2); // THEN - QCOMPARE(job1->dependencies().size(), 1); + QCOMPARE(job1->dependencies().size(), 1U); QCOMPARE(job1->dependencies().at(0).lock(), job3); } @@ -98,7 +98,7 @@ private Q_SLOTS: job1->removeDependency(QWeakPointer<QAspectJob>()); // THEN - QCOMPARE(job1->dependencies().size(), 1); + QCOMPARE(job1->dependencies().size(), 1U); QCOMPARE(job1->dependencies().at(0).lock(), job3); } }; diff --git a/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp b/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp index 08da931fc..5904eaac9 100644 --- a/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp +++ b/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp @@ -89,7 +89,7 @@ void tst_qtext2dentity::checkChangeArbiter() auto atlases = lookupNodeByClassName(rootEntity.data(), "Qt3DExtras::QTextureAtlas"); QVERIFY(atlases.length() == 1); auto atlas = atlases[0]; - QTRY_VERIFY(Qt3DCore::QNodePrivate::get(atlas)->m_changeArbiter); + QVERIFY(Qt3DCore::QNodePrivate::get(atlas)->m_changeArbiter); } QTEST_MAIN(tst_qtext2dentity) diff --git a/tests/auto/input/abstractaxisinput/CMakeLists.txt b/tests/auto/input/abstractaxisinput/CMakeLists.txt index 10dc60834..7d8bf5518 100644 --- a/tests/auto/input/abstractaxisinput/CMakeLists.txt +++ b/tests/auto/input/abstractaxisinput/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_abstractaxisinput SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_abstractaxisinput.cpp INCLUDE_DIRECTORIES @@ -30,5 +31,5 @@ qt_internal_add_test(tst_abstractaxisinput qt_internal_extend_target(tst_abstractaxisinput CONDITION QT_FEATURE_private_tests SOURCES ../../core/common/qbackendnodetester.cpp ../../core/common/qbackendnodetester.h - ../../core/common/testarbiter.h + ../../core/common/testarbiter.h ../commons/testdevice.cpp ) diff --git a/tests/auto/input/actioninput/CMakeLists.txt b/tests/auto/input/actioninput/CMakeLists.txt index f9564e2ac..aef9c7df4 100644 --- a/tests/auto/input/actioninput/CMakeLists.txt +++ b/tests/auto/input/actioninput/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_actioninput SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_actioninput.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/analogaxisinput/CMakeLists.txt b/tests/auto/input/analogaxisinput/CMakeLists.txt index 72cbbf68c..70645da56 100644 --- a/tests/auto/input/analogaxisinput/CMakeLists.txt +++ b/tests/auto/input/analogaxisinput/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_analogaxisinput SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_analogaxisinput.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/buttonaxisinput/CMakeLists.txt b/tests/auto/input/buttonaxisinput/CMakeLists.txt index 3329ff12c..6529b75b6 100644 --- a/tests/auto/input/buttonaxisinput/CMakeLists.txt +++ b/tests/auto/input/buttonaxisinput/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_buttonaxisinput SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_buttonaxisinput.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/commons/testdevice.cpp b/tests/auto/input/commons/testdevice.cpp new file mode 100644 index 000000000..898766fe7 --- /dev/null +++ b/tests/auto/input/commons/testdevice.cpp @@ -0,0 +1,30 @@ +/**************************************************************************** +** +** Copyright (C) 2022 Klaralvdalens Datakonsult AB (KDAB). +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "moc_testdevice.cpp" +#include "moc_testdeviceproxy.cpp" diff --git a/tests/auto/input/inputchord/CMakeLists.txt b/tests/auto/input/inputchord/CMakeLists.txt index 49257f421..aeca88132 100644 --- a/tests/auto/input/inputchord/CMakeLists.txt +++ b/tests/auto/input/inputchord/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_inputchord SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_inputchord.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/inputsequence/CMakeLists.txt b/tests/auto/input/inputsequence/CMakeLists.txt index b0faec313..6e58f758b 100644 --- a/tests/auto/input/inputsequence/CMakeLists.txt +++ b/tests/auto/input/inputsequence/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_inputsequence SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_inputsequence.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/keyboardhandler/CMakeLists.txt b/tests/auto/input/keyboardhandler/CMakeLists.txt index 8726bd533..146177c86 100644 --- a/tests/auto/input/keyboardhandler/CMakeLists.txt +++ b/tests/auto/input/keyboardhandler/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_keyboardhandler SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_keyboardhandler.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/loadproxydevicejob/CMakeLists.txt b/tests/auto/input/loadproxydevicejob/CMakeLists.txt index edb18d443..54c71fa26 100644 --- a/tests/auto/input/loadproxydevicejob/CMakeLists.txt +++ b/tests/auto/input/loadproxydevicejob/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_loadproxydevicejob SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_loadproxydevicejob.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/physicaldeviceproxy/CMakeLists.txt b/tests/auto/input/physicaldeviceproxy/CMakeLists.txt index 263e6ef4b..0598f3045 100644 --- a/tests/auto/input/physicaldeviceproxy/CMakeLists.txt +++ b/tests/auto/input/physicaldeviceproxy/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_physicaldeviceproxy SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_physicaldeviceproxy.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qabstractaxisinput/CMakeLists.txt b/tests/auto/input/qabstractaxisinput/CMakeLists.txt index 28d7f53b2..30e354690 100644 --- a/tests/auto/input/qabstractaxisinput/CMakeLists.txt +++ b/tests/auto/input/qabstractaxisinput/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qabstractaxisinput SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qabstractaxisinput.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qabstractphysicaldevicebackendnode/CMakeLists.txt b/tests/auto/input/qabstractphysicaldevicebackendnode/CMakeLists.txt index 2d42dd1f7..205c9c415 100644 --- a/tests/auto/input/qabstractphysicaldevicebackendnode/CMakeLists.txt +++ b/tests/auto/input/qabstractphysicaldevicebackendnode/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qabstractphysicaldevicebackendnode SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qabstractphysicaldevicebackendnode.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qabstractphysicaldeviceproxy/CMakeLists.txt b/tests/auto/input/qabstractphysicaldeviceproxy/CMakeLists.txt index e1d6aac23..33ebd9fb8 100644 --- a/tests/auto/input/qabstractphysicaldeviceproxy/CMakeLists.txt +++ b/tests/auto/input/qabstractphysicaldeviceproxy/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qabstractphysicaldeviceproxy SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qabstractphysicaldeviceproxy.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qaction/CMakeLists.txt b/tests/auto/input/qaction/CMakeLists.txt index 724ef0b7a..1a16130c8 100644 --- a/tests/auto/input/qaction/CMakeLists.txt +++ b/tests/auto/input/qaction/CMakeLists.txt @@ -9,6 +9,7 @@ qt_internal_add_test(tst_qt3d_qaction # special case end SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qaction.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qactioninput/CMakeLists.txt b/tests/auto/input/qactioninput/CMakeLists.txt index 186b30b49..8fb91057d 100644 --- a/tests/auto/input/qactioninput/CMakeLists.txt +++ b/tests/auto/input/qactioninput/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qactioninput SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qactioninput.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qanalogaxisinput/CMakeLists.txt b/tests/auto/input/qanalogaxisinput/CMakeLists.txt index 147ff97c3..a4c66c558 100644 --- a/tests/auto/input/qanalogaxisinput/CMakeLists.txt +++ b/tests/auto/input/qanalogaxisinput/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qanalogaxisinput SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qanalogaxisinput.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qaxisaccumulator/CMakeLists.txt b/tests/auto/input/qaxisaccumulator/CMakeLists.txt index 86337c38e..a26215f93 100644 --- a/tests/auto/input/qaxisaccumulator/CMakeLists.txt +++ b/tests/auto/input/qaxisaccumulator/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qaxisaccumulator SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qaxisaccumulator.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qbuttonaxisinput/CMakeLists.txt b/tests/auto/input/qbuttonaxisinput/CMakeLists.txt index 36698b66a..0a0b1729a 100644 --- a/tests/auto/input/qbuttonaxisinput/CMakeLists.txt +++ b/tests/auto/input/qbuttonaxisinput/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qbuttonaxisinput SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qbuttonaxisinput.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qkeyboardhandler/CMakeLists.txt b/tests/auto/input/qkeyboardhandler/CMakeLists.txt index 452292249..6285d9af0 100644 --- a/tests/auto/input/qkeyboardhandler/CMakeLists.txt +++ b/tests/auto/input/qkeyboardhandler/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qkeyboardhandler SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qkeyboardhandler.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qmousedevice/CMakeLists.txt b/tests/auto/input/qmousedevice/CMakeLists.txt index 62e3247ec..a8f4ed6b6 100644 --- a/tests/auto/input/qmousedevice/CMakeLists.txt +++ b/tests/auto/input/qmousedevice/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_qmousedevice SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qmousedevice.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/qmouseevent/CMakeLists.txt b/tests/auto/input/qmouseevent/CMakeLists.txt index 8a2e0bb8b..39698ade4 100644 --- a/tests/auto/input/qmouseevent/CMakeLists.txt +++ b/tests/auto/input/qmouseevent/CMakeLists.txt @@ -9,6 +9,7 @@ qt_internal_add_test(tst_qt3d_qmouseevent #special case end SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_qmouseevent.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/input/utils/CMakeLists.txt b/tests/auto/input/utils/CMakeLists.txt index 0ff18ec4d..2576b2b88 100644 --- a/tests/auto/input/utils/CMakeLists.txt +++ b/tests/auto/input/utils/CMakeLists.txt @@ -7,6 +7,7 @@ qt_internal_add_test(tst_utils SOURCES ../commons/testdevice.h + ../commons/testdevice.cpp ../commons/testdeviceproxy.h tst_utils.cpp INCLUDE_DIRECTORIES diff --git a/tests/auto/quick3d/quick3dnodeinstantiator/data/createMultipleAsync.qml b/tests/auto/quick3d/quick3dnodeinstantiator/data/createMultipleAsync.qml new file mode 100644 index 000000000..be6c46582 --- /dev/null +++ b/tests/auto/quick3d/quick3dnodeinstantiator/data/createMultipleAsync.qml @@ -0,0 +1,13 @@ +import QtQml 2.1 +import Qt3D.Core 2.0 + +Entity { + NodeInstantiator { + model: 10 + asynchronous: true + delegate: Entity { + property bool success: true + property int idx: index + } + } +} diff --git a/tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp b/tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp index 0071a2aad..7240ae8a3 100644 --- a/tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp +++ b/tests/auto/quick3d/quick3dnodeinstantiator/tst_quick3dnodeinstantiator.cpp @@ -39,6 +39,7 @@ #include <QtQml/qqmlengine.h> #include <QtQml/qqmlcomponent.h> #include <QtQml/qqmlcontext.h> +#include <QtQml/qqmlincubator.h> using namespace Qt3DCore::Quick; @@ -55,6 +56,8 @@ private slots: void activeProperty(); void intModelChange(); void createAndRemove(); + void asynchronous_data(); + void asynchronous(); }; void tst_quick3dnodeinstantiator::createNone() @@ -250,6 +253,49 @@ void tst_quick3dnodeinstantiator::createAndRemove() QCOMPARE(object->property("datum").toString(), names[i]); } } + +void tst_quick3dnodeinstantiator::asynchronous_data() +{ + QTest::addColumn<bool>("asyncIncubator"); + QTest::addColumn<QString>("fileName"); + + QTest::newRow("Asynchronous Instantiator") << false << "createMultipleAsync.qml"; + QTest::newRow("Nested-asynchronous Instantiator") << true << "createMultiple.qml"; +} + +void tst_quick3dnodeinstantiator::asynchronous() +{ + QFETCH(bool, asyncIncubator); + QFETCH(QString, fileName); + + QQmlEngine engine; + QQmlIncubationController incubationController; + engine.setIncubationController(&incubationController); + QQmlComponent component(&engine, testFileUrl(fileName)); + QQmlIncubator incubator(asyncIncubator ? QQmlIncubator::Asynchronous : QQmlIncubator::Synchronous); + component.create(incubator); + while (!incubator.isReady()) + incubationController.incubateFor(10); + QObject *rootObject = incubator.object(); + QVERIFY(rootObject != nullptr); + while (incubationController.incubatingObjectCount() > 0) + incubationController.incubateFor(10); + Quick3DNodeInstantiator *instantiator = rootObject->findChild<Quick3DNodeInstantiator *>(); + QVERIFY(instantiator != nullptr); + QCOMPARE(instantiator->isActive(), true); + QCOMPARE(instantiator->count(), 10); + + for (int i=0; i<10; i++) { + QObject *object = instantiator->objectAt(i); + QVERIFY(object); + QCOMPARE(object->parent(), rootObject); + QCOMPARE(object->property("success").toBool(), true); + QCOMPARE(object->property("idx").toInt(), i); + } +} + + QTEST_MAIN(tst_quick3dnodeinstantiator) #include "tst_quick3dnodeinstantiator.moc" +#include "moc_stringmodel.cpp" diff --git a/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp b/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp index 3a4d5f021..3cc4b3822 100644 --- a/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp +++ b/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp @@ -248,7 +248,7 @@ private Q_SLOTS: // THEN -> empty if job ran properly const std::vector<Qt3DCore::QNodeId> dirtyTechniquesId = testAspect.nodeManagers()->techniqueManager()->takeDirtyTechniques(); - QCOMPARE(dirtyTechniquesId.size(), 0); + QCOMPARE(dirtyTechniquesId.size(), 0U); // Check at least one technique is valid bool foundValid = false; diff --git a/tests/auto/render/opengl/renderviews/tst_renderviews.cpp b/tests/auto/render/opengl/renderviews/tst_renderviews.cpp index 9d4765f8a..70d1305ac 100644 --- a/tests/auto/render/opengl/renderviews/tst_renderviews.cpp +++ b/tests/auto/render/opengl/renderviews/tst_renderviews.cpp @@ -294,6 +294,68 @@ private Q_SLOTS: << QList<ShaderParameterPack> { pack1, minifiedPack1, minifiedPack1, pack1, minifiedPack1, minifiedPack1 }; } + void checkShaderParameterPackStoresSingleUBOPerBlockIndex() + { + // GIVEN + ShaderParameterPack pack; + auto nodeId1 = Qt3DCore::QNodeId::createId(); + auto nodeId2 = Qt3DCore::QNodeId::createId(); + + BlockToUBO ubo1 { 1, nodeId1, false, {}}; + BlockToUBO ubo2 { 1, nodeId2, false, {}}; + + // WHEN + pack.setUniformBuffer(ubo1); + pack.setUniformBuffer(ubo2); + + // THEN + QCOMPARE(pack.uniformBuffers().size(), 1U); + QCOMPARE(pack.uniformBuffers().front().m_blockIndex, 1); + QCOMPARE(pack.uniformBuffers().front().m_bufferID, nodeId2); + + // WHEN + BlockToUBO ubo3 { 2, nodeId2, false, {}}; + pack.setUniformBuffer(ubo3); + + // THEN + QCOMPARE(pack.uniformBuffers().size(), 2U); + QCOMPARE(pack.uniformBuffers().front().m_blockIndex, 1); + QCOMPARE(pack.uniformBuffers().front().m_bufferID, nodeId2); + QCOMPARE(pack.uniformBuffers().back().m_blockIndex, 2); + QCOMPARE(pack.uniformBuffers().back().m_bufferID, nodeId2); + } + + void checkShaderParameterPackStoresSingleSSBOPerBlockIndex() + { + // GIVEN + ShaderParameterPack pack; + auto nodeId1 = Qt3DCore::QNodeId::createId(); + auto nodeId2 = Qt3DCore::QNodeId::createId(); + + BlockToSSBO ssbo1 { 1, 0, nodeId1}; + BlockToSSBO ssbo2 { 1, 0, nodeId2}; + + // WHEN + pack.setShaderStorageBuffer(ssbo1); + pack.setShaderStorageBuffer(ssbo2); + + // THEN + QCOMPARE(pack.shaderStorageBuffers().size(), 1U); + QCOMPARE(pack.shaderStorageBuffers().front().m_blockIndex, 1); + QCOMPARE(pack.shaderStorageBuffers().front().m_bufferID, nodeId2); + + // WHEN + BlockToSSBO ssbo3 { 2, 1, nodeId2}; + pack.setShaderStorageBuffer(ssbo3); + + // THEN + QCOMPARE(pack.shaderStorageBuffers().size(), 2U); + QCOMPARE(pack.shaderStorageBuffers().front().m_blockIndex, 1); + QCOMPARE(pack.shaderStorageBuffers().front().m_bufferID, nodeId2); + QCOMPARE(pack.shaderStorageBuffers().back().m_blockIndex, 2); + QCOMPARE(pack.shaderStorageBuffers().back().m_bufferID, nodeId2); + } + void checkRenderViewUniformMinification() { QFETCH(QList<QShaderProgram*>, shaders); diff --git a/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp b/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp index df0eab407..a9e1f4fc1 100644 --- a/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp +++ b/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp @@ -2258,7 +2258,7 @@ private Q_SLOTS: std::vector<Qt3DRender::Render::PickingUtils::ViewportCameraAreaDetails> results = gatherer.gather(test->frameGraphRoot()); // THEN - QCOMPARE(results.size(), 0); + QCOMPARE(results.size(), 0U); // WHEN Qt3DRender::Render::FrameGraphNode *backendFGNode = test->nodeManagers()->frameGraphManager()->lookupNode(noPicking->id()); @@ -2274,7 +2274,7 @@ private Q_SLOTS: results = gatherer.gather(test->frameGraphRoot()); // THEN - QCOMPARE(results.size(), 1); + QCOMPARE(results.size(), 1U); auto vca = results.front(); QCOMPARE(vca.area, QSize(600, 600)); QCOMPARE(vca.cameraId, camera->id()); diff --git a/tests/auto/render/qmlscenereader/qmlscenereader.cpp b/tests/auto/render/qmlscenereader/qmlscenereader.cpp index 182782edb..417a75880 100644 --- a/tests/auto/render/qmlscenereader/qmlscenereader.cpp +++ b/tests/auto/render/qmlscenereader/qmlscenereader.cpp @@ -82,3 +82,5 @@ void QmlSceneReader::loadComplete() } QT_END_NAMESPACE + +#include "moc_qmlscenereader.cpp" diff --git a/tests/auto/render/qmlscenereader/qmlscenereader.h b/tests/auto/render/qmlscenereader/qmlscenereader.h index 9d4643d93..75a74d03a 100644 --- a/tests/auto/render/qmlscenereader/qmlscenereader.h +++ b/tests/auto/render/qmlscenereader/qmlscenereader.h @@ -37,6 +37,9 @@ ** ****************************************************************************/ +#ifndef QMLSCENEREADER_H +#define QMLSCENEREADER_H + #include <QObject> QT_BEGIN_NAMESPACE @@ -61,3 +64,5 @@ private: }; QT_END_NAMESPACE + +#endif diff --git a/tests/auto/render/raycasting/tst_raycasting.cpp b/tests/auto/render/raycasting/tst_raycasting.cpp index 22e516c44..8f20d32b4 100644 --- a/tests/auto/render/raycasting/tst_raycasting.cpp +++ b/tests/auto/render/raycasting/tst_raycasting.cpp @@ -141,6 +141,8 @@ void tst_RayCasting::shouldReturnValidHandle() void tst_RayCasting::shouldReturnResultForEachHandle() { + QSKIP("Test hangs due to changes in underlying qt configuration - See QTBUG-103881"); + // GIVEN QRay3D ray; QList<QBoundingVolume *> volumes; @@ -166,6 +168,8 @@ void tst_RayCasting::shouldReturnResultForEachHandle() void tst_RayCasting::shouldReturnAllResults() { + QSKIP("Test hangs due to changes in underlying qt configuration - See QTBUG-103881"); + // GIVEN QRay3D ray; QList<QBoundingVolume *> volumes; diff --git a/tests/auto/render/scene2d/tst_scene2d.cpp b/tests/auto/render/scene2d/tst_scene2d.cpp index 53075c692..a71d2f54a 100644 --- a/tests/auto/render/scene2d/tst_scene2d.cpp +++ b/tests/auto/render/scene2d/tst_scene2d.cpp @@ -123,6 +123,8 @@ private Q_SLOTS: void checkInitializeFromPeer() { + QSKIP("Skipped as crashing since 6.4.0"); + // GIVEN Qt3DRender::Quick::QScene2D frontend; TestRenderer renderer; @@ -158,6 +160,7 @@ private Q_SLOTS: void checkSceneChangeEvents() { + QSKIP("Skipped as crashing since 6.4.0"); // GIVEN Qt3DRender::Quick::QScene2D frontend; QScopedPointer<Scene2D> backendScene2d(new Scene2D()); @@ -207,6 +210,7 @@ private Q_SLOTS: void testCoordinateCalculation() { + QSKIP("Skipped as crashing since 6.4.0"); // GIVEN qputenv("QT3D_SCENE2D_DISABLE_RENDERING", "1"); diff --git a/tests/auto/shared/util.cpp b/tests/auto/shared/util.cpp index 55041eeb4..d4a19164a 100644 --- a/tests/auto/shared/util.cpp +++ b/tests/auto/shared/util.cpp @@ -123,3 +123,5 @@ QQmlTestMessageHandler::~QQmlTestMessageHandler() qInstallMessageHandler(m_oldHandler); QQmlTestMessageHandler::m_instance = 0; } + +#include "moc_util.cpp" |