summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-04-02 10:48:27 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-04-02 11:15:29 +0100
commitf7934f67f7ca833182ac288bdcb61e0141dfbd84 (patch)
tree09b410ecfc7c8f114e2f994796dc41edf636476a /src
parent3e664bf438d4a3ab9a5f1633f2db171632b777b8 (diff)
parentc64df4a307aff064433f57805561cb445c0e285f (diff)
Merge branch '5.8' into 5.9
Conflicts: src/core/jobs/qthreadpooler.cpp src/core/nodes/qcomponent.cpp src/core/qpostman.cpp src/core/qscene_p.h src/core/services/qservicelocator_p.h src/input/frontend/qinputaspect.cpp src/plugins/sceneparsers/assimp/assimpimporter.cpp src/plugins/sceneparsers/assimp/assimpimporter.h src/plugins/sceneparsers/gltf/gltfimporter.h src/plugins/sceneparsers/gltf/gltfio.cpp src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp src/quick3d/imports/render/qt3dquick3drenderplugin.cpp src/quick3d/quick3dextras/qt3dquickwindow.cpp Change-Id: I3566708c6f74a34959e7bb64b64e93647ca3f699
Diffstat (limited to 'src')
-rw-r--r--src/core/aspects/aspectcommanddebugger.cpp8
-rw-r--r--src/core/aspects/qabstractaspect.cpp16
-rw-r--r--src/core/aspects/qabstractaspect.h4
-rw-r--r--src/core/aspects/qabstractaspect_p.h15
-rw-r--r--src/core/aspects/qaspectengine.cpp31
-rw-r--r--src/core/aspects/qaspectengine.h5
-rw-r--r--src/core/aspects/qaspectengine_p.h5
-rw-r--r--src/core/aspects/qaspectfactory.cpp6
-rw-r--r--src/core/aspects/qaspectfactory_p.h4
-rw-r--r--src/core/aspects/qaspectmanager.cpp32
-rw-r--r--src/core/aspects/qaspectmanager_p.h11
-rw-r--r--src/core/aspects/qaspectthread.cpp5
-rw-r--r--src/core/aspects/qaspectthread_p.h4
-rw-r--r--src/core/changes/qcomponentaddedchange.cpp4
-rw-r--r--src/core/changes/qcomponentaddedchange_p.h5
-rw-r--r--src/core/changes/qcomponentremovedchange.cpp4
-rw-r--r--src/core/changes/qcomponentremovedchange_p.h5
-rw-r--r--src/core/changes/qdynamicpropertyupdatedchange_p.h3
-rw-r--r--src/core/changes/qnodecreatedchange.cpp2
-rw-r--r--src/core/changes/qnodecreatedchange.h3
-rw-r--r--src/core/changes/qnodecreatedchange_p.h5
-rw-r--r--src/core/changes/qnodedestroyedchange.h2
-rw-r--r--src/core/changes/qnodedestroyedchange_p.h3
-rw-r--r--src/core/changes/qpropertynodeaddedchange.cpp1
-rw-r--r--src/core/changes/qpropertynodeaddedchange_p.h3
-rw-r--r--src/core/changes/qpropertynoderemovedchange.cpp1
-rw-r--r--src/core/changes/qpropertynoderemovedchange_p.h3
-rw-r--r--src/core/changes/qpropertyupdatedchange_p.h5
-rw-r--r--src/core/changes/qpropertyupdatedchangebase_p.h2
-rw-r--r--src/core/changes/qpropertyvalueaddedchange_p.h5
-rw-r--r--src/core/changes/qpropertyvalueaddedchangebase.cpp1
-rw-r--r--src/core/changes/qpropertyvalueaddedchangebase_p.h2
-rw-r--r--src/core/changes/qpropertyvalueremovedchange.cpp1
-rw-r--r--src/core/changes/qpropertyvalueremovedchange_p.h5
-rw-r--r--src/core/changes/qpropertyvalueremovedchangebase.cpp1
-rw-r--r--src/core/changes/qpropertyvalueremovedchangebase_p.h2
-rw-r--r--src/core/changes/qscenechange.cpp1
-rw-r--r--src/core/changes/qscenechange.h4
-rw-r--r--src/core/changes/qscenechange_p.h5
-rw-r--r--src/core/changes/qstaticpropertyupdatedchangebase.cpp1
-rw-r--r--src/core/changes/qstaticpropertyupdatedchangebase_p.h2
-rw-r--r--src/core/changes/qstaticpropertyvalueaddedchangebase.cpp1
-rw-r--r--src/core/changes/qstaticpropertyvalueaddedchangebase_p.h2
-rw-r--r--src/core/changes/qstaticpropertyvalueremovedchangebase_p.h2
-rw-r--r--src/core/corelogging_p.h2
-rw-r--r--src/core/jobs/dependencyhandler.cpp4
-rw-r--r--src/core/jobs/dependencyhandler_p.h4
-rw-r--r--src/core/jobs/qabstractaspectjobmanager_p.h3
-rw-r--r--src/core/jobs/qaspectjob.cpp3
-rw-r--r--src/core/jobs/qaspectjob.h4
-rw-r--r--src/core/jobs/qaspectjob_p.h3
-rw-r--r--src/core/jobs/qaspectjobmanager.cpp17
-rw-r--r--src/core/jobs/qaspectjobmanager_p.h7
-rw-r--r--src/core/jobs/qaspectjobproviderinterface_p.h4
-rw-r--r--src/core/jobs/qthreadpooler.cpp14
-rw-r--r--src/core/jobs/qthreadpooler_p.h15
-rw-r--r--src/core/jobs/task.cpp11
-rw-r--r--src/core/jobs/task_p.h9
-rw-r--r--src/core/nodes/propertychangehandler_p.h11
-rw-r--r--src/core/nodes/qabstractnodefactory_p.h3
-rw-r--r--src/core/nodes/qbackendnode.cpp8
-rw-r--r--src/core/nodes/qbackendnode.h4
-rw-r--r--src/core/nodes/qbackendnode_p.h6
-rw-r--r--src/core/nodes/qcomponent.cpp8
-rw-r--r--src/core/nodes/qcomponent_p.h4
-rw-r--r--src/core/nodes/qdestructionidandtypecollector_p.h2
-rw-r--r--src/core/nodes/qentity.cpp13
-rw-r--r--src/core/nodes/qentity.h3
-rw-r--r--src/core/nodes/qentity_p.h3
-rw-r--r--src/core/nodes/qnode.cpp27
-rw-r--r--src/core/nodes/qnode.h6
-rw-r--r--src/core/nodes/qnode_p.h10
-rw-r--r--src/core/nodes/qnodecreatedchangegenerator.cpp1
-rw-r--r--src/core/nodes/qnodecreatedchangegenerator_p.h5
-rw-r--r--src/core/nodes/qnodeid.cpp2
-rw-r--r--src/core/nodes/qnodeid.h2
-rw-r--r--src/core/nodes/qnodevisitor_p.h4
-rw-r--r--src/core/qbackendnodefactory_p.h3
-rw-r--r--src/core/qchangearbiter.cpp19
-rw-r--r--src/core/qchangearbiter_p.h17
-rw-r--r--src/core/qobservableinterface_p.h3
-rw-r--r--src/core/qpostman.cpp7
-rw-r--r--src/core/qscene.cpp8
-rw-r--r--src/core/qscene_p.h8
-rw-r--r--src/core/qsceneobserverinterface_p.h3
-rw-r--r--src/core/qscheduler.cpp9
-rw-r--r--src/core/qscheduler_p.h2
-rw-r--r--src/core/qtickclock.cpp3
-rw-r--r--src/core/qtickclock_p.h3
-rw-r--r--src/core/resources/qboundedcircularbuffer_p.h10
-rw-r--r--src/core/resources/qcircularbuffer_p.h12
-rw-r--r--src/core/resources/qframeallocator_p.h7
-rw-r--r--src/core/resources/qhandlemanager_p.h6
-rw-r--r--src/core/resources/qresourcemanager_p.h15
-rw-r--r--src/core/services/nullservices_p.h5
-rw-r--r--src/core/services/qabstractframeadvanceservice_p.h3
-rw-r--r--src/core/services/qabstractframeadvanceservice_p_p.h1
-rw-r--r--src/core/services/qabstractserviceprovider_p.h2
-rw-r--r--src/core/services/qeventfilterservice.cpp10
-rw-r--r--src/core/services/qeventfilterservice_p.h1
-rw-r--r--src/core/services/qopenglinformationservice_p.h5
-rw-r--r--src/core/services/qopenglinformationservice_p_p.h1
-rw-r--r--src/core/services/qservicelocator.cpp12
-rw-r--r--src/core/services/qservicelocator_p.h4
-rw-r--r--src/core/services/qsysteminformationservice_p.h3
-rw-r--r--src/core/services/qsysteminformationservice_p_p.h1
-rw-r--r--src/core/services/qtickclockservice.cpp7
-rw-r--r--src/core/services/qtickclockservice_p.h2
-rw-r--r--src/core/transforms/qmath3d_p.h1
-rw-r--r--src/core/transforms/qtransform.cpp3
-rw-r--r--src/core/transforms/qtransform.h1
-rw-r--r--src/core/transforms/qtransform_p.h2
-rw-r--r--src/extras/defaults/qdiffusemapmaterial.cpp7
-rw-r--r--src/extras/defaults/qdiffusemapmaterial.h2
-rw-r--r--src/extras/defaults/qdiffusespecularmapmaterial.cpp7
-rw-r--r--src/extras/defaults/qdiffusespecularmapmaterial.h2
-rw-r--r--src/extras/defaults/qfirstpersoncameracontroller.cpp15
-rw-r--r--src/extras/defaults/qfirstpersoncameracontroller_p.h6
-rw-r--r--src/extras/defaults/qforwardrenderer.h5
-rw-r--r--src/extras/defaults/qgoochmaterial.cpp2
-rw-r--r--src/extras/defaults/qgoochmaterial.h2
-rw-r--r--src/extras/defaults/qnormaldiffusemapalphamaterial.cpp7
-rw-r--r--src/extras/defaults/qnormaldiffusemapalphamaterial_p.h2
-rw-r--r--src/extras/defaults/qnormaldiffusemapmaterial.cpp8
-rw-r--r--src/extras/defaults/qnormaldiffusemapmaterial.h2
-rw-r--r--src/extras/defaults/qnormaldiffusemapmaterial_p.h2
-rw-r--r--src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp7
-rw-r--r--src/extras/defaults/qnormaldiffusespecularmapmaterial.h2
-rw-r--r--src/extras/defaults/qorbitcameracontroller.cpp5
-rw-r--r--src/extras/defaults/qorbitcameracontroller.h2
-rw-r--r--src/extras/defaults/qorbitcameracontroller_p.h5
-rw-r--r--src/extras/defaults/qpervertexcolormaterial.cpp7
-rw-r--r--src/extras/defaults/qpervertexcolormaterial.h2
-rw-r--r--src/extras/defaults/qphongalphamaterial.cpp7
-rw-r--r--src/extras/defaults/qphongalphamaterial.h6
-rw-r--r--src/extras/defaults/qphongmaterial.cpp8
-rw-r--r--src/extras/defaults/qphongmaterial.h2
-rw-r--r--src/extras/defaults/qskyboxentity_p.h3
-rw-r--r--src/extras/defaults/qt3dwindow.cpp6
-rw-r--r--src/extras/defaults/qt3dwindow.h2
-rw-r--r--src/extras/geometries/qconegeometry.cpp4
-rw-r--r--src/extras/geometries/qconemesh.cpp6
-rw-r--r--src/extras/geometries/qcuboidgeometry.cpp3
-rw-r--r--src/extras/geometries/qcuboidgeometry.h2
-rw-r--r--src/extras/geometries/qcuboidgeometry_p.h3
-rw-r--r--src/extras/geometries/qcuboidmesh.cpp3
-rw-r--r--src/extras/geometries/qcuboidmesh.h2
-rw-r--r--src/extras/geometries/qcylindergeometry.cpp5
-rw-r--r--src/extras/geometries/qcylindermesh.cpp6
-rw-r--r--src/extras/geometries/qplanegeometry.cpp2
-rw-r--r--src/extras/geometries/qplanegeometry.h2
-rw-r--r--src/extras/geometries/qplanegeometry_p.h3
-rw-r--r--src/extras/geometries/qplanemesh.cpp3
-rw-r--r--src/extras/geometries/qplanemesh.h2
-rw-r--r--src/extras/geometries/qspheregeometry.cpp4
-rw-r--r--src/extras/geometries/qspheremesh.cpp3
-rw-r--r--src/extras/geometries/qtorusgeometry.cpp6
-rw-r--r--src/extras/geometries/qtorusmesh.cpp3
-rw-r--r--src/extras/shaders/es2/light.inc.frag256
-rw-r--r--src/input/backend/abstractaxisinput.cpp10
-rw-r--r--src/input/backend/action.cpp4
-rw-r--r--src/input/backend/actioninput.cpp4
-rw-r--r--src/input/backend/actioninput_p.h3
-rw-r--r--src/input/backend/analogaxisinput.cpp4
-rw-r--r--src/input/backend/assignkeyboardfocusjob.cpp11
-rw-r--r--src/input/backend/axis.cpp4
-rw-r--r--src/input/backend/axisaccumulator.cpp6
-rw-r--r--src/input/backend/axisaccumulator_p.h3
-rw-r--r--src/input/backend/axisaccumulatorjob.cpp1
-rw-r--r--src/input/backend/axisaccumulatorjob_p.h2
-rw-r--r--src/input/backend/axissetting.cpp4
-rw-r--r--src/input/backend/buttonaxisinput.cpp4
-rw-r--r--src/input/backend/eventsourcesetterhelper.cpp3
-rw-r--r--src/input/backend/eventsourcesetterhelper_p.h4
-rw-r--r--src/input/backend/genericdevicebackendnode.cpp7
-rw-r--r--src/input/backend/genericdevicebackendnode_p.h5
-rw-r--r--src/input/backend/inputchord.cpp6
-rw-r--r--src/input/backend/inputchord_p.h3
-rw-r--r--src/input/backend/inputhandler.cpp19
-rw-r--r--src/input/backend/inputhandler_p.h7
-rw-r--r--src/input/backend/inputmanagers_p.h5
-rw-r--r--src/input/backend/inputsequence.cpp12
-rw-r--r--src/input/backend/inputsequence_p.h3
-rw-r--r--src/input/backend/inputsettings.cpp4
-rw-r--r--src/input/backend/inputsettings_p.h2
-rw-r--r--src/input/backend/keyboarddevice.cpp8
-rw-r--r--src/input/backend/keyboarddevice_p.h5
-rw-r--r--src/input/backend/keyboardeventfilter.cpp8
-rw-r--r--src/input/backend/keyboardeventfilter_p.h2
-rw-r--r--src/input/backend/keyboardhandler.cpp12
-rw-r--r--src/input/backend/keyboardhandler_p.h2
-rw-r--r--src/input/backend/keyboardmousegenericdeviceintegration.cpp1
-rw-r--r--src/input/backend/keyeventdispatcherjob.cpp9
-rw-r--r--src/input/backend/keyeventdispatcherjob_p.h2
-rw-r--r--src/input/backend/loadproxydevicejob.cpp3
-rw-r--r--src/input/backend/logicaldevice.cpp12
-rw-r--r--src/input/backend/mousedevice.cpp11
-rw-r--r--src/input/backend/mousedevice_p.h3
-rw-r--r--src/input/backend/mouseeventdispatcherjob.cpp9
-rw-r--r--src/input/backend/mouseeventdispatcherjob_p.h2
-rw-r--r--src/input/backend/mouseeventfilter.cpp8
-rw-r--r--src/input/backend/mouseeventfilter_p.h2
-rw-r--r--src/input/backend/mousehandler.cpp9
-rw-r--r--src/input/backend/mousehandler_p.h2
-rw-r--r--src/input/backend/physicaldeviceproxy.cpp8
-rw-r--r--src/input/backend/qabstractphysicaldevicebackendnode.cpp16
-rw-r--r--src/input/backend/qabstractphysicaldevicebackendnode_p.h1
-rw-r--r--src/input/backend/qabstractphysicaldevicebackendnode_p_p.h7
-rw-r--r--src/input/backend/updateaxisactionjob.cpp1
-rw-r--r--src/input/backend/updateaxisactionjob_p.h1
-rw-r--r--src/input/frontend/qabstractactioninput.cpp1
-rw-r--r--src/input/frontend/qabstractactioninput_p.h3
-rw-r--r--src/input/frontend/qabstractaxisinput.cpp3
-rw-r--r--src/input/frontend/qabstractaxisinput.h2
-rw-r--r--src/input/frontend/qabstractaxisinput_p.h3
-rw-r--r--src/input/frontend/qabstractphysicaldevice.cpp4
-rw-r--r--src/input/frontend/qabstractphysicaldevice_p.h3
-rw-r--r--src/input/frontend/qabstractphysicaldeviceproxy.cpp2
-rw-r--r--src/input/frontend/qabstractphysicaldeviceproxy_p.h1
-rw-r--r--src/input/frontend/qaction.cpp6
-rw-r--r--src/input/frontend/qactioninput.cpp3
-rw-r--r--src/input/frontend/qactioninput.h2
-rw-r--r--src/input/frontend/qactioninput_p.h3
-rw-r--r--src/input/frontend/qanalogaxisinput.cpp1
-rw-r--r--src/input/frontend/qaxis.cpp1
-rw-r--r--src/input/frontend/qaxisaccumulator.cpp1
-rw-r--r--src/input/frontend/qaxisaccumulator_p.h3
-rw-r--r--src/input/frontend/qaxissetting.cpp1
-rw-r--r--src/input/frontend/qaxissetting.h3
-rw-r--r--src/input/frontend/qbuttonaxisinput.cpp1
-rw-r--r--src/input/frontend/qgamepadinput.cpp7
-rw-r--r--src/input/frontend/qgamepadinput_p.h1
-rw-r--r--src/input/frontend/qgenericinputdevice.cpp2
-rw-r--r--src/input/frontend/qgenericinputdevice_p.h1
-rw-r--r--src/input/frontend/qinputaspect.cpp76
-rw-r--r--src/input/frontend/qinputaspect_p.h2
-rw-r--r--src/input/frontend/qinputchord.cpp3
-rw-r--r--src/input/frontend/qinputchord.h2
-rw-r--r--src/input/frontend/qinputchord_p.h3
-rw-r--r--src/input/frontend/qinputdeviceintegration_p.h6
-rw-r--r--src/input/frontend/qinputdeviceintegration_p_p.h4
-rw-r--r--src/input/frontend/qinputdeviceintegrationfactory.cpp6
-rw-r--r--src/input/frontend/qinputdeviceplugin_p.h2
-rw-r--r--src/input/frontend/qinputsequence.cpp10
-rw-r--r--src/input/frontend/qinputsequence.h2
-rw-r--r--src/input/frontend/qinputsequence_p.h3
-rw-r--r--src/input/frontend/qinputsettings.cpp1
-rw-r--r--src/input/frontend/qinputsettings.h2
-rw-r--r--src/input/frontend/qinputsettings_p.h3
-rw-r--r--src/input/frontend/qkeyboarddevice.cpp6
-rw-r--r--src/input/frontend/qkeyboarddevice.h2
-rw-r--r--src/input/frontend/qkeyboarddevice_p.h3
-rw-r--r--src/input/frontend/qkeyboardhandler.cpp3
-rw-r--r--src/input/frontend/qkeyboardhandler_p.h2
-rw-r--r--src/input/frontend/qkeyevent.h4
-rw-r--r--src/input/frontend/qlogicaldevice.cpp7
-rw-r--r--src/input/frontend/qlogicaldevice_p.h3
-rw-r--r--src/input/frontend/qmousedevice.cpp3
-rw-r--r--src/input/frontend/qmousedevice.h2
-rw-r--r--src/input/frontend/qmousedevice_p.h2
-rw-r--r--src/input/frontend/qmouseevent.h4
-rw-r--r--src/input/frontend/qmousehandler.cpp7
-rw-r--r--src/input/frontend/qmousehandler_p.h3
-rw-r--r--src/input/frontend/qphysicaldevicecreatedchange.cpp2
-rw-r--r--src/plugins/sceneparsers/assimp/assimphelpers.cpp10
-rw-r--r--src/plugins/sceneparsers/assimp/assimphelpers.h5
-rw-r--r--src/plugins/sceneparsers/assimp/assimpimporter.cpp23
-rw-r--r--src/plugins/sceneparsers/assimp/assimpimporter.h12
-rw-r--r--src/plugins/sceneparsers/gltf/gltfimporter.h6
-rw-r--r--src/plugins/sceneparsers/gltf/gltfio.cpp1588
-rw-r--r--src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp14
-rw-r--r--src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp26
-rw-r--r--src/quick3d/imports/input/qt3dquick3dinputplugin.cpp32
-rw-r--r--src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp5
-rw-r--r--src/quick3d/imports/render/qt3dquick3drenderplugin.cpp138
-rw-r--r--src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp6
-rw-r--r--src/quick3d/imports/scene3d/scene3dcleaner.cpp6
-rw-r--r--src/quick3d/imports/scene3d/scene3dcleaner_p.h2
-rw-r--r--src/quick3d/imports/scene3d/scene3ditem.cpp19
-rw-r--r--src/quick3d/imports/scene3d/scene3ditem_p.h2
-rw-r--r--src/quick3d/imports/scene3d/scene3dlogging_p.h2
-rw-r--r--src/quick3d/imports/scene3d/scene3drenderer.cpp20
-rw-r--r--src/quick3d/imports/scene3d/scene3drenderer_p.h3
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgmaterial_p.h4
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp3
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgnode.cpp3
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgnode_p.h2
-rw-r--r--src/quick3d/quick3d/items/quick3dentity.cpp1
-rw-r--r--src/quick3d/quick3d/items/quick3dentity_p.h3
-rw-r--r--src/quick3d/quick3d/items/quick3dentityloader.cpp6
-rw-r--r--src/quick3d/quick3d/items/quick3dentityloader_p.h5
-rw-r--r--src/quick3d/quick3d/items/quick3dentityloader_p_p.h5
-rw-r--r--src/quick3d/quick3d/items/quick3dnode.cpp3
-rw-r--r--src/quick3d/quick3d/items/quick3dnode_p.h3
-rw-r--r--src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp10
-rw-r--r--src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h3
-rw-r--r--src/quick3d/quick3d/qqmlaspectengine.cpp7
-rw-r--r--src/quick3d/quick3d/qqmlaspectengine.h2
-rw-r--r--src/quick3d/quick3d/qqmlaspectengine_p.h5
-rw-r--r--src/quick3d/quick3d/qquaternionanimation.cpp1
-rw-r--r--src/quick3d/quick3d/qquaternionanimation_p.h3
-rw-r--r--src/quick3d/quick3d/qt3dquick_global.cpp13
-rw-r--r--src/quick3d/quick3d/qt3dquicknodefactory.cpp1
-rw-r--r--src/quick3d/quick3d/qt3dquicknodefactory_p.h3
-rw-r--r--src/quick3d/quick3d/qt3dquickvaluetypes_p.h10
-rw-r--r--src/quick3d/quick3dextras/qt3dquickwindow.cpp22
-rw-r--r--src/quick3d/quick3dextras/qt3dquickwindow.h4
-rw-r--r--src/quick3d/quick3dinput/items/quick3daction.cpp2
-rw-r--r--src/quick3d/quick3dinput/items/quick3daction_p.h5
-rw-r--r--src/quick3d/quick3dinput/items/quick3daxis.cpp2
-rw-r--r--src/quick3d/quick3dinput/items/quick3daxis_p.h7
-rw-r--r--src/quick3d/quick3dinput/items/quick3dinputchord.cpp2
-rw-r--r--src/quick3d/quick3dinput/items/quick3dinputchord_p.h5
-rw-r--r--src/quick3d/quick3dinput/items/quick3dinputsequence.cpp2
-rw-r--r--src/quick3d/quick3dinput/items/quick3dinputsequence_p.h5
-rw-r--r--src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp2
-rw-r--r--src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h5
-rw-r--r--src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp2
-rw-r--r--src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h7
-rw-r--r--src/quick3d/quick3dinput/qt3dquickinput_global.cpp4
-rw-r--r--src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp2
-rw-r--r--src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h3
-rw-r--r--src/quick3d/quick3drender/items/quick3dbuffer.cpp6
-rw-r--r--src/quick3d/quick3drender/items/quick3dbuffer_p.h3
-rw-r--r--src/quick3d/quick3drender/items/quick3deffect.cpp3
-rw-r--r--src/quick3d/quick3drender/items/quick3deffect_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3dgeometry.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3dgeometry_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3dlayerfilter.cpp3
-rw-r--r--src/quick3d/quick3drender/items/quick3dlayerfilter_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3dmaterial.cpp3
-rw-r--r--src/quick3d/quick3drender/items/quick3dmaterial_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3dparameter.cpp6
-rw-r--r--src/quick3d/quick3drender/items/quick3dparameter_p.h3
-rw-r--r--src/quick3d/quick3drender/items/quick3dparameter_p_p.h4
-rw-r--r--src/quick3d/quick3drender/items/quick3drenderpass.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3drenderpass_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h7
-rw-r--r--src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3drendertargetselector.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3drendertargetselector_p.h7
-rw-r--r--src/quick3d/quick3drender/items/quick3dscene.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3dscene_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3dshaderdata.cpp8
-rw-r--r--src/quick3d/quick3drender/items/quick3dshaderdata_p.h8
-rw-r--r--src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp4
-rw-r--r--src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h3
-rw-r--r--src/quick3d/quick3drender/items/quick3dstateset.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3dstateset_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3dtechnique.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3dtechnique_p.h5
-rw-r--r--src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h7
-rw-r--r--src/quick3d/quick3drender/items/quick3dtexture.cpp5
-rw-r--r--src/quick3d/quick3drender/items/quick3dtexture_p.h6
-rw-r--r--src/quick3d/quick3drender/items/quick3dviewport.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3dviewport_p.h3
-rw-r--r--src/quick3d/quick3drender/qt3dquickrender_global.cpp4
-rw-r--r--src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp2
-rw-r--r--src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h3
362 files changed, 2908 insertions, 975 deletions
diff --git a/src/core/aspects/aspectcommanddebugger.cpp b/src/core/aspects/aspectcommanddebugger.cpp
index 6bb93c827..0b837052f 100644
--- a/src/core/aspects/aspectcommanddebugger.cpp
+++ b/src/core/aspects/aspectcommanddebugger.cpp
@@ -40,11 +40,13 @@
#ifdef QT3D_JOBS_RUN_STATS
#include "aspectcommanddebugger_p.h"
+
#include <Qt3DCore/qaspectengine.h>
+#include <QtNetwork/QTcpSocket>
+#include <QtCore/QJsonDocument>
+#include <QtCore/QJsonObject>
+
#include <Qt3DCore/private/qabstractaspect_p.h>
-#include <QTcpSocket>
-#include <QJsonDocument>
-#include <QJsonObject>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp
index 8f1afb30e..710522356 100644
--- a/src/core/aspects/qabstractaspect.cpp
+++ b/src/core/aspects/qabstractaspect.cpp
@@ -38,15 +38,17 @@
****************************************************************************/
#include "qabstractaspect.h"
-#include "qentity.h"
-#include <Qt3DCore/private/qaspectmanager_p.h>
-#include <private/qabstractaspect_p.h>
-#include <Qt3DCore/private/qaspectjobmanager_p.h>
-#include <private/qchangearbiter_p.h>
-#include <Qt3DCore/private/qscene_p.h>
-#include <Qt3DCore/private/qnodevisitor_p.h>
+#include "qabstractaspect_p.h"
+
+#include <Qt3DCore/qentity.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
+
#include <Qt3DCore/private/corelogging_p.h>
+#include <Qt3DCore/private/qaspectjobmanager_p.h>
+#include <Qt3DCore/private/qaspectmanager_p.h>
+#include <Qt3DCore/private/qchangearbiter_p.h>
+#include <Qt3DCore/private/qnodevisitor_p.h>
+#include <Qt3DCore/private/qscene_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qabstractaspect.h b/src/core/aspects/qabstractaspect.h
index a4ad68c1d..66f0bdc24 100644
--- a/src/core/aspects/qabstractaspect.h
+++ b/src/core/aspects/qabstractaspect.h
@@ -40,10 +40,10 @@
#ifndef QT3DCORE_QABSTRACTASPECT_H
#define QT3DCORE_QABSTRACTASPECT_H
-#include <QObject>
-#include <QSharedPointer>
#include <Qt3DCore/qt3dcore_global.h>
#include <Qt3DCore/qnodeid.h>
+#include <QtCore/QObject>
+#include <QtCore/QSharedPointer>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qabstractaspect_p.h b/src/core/aspects/qabstractaspect_p.h
index 53b01cc40..e64970649 100644
--- a/src/core/aspects/qabstractaspect_p.h
+++ b/src/core/aspects/qabstractaspect_p.h
@@ -51,14 +51,15 @@
// We mean it.
//
-#include <private/qobject_p.h>
-#include <private/qaspectjobproviderinterface_p.h>
-#include <private/qbackendnode_p.h>
-#include <private/qbackendnodefactory_p.h>
-#include <private/qsceneobserverinterface_p.h>
-#include <private/qt3dcore_global_p.h>
-#include <Qt3DCore/qnodedestroyedchange.h>
#include <Qt3DCore/qabstractaspect.h>
+#include <Qt3DCore/qnodedestroyedchange.h>
+
+#include <Qt3DCore/private/qaspectjobproviderinterface_p.h>
+#include <Qt3DCore/private/qbackendnode_p.h>
+#include <Qt3DCore/private/qbackendnodefactory_p.h>
+#include <Qt3DCore/private/qsceneobserverinterface_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+#include <QtCore/private/qobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qaspectengine.cpp b/src/core/aspects/qaspectengine.cpp
index 91961984f..deb6245fd 100644
--- a/src/core/aspects/qaspectengine.cpp
+++ b/src/core/aspects/qaspectengine.cpp
@@ -38,27 +38,26 @@
****************************************************************************/
#include "qaspectengine.h"
+#include "qaspectengine_p.h"
+
+#include <Qt3DCore/qabstractaspect.h>
+#include <Qt3DCore/qcomponent.h>
+#include <Qt3DCore/qentity.h>
+#include <Qt3DCore/qnode.h>
+#include <QtCore/QMetaObject>
-#include "qabstractaspect.h"
-#include "qaspectthread_p.h"
-#include "qaspectmanager_p.h"
-#include "qchangearbiter_p.h"
-#include "qabstractaspect.h"
-#include "qnode.h"
#include <Qt3DCore/private/corelogging_p.h>
-#include <QMetaObject>
-#include <private/qpostman_p.h>
-#include <private/qscene_p.h>
-#include <private/qaspectengine_p.h>
-#include <private/qnode_p.h>
-#include <private/qnodevisitor_p.h>
-#include <private/qscene_p.h>
-#include "qentity.h"
-#include "qcomponent.h"
+#include <Qt3DCore/private/qaspectthread_p.h>
+#include <Qt3DCore/private/qaspectmanager_p.h>
+#include <Qt3DCore/private/aspectcommanddebugger_p.h>
+#include <Qt3DCore/private/qchangearbiter_p.h>
#include <Qt3DCore/private/qeventfilterservice_p.h>
+#include <Qt3DCore/private/qnode_p.h>
+#include <Qt3DCore/private/qnodevisitor_p.h>
#include <Qt3DCore/private/qnodecreatedchangegenerator_p.h>
+#include <Qt3DCore/private/qpostman_p.h>
+#include <Qt3DCore/private/qscene_p.h>
#include <Qt3DCore/private/qservicelocator_p.h>
-#include <Qt3DCore/private/aspectcommanddebugger_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qaspectengine.h b/src/core/aspects/qaspectengine.h
index 6de5df42c..28b15046b 100644
--- a/src/core/aspects/qaspectengine.h
+++ b/src/core/aspects/qaspectengine.h
@@ -40,10 +40,9 @@
#ifndef QT3DCORE_QASPECTENGINE_H
#define QT3DCORE_QASPECTENGINE_H
-#include <QObject>
-#include <QVector>
-
#include <Qt3DCore/qt3dcore_global.h>
+#include <QtCore/QObject>
+#include <QtCore/QVector>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qaspectengine_p.h b/src/core/aspects/qaspectengine_p.h
index 10b3536df..c2211dce1 100644
--- a/src/core/aspects/qaspectengine_p.h
+++ b/src/core/aspects/qaspectengine_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
-#include <private/qobject_p.h>
#include <Qt3DCore/qnodecreatedchange.h>
-#include <Qt3DCore/private/qaspectfactory_p.h>
#include <QtCore/qsharedpointer.h>
+#include <Qt3DCore/private/qaspectfactory_p.h>
+#include <QtCore/private/qobject_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/aspects/qaspectfactory.cpp b/src/core/aspects/qaspectfactory.cpp
index 3135e1653..94e04b34d 100644
--- a/src/core/aspects/qaspectfactory.cpp
+++ b/src/core/aspects/qaspectfactory.cpp
@@ -39,11 +39,9 @@
#include "qaspectfactory_p.h"
-#include <QtGlobal>
-
-#include <QDebug>
-
#include <Qt3DCore/QAbstractAspect>
+#include <QtCore/QDebug>
+#include <QtCore/QtGlobal>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qaspectfactory_p.h b/src/core/aspects/qaspectfactory_p.h
index 9e2bedaaa..67b5e0b9d 100644
--- a/src/core/aspects/qaspectfactory_p.h
+++ b/src/core/aspects/qaspectfactory_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
-#include <QHash>
-#include <QStringList>
+#include <QtCore/QHash>
+#include <QtCore/QStringList>
#include <Qt3DCore/private/qt3dcore_global_p.h>
diff --git a/src/core/aspects/qaspectmanager.cpp b/src/core/aspects/qaspectmanager.cpp
index 98fb982df..5ccc89b9e 100644
--- a/src/core/aspects/qaspectmanager.cpp
+++ b/src/core/aspects/qaspectmanager.cpp
@@ -38,27 +38,27 @@
****************************************************************************/
#include "qaspectmanager_p.h"
-#include "qabstractaspect.h"
-#include "qabstractaspect_p.h"
-#include "qchangearbiter_p.h"
-// TODO Make the kind of job manager configurable (e.g. ThreadWeaver vs Intel TBB)
-#include "qaspectjobmanager_p.h"
-#include "qabstractaspectjobmanager_p.h"
-#include "qentity.h"
-#include <Qt3DCore/private/qservicelocator_p.h>
+#include <Qt3DCore/qabstractaspect.h>
+#include <Qt3DCore/qentity.h>
+#include <QtCore/QEventLoop>
+#include <QtCore/QThread>
+#include <QtCore/QWaitCondition>
+#include <QtGui/QSurface>
-#include <Qt3DCore/private/qaspectjob_p.h>
-#include <Qt3DCore/private/qthreadpooler_p.h>
-#include <Qt3DCore/private/qtickclockservice_p.h>
#include <Qt3DCore/private/corelogging_p.h>
+#include <Qt3DCore/private/qabstractaspect_p.h>
+#include <Qt3DCore/private/qabstractaspectjobmanager_p.h>
+#include <Qt3DCore/private/qabstractframeadvanceservice_p.h>
+// TODO Make the kind of job manager configurable (e.g. ThreadWeaver vs Intel TBB)
+#include <Qt3DCore/private/qaspectjobmanager_p.h>
+#include <Qt3DCore/private/qaspectjob_p.h>
+#include <Qt3DCore/private/qchangearbiter_p.h>
#include <Qt3DCore/private/qscheduler_p.h>
+#include <Qt3DCore/private/qservicelocator_p.h>
+#include <Qt3DCore/private/qthreadpooler_p.h>
#include <Qt3DCore/private/qtickclock_p.h>
-#include <Qt3DCore/private/qabstractframeadvanceservice_p.h>
-#include <QEventLoop>
-#include <QThread>
-#include <QWaitCondition>
-#include <QSurface>
+#include <Qt3DCore/private/qtickclockservice_p.h>
#if defined(QT3D_CORE_JOB_TIMING)
#include <QElapsedTimer>
diff --git a/src/core/aspects/qaspectmanager_p.h b/src/core/aspects/qaspectmanager_p.h
index e4795516c..1c87738ed 100644
--- a/src/core/aspects/qaspectmanager_p.h
+++ b/src/core/aspects/qaspectmanager_p.h
@@ -51,13 +51,14 @@
// We mean it.
//
-#include <QObject>
#include <Qt3DCore/qnodecreatedchange.h>
+#include <QtCore/QObject>
+#include <QtCore/QScopedPointer>
+#include <QtCore/QSemaphore>
+#include <QtCore/QVariant>
+#include <QtCore/QVector>
+
#include <Qt3DCore/private/qt3dcore_global_p.h>
-#include <QVector>
-#include <QScopedPointer>
-#include <QVariant>
-#include <QSemaphore>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qaspectthread.cpp b/src/core/aspects/qaspectthread.cpp
index 9e6961901..31715b04e 100644
--- a/src/core/aspects/qaspectthread.cpp
+++ b/src/core/aspects/qaspectthread.cpp
@@ -38,10 +38,11 @@
****************************************************************************/
#include "qaspectthread_p.h"
-#include "qaspectmanager_p.h"
+#include <QtCore/QMutexLocker>
+
+#include <Qt3DCore/private/qaspectmanager_p.h>
#include <Qt3DCore/private/corelogging_p.h>
-#include <QMutexLocker>
QT_BEGIN_NAMESPACE
diff --git a/src/core/aspects/qaspectthread_p.h b/src/core/aspects/qaspectthread_p.h
index dc508b271..91fb363c5 100644
--- a/src/core/aspects/qaspectthread_p.h
+++ b/src/core/aspects/qaspectthread_p.h
@@ -51,10 +51,10 @@
// We mean it.
//
-#include <QThread>
#include <Qt3DCore/qt3dcore_global.h>
-
#include <QtCore/QSemaphore>
+#include <QtCore/QThread>
+
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qcomponentaddedchange.cpp b/src/core/changes/qcomponentaddedchange.cpp
index 985567849..e00c4ffab 100644
--- a/src/core/changes/qcomponentaddedchange.cpp
+++ b/src/core/changes/qcomponentaddedchange.cpp
@@ -39,9 +39,11 @@
#include "qcomponentaddedchange.h"
#include "qcomponentaddedchange_p.h"
+
#include <Qt3DCore/qcomponent.h>
#include <Qt3DCore/qentity.h>
-#include <private/qnode_p.h>
+
+#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qcomponentaddedchange_p.h b/src/core/changes/qcomponentaddedchange_p.h
index 99550c92f..5eb453363 100644
--- a/src/core/changes/qcomponentaddedchange_p.h
+++ b/src/core/changes/qcomponentaddedchange_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DCore/private/qt3dcore_global_p.h>
-#include <private/qscenechange_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DCore/private/qscenechange_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+
struct QMetaObject;
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qcomponentremovedchange.cpp b/src/core/changes/qcomponentremovedchange.cpp
index 30863cd89..5e5dfa5aa 100644
--- a/src/core/changes/qcomponentremovedchange.cpp
+++ b/src/core/changes/qcomponentremovedchange.cpp
@@ -39,9 +39,11 @@
#include "qcomponentremovedchange.h"
#include "qcomponentremovedchange_p.h"
+
#include <Qt3DCore/qcomponent.h>
#include <Qt3DCore/qentity.h>
-#include <private/qnode_p.h>
+
+#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qcomponentremovedchange_p.h b/src/core/changes/qcomponentremovedchange_p.h
index ff5c71f84..5284c7bbd 100644
--- a/src/core/changes/qcomponentremovedchange_p.h
+++ b/src/core/changes/qcomponentremovedchange_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DCore/private/qt3dcore_global_p.h>
-#include <private/qscenechange_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DCore/private/qscenechange_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+
struct QMetaObject;
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qdynamicpropertyupdatedchange_p.h b/src/core/changes/qdynamicpropertyupdatedchange_p.h
index 729ae44d0..c71c2a71a 100644
--- a/src/core/changes/qdynamicpropertyupdatedchange_p.h
+++ b/src/core/changes/qdynamicpropertyupdatedchange_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <private/qpropertyupdatedchangebase_p.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qvariant.h>
+#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/changes/qnodecreatedchange.cpp b/src/core/changes/qnodecreatedchange.cpp
index a77721cdc..34ca939d7 100644
--- a/src/core/changes/qnodecreatedchange.cpp
+++ b/src/core/changes/qnodecreatedchange.cpp
@@ -36,7 +36,9 @@
#include "qnodecreatedchange.h"
#include "qnodecreatedchange_p.h"
+
#include <Qt3DCore/qnode.h>
+
#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qnodecreatedchange.h b/src/core/changes/qnodecreatedchange.h
index 4b5e70b82..85444e00c 100644
--- a/src/core/changes/qnodecreatedchange.h
+++ b/src/core/changes/qnodecreatedchange.h
@@ -37,9 +37,8 @@
#ifndef QT3DCORE_QNODECREATEDCHANGE_H
#define QT3DCORE_QNODECREATEDCHANGE_H
-#include <Qt3DCore/qt3dcore_global.h>
#include <Qt3DCore/qscenechange.h>
-
+#include <Qt3DCore/qt3dcore_global.h>
#include <QtCore/qsharedpointer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qnodecreatedchange_p.h b/src/core/changes/qnodecreatedchange_p.h
index 75969e461..cb1470970 100644
--- a/src/core/changes/qnodecreatedchange_p.h
+++ b/src/core/changes/qnodecreatedchange_p.h
@@ -48,10 +48,11 @@
// We mean it.
//
-#include <Qt3DCore/private/qt3dcore_global_p.h>
-#include <private/qscenechange_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DCore/private/qscenechange_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+
struct QMetaObject;
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qnodedestroyedchange.h b/src/core/changes/qnodedestroyedchange.h
index 348fda23f..11a54f8e2 100644
--- a/src/core/changes/qnodedestroyedchange.h
+++ b/src/core/changes/qnodedestroyedchange.h
@@ -37,8 +37,8 @@
#ifndef QT3DCORE_QNODEDESTROYEDCHANGE_H
#define QT3DCORE_QNODEDESTROYEDCHANGE_H
-#include <Qt3DCore/qscenechange.h>
#include <Qt3DCore/qnode.h>
+#include <Qt3DCore/qscenechange.h>
#include <QtCore/qsharedpointer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qnodedestroyedchange_p.h b/src/core/changes/qnodedestroyedchange_p.h
index 999976431..081ca858f 100644
--- a/src/core/changes/qnodedestroyedchange_p.h
+++ b/src/core/changes/qnodedestroyedchange_p.h
@@ -48,9 +48,10 @@
// We mean it.
//
-#include <private/qscenechange_p.h>
#include <Qt3DCore/qnode.h>
+#include <Qt3DCore/private/qscenechange_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/changes/qpropertynodeaddedchange.cpp b/src/core/changes/qpropertynodeaddedchange.cpp
index 66b5c70d3..390a170b6 100644
--- a/src/core/changes/qpropertynodeaddedchange.cpp
+++ b/src/core/changes/qpropertynodeaddedchange.cpp
@@ -39,6 +39,7 @@
#include "qpropertynodeaddedchange.h"
#include "qpropertynodeaddedchange_p.h"
+
#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qpropertynodeaddedchange_p.h b/src/core/changes/qpropertynodeaddedchange_p.h
index 01340ae8c..2930867ea 100644
--- a/src/core/changes/qpropertynodeaddedchange_p.h
+++ b/src/core/changes/qpropertynodeaddedchange_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <private/qstaticpropertyvalueaddedchangebase_p.h>
#include <Qt3DCore/qnode.h>
+#include <Qt3DCore/private/qstaticpropertyvalueaddedchangebase_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/changes/qpropertynoderemovedchange.cpp b/src/core/changes/qpropertynoderemovedchange.cpp
index a7b4e95f3..a0f342d0b 100644
--- a/src/core/changes/qpropertynoderemovedchange.cpp
+++ b/src/core/changes/qpropertynoderemovedchange.cpp
@@ -39,6 +39,7 @@
#include "qpropertynoderemovedchange.h"
#include "qpropertynoderemovedchange_p.h"
+
#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qpropertynoderemovedchange_p.h b/src/core/changes/qpropertynoderemovedchange_p.h
index 6cd23661b..0145cc507 100644
--- a/src/core/changes/qpropertynoderemovedchange_p.h
+++ b/src/core/changes/qpropertynoderemovedchange_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <private/qstaticpropertyvalueremovedchangebase_p.h>
#include <Qt3DCore/qnode.h>
+#include <Qt3DCore/private/qstaticpropertyvalueremovedchangebase_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/changes/qpropertyupdatedchange_p.h b/src/core/changes/qpropertyupdatedchange_p.h
index f985120c9..ad908a8c4 100644
--- a/src/core/changes/qpropertyupdatedchange_p.h
+++ b/src/core/changes/qpropertyupdatedchange_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
-#include <private/qstaticpropertyupdatedchangebase_p.h>
-#include <QVariant>
+#include <QtCore/QVariant>
+
+#include <Qt3DCore/private/qstaticpropertyupdatedchangebase_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qpropertyupdatedchangebase_p.h b/src/core/changes/qpropertyupdatedchangebase_p.h
index b86f2dccf..7c66812a1 100644
--- a/src/core/changes/qpropertyupdatedchangebase_p.h
+++ b/src/core/changes/qpropertyupdatedchangebase_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qscenechange_p.h>
+#include <Qt3DCore/private/qscenechange_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qpropertyvalueaddedchange_p.h b/src/core/changes/qpropertyvalueaddedchange_p.h
index 538a591a1..edd59489f 100644
--- a/src/core/changes/qpropertyvalueaddedchange_p.h
+++ b/src/core/changes/qpropertyvalueaddedchange_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <private/qstaticpropertyvalueaddedchangebase_p.h>
-#include <Qt3DCore/private/qt3dcore_global_p.h>
#include <QtCore/qvariant.h>
+#include <Qt3DCore/private/qstaticpropertyvalueaddedchangebase_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/changes/qpropertyvalueaddedchangebase.cpp b/src/core/changes/qpropertyvalueaddedchangebase.cpp
index 26dcd5555..3c9929496 100644
--- a/src/core/changes/qpropertyvalueaddedchangebase.cpp
+++ b/src/core/changes/qpropertyvalueaddedchangebase.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qpropertyvalueaddedchangebase.h"
+
#include "qpropertyvalueaddedchangebase_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qpropertyvalueaddedchangebase_p.h b/src/core/changes/qpropertyvalueaddedchangebase_p.h
index 405b2ad3f..be92e2d5b 100644
--- a/src/core/changes/qpropertyvalueaddedchangebase_p.h
+++ b/src/core/changes/qpropertyvalueaddedchangebase_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qscenechange_p.h>
+#include <Qt3DCore/private/qscenechange_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qpropertyvalueremovedchange.cpp b/src/core/changes/qpropertyvalueremovedchange.cpp
index 6e8a1f817..9d420abc0 100644
--- a/src/core/changes/qpropertyvalueremovedchange.cpp
+++ b/src/core/changes/qpropertyvalueremovedchange.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qpropertyvalueremovedchange.h"
+
#include "qpropertyvalueremovedchange_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qpropertyvalueremovedchange_p.h b/src/core/changes/qpropertyvalueremovedchange_p.h
index 82644b76c..b4e86bc9e 100644
--- a/src/core/changes/qpropertyvalueremovedchange_p.h
+++ b/src/core/changes/qpropertyvalueremovedchange_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <private/qstaticpropertyvalueremovedchangebase_p.h>
-#include <Qt3DCore/private/qt3dcore_global_p.h>
#include <QtCore/qvariant.h>
+#include <Qt3DCore/private/qstaticpropertyvalueremovedchangebase_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/changes/qpropertyvalueremovedchangebase.cpp b/src/core/changes/qpropertyvalueremovedchangebase.cpp
index 8115d6e22..71213019c 100644
--- a/src/core/changes/qpropertyvalueremovedchangebase.cpp
+++ b/src/core/changes/qpropertyvalueremovedchangebase.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qpropertyvalueremovedchangebase.h"
+
#include "qpropertyvalueremovedchangebase_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qpropertyvalueremovedchangebase_p.h b/src/core/changes/qpropertyvalueremovedchangebase_p.h
index e4c4be640..f9c1b4009 100644
--- a/src/core/changes/qpropertyvalueremovedchangebase_p.h
+++ b/src/core/changes/qpropertyvalueremovedchangebase_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qscenechange_p.h>
+#include <Qt3DCore/private/qscenechange_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qscenechange.cpp b/src/core/changes/qscenechange.cpp
index 959518904..df15e239d 100644
--- a/src/core/changes/qscenechange.cpp
+++ b/src/core/changes/qscenechange.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qscenechange.h"
+
#include "qscenechange_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qscenechange.h b/src/core/changes/qscenechange.h
index 4555983e2..378c2f676 100644
--- a/src/core/changes/qscenechange.h
+++ b/src/core/changes/qscenechange.h
@@ -40,9 +40,9 @@
#ifndef QT3DCORE_QSCENECHANGE_H
#define QT3DCORE_QSCENECHANGE_H
-#include <Qt3DCore/qt3dcore_global.h>
-#include <QSharedPointer>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DCore/qt3dcore_global.h>
+#include <QtCore/QSharedPointer>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qscenechange_p.h b/src/core/changes/qscenechange_p.h
index 80ce4eaa5..cd0194b01 100644
--- a/src/core/changes/qscenechange_p.h
+++ b/src/core/changes/qscenechange_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <QtGlobal>
-#include <Qt3DCore/private/qt3dcore_global_p.h>
#include <Qt3DCore/qscenechange.h>
+#include <QtCore/QtGlobal>
+
+#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qstaticpropertyupdatedchangebase.cpp b/src/core/changes/qstaticpropertyupdatedchangebase.cpp
index 409d80add..d065dbf0b 100644
--- a/src/core/changes/qstaticpropertyupdatedchangebase.cpp
+++ b/src/core/changes/qstaticpropertyupdatedchangebase.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qstaticpropertyupdatedchangebase.h"
+
#include "qstaticpropertyupdatedchangebase_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qstaticpropertyupdatedchangebase_p.h b/src/core/changes/qstaticpropertyupdatedchangebase_p.h
index c81df4076..3f76e2f56 100644
--- a/src/core/changes/qstaticpropertyupdatedchangebase_p.h
+++ b/src/core/changes/qstaticpropertyupdatedchangebase_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qpropertyupdatedchangebase_p.h>
+#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qstaticpropertyvalueaddedchangebase.cpp b/src/core/changes/qstaticpropertyvalueaddedchangebase.cpp
index 4fb658459..efd2c0165 100644
--- a/src/core/changes/qstaticpropertyvalueaddedchangebase.cpp
+++ b/src/core/changes/qstaticpropertyvalueaddedchangebase.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qstaticpropertyvalueaddedchangebase.h"
+
#include "qstaticpropertyvalueaddedchangebase_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qstaticpropertyvalueaddedchangebase_p.h b/src/core/changes/qstaticpropertyvalueaddedchangebase_p.h
index 7a614c0d1..cd995d739 100644
--- a/src/core/changes/qstaticpropertyvalueaddedchangebase_p.h
+++ b/src/core/changes/qstaticpropertyvalueaddedchangebase_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qpropertyvalueaddedchangebase_p.h>
+#include <Qt3DCore/private/qpropertyvalueaddedchangebase_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/changes/qstaticpropertyvalueremovedchangebase_p.h b/src/core/changes/qstaticpropertyvalueremovedchangebase_p.h
index 47f43f745..ac4e1d875 100644
--- a/src/core/changes/qstaticpropertyvalueremovedchangebase_p.h
+++ b/src/core/changes/qstaticpropertyvalueremovedchangebase_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qpropertyvalueremovedchangebase_p.h>
+#include <Qt3DCore/private/qpropertyvalueremovedchangebase_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/corelogging_p.h b/src/core/corelogging_p.h
index 7fc3fff55..5ddd6ea73 100644
--- a/src/core/corelogging_p.h
+++ b/src/core/corelogging_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <QLoggingCategory>
+#include <QtCore/QLoggingCategory>
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/dependencyhandler.cpp b/src/core/jobs/dependencyhandler.cpp
index 3ccbbf059..6a925d037 100644
--- a/src/core/jobs/dependencyhandler.cpp
+++ b/src/core/jobs/dependencyhandler.cpp
@@ -37,10 +37,10 @@
**
****************************************************************************/
-#include <iterator>
-
#include "dependencyhandler_p.h"
+#include <iterator>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/jobs/dependencyhandler_p.h b/src/core/jobs/dependencyhandler_p.h
index db9389c9a..a5a023139 100644
--- a/src/core/jobs/dependencyhandler_p.h
+++ b/src/core/jobs/dependencyhandler_p.h
@@ -51,11 +51,11 @@
// We mean it.
//
-#include "task_p.h"
-
#include <QtCore/QMutex>
#include <QtCore/QVector>
+#include <Qt3DCore/private/task_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/jobs/qabstractaspectjobmanager_p.h b/src/core/jobs/qabstractaspectjobmanager_p.h
index 32e6e499e..5c4e9f699 100644
--- a/src/core/jobs/qabstractaspectjobmanager_p.h
+++ b/src/core/jobs/qabstractaspectjobmanager_p.h
@@ -51,9 +51,8 @@
// We mean it.
//
-#include <QObject>
-
#include <Qt3DCore/qaspectjob.h>
+#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/qaspectjob.cpp b/src/core/jobs/qaspectjob.cpp
index 59f48e9bf..6016bd273 100644
--- a/src/core/jobs/qaspectjob.cpp
+++ b/src/core/jobs/qaspectjob.cpp
@@ -39,7 +39,8 @@
#include "qaspectjob.h"
#include "qaspectjob_p.h"
-#include <QByteArray>
+
+#include <QtCore/QByteArray>
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/qaspectjob.h b/src/core/jobs/qaspectjob.h
index b2e5e587c..398cd88d1 100644
--- a/src/core/jobs/qaspectjob.h
+++ b/src/core/jobs/qaspectjob.h
@@ -41,8 +41,8 @@
#define QT3DCORE_QASPECTJOB_H
#include <Qt3DCore/qt3dcore_global.h>
-#include <QSharedPointer>
-#include <QVector>
+#include <QtCore/QSharedPointer>
+#include <QtCore/QVector>
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/qaspectjob_p.h b/src/core/jobs/qaspectjob_p.h
index c54240a4e..fdf39b8b6 100644
--- a/src/core/jobs/qaspectjob_p.h
+++ b/src/core/jobs/qaspectjob_p.h
@@ -51,7 +51,8 @@
// We mean it.
//
-#include <QWeakPointer>
+#include <QtCore/QWeakPointer>
+
#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/qaspectjobmanager.cpp b/src/core/jobs/qaspectjobmanager.cpp
index f2a71412d..468d904b4 100644
--- a/src/core/jobs/qaspectjobmanager.cpp
+++ b/src/core/jobs/qaspectjobmanager.cpp
@@ -38,16 +38,17 @@
****************************************************************************/
#include "qaspectjobmanager_p.h"
-#include "task_p.h"
-#include "qthreadpooler_p.h"
-#include "dependencyhandler_p.h"
-
-#include <QAtomicInt>
-#include <QDebug>
-#include <QThread>
-#include <QCoreApplication>
+
+#include <QtCore/QAtomicInt>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDebug>
+#include <QtCore/QThread>
#include <QtCore/QFuture>
+#include <Qt3DCore/private/dependencyhandler_p.h>
+#include <Qt3DCore/private/qthreadpooler_p.h>
+#include <Qt3DCore/private/task_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/jobs/qaspectjobmanager_p.h b/src/core/jobs/qaspectjobmanager_p.h
index 5b7f27ad6..6fbf03d22 100644
--- a/src/core/jobs/qaspectjobmanager_p.h
+++ b/src/core/jobs/qaspectjobmanager_p.h
@@ -51,12 +51,11 @@
// We mean it.
//
-#include <private/qabstractaspectjobmanager_p.h>
-#include <Qt3DCore/private/qt3dcore_global_p.h>
-
#include <Qt3DCore/qaspectjob.h>
+#include <QtCore/QVector>
-#include <QVector>
+#include <Qt3DCore/private/qabstractaspectjobmanager_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/qaspectjobproviderinterface_p.h b/src/core/jobs/qaspectjobproviderinterface_p.h
index 1e2166ace..29b44b3c1 100644
--- a/src/core/jobs/qaspectjobproviderinterface_p.h
+++ b/src/core/jobs/qaspectjobproviderinterface_p.h
@@ -51,10 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qt3dcore_global_p.h>
#include <Qt3DCore/qaspectjob.h>
+#include <QtCore/QVector>
-#include <QVector>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/qthreadpooler.cpp b/src/core/jobs/qthreadpooler.cpp
index 8cfafafae..8ad6f7f0a 100644
--- a/src/core/jobs/qthreadpooler.cpp
+++ b/src/core/jobs/qthreadpooler.cpp
@@ -38,19 +38,17 @@
****************************************************************************/
#include "qthreadpooler_p.h"
-#include "dependencyhandler_p.h"
#include <Qt3DCore/qt3dcore-config.h>
-#include <QDebug>
+#include <QtCore/QDebug>
#ifdef QT3D_JOBS_RUN_STATS
-#include <QFile>
-#include <QThreadStorage>
-#include <QDateTime>
-#include <QStandardPaths>
-#include <QSysInfo>
-#include <QCoreApplication>
+#include <QtCore/QFile>
+#include <QtCore/QThreadStorage>
+#include <QtCore/QDateTime>
#endif
+#include <Qt3DCore/private/dependencyhandler_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/jobs/qthreadpooler_p.h b/src/core/jobs/qthreadpooler_p.h
index 47b28e639..9d632a696 100644
--- a/src/core/jobs/qthreadpooler_p.h
+++ b/src/core/jobs/qthreadpooler_p.h
@@ -51,17 +51,18 @@
// We mean it.
//
-#include "task_p.h"
-#include "dependencyhandler_p.h"
-#include "qaspectjob_p.h"
+#include <QtCore/QFuture>
+#include <QtCore/QFutureInterface>
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
-#include <QtCore/QFutureInterface>
-#include <QtCore/QFuture>
-#include <QThreadPool>
+#include <QtCore/QThreadPool>
+
+#include <Qt3DCore/private/dependencyhandler_p.h>
+#include <Qt3DCore/private/qaspectjob_p.h>
+#include <Qt3DCore/private/task_p.h>
#ifdef QT3D_JOBS_RUN_STATS
-#include <QElapsedTimer>
+#include <QtCore/QElapsedTimer>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/task.cpp b/src/core/jobs/task.cpp
index 7c9fb89a7..ca3c8b65a 100644
--- a/src/core/jobs/task.cpp
+++ b/src/core/jobs/task.cpp
@@ -38,12 +38,13 @@
****************************************************************************/
#include "task_p.h"
-#include "dependencyhandler_p.h"
-#include "qthreadpooler_p.h"
-#include <QMutexLocker>
-#include <QElapsedTimer>
-#include <QDebug>
+#include <QtCore/QDebug>
+#include <QtCore/QElapsedTimer>
+#include <QtCore/QMutexLocker>
+
+#include <Qt3DCore/private/dependencyhandler_p.h>
+#include <Qt3DCore/private/qthreadpooler_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/jobs/task_p.h b/src/core/jobs/task_p.h
index 593d7d7ad..8193abaf6 100644
--- a/src/core/jobs/task_p.h
+++ b/src/core/jobs/task_p.h
@@ -51,13 +51,12 @@
// We mean it.
//
-#include "qaspectjobmanager_p.h"
-
-#include <QtCore/QtGlobal>
-#include <QtCore/QThread>
+#include <QtCore/QRunnable>
#include <QtCore/QSharedPointer>
+#include <QtCore/QThread>
+#include <QtCore/QtGlobal>
-#include <QtCore/QRunnable>
+#include <Qt3DCore/private/qaspectjobmanager_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/propertychangehandler_p.h b/src/core/nodes/propertychangehandler_p.h
index e91df5016..4bcfdef75 100644
--- a/src/core/nodes/propertychangehandler_p.h
+++ b/src/core/nodes/propertychangehandler_p.h
@@ -52,12 +52,11 @@
//
#include <Qt3DCore/qt3dcore_global.h>
-
-#include <QObject>
-#include <QHash>
-#include <QVector>
-#include <QMetaMethod>
-#include <QDebug>
+#include <QtCore/QDebug>
+#include <QtCore/QHash>
+#include <QtCore/QMetaMethod>
+#include <QtCore/QObject>
+#include <QtCore/QVector>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qabstractnodefactory_p.h b/src/core/nodes/qabstractnodefactory_p.h
index bb7533e94..dbe0adffe 100644
--- a/src/core/nodes/qabstractnodefactory_p.h
+++ b/src/core/nodes/qabstractnodefactory_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qt3dcore_global_p.h>
#include <Qt3DCore/qnode.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/nodes/qbackendnode.cpp b/src/core/nodes/qbackendnode.cpp
index 6970794b8..e3963b202 100644
--- a/src/core/nodes/qbackendnode.cpp
+++ b/src/core/nodes/qbackendnode.cpp
@@ -39,9 +39,11 @@
#include "qbackendnode.h"
#include "qbackendnode_p.h"
-#include "qaspectengine.h"
-#include "qnode.h"
-#include "qpropertyupdatedchange.h"
+
+#include <Qt3DCore/qaspectengine.h>
+#include <Qt3DCore/qnode.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
#include <Qt3DCore/private/corelogging_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qbackendnode.h b/src/core/nodes/qbackendnode.h
index 39114034d..d2cae5696 100644
--- a/src/core/nodes/qbackendnode.h
+++ b/src/core/nodes/qbackendnode.h
@@ -40,10 +40,10 @@
#ifndef QT3DCORE_QBACKENDNODE_H
#define QT3DCORE_QBACKENDNODE_H
-#include <Qt3DCore/qt3dcore_global.h>
-#include <Qt3DCore/qscenechange.h>
#include <Qt3DCore/qnodecreatedchange.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DCore/qscenechange.h>
+#include <Qt3DCore/qt3dcore_global.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qbackendnode_p.h b/src/core/nodes/qbackendnode_p.h
index 6cddfad11..6940f5623 100644
--- a/src/core/nodes/qbackendnode_p.h
+++ b/src/core/nodes/qbackendnode_p.h
@@ -51,13 +51,13 @@
// We mean it.
//
+#include <Qt3DCore/qbackendnode.h>
#include <Qt3DCore/qnodeid.h>
+
+#include <Qt3DCore/private/qlockableobserverinterface_p.h>
#include <Qt3DCore/private/qobservableinterface_p.h>
#include <Qt3DCore/private/qobserverinterface_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
-#include <Qt3DCore/qbackendnode.h>
-#include <Qt3DCore/private/qlockableobserverinterface_p.h>
-#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qcomponent.cpp b/src/core/nodes/qcomponent.cpp
index abedb6244..8e337adf6 100644
--- a/src/core/nodes/qcomponent.cpp
+++ b/src/core/nodes/qcomponent.cpp
@@ -39,12 +39,14 @@
#include "qcomponent.h"
#include "qcomponent_p.h"
-#include "qentity.h"
-#include "qentity_p.h"
-#include "qscene_p.h"
+
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qcomponentaddedchange.h>
#include <Qt3DCore/qcomponentremovedchange.h>
+#include <Qt3DCore/qentity.h>
+
+#include <Qt3DCore/private/qentity_p.h>
+#include <Qt3DCore/private/qscene_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qcomponent_p.h b/src/core/nodes/qcomponent_p.h
index 74cef1629..6c7c3c89d 100644
--- a/src/core/nodes/qcomponent_p.h
+++ b/src/core/nodes/qcomponent_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
-#include <private/qnode_p.h>
-#include <private/qt3dcore_global_p.h>
+#include <Qt3DCore/private/qnode_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qdestructionidandtypecollector_p.h b/src/core/nodes/qdestructionidandtypecollector_p.h
index 3e5fd9138..8557c27f0 100644
--- a/src/core/nodes/qdestructionidandtypecollector_p.h
+++ b/src/core/nodes/qdestructionidandtypecollector_p.h
@@ -48,8 +48,8 @@
// We mean it.
//
-#include <Qt3DCore/private/qnodevisitor_p.h>
#include <Qt3DCore/private/qentity_p.h>
+#include <Qt3DCore/private/qnodevisitor_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp
index b28898c60..9bc41f8cc 100644
--- a/src/core/nodes/qentity.cpp
+++ b/src/core/nodes/qentity.cpp
@@ -39,17 +39,18 @@
#include "qentity.h"
#include "qentity_p.h"
-#include "qcomponent.h"
-#include "qcomponent_p.h"
-#include <Qt3DCore/private/qscene_p.h>
+#include <Qt3DCore/qcomponent.h>
#include <Qt3DCore/qcomponentaddedchange.h>
#include <Qt3DCore/qcomponentremovedchange.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qnodecreatedchange.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <QtCore/QMetaObject>
+#include <QtCore/QMetaProperty>
+
#include <Qt3DCore/private/corelogging_p.h>
-#include <QMetaObject>
-#include <QMetaProperty>
+#include <Qt3DCore/private/qcomponent_p.h>
+#include <Qt3DCore/private/qscene_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qentity.h b/src/core/nodes/qentity.h
index a7f492a96..978f84ebe 100644
--- a/src/core/nodes/qentity.h
+++ b/src/core/nodes/qentity.h
@@ -42,8 +42,7 @@
#include <Qt3DCore/qnode.h>
#include <Qt3DCore/qt3dcore_global.h>
-
-#include <QMetaType>
+#include <QtCore/QMetaType>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qentity_p.h b/src/core/nodes/qentity_p.h
index 2c159807b..9e9dbbd24 100644
--- a/src/core/nodes/qentity_p.h
+++ b/src/core/nodes/qentity_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
+#include <Qt3DCore/qentity.h>
+
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
-#include "qentity.h"
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp
index 6219790e6..6caf03337 100644
--- a/src/core/nodes/qnode.cpp
+++ b/src/core/nodes/qnode.cpp
@@ -40,25 +40,26 @@
#include "qnode.h"
#include "qnode_p.h"
-#include <Qt3DCore/qentity.h>
+#include <Qt3DCore/QComponent>
+#include <Qt3DCore/qaspectengine.h>
#include <Qt3DCore/qdynamicpropertyupdatedchange.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DCore/qentity.h>
+#include <Qt3DCore/qnodedestroyedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
-#include <Qt3DCore/qnodedestroyedchange.h>
-#include <Qt3DCore/qaspectengine.h>
-#include <Qt3DCore/private/qdestructionidandtypecollector_p.h>
-#include <Qt3DCore/private/qscene_p.h>
-#include <Qt3DCore/private/qpostman_p.h>
-#include <QEvent>
-#include <QChildEvent>
-#include <QMetaObject>
-#include <QMetaProperty>
-#include <QtCore/private/qmetaobject_p.h>
-#include <Qt3DCore/QComponent>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <QtCore/QChildEvent>
+#include <QtCore/QEvent>
+#include <QtCore/QMetaObject>
+#include <QtCore/QMetaProperty>
+
#include <Qt3DCore/private/corelogging_p.h>
+#include <Qt3DCore/private/qdestructionidandtypecollector_p.h>
#include <Qt3DCore/private/qnodecreatedchangegenerator_p.h>
#include <Qt3DCore/private/qnodevisitor_p.h>
+#include <Qt3DCore/private/qpostman_p.h>
+#include <Qt3DCore/private/qscene_p.h>
+#include <QtCore/private/qmetaobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qnode.h b/src/core/nodes/qnode.h
index bfd45171e..cf3a16301 100644
--- a/src/core/nodes/qnode.h
+++ b/src/core/nodes/qnode.h
@@ -40,11 +40,11 @@
#ifndef QT3DCORE_QNODE_H
#define QT3DCORE_QNODE_H
-#include <QObject>
-#include <Qt3DCore/qt3dcore_global.h>
+#include <Qt3DCore/qnodecreatedchange.h>
#include <Qt3DCore/qnodeid.h>
#include <Qt3DCore/qscenechange.h>
-#include <Qt3DCore/qnodecreatedchange.h>
+#include <Qt3DCore/qt3dcore_global.h>
+#include <QtCore/QObject>
#define Q_NODE_NULLPTR static_cast<Qt3DCore::QNode *>(nullptr)
diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h
index bfac1cbe1..ad9d2376e 100644
--- a/src/core/nodes/qnode_p.h
+++ b/src/core/nodes/qnode_p.h
@@ -51,13 +51,15 @@
// We mean it.
//
-#include <private/qobject_p.h>
#include <Qt3DCore/qnode.h>
-#include <Qt3DCore/private/qobservableinterface_p.h>
+
+#include <functional>
+
+#include <Qt3DCore/private/propertychangehandler_p.h>
#include <Qt3DCore/private/qchangearbiter_p.h>
+#include <Qt3DCore/private/qobservableinterface_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
-#include "propertychangehandler_p.h"
-#include <functional>
+#include <QtCore/private/qobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qnodecreatedchangegenerator.cpp b/src/core/nodes/qnodecreatedchangegenerator.cpp
index c350c866a..d91949fb1 100644
--- a/src/core/nodes/qnodecreatedchangegenerator.cpp
+++ b/src/core/nodes/qnodecreatedchangegenerator.cpp
@@ -35,6 +35,7 @@
****************************************************************************/
#include "qnodecreatedchangegenerator_p.h"
+
#include <Qt3DCore/private/qnodevisitor_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qnodecreatedchangegenerator_p.h b/src/core/nodes/qnodecreatedchangegenerator_p.h
index f00241b39..42c2847cc 100644
--- a/src/core/nodes/qnodecreatedchangegenerator_p.h
+++ b/src/core/nodes/qnodecreatedchangegenerator_p.h
@@ -48,12 +48,13 @@
// We mean it.
//
-#include <Qt3DCore/qt3dcore_global.h>
#include <Qt3DCore/qnode.h>
#include <Qt3DCore/qnodecreatedchange.h>
-#include <Qt3DCore/private/qnode_p.h>
+#include <Qt3DCore/qt3dcore_global.h>
#include <QtCore/qvector.h>
+#include <Qt3DCore/private/qnode_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/nodes/qnodeid.cpp b/src/core/nodes/qnodeid.cpp
index f41627734..17bc4e8e1 100644
--- a/src/core/nodes/qnodeid.cpp
+++ b/src/core/nodes/qnodeid.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "qnodeid.h"
+#include <Qt3DCore/qnodeid.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qnodeid.h b/src/core/nodes/qnodeid.h
index 7e8b1c97c..a00559df3 100644
--- a/src/core/nodes/qnodeid.h
+++ b/src/core/nodes/qnodeid.h
@@ -41,7 +41,7 @@
#define QT3DCORE_QNODEID_H
#include <Qt3DCore/qt3dcore_global.h>
-#include <QDebug>
+#include <QtCore/QDebug>
#include <QtCore/QHashFunctions>
QT_BEGIN_NAMESPACE
diff --git a/src/core/nodes/qnodevisitor_p.h b/src/core/nodes/qnodevisitor_p.h
index 3637293f5..15bfa90db 100644
--- a/src/core/nodes/qnodevisitor_p.h
+++ b/src/core/nodes/qnodevisitor_p.h
@@ -51,9 +51,9 @@
// We mean it.
//
-#include <Qt3DCore/qt3dcore_global.h>
-#include <Qt3DCore/qnode.h>
#include <Qt3DCore/qentity.h>
+#include <Qt3DCore/qnode.h>
+#include <Qt3DCore/qt3dcore_global.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/qbackendnodefactory_p.h b/src/core/qbackendnodefactory_p.h
index 9f2afb16d..46e68266f 100644
--- a/src/core/qbackendnodefactory_p.h
+++ b/src/core/qbackendnodefactory_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qt3dcore_global_p.h>
#include <Qt3DCore/qnodecreatedchange.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/qchangearbiter.cpp b/src/core/qchangearbiter.cpp
index a7ca3ed40..d6c7e05df 100644
--- a/src/core/qchangearbiter.cpp
+++ b/src/core/qchangearbiter.cpp
@@ -38,17 +38,18 @@
****************************************************************************/
#include "qchangearbiter_p.h"
-#include "qcomponent.h"
-#include "qabstractaspectjobmanager_p.h"
-#include "qsceneobserverinterface_p.h"
-#include <Qt3DCore/private/qscene_p.h>
+#include <Qt3DCore/qcomponent.h>
+#include <QtCore/QMutexLocker>
+#include <QtCore/QReadLocker>
+#include <QtCore/QThread>
+#include <QtCore/QWriteLocker>
+
#include <Qt3DCore/private/corelogging_p.h>
-#include <QMutexLocker>
-#include <QReadLocker>
-#include <QThread>
-#include <QWriteLocker>
-#include <private/qpostman_p.h>
+#include <Qt3DCore/private/qabstractaspectjobmanager_p.h>
+#include <Qt3DCore/private/qpostman_p.h>
+#include <Qt3DCore/private/qscene_p.h>
+#include <Qt3DCore/private/qsceneobserverinterface_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/qchangearbiter_p.h b/src/core/qchangearbiter_p.h
index e381abc65..54ef6a207 100644
--- a/src/core/qchangearbiter_p.h
+++ b/src/core/qchangearbiter_p.h
@@ -51,16 +51,17 @@
// We mean it.
//
-#include <QObject>
-#include <QFlags>
-#include <QReadWriteLock>
-#include <QVariant>
-#include <QVector>
-#include <QPair>
-#include <QThreadStorage>
-#include <QMutex>
#include <Qt3DCore/qnodeid.h>
#include <Qt3DCore/qscenechange.h>
+#include <QtCore/QFlags>
+#include <QtCore/QMutex>
+#include <QtCore/QObject>
+#include <QtCore/QPair>
+#include <QtCore/QReadWriteLock>
+#include <QtCore/QThreadStorage>
+#include <QtCore/QVariant>
+#include <QtCore/QVector>
+
#include <Qt3DCore/private/qlockableobserverinterface_p.h>
#include <Qt3DCore/private/qt3dcore_global_p.h>
diff --git a/src/core/qobservableinterface_p.h b/src/core/qobservableinterface_p.h
index e867f1b84..8b92168ff 100644
--- a/src/core/qobservableinterface_p.h
+++ b/src/core/qobservableinterface_p.h
@@ -52,7 +52,8 @@
//
#include <Qt3DCore/qscenechange.h>
-#include <private/qt3dcore_global_p.h>
+
+#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/qpostman.cpp b/src/core/qpostman.cpp
index db7a9500e..9fd8f9104 100644
--- a/src/core/qpostman.cpp
+++ b/src/core/qpostman.cpp
@@ -39,12 +39,15 @@
#include "qpostman_p.h"
#include "qpostman_p_p.h"
+
+#include <Qt3DCore/qnode.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
-#include <Qt3DCore/private/qscene_p.h>
+
#include <Qt3DCore/private/qlockableobserverinterface_p.h>
-#include <Qt3DCore/qnode.h>
#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
+#include <Qt3DCore/private/qscene_p.h>
+#include <QtCore/private/qobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/qscene.cpp b/src/core/qscene.cpp
index 1fcfeaac7..33841574e 100644
--- a/src/core/qscene.cpp
+++ b/src/core/qscene.cpp
@@ -38,12 +38,14 @@
****************************************************************************/
#include "qscene_p.h"
-#include <QHash>
-#include <QReadLocker>
+
#include <Qt3DCore/qnode.h>
+#include <QtCore/QHash>
+#include <QtCore/QReadLocker>
+
#include <Qt3DCore/private/qlockableobserverinterface_p.h>
-#include <Qt3DCore/private/qobservableinterface_p.h>
#include <Qt3DCore/private/qnode_p.h>
+#include <Qt3DCore/private/qobservableinterface_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/qscene_p.h b/src/core/qscene_p.h
index d200abf42..aaa8d9e92 100644
--- a/src/core/qscene_p.h
+++ b/src/core/qscene_p.h
@@ -51,10 +51,12 @@
// We mean it.
//
-#include <Qt3DCore/private/qt3dcore_global_p.h>
-#include <Qt3DCore/private/qobservableinterface_p.h>
+#include <QtCore/QScopedPointer>
+
#include <Qt3DCore/qnode.h>
-#include <QScopedPointer>
+#include <QtCore/qscopedpointer.h>
+#include <Qt3DCore/private/qobservableinterface_p.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/qsceneobserverinterface_p.h b/src/core/qsceneobserverinterface_p.h
index 77b1c3626..f183ab571 100644
--- a/src/core/qsceneobserverinterface_p.h
+++ b/src/core/qsceneobserverinterface_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qt3dcore_global_p.h>
#include <Qt3DCore/qscenechange.h>
+#include <Qt3DCore/private/qt3dcore_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/qscheduler.cpp b/src/core/qscheduler.cpp
index 4765f618d..cc2f9081e 100644
--- a/src/core/qscheduler.cpp
+++ b/src/core/qscheduler.cpp
@@ -39,10 +39,11 @@
#include "qscheduler_p.h"
-#include "qabstractaspect.h"
-#include "qabstractaspect_p.h"
-#include "qaspectmanager_p.h"
-#include "qabstractaspectjobmanager_p.h"
+#include <Qt3DCore/qabstractaspect.h>
+
+#include <Qt3DCore/private/qabstractaspect_p.h>
+#include <Qt3DCore/private/qaspectmanager_p.h>
+#include <Qt3DCore/private/qabstractaspectjobmanager_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/qscheduler_p.h b/src/core/qscheduler_p.h
index 9d0f99ccb..9b1685e54 100644
--- a/src/core/qscheduler_p.h
+++ b/src/core/qscheduler_p.h
@@ -40,8 +40,8 @@
#ifndef QT3DCORE_QSCHEDULER_P_H
#define QT3DCORE_QSCHEDULER_P_H
-#include <QObject>
#include <Qt3DCore/qt3dcore_global.h>
+#include <QtCore/QObject>
//
// W A R N I N G
diff --git a/src/core/qtickclock.cpp b/src/core/qtickclock.cpp
index 4dfb29f1b..38ed07925 100644
--- a/src/core/qtickclock.cpp
+++ b/src/core/qtickclock.cpp
@@ -39,8 +39,9 @@
#include "qtickclock_p.h"
+#include <QtCore/QThread>
+
#include <Qt3DCore/private/corelogging_p.h>
-#include <QThread>
QT_BEGIN_NAMESPACE
diff --git a/src/core/qtickclock_p.h b/src/core/qtickclock_p.h
index b19417173..2b6686745 100644
--- a/src/core/qtickclock_p.h
+++ b/src/core/qtickclock_p.h
@@ -52,8 +52,7 @@
//
#include <Qt3DCore/qt3dcore_global.h>
-
-#include <QElapsedTimer>
+#include <QtCore/QElapsedTimer>
QT_BEGIN_NAMESPACE
diff --git a/src/core/resources/qboundedcircularbuffer_p.h b/src/core/resources/qboundedcircularbuffer_p.h
index f879a4a6f..22299d7da 100644
--- a/src/core/resources/qboundedcircularbuffer_p.h
+++ b/src/core/resources/qboundedcircularbuffer_p.h
@@ -51,12 +51,12 @@
// We mean it.
//
-#include <Qt3DCore/private/qcircularbuffer_p.h>
+#include <QtCore/QReadWriteLock>
+#include <QtCore/QReadLocker>
+#include <QtCore/QSemaphore>
+#include <QtCore/QtGlobal>
-#include <QReadWriteLock>
-#include <QReadLocker>
-#include <QSemaphore>
-#include <QtGlobal>
+#include <Qt3DCore/private/qcircularbuffer_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/resources/qcircularbuffer_p.h b/src/core/resources/qcircularbuffer_p.h
index 08665f4b5..e10b7236d 100644
--- a/src/core/resources/qcircularbuffer_p.h
+++ b/src/core/resources/qcircularbuffer_p.h
@@ -51,21 +51,23 @@
// We mean it.
//
+#include <Qt3DCore/qt3dcore_global.h>
+#include <QtCore/QtGlobal>
#include <QtCore/qlist.h>
#include <QtCore/qpair.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qvector.h>
#include <algorithm>
-#ifdef Q_COMPILER_INITIALIZER_LISTS
-# include <initializer_list>
-#endif
#include <iterator>
#include <limits>
#include <memory>
#include <new>
-#include <QtGlobal>
-#include <Qt3DCore/qt3dcore_global.h>
+
+
+#ifdef Q_COMPILER_INITIALIZER_LISTS
+# include <initializer_list>
+#endif
QT_BEGIN_NAMESPACE
diff --git a/src/core/resources/qframeallocator_p.h b/src/core/resources/qframeallocator_p.h
index cd0fa504c..b3ded0760 100644
--- a/src/core/resources/qframeallocator_p.h
+++ b/src/core/resources/qframeallocator_p.h
@@ -56,9 +56,10 @@
#include <valgrind/memcheck.h>
#endif
-#include <QDebug>
-#include <QScopedPointer>
-#include <QVector>
+#include <QtCore/QDebug>
+#include <QtCore/QScopedPointer>
+#include <QtCore/QVector>
+
#include <Qt3DCore/private/qt3dcore_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/resources/qhandlemanager_p.h b/src/core/resources/qhandlemanager_p.h
index b41fc75b1..0c3609bb9 100644
--- a/src/core/resources/qhandlemanager_p.h
+++ b/src/core/resources/qhandlemanager_p.h
@@ -51,12 +51,12 @@
// We mean it.
//
-#include <QtGlobal>
#include <Qt3DCore/qt3dcore_global.h>
-#include "qhandle_p.h"
-
+#include <QtCore/QtGlobal>
#include <QtCore/QVector>
+#include <Qt3DCore/private/qhandle_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/resources/qresourcemanager_p.h b/src/core/resources/qresourcemanager_p.h
index 1b79434fd..8ddc1c0a4 100644
--- a/src/core/resources/qresourcemanager_p.h
+++ b/src/core/resources/qresourcemanager_p.h
@@ -51,14 +51,15 @@
// We mean it.
//
-#include <QtGlobal>
-#include <QReadWriteLock>
-#include <QReadLocker>
-#include <QMutex>
-#include <QHash>
#include <Qt3DCore/qt3dcore_global.h>
-#include "qhandle_p.h"
-#include "qhandlemanager_p.h"
+#include <QtCore/QHash>
+#include <QtCore/QMutex>
+#include <QtCore/QReadLocker>
+#include <QtCore/QReadWriteLock>
+#include <QtCore/QtGlobal>
+
+#include <Qt3DCore/private/qhandle_p.h>
+#include <Qt3DCore/private/qhandlemanager_p.h>
// Silence complaints about unreferenced local variables in
// ArrayAllocatingPolicy::deallocateBuckets() when the compiler
diff --git a/src/core/services/nullservices_p.h b/src/core/services/nullservices_p.h
index ed7bd3a39..f75c6abc1 100644
--- a/src/core/services/nullservices_p.h
+++ b/src/core/services/nullservices_p.h
@@ -52,8 +52,9 @@
//
#include <Qt3DCore/qt3dcore_global.h>
-#include "qopenglinformationservice_p.h"
-#include "qsysteminformationservice_p.h"
+
+#include <Qt3DCore/private/qopenglinformationservice_p.h>
+#include <Qt3DCore/private/qsysteminformationservice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/services/qabstractframeadvanceservice_p.h b/src/core/services/qabstractframeadvanceservice_p.h
index 2dde68f06..a5f635710 100644
--- a/src/core/services/qabstractframeadvanceservice_p.h
+++ b/src/core/services/qabstractframeadvanceservice_p.h
@@ -52,8 +52,9 @@
//
#include <Qt3DCore/qt3dcore_global.h>
+#include <QtCore/QString>
+
#include <Qt3DCore/private/qservicelocator_p.h>
-#include <QString>
QT_BEGIN_NAMESPACE
diff --git a/src/core/services/qabstractframeadvanceservice_p_p.h b/src/core/services/qabstractframeadvanceservice_p_p.h
index d73ca3116..c49586b8f 100644
--- a/src/core/services/qabstractframeadvanceservice_p_p.h
+++ b/src/core/services/qabstractframeadvanceservice_p_p.h
@@ -52,6 +52,7 @@
//
#include <Qt3DCore/qt3dcore_global.h>
+
#include <Qt3DCore/private/qabstractserviceprovider_p.h>
#include <Qt3DCore/private/qservicelocator_p.h>
diff --git a/src/core/services/qabstractserviceprovider_p.h b/src/core/services/qabstractserviceprovider_p.h
index a176f0727..cef6ef034 100644
--- a/src/core/services/qabstractserviceprovider_p.h
+++ b/src/core/services/qabstractserviceprovider_p.h
@@ -55,6 +55,8 @@
#include <Qt3DCore/qt3dcore_global.h>
#include <QtCore/qstring.h>
+#include <Qt3DCore/private/qservicelocator_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/services/qeventfilterservice.cpp b/src/core/services/qeventfilterservice.cpp
index 8f6687001..6584c5e24 100644
--- a/src/core/services/qeventfilterservice.cpp
+++ b/src/core/services/qeventfilterservice.cpp
@@ -38,10 +38,12 @@
****************************************************************************/
#include "qeventfilterservice_p.h"
-#include "qabstractserviceprovider_p.h"
-#include <QMap>
-#include <QObject>
-#include <QVector>
+
+#include <QtCore/QMap>
+#include <QtCore/QObject>
+#include <QtCore/QVector>
+
+#include <Qt3DCore/private/qabstractserviceprovider_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/services/qeventfilterservice_p.h b/src/core/services/qeventfilterservice_p.h
index 4962e2af6..5f779c9cd 100644
--- a/src/core/services/qeventfilterservice_p.h
+++ b/src/core/services/qeventfilterservice_p.h
@@ -52,6 +52,7 @@
//
#include <Qt3DCore/qt3dcore_global.h>
+
#include <Qt3DCore/private/qservicelocator_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/services/qopenglinformationservice_p.h b/src/core/services/qopenglinformationservice_p.h
index a2c37c29a..c84c5ed10 100644
--- a/src/core/services/qopenglinformationservice_p.h
+++ b/src/core/services/qopenglinformationservice_p.h
@@ -52,9 +52,10 @@
//
#include <Qt3DCore/qt3dcore_global.h>
-#include <Qt3DCore/private/qservicelocator_p.h>
-#include <QtGui/qsurfaceformat.h>
#include <QtCore/qstring.h>
+#include <QtGui/qsurfaceformat.h>
+
+#include <Qt3DCore/private/qservicelocator_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/services/qopenglinformationservice_p_p.h b/src/core/services/qopenglinformationservice_p_p.h
index 4abef6f18..d10d81d71 100644
--- a/src/core/services/qopenglinformationservice_p_p.h
+++ b/src/core/services/qopenglinformationservice_p_p.h
@@ -52,6 +52,7 @@
//
#include <Qt3DCore/qt3dcore_global.h>
+
#include <Qt3DCore/private/qabstractserviceprovider_p.h>
#include <Qt3DCore/private/qservicelocator_p.h>
diff --git a/src/core/services/qservicelocator.cpp b/src/core/services/qservicelocator.cpp
index 176d9b078..9d12cfe2c 100644
--- a/src/core/services/qservicelocator.cpp
+++ b/src/core/services/qservicelocator.cpp
@@ -38,11 +38,13 @@
****************************************************************************/
#include "qservicelocator_p.h"
-#include "qabstractserviceprovider_p.h"
-#include "nullservices_p.h"
-#include "qtickclockservice_p.h"
-#include "qeventfilterservice_p.h"
-#include <QHash>
+
+#include <QtCore/QHash>
+
+#include <Qt3DCore/private/nullservices_p.h>
+#include <Qt3DCore/private/qabstractserviceprovider_p.h>
+#include <Qt3DCore/private/qeventfilterservice_p.h>
+#include <Qt3DCore/private/qtickclockservice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/services/qservicelocator_p.h b/src/core/services/qservicelocator_p.h
index db402bb90..1c5db4a5b 100644
--- a/src/core/services/qservicelocator_p.h
+++ b/src/core/services/qservicelocator_p.h
@@ -52,8 +52,8 @@
//
#include <Qt3DCore/qt3dcore_global.h>
-#include <QScopedPointer>
-#include <QObject>
+#include <QtCore/qobject.h>
+#include <QtCore/qscopedpointer.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/services/qsysteminformationservice_p.h b/src/core/services/qsysteminformationservice_p.h
index dc384fb93..0ab737817 100644
--- a/src/core/services/qsysteminformationservice_p.h
+++ b/src/core/services/qsysteminformationservice_p.h
@@ -52,9 +52,10 @@
//
#include <Qt3DCore/qt3dcore_global.h>
-#include <Qt3DCore/private/qservicelocator_p.h>
#include <QtCore/qstringlist.h>
+#include <Qt3DCore/private/qservicelocator_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/services/qsysteminformationservice_p_p.h b/src/core/services/qsysteminformationservice_p_p.h
index 897caf62b..e3ce9fe49 100644
--- a/src/core/services/qsysteminformationservice_p_p.h
+++ b/src/core/services/qsysteminformationservice_p_p.h
@@ -52,6 +52,7 @@
//
#include <Qt3DCore/qt3dcore_global.h>
+
#include <Qt3DCore/private/qabstractserviceprovider_p.h>
#include <Qt3DCore/private/qservicelocator_p.h>
diff --git a/src/core/services/qtickclockservice.cpp b/src/core/services/qtickclockservice.cpp
index 3691959ed..225e70ec2 100644
--- a/src/core/services/qtickclockservice.cpp
+++ b/src/core/services/qtickclockservice.cpp
@@ -38,9 +38,10 @@
****************************************************************************/
#include "qtickclockservice_p.h"
-#include "qtickclock_p.h"
-#include "qabstractframeadvanceservice_p.h"
-#include "qabstractframeadvanceservice_p_p.h"
+
+#include <Qt3DCore/private/qabstractframeadvanceservice_p.h>
+#include <Qt3DCore/private/qabstractframeadvanceservice_p_p.h>
+#include <Qt3DCore/private/qtickclock_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/services/qtickclockservice_p.h b/src/core/services/qtickclockservice_p.h
index b84018d0b..53f3cf310 100644
--- a/src/core/services/qtickclockservice_p.h
+++ b/src/core/services/qtickclockservice_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "qabstractframeadvanceservice_p.h"
+#include <Qt3DCore/private/qabstractframeadvanceservice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/core/transforms/qmath3d_p.h b/src/core/transforms/qmath3d_p.h
index 38ebbd99a..8c2afac31 100644
--- a/src/core/transforms/qmath3d_p.h
+++ b/src/core/transforms/qmath3d_p.h
@@ -50,7 +50,6 @@
//
// We mean it.
//
-
#include <QtGui/qmatrix4x4.h>
#include <QtGui/qquaternion.h>
#include <QtGui/qvector3d.h>
diff --git a/src/core/transforms/qtransform.cpp b/src/core/transforms/qtransform.cpp
index d28138cad..a551d83d8 100644
--- a/src/core/transforms/qtransform.cpp
+++ b/src/core/transforms/qtransform.cpp
@@ -39,10 +39,11 @@
#include "qtransform.h"
#include "qtransform_p.h"
-#include "qmath3d_p.h"
#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DCore/private/qmath3d_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/core/transforms/qtransform.h b/src/core/transforms/qtransform.h
index 25b1da8cd..cb2b1bdce 100644
--- a/src/core/transforms/qtransform.h
+++ b/src/core/transforms/qtransform.h
@@ -41,7 +41,6 @@
#define QT3DCORE_QTRANSFORM_H
#include <Qt3DCore/qcomponent.h>
-
#include <QtGui/qmatrix4x4.h>
#include <QtGui/qquaternion.h>
#include <QtGui/qvector3d.h>
diff --git a/src/core/transforms/qtransform_p.h b/src/core/transforms/qtransform_p.h
index 8d1a60566..89bc55491 100644
--- a/src/core/transforms/qtransform_p.h
+++ b/src/core/transforms/qtransform_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qcomponent_p.h>
+#include <Qt3DCore/private/qcomponent_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qdiffusemapmaterial.cpp b/src/extras/defaults/qdiffusemapmaterial.cpp
index b3aa3bf00..a6da98a2e 100644
--- a/src/extras/defaults/qdiffusemapmaterial.cpp
+++ b/src/extras/defaults/qdiffusemapmaterial.cpp
@@ -39,6 +39,7 @@
#include "qdiffusemapmaterial.h"
#include "qdiffusemapmaterial_p.h"
+
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qeffect.h>
@@ -48,9 +49,9 @@
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qgraphicsapifilter.h>
-#include <QUrl>
-#include <QVector3D>
-#include <QVector4D>
+#include <QtCore/QUrl>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qdiffusemapmaterial.h b/src/extras/defaults/qdiffusemapmaterial.h
index b6bba9b36..e6c632ed2 100644
--- a/src/extras/defaults/qdiffusemapmaterial.h
+++ b/src/extras/defaults/qdiffusemapmaterial.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qmaterial.h>
-#include <QColor>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qdiffusespecularmapmaterial.cpp b/src/extras/defaults/qdiffusespecularmapmaterial.cpp
index 4b79eea2b..615ee6305 100644
--- a/src/extras/defaults/qdiffusespecularmapmaterial.cpp
+++ b/src/extras/defaults/qdiffusespecularmapmaterial.cpp
@@ -39,6 +39,7 @@
#include "qdiffusespecularmapmaterial.h"
#include "qdiffusespecularmapmaterial_p.h"
+
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qeffect.h>
@@ -48,9 +49,9 @@
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qgraphicsapifilter.h>
-#include <QUrl>
-#include <QVector3D>
-#include <QVector4D>
+#include <QtCore/QUrl>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qdiffusespecularmapmaterial.h b/src/extras/defaults/qdiffusespecularmapmaterial.h
index d5dd053bd..d86948673 100644
--- a/src/extras/defaults/qdiffusespecularmapmaterial.h
+++ b/src/extras/defaults/qdiffusespecularmapmaterial.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qmaterial.h>
-#include <QColor>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qfirstpersoncameracontroller.cpp b/src/extras/defaults/qfirstpersoncameracontroller.cpp
index efdde2dac..5321bfcf2 100644
--- a/src/extras/defaults/qfirstpersoncameracontroller.cpp
+++ b/src/extras/defaults/qfirstpersoncameracontroller.cpp
@@ -34,19 +34,20 @@
**
****************************************************************************/
-#include "qfirstpersoncameracontroller_p.h"
#include "qfirstpersoncameracontroller.h"
-#include <Qt3DRender/QCamera>
-#include <Qt3DInput/QAxis>
-#include <Qt3DInput/QAnalogAxisInput>
-#include <Qt3DInput/QButtonAxisInput>
+#include "qfirstpersoncameracontroller_p.h"
+
#include <Qt3DInput/QAction>
#include <Qt3DInput/QActionInput>
-#include <Qt3DInput/QLogicalDevice>
+#include <Qt3DInput/QAnalogAxisInput>
+#include <Qt3DInput/QAxis>
+#include <Qt3DInput/QButtonAxisInput>
+#include <Qt3DLogic/QFrameAction>
#include <Qt3DInput/QKeyboardDevice>
+#include <Qt3DInput/QLogicalDevice>
#include <Qt3DInput/QMouseDevice>
#include <Qt3DInput/QMouseEvent>
-#include <Qt3DLogic/QFrameAction>
+#include <Qt3DRender/QCamera>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qfirstpersoncameracontroller_p.h b/src/extras/defaults/qfirstpersoncameracontroller_p.h
index d4080889b..48a7c7998 100644
--- a/src/extras/defaults/qfirstpersoncameracontroller_p.h
+++ b/src/extras/defaults/qfirstpersoncameracontroller_p.h
@@ -51,9 +51,11 @@
#ifndef QT3DEXTRAS_QFIRSTPERSONCAMERACONTROLLER_P_H
#define QT3DEXTRAS_QFIRSTPERSONCAMERACONTROLLER_P_H
+#include <Qt3DExtras/qfirstpersoncameracontroller.h>
+#include <QtGui/QVector3D>
+
#include <Qt3DCore/private/qentity_p.h>
-#include <QVector3D>
-#include "qfirstpersoncameracontroller.h"
+
//
// W A R N I N G
diff --git a/src/extras/defaults/qforwardrenderer.h b/src/extras/defaults/qforwardrenderer.h
index a2527a4ec..7b6078169 100644
--- a/src/extras/defaults/qforwardrenderer.h
+++ b/src/extras/defaults/qforwardrenderer.h
@@ -42,8 +42,9 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qtechniquefilter.h>
-#include <QRectF>
-#include <QColor>
+#include <QtCore/QRectF>
+#include <QtGui/QColor>
+
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qgoochmaterial.cpp b/src/extras/defaults/qgoochmaterial.cpp
index f2f34fc84..ba7ef8dab 100644
--- a/src/extras/defaults/qgoochmaterial.cpp
+++ b/src/extras/defaults/qgoochmaterial.cpp
@@ -39,13 +39,13 @@
#include "qgoochmaterial.h"
#include "qgoochmaterial_p.h"
+
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qeffect.h>
#include <Qt3DRender/qgraphicsapifilter.h>
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qtechnique.h>
-
#include <QtCore/qurl.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qgoochmaterial.h b/src/extras/defaults/qgoochmaterial.h
index 232257513..6afddfe8b 100644
--- a/src/extras/defaults/qgoochmaterial.h
+++ b/src/extras/defaults/qgoochmaterial.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qmaterial.h>
-#include <QColor>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp b/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp
index 92564ee3f..eb6398341 100644
--- a/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp
+++ b/src/extras/defaults/qnormaldiffusemapalphamaterial.cpp
@@ -49,10 +49,9 @@
#include <Qt3DRender/qgraphicsapifilter.h>
#include <Qt3DRender/qalphacoverage.h>
#include <Qt3DRender/qdepthtest.h>
-
-#include <QUrl>
-#include <QVector3D>
-#include <QVector4D>
+#include <QtCore/QUrl>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qnormaldiffusemapalphamaterial_p.h b/src/extras/defaults/qnormaldiffusemapalphamaterial_p.h
index 91b0961f1..5994d87eb 100644
--- a/src/extras/defaults/qnormaldiffusemapalphamaterial_p.h
+++ b/src/extras/defaults/qnormaldiffusemapalphamaterial_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <qnormaldiffusemapmaterial_p.h>
+#include <Qt3DExtras/private/qnormaldiffusemapmaterial_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qnormaldiffusemapmaterial.cpp b/src/extras/defaults/qnormaldiffusemapmaterial.cpp
index 8373c4d5d..35cea095a 100644
--- a/src/extras/defaults/qnormaldiffusemapmaterial.cpp
+++ b/src/extras/defaults/qnormaldiffusemapmaterial.cpp
@@ -39,6 +39,7 @@
#include "qnormaldiffusemapmaterial.h"
#include "qnormaldiffusemapmaterial_p.h"
+
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qeffect.h>
#include <Qt3DRender/qtexture.h>
@@ -47,10 +48,9 @@
#include <Qt3DRender/qshaderprogram.h>
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qgraphicsapifilter.h>
-
-#include <QUrl>
-#include <QVector3D>
-#include <QVector4D>
+#include <QtCore/QUrl>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qnormaldiffusemapmaterial.h b/src/extras/defaults/qnormaldiffusemapmaterial.h
index f60a27b86..c38d53352 100644
--- a/src/extras/defaults/qnormaldiffusemapmaterial.h
+++ b/src/extras/defaults/qnormaldiffusemapmaterial.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qmaterial.h>
-#include <QColor>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qnormaldiffusemapmaterial_p.h b/src/extras/defaults/qnormaldiffusemapmaterial_p.h
index 8dff59218..d88b01f1f 100644
--- a/src/extras/defaults/qnormaldiffusemapmaterial_p.h
+++ b/src/extras/defaults/qnormaldiffusemapmaterial_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <Qt3DRender/private/qmaterial_p.h>
+#include <private/qmaterial_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp b/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp
index e4a83c50c..c6f8ced9c 100644
--- a/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp
+++ b/src/extras/defaults/qnormaldiffusespecularmapmaterial.cpp
@@ -39,6 +39,7 @@
#include "qnormaldiffusespecularmapmaterial.h"
#include "qnormaldiffusespecularmapmaterial_p.h"
+
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qeffect.h>
@@ -48,9 +49,9 @@
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qgraphicsapifilter.h>
-#include <QUrl>
-#include <QVector3D>
-#include <QVector4D>
+#include <QtCore/QUrl>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qnormaldiffusespecularmapmaterial.h b/src/extras/defaults/qnormaldiffusespecularmapmaterial.h
index 586715971..164b07710 100644
--- a/src/extras/defaults/qnormaldiffusespecularmapmaterial.h
+++ b/src/extras/defaults/qnormaldiffusespecularmapmaterial.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qmaterial.h>
-#include <QColor>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qorbitcameracontroller.cpp b/src/extras/defaults/qorbitcameracontroller.cpp
index 1483e75ed..565a75ea1 100644
--- a/src/extras/defaults/qorbitcameracontroller.cpp
+++ b/src/extras/defaults/qorbitcameracontroller.cpp
@@ -34,9 +34,9 @@
**
****************************************************************************/
-#include "qorbitcameracontroller_p.h"
#include "qorbitcameracontroller.h"
-#include <QtGlobal>
+#include "qorbitcameracontroller_p.h"
+
#include <Qt3DRender/QCamera>
#include <Qt3DInput/QAxis>
#include <Qt3DInput/QAnalogAxisInput>
@@ -48,6 +48,7 @@
#include <Qt3DInput/QMouseDevice>
#include <Qt3DInput/QMouseEvent>
#include <Qt3DLogic/QFrameAction>
+#include <QtCore/QtGlobal>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qorbitcameracontroller.h b/src/extras/defaults/qorbitcameracontroller.h
index e48e39142..7cb8b3eb7 100644
--- a/src/extras/defaults/qorbitcameracontroller.h
+++ b/src/extras/defaults/qorbitcameracontroller.h
@@ -37,8 +37,8 @@
#ifndef QT3DEXTRAS_QORBITCAMERACONTROLLER_H
#define QT3DEXTRAS_QORBITCAMERACONTROLLER_H
-#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DCore/QEntity>
+#include <Qt3DExtras/qt3dextras_global.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qorbitcameracontroller_p.h b/src/extras/defaults/qorbitcameracontroller_p.h
index e730e482e..8105d4375 100644
--- a/src/extras/defaults/qorbitcameracontroller_p.h
+++ b/src/extras/defaults/qorbitcameracontroller_p.h
@@ -48,9 +48,10 @@
// We mean it.
//
+#include <Qt3DExtras/qorbitcameracontroller.h>
+#include <QtGui/QVector3D>
+
#include <Qt3DCore/private/qentity_p.h>
-#include <QVector3D>
-#include "qorbitcameracontroller.h"
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qpervertexcolormaterial.cpp b/src/extras/defaults/qpervertexcolormaterial.cpp
index 514f994c1..5619a71e7 100644
--- a/src/extras/defaults/qpervertexcolormaterial.cpp
+++ b/src/extras/defaults/qpervertexcolormaterial.cpp
@@ -39,6 +39,7 @@
#include "qpervertexcolormaterial.h"
#include "qpervertexcolormaterial_p.h"
+
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qeffect.h>
@@ -47,9 +48,9 @@
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qgraphicsapifilter.h>
-#include <QUrl>
-#include <QVector3D>
-#include <QVector4D>
+#include <QtCore/QUrl>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qpervertexcolormaterial.h b/src/extras/defaults/qpervertexcolormaterial.h
index 485e2fe0e..8b64eb2d3 100644
--- a/src/extras/defaults/qpervertexcolormaterial.h
+++ b/src/extras/defaults/qpervertexcolormaterial.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qmaterial.h>
-#include <QColor>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qphongalphamaterial.cpp b/src/extras/defaults/qphongalphamaterial.cpp
index 7a05610c2..d7f054d71 100644
--- a/src/extras/defaults/qphongalphamaterial.cpp
+++ b/src/extras/defaults/qphongalphamaterial.cpp
@@ -39,6 +39,7 @@
#include "qphongalphamaterial.h"
#include "qphongalphamaterial_p.h"
+
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qeffect.h>
@@ -50,9 +51,9 @@
#include <Qt3DRender/qblendequation.h>
#include <Qt3DRender/qblendequationarguments.h>
#include <Qt3DRender/qnodepthmask.h>
-#include <QUrl>
-#include <QVector3D>
-#include <QVector4D>
+#include <QtCore/QUrl>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qphongalphamaterial.h b/src/extras/defaults/qphongalphamaterial.h
index b67524ef7..667c5b283 100644
--- a/src/extras/defaults/qphongalphamaterial.h
+++ b/src/extras/defaults/qphongalphamaterial.h
@@ -41,10 +41,10 @@
#define QT3DEXTRAS_QPHONGALPHAMATERIAL_H
#include <Qt3DExtras/qt3dextras_global.h>
-#include <Qt3DRender/qmaterial.h>
-#include <Qt3DRender/qblendequationarguments.h>
#include <Qt3DRender/qblendequation.h>
-#include <QColor>
+#include <Qt3DRender/qblendequationarguments.h>
+#include <Qt3DRender/qmaterial.h>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qphongmaterial.cpp b/src/extras/defaults/qphongmaterial.cpp
index c294984b6..449eb7351 100644
--- a/src/extras/defaults/qphongmaterial.cpp
+++ b/src/extras/defaults/qphongmaterial.cpp
@@ -39,6 +39,7 @@
#include "qphongmaterial.h"
#include "qphongmaterial_p.h"
+
#include <Qt3DRender/qfilterkey.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qeffect.h>
@@ -47,9 +48,10 @@
#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qrenderpass.h>
#include <Qt3DRender/qgraphicsapifilter.h>
-#include <QUrl>
-#include <QVector3D>
-#include <QVector4D>
+#include <QtCore/QUrl>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
+
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qphongmaterial.h b/src/extras/defaults/qphongmaterial.h
index d4b8a0f0e..d78c8c2ff 100644
--- a/src/extras/defaults/qphongmaterial.h
+++ b/src/extras/defaults/qphongmaterial.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qmaterial.h>
-#include <QColor>
+#include <QtGui/QColor>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qskyboxentity_p.h b/src/extras/defaults/qskyboxentity_p.h
index ebf89bdbc..88a40e2eb 100644
--- a/src/extras/defaults/qskyboxentity_p.h
+++ b/src/extras/defaults/qskyboxentity_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
+#include <QtGui/QVector3D>
+
#include <Qt3DCore/private/qentity_p.h>
-#include <QVector3D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qt3dwindow.cpp b/src/extras/defaults/qt3dwindow.cpp
index 6d68df208..a0ce40e16 100644
--- a/src/extras/defaults/qt3dwindow.cpp
+++ b/src/extras/defaults/qt3dwindow.cpp
@@ -50,17 +50,15 @@
#include "qt3dwindow.h"
+#include <Qt3DCore/qaspectengine.h>
+#include <Qt3DCore/qentity.h>
#include <Qt3DExtras/qforwardrenderer.h>
#include <Qt3DRender/qrendersettings.h>
#include <Qt3DRender/qrenderaspect.h>
#include <Qt3DInput/qinputaspect.h>
#include <Qt3DInput/qinputsettings.h>
#include <Qt3DLogic/qlogicaspect.h>
-
-#include <Qt3DCore/qaspectengine.h>
#include <Qt3DRender/qcamera.h>
-#include <Qt3DCore/qentity.h>
-
#include <QtGui/qopenglcontext.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/defaults/qt3dwindow.h b/src/extras/defaults/qt3dwindow.h
index f3ab04aac..811bb134d 100644
--- a/src/extras/defaults/qt3dwindow.h
+++ b/src/extras/defaults/qt3dwindow.h
@@ -51,8 +51,8 @@
#ifndef QT3DWINDOW_H
#define QT3DWINDOW_H
-#include <QWindow>
#include <Qt3DExtras/qt3dextras_global.h>
+#include <QtGui/QWindow>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qconegeometry.cpp b/src/extras/geometries/qconegeometry.cpp
index a86d10f6b..12bbf7ce3 100644
--- a/src/extras/geometries/qconegeometry.cpp
+++ b/src/extras/geometries/qconegeometry.cpp
@@ -57,10 +57,12 @@
#include "qconegeometry.h"
#include "qconegeometry_p.h"
+
#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qbufferdatagenerator.h>
#include <Qt3DRender/qattribute.h>
-#include <QVector3D>
+#include <QtGui/QVector3D>
+
#include <cmath>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qconemesh.cpp b/src/extras/geometries/qconemesh.cpp
index 8baa19217..5e327df03 100644
--- a/src/extras/geometries/qconemesh.cpp
+++ b/src/extras/geometries/qconemesh.cpp
@@ -41,13 +41,15 @@
# define _USE_MATH_DEFINES // For MSVC
#endif
-#include "qconemesh.h"
#include "qconegeometry.h"
+
+#include <Qt3DExtras/qconemesh.h>
#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qbufferdatagenerator.h>
#include <Qt3DRender/qattribute.h>
+#include <QtGui/QVector3D>
+
#include <qmath.h>
-#include <QVector3D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qcuboidgeometry.cpp b/src/extras/geometries/qcuboidgeometry.cpp
index 28743858a..3bb68a500 100644
--- a/src/extras/geometries/qcuboidgeometry.cpp
+++ b/src/extras/geometries/qcuboidgeometry.cpp
@@ -39,12 +39,15 @@
#include "qcuboidgeometry.h"
#include "qcuboidgeometry_p.h"
+
#include <Qt3DRender/qattribute.h>
#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qbufferdatagenerator.h>
#include <Qt3DRender/private/renderlogging_p.h>
+
#include <limits>
+
QT_BEGIN_NAMESPACE
using namespace Qt3DRender;
diff --git a/src/extras/geometries/qcuboidgeometry.h b/src/extras/geometries/qcuboidgeometry.h
index fad5dcf9f..2c295d6c4 100644
--- a/src/extras/geometries/qcuboidgeometry.h
+++ b/src/extras/geometries/qcuboidgeometry.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qgeometry.h>
-#include <QSize>
+#include <QtCore/QSize>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qcuboidgeometry_p.h b/src/extras/geometries/qcuboidgeometry_p.h
index 212be19b4..cfabc0388 100644
--- a/src/extras/geometries/qcuboidgeometry_p.h
+++ b/src/extras/geometries/qcuboidgeometry_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
+#include <QtCore/QSize>
+
#include <Qt3DRender/private/qgeometry_p.h>
-#include <QSize>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qcuboidmesh.cpp b/src/extras/geometries/qcuboidmesh.cpp
index 88c735746..9e10d93a4 100644
--- a/src/extras/geometries/qcuboidmesh.cpp
+++ b/src/extras/geometries/qcuboidmesh.cpp
@@ -38,7 +38,8 @@
****************************************************************************/
#include "qcuboidmesh.h"
-#include "qcuboidgeometry.h"
+
+#include <Qt3DExtras/qcuboidgeometry.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qcuboidmesh.h b/src/extras/geometries/qcuboidmesh.h
index f709703c5..ca33c5f2d 100644
--- a/src/extras/geometries/qcuboidmesh.h
+++ b/src/extras/geometries/qcuboidmesh.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <QSize>
+#include <QtCore/QSize>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qcylindergeometry.cpp b/src/extras/geometries/qcylindergeometry.cpp
index 29f7ea7e0..4051477a6 100644
--- a/src/extras/geometries/qcylindergeometry.cpp
+++ b/src/extras/geometries/qcylindergeometry.cpp
@@ -43,11 +43,14 @@
#include "qcylindergeometry.h"
#include "qcylindergeometry_p.h"
+
#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qbufferdatagenerator.h>
#include <Qt3DRender/qattribute.h>
+#include <QtGui/QVector3D>
+
#include <qmath.h>
-#include <QVector3D>
+
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qcylindermesh.cpp b/src/extras/geometries/qcylindermesh.cpp
index 9b0ded28b..02df6295f 100644
--- a/src/extras/geometries/qcylindermesh.cpp
+++ b/src/extras/geometries/qcylindermesh.cpp
@@ -43,12 +43,14 @@
#endif
#include "qcylindermesh.h"
-#include "qcylindergeometry.h"
+
+#include <Qt3DExtras/qcylindergeometry.h>
#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qbufferdatagenerator.h>
#include <Qt3DRender/qattribute.h>
+#include <QtGui/QVector3D>
+
#include <qmath.h>
-#include <QVector3D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qplanegeometry.cpp b/src/extras/geometries/qplanegeometry.cpp
index 16b401d3d..f6eba9e61 100644
--- a/src/extras/geometries/qplanegeometry.cpp
+++ b/src/extras/geometries/qplanegeometry.cpp
@@ -39,9 +39,11 @@
#include "qplanegeometry.h"
#include "qplanegeometry_p.h"
+
#include <Qt3DRender/qattribute.h>
#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qbufferdatagenerator.h>
+
#include <limits>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qplanegeometry.h b/src/extras/geometries/qplanegeometry.h
index 7ec5cba43..694e04e82 100644
--- a/src/extras/geometries/qplanegeometry.h
+++ b/src/extras/geometries/qplanegeometry.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qgeometry.h>
-#include <QSize>
+#include <QtCore/QSize>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qplanegeometry_p.h b/src/extras/geometries/qplanegeometry_p.h
index d0a4e88e4..cfde6da1c 100644
--- a/src/extras/geometries/qplanegeometry_p.h
+++ b/src/extras/geometries/qplanegeometry_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
+#include <QtCore/QSize>
+
#include <Qt3DRender/private/qgeometry_p.h>
-#include <QSize>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qplanemesh.cpp b/src/extras/geometries/qplanemesh.cpp
index 120aed6df..5991c5397 100644
--- a/src/extras/geometries/qplanemesh.cpp
+++ b/src/extras/geometries/qplanemesh.cpp
@@ -38,7 +38,8 @@
****************************************************************************/
#include "qplanemesh.h"
-#include "qplanegeometry.h"
+
+#include <Qt3DExtras/qplanegeometry.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qplanemesh.h b/src/extras/geometries/qplanemesh.h
index b1505db17..d68774ca0 100644
--- a/src/extras/geometries/qplanemesh.h
+++ b/src/extras/geometries/qplanemesh.h
@@ -42,7 +42,7 @@
#include <Qt3DExtras/qt3dextras_global.h>
#include <Qt3DRender/qgeometryrenderer.h>
-#include <QSize>
+#include <QtCore/QSize>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qspheregeometry.cpp b/src/extras/geometries/qspheregeometry.cpp
index a79eb8074..eae12ef39 100644
--- a/src/extras/geometries/qspheregeometry.cpp
+++ b/src/extras/geometries/qspheregeometry.cpp
@@ -39,15 +39,17 @@
#include "qspheregeometry.h"
#include "qspheregeometry_p.h"
+
#include <Qt3DRender/qbufferdatagenerator.h>
#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qattribute.h>
+#include <qmath.h>
+
#ifndef _USE_MATH_DEFINES
# define _USE_MATH_DEFINES // For MSVC
#endif
-#include <qmath.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qspheremesh.cpp b/src/extras/geometries/qspheremesh.cpp
index 988a95990..22089d7ab 100644
--- a/src/extras/geometries/qspheremesh.cpp
+++ b/src/extras/geometries/qspheremesh.cpp
@@ -39,7 +39,8 @@
****************************************************************************/
#include "qspheremesh.h"
-#include "qspheregeometry.h"
+
+#include <Qt3DExtras/qspheregeometry.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qtorusgeometry.cpp b/src/extras/geometries/qtorusgeometry.cpp
index 08afce1b0..57c94ec95 100644
--- a/src/extras/geometries/qtorusgeometry.cpp
+++ b/src/extras/geometries/qtorusgeometry.cpp
@@ -39,12 +39,14 @@
#include "qtorusgeometry.h"
#include "qtorusgeometry_p.h"
+
#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qbufferdatagenerator.h>
#include <Qt3DRender/qattribute.h>
+#include <QtGui/QVector3D>
+#include <QtGui/QVector4D>
+
#include <qmath.h>
-#include <QVector3D>
-#include <QVector4D>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/geometries/qtorusmesh.cpp b/src/extras/geometries/qtorusmesh.cpp
index 96fce9ec0..8e7c678db 100644
--- a/src/extras/geometries/qtorusmesh.cpp
+++ b/src/extras/geometries/qtorusmesh.cpp
@@ -43,7 +43,8 @@
#endif
#include "qtorusmesh.h"
-#include "qtorusgeometry.h"
+
+#include <Qt3DExtras/qtorusgeometry.h>
QT_BEGIN_NAMESPACE
diff --git a/src/extras/shaders/es2/light.inc.frag b/src/extras/shaders/es2/light.inc.frag
index 02660f008..726340d7e 100644
--- a/src/extras/shaders/es2/light.inc.frag
+++ b/src/extras/shaders/es2/light.inc.frag
@@ -14,125 +14,215 @@ struct Light {
uniform Light lights[MAX_LIGHTS];
uniform int lightCount;
+void addLightAdsModelNormalMapped(const in FP vec3 vpos,
+ const in FP vec3 n,
+ const in FP vec3 eye,
+ const in FP float shininess,
+ const in FP mat3 tangentMatrix,
+ const in Light light,
+ inout FP vec3 diffuseColor,
+ inout FP vec3 specularColor)
+{
+ FP vec3 snormal = normalize( vec3( tangentMatrix[0][2], tangentMatrix[1][2], tangentMatrix[2][2] ) );
+
+ FP vec3 s, ts;
+ FP float att = 1.0;
+ if ( light.type != TYPE_DIRECTIONAL ) {
+ s = light.position - vpos;
+ if ( dot(snormal, s) < 0.0 )
+ att = 0.0;
+ else {
+ ts = normalize( tangentMatrix * s );
+ if (length( light.attenuation ) != 0.0) {
+ FP float dist = length(s);
+ att = 1.0 / (light.attenuation.x + light.attenuation.y * dist + light.attenuation.z * dist * dist);
+ }
+ s = normalize( s );
+ if ( light.type == TYPE_SPOT ) {
+ if ( degrees(acos(dot(-s, normalize(light.direction))) ) > light.cutOffAngle)
+ att = 0.0;
+ }
+ }
+ } else {
+ if ( dot(snormal, -light.direction) > 0.0 )
+ s = normalize( tangentMatrix * -light.direction );
+ else
+ att = 0.0;
+ }
+
+ FP float diffuse = max( dot( ts, n ), 0.0 );
+
+ FP float specular = 0.0;
+ if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) {
+ FP vec3 r = reflect( -ts, n );
+ FP vec3 v = normalize( tangentMatrix * ( eye - vpos ) );
+ FP float normFactor = ( shininess + 2.0 ) / 2.0;
+ specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess );
+ }
+
+ diffuseColor += att * light.intensity * diffuse * light.color;
+ specularColor += att * light.intensity * specular * light.color;
+}
+
void adsModelNormalMapped(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3 eye, const in FP float shininess,
const in FP mat3 tangentMatrix,
out FP vec3 diffuseColor, out FP vec3 specularColor)
{
diffuseColor = vec3(0.0);
specularColor = vec3(0.0);
-
- FP vec3 snormal = normalize( vec3( tangentMatrix[0][2], tangentMatrix[1][2], tangentMatrix[2][2] ) );
+ if (lightCount < 1) return;
FP vec3 n = normalize( vnormal );
+ addLightAdsModelNormalMapped(vpos, n, eye, shininess, tangentMatrix, lights[0], diffuseColor, specularColor);
+ if (lightCount < 2) return;
- FP vec3 s, ts;
- for (int i = 0; i < lightCount; ++i) {
- FP float att = 1.0;
- if ( lights[i].type != TYPE_DIRECTIONAL ) {
- s = lights[i].position - vpos;
- if ( dot(snormal, s) < 0.0 )
- att = 0.0;
- else {
- ts = normalize( tangentMatrix * s );
- if (length( lights[i].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[i].attenuation.x + lights[i].attenuation.y * dist + lights[i].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[i].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[i].direction))) ) > lights[i].cutOffAngle)
- att = 0.0;
- }
- }
- } else {
- if ( dot(snormal, -lights[i].direction) > 0.0 )
- s = normalize( tangentMatrix * -lights[i].direction );
- else
- att = 0.0;
- }
+ addLightAdsModelNormalMapped(vpos, n, eye, shininess, tangentMatrix, lights[1], diffuseColor, specularColor);
+ if (lightCount < 3) return;
+
+ addLightAdsModelNormalMapped(vpos, n, eye, shininess, tangentMatrix, lights[2], diffuseColor, specularColor);
+ if (lightCount < 4) return;
+
+ addLightAdsModelNormalMapped(vpos, n, eye, shininess, tangentMatrix, lights[3], diffuseColor, specularColor);
+ if (lightCount < 5) return;
+
+ addLightAdsModelNormalMapped(vpos, n, eye, shininess, tangentMatrix, lights[4], diffuseColor, specularColor);
+ if (lightCount < 6) return;
- FP float diffuse = max( dot( ts, n ), 0.0 );
+ addLightAdsModelNormalMapped(vpos, n, eye, shininess, tangentMatrix, lights[5], diffuseColor, specularColor);
+ if (lightCount < 7) return;
- FP float specular = 0.0;
- if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) {
- FP vec3 r = reflect( -ts, n );
- FP vec3 v = normalize( tangentMatrix * ( eye - vpos ) );
- FP float normFactor = ( shininess + 2.0 ) / 2.0;
- specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess );
+ addLightAdsModelNormalMapped(vpos, n, eye, shininess, tangentMatrix, lights[6], diffuseColor, specularColor);
+ if (lightCount < 8) return;
+
+ addLightAdsModelNormalMapped(vpos, n, eye, shininess, tangentMatrix, lights[7], diffuseColor, specularColor);
+}
+
+void addLightAdsModel(const in FP vec3 vpos,
+ const in FP vec3 n,
+ const in FP vec3 eye,
+ const in FP float shininess,
+ const in Light light,
+ inout FP vec3 diffuseColor,
+ inout FP vec3 specularColor)
+{
+ FP vec3 s;
+
+ FP float att = 1.0;
+ if ( light.type != TYPE_DIRECTIONAL ) {
+ s = light.position - vpos;
+ if (length( light.attenuation ) != 0.0) {
+ FP float dist = length(s);
+ att = 1.0 / (light.attenuation.x + light.attenuation.y * dist + light.attenuation.z * dist * dist);
+ }
+ s = normalize( s );
+ if ( light.type == TYPE_SPOT ) {
+ if ( degrees(acos(dot(-s, normalize(light.direction))) ) > light.cutOffAngle)
+ att = 0.0;
}
+ } else {
+ s = normalize( -light.direction );
+ }
- diffuseColor += att * lights[i].intensity * diffuse * lights[i].color;
- specularColor += att * lights[i].intensity * specular * lights[i].color;
+ FP float diffuse = max( dot( s, n ), 0.0 );
+ FP float specular = 0.0;
+
+ if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) {
+ FP vec3 r = reflect( -s, n );
+ FP vec3 v = normalize( eye - vpos );
+ FP float normFactor = ( shininess + 2.0 ) / 2.0;
+ specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess );
}
+
+ diffuseColor += att * light.intensity * diffuse * light.color;
+ specularColor += att * light.intensity * specular * light.color;
}
+
void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3 eye, const in FP float shininess,
out FP vec3 diffuseColor, out FP vec3 specularColor)
{
diffuseColor = vec3(0.0);
specularColor = vec3(0.0);
+ if (lightCount < 1) return;
FP vec3 n = normalize( vnormal );
+ addLightAdsModel(vpos, n, eye, shininess, lights[0], diffuseColor, specularColor);
+ if (lightCount < 2) return;
- FP vec3 s;
- for (int i = 0; i < lightCount; ++i) {
- FP float att = 1.0;
- if ( lights[i].type != TYPE_DIRECTIONAL ) {
- s = lights[i].position - vpos;
- if (length( lights[i].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[i].attenuation.x + lights[i].attenuation.y * dist + lights[i].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[i].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[i].direction))) ) > lights[i].cutOffAngle)
- att = 0.0;
- }
- } else {
- s = normalize( -lights[i].direction );
- }
+ addLightAdsModel(vpos, n, eye, shininess, lights[1], diffuseColor, specularColor);
+ if (lightCount < 3) return;
- FP float diffuse = max( dot( s, n ), 0.0 );
+ addLightAdsModel(vpos, n, eye, shininess, lights[2], diffuseColor, specularColor);
+ if (lightCount < 4) return;
- FP float specular = 0.0;
- if (diffuse > 0.0 && shininess > 0.0 && att > 0.0) {
- FP vec3 r = reflect( -s, n );
- FP vec3 v = normalize( eye - vpos );
- FP float normFactor = ( shininess + 2.0 ) / 2.0;
- specular = normFactor * pow( max( dot( r, v ), 0.0 ), shininess );
- }
+ addLightAdsModel(vpos, n, eye, shininess, lights[3], diffuseColor, specularColor);
+ if (lightCount < 5) return;
+
+ addLightAdsModel(vpos, n, eye, shininess, lights[4], diffuseColor, specularColor);
+ if (lightCount < 6) return;
+
+ addLightAdsModel(vpos, n, eye, shininess, lights[5], diffuseColor, specularColor);
+ if (lightCount < 7) return;
+
+ addLightAdsModel(vpos, n, eye, shininess, lights[6], diffuseColor, specularColor);
+ if (lightCount < 8) return;
- diffuseColor += att * lights[i].intensity * diffuse * lights[i].color;
- specularColor += att * lights[i].intensity * specular * lights[i].color;
+ addLightAdsModel(vpos, n, eye, shininess, lights[7], diffuseColor, specularColor);
+}
+
+void addLightAdModel(const in FP vec3 vpos,
+ const in FP vec3 n,
+ const in Light light,
+ inout FP vec3 diffuseColor)
+{
+ FP vec3 s;
+ FP float att = 1.0;
+ if ( light.type != TYPE_DIRECTIONAL ) {
+ s = light.position - vpos;
+ if (length( light.attenuation ) != 0.0) {
+ FP float dist = length(s);
+ att = 1.0 / (light.attenuation.x + light.attenuation.y * dist + light.attenuation.z * dist * dist);
+ }
+ s = normalize( s );
+ if ( light.type == TYPE_SPOT ) {
+ if ( degrees(acos(dot(-s, normalize(light.direction))) ) > light.cutOffAngle)
+ att = 0.0;
+ }
+ } else {
+ s = normalize( -light.direction );
}
+
+ FP float diffuse = max( dot( s, n ), 0.0 );
+
+ diffuseColor += att * light.intensity * diffuse * light.color;
}
void adModel(const in FP vec3 vpos, const in FP vec3 vnormal, out FP vec3 diffuseColor)
{
diffuseColor = vec3(0.0);
+ if (lightCount < 1) return;
FP vec3 n = normalize( vnormal );
+ addLightAdModel(vpos, n, lights[0], diffuseColor);
+ if (lightCount < 2) return;
- FP vec3 s;
- for (int i = 0; i < lightCount; ++i) {
- FP float att = 1.0;
- if ( lights[i].type != TYPE_DIRECTIONAL ) {
- s = lights[i].position - vpos;
- if (length( lights[i].attenuation ) != 0.0) {
- FP float dist = length(s);
- att = 1.0 / (lights[i].attenuation.x + lights[i].attenuation.y * dist + lights[i].attenuation.z * dist * dist);
- }
- s = normalize( s );
- if ( lights[i].type == TYPE_SPOT ) {
- if ( degrees(acos(dot(-s, normalize(lights[i].direction))) ) > lights[i].cutOffAngle)
- att = 0.0;
- }
- } else {
- s = normalize( -lights[i].direction );
- }
+ addLightAdModel(vpos, n, lights[1], diffuseColor);
+ if (lightCount < 3) return;
- FP float diffuse = max( dot( s, n ), 0.0 );
+ addLightAdModel(vpos, n, lights[2], diffuseColor);
+ if (lightCount < 4) return;
- diffuseColor += att * lights[i].intensity * diffuse * lights[i].color;
- }
+ addLightAdModel(vpos, n, lights[3], diffuseColor);
+ if (lightCount < 5) return;
+
+ addLightAdModel(vpos, n, lights[4], diffuseColor);
+ if (lightCount < 6) return;
+
+ addLightAdModel(vpos, n, lights[5], diffuseColor);
+ if (lightCount < 7) return;
+
+ addLightAdModel(vpos, n, lights[6], diffuseColor);
+ if (lightCount < 8) return;
+
+ addLightAdModel(vpos, n, lights[7], diffuseColor);
}
diff --git a/src/input/backend/abstractaxisinput.cpp b/src/input/backend/abstractaxisinput.cpp
index 5cb209f25..aae165a7e 100644
--- a/src/input/backend/abstractaxisinput.cpp
+++ b/src/input/backend/abstractaxisinput.cpp
@@ -37,13 +37,15 @@
**
****************************************************************************/
-#include "abstractaxisinput_p.h"
-#include <Qt3DInput/qabstractaxisinput.h>
+#include "qabstractaxisinput.h"
+#include "qabstractaxisinput_p.h"
+
#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
+#include <Qt3DInput/private/abstractaxisinput_p.h>
#include <Qt3DInput/private/inputhandler_p.h>
-#include <Qt3DInput/private/qabstractaxisinput_p.h>
#include <Qt3DInput/private/qinputdeviceintegration_p.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/action.cpp b/src/input/backend/action.cpp
index b7fa8740e..601961dd9 100644
--- a/src/input/backend/action.cpp
+++ b/src/input/backend/action.cpp
@@ -38,13 +38,15 @@
****************************************************************************/
#include "action_p.h"
+
#include <Qt3DInput/qaction.h>
#include <Qt3DInput/qabstractactioninput.h>
-#include <Qt3DInput/private/qaction_p.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
+#include <Qt3DInput/private/qaction_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/actioninput.cpp b/src/input/backend/actioninput.cpp
index b120c789e..46dc7f584 100644
--- a/src/input/backend/actioninput.cpp
+++ b/src/input/backend/actioninput.cpp
@@ -38,10 +38,12 @@
****************************************************************************/
#include "actioninput_p.h"
+
#include <Qt3DInput/qactioninput.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
#include <Qt3DInput/private/qactioninput_p.h>
#include <Qt3DInput/private/inputhandler_p.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DInput/private/utils_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/actioninput_p.h b/src/input/backend/actioninput_p.h
index da99c985e..3059f66cf 100644
--- a/src/input/backend/actioninput_p.h
+++ b/src/input/backend/actioninput_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DInput/private/abstractactioninput_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DInput/private/abstractactioninput_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/analogaxisinput.cpp b/src/input/backend/analogaxisinput.cpp
index 914604e33..4a801baec 100644
--- a/src/input/backend/analogaxisinput.cpp
+++ b/src/input/backend/analogaxisinput.cpp
@@ -38,11 +38,13 @@
****************************************************************************/
#include "analogaxisinput_p.h"
+
#include <Qt3DInput/qanalogaxisinput.h>
#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
#include <Qt3DInput/private/qanalogaxisinput_p.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DInput/private/utils_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/assignkeyboardfocusjob.cpp b/src/input/backend/assignkeyboardfocusjob.cpp
index ae845beaf..216c914d4 100644
--- a/src/input/backend/assignkeyboardfocusjob.cpp
+++ b/src/input/backend/assignkeyboardfocusjob.cpp
@@ -38,11 +38,12 @@
****************************************************************************/
#include "assignkeyboardfocusjob_p.h"
-#include "keyboarddevice_p.h"
-#include "keyboardhandler_p.h"
-#include "inputhandler_p.h"
-#include "inputmanagers_p.h"
-#include "job_common_p.h"
+
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/job_common_p.h>
+#include <Qt3DInput/private/keyboarddevice_p.h>
+#include <Qt3DInput/private/keyboardhandler_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/axis.cpp b/src/input/backend/axis.cpp
index 4239749c1..6ba4e2b34 100644
--- a/src/input/backend/axis.cpp
+++ b/src/input/backend/axis.cpp
@@ -38,13 +38,15 @@
****************************************************************************/
#include "axis_p.h"
+
#include <Qt3DInput/qaxis.h>
#include <Qt3DInput/qabstractaxisinput.h>
-#include <Qt3DInput/private/qaxis_p.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
+#include <Qt3DInput/private/qaxis_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/axisaccumulator.cpp b/src/input/backend/axisaccumulator.cpp
index 3b0423f47..edc282bec 100644
--- a/src/input/backend/axisaccumulator.cpp
+++ b/src/input/backend/axisaccumulator.cpp
@@ -38,10 +38,12 @@
****************************************************************************/
#include "axisaccumulator_p.h"
-#include <Qt3DInput/private/qaxisaccumulator_p.h>
-#include <Qt3DInput/private/inputmanagers_p.h>
+
#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/qaxisaccumulator_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/axisaccumulator_p.h b/src/input/backend/axisaccumulator_p.h
index 67eb3906a..7d6799eb0 100644
--- a/src/input/backend/axisaccumulator_p.h
+++ b/src/input/backend/axisaccumulator_p.h
@@ -51,11 +51,10 @@
// We mean it.
//
+#include <Qt3DInput/qaxisaccumulator.h>
#include <Qt3DCore/qbackendnode.h>
#include <Qt3DCore/qnodeid.h>
-#include <Qt3DInput/qaxisaccumulator.h>
-
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/axisaccumulatorjob.cpp b/src/input/backend/axisaccumulatorjob.cpp
index 133f9713a..7ea2d063d 100644
--- a/src/input/backend/axisaccumulatorjob.cpp
+++ b/src/input/backend/axisaccumulatorjob.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "axisaccumulatorjob_p.h"
+
#include <Qt3DInput/private/axisaccumulator_p.h>
#include <Qt3DInput/private/job_common_p.h>
#include <Qt3DInput/private/inputmanagers_p.h>
diff --git a/src/input/backend/axisaccumulatorjob_p.h b/src/input/backend/axisaccumulatorjob_p.h
index d8ced8a3a..4d38fd70f 100644
--- a/src/input/backend/axisaccumulatorjob_p.h
+++ b/src/input/backend/axisaccumulatorjob_p.h
@@ -51,9 +51,9 @@
// We mean it.
//
+#include <Qt3DInput/private/handle_types_p.h>
#include <Qt3DCore/qaspectjob.h>
#include <Qt3DCore/qnodeid.h>
-#include <Qt3DInput/private/handle_types_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/axissetting.cpp b/src/input/backend/axissetting.cpp
index 10892f861..b3c81f84d 100644
--- a/src/input/backend/axissetting.cpp
+++ b/src/input/backend/axissetting.cpp
@@ -38,10 +38,12 @@
****************************************************************************/
#include "axissetting_p.h"
+
#include <Qt3DInput/qaxissetting.h>
-#include <Qt3DInput/private/qaxissetting_p.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DInput/private/qaxissetting_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/buttonaxisinput.cpp b/src/input/backend/buttonaxisinput.cpp
index 99fa99852..fef8f6d41 100644
--- a/src/input/backend/buttonaxisinput.cpp
+++ b/src/input/backend/buttonaxisinput.cpp
@@ -38,11 +38,13 @@
****************************************************************************/
#include "buttonaxisinput_p.h"
+
#include <Qt3DInput/qbuttonaxisinput.h>
#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
#include <Qt3DInput/private/qbuttonaxisinput_p.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DInput/private/utils_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/eventsourcesetterhelper.cpp b/src/input/backend/eventsourcesetterhelper.cpp
index 4ae6cebae..5c11ada38 100644
--- a/src/input/backend/eventsourcesetterhelper.cpp
+++ b/src/input/backend/eventsourcesetterhelper.cpp
@@ -38,7 +38,8 @@
****************************************************************************/
#include "eventsourcesetterhelper_p.h"
-#include "inputhandler_p.h"
+
+#include <Qt3DInput/private/inputhandler_p.h>
#include <Qt3DCore/private/qeventfilterservice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/eventsourcesetterhelper_p.h b/src/input/backend/eventsourcesetterhelper_p.h
index 97776dc9b..48418f1b9 100644
--- a/src/input/backend/eventsourcesetterhelper_p.h
+++ b/src/input/backend/eventsourcesetterhelper_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
-#include <QObject>
-#include <QMutex>
+#include <QtCore/QMutex>
+#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/genericdevicebackendnode.cpp b/src/input/backend/genericdevicebackendnode.cpp
index 093acd966..40202b4a5 100644
--- a/src/input/backend/genericdevicebackendnode.cpp
+++ b/src/input/backend/genericdevicebackendnode.cpp
@@ -38,11 +38,12 @@
****************************************************************************/
#include "genericdevicebackendnode_p.h"
-#include "inputhandler_p.h"
-#include "inputmanagers_p.h"
-#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/genericdevicebackendnode_p.h b/src/input/backend/genericdevicebackendnode_p.h
index 8c0ffcfde..16aaf3e5b 100644
--- a/src/input/backend/genericdevicebackendnode_p.h
+++ b/src/input/backend/genericdevicebackendnode_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
+#include <QtCore/QHash>
+#include <QtCore/QMutex>
+
#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
-#include <QHash>
-#include <QMutex>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/inputchord.cpp b/src/input/backend/inputchord.cpp
index ebcf79737..731fd91e3 100644
--- a/src/input/backend/inputchord.cpp
+++ b/src/input/backend/inputchord.cpp
@@ -38,13 +38,15 @@
****************************************************************************/
#include "inputchord_p.h"
+
#include <Qt3DInput/qinputchord.h>
-#include <Qt3DInput/private/qinputchord_p.h>
-#include <Qt3DInput/private/inputhandler_p.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
+#include <Qt3DInput/private/qinputchord_p.h>
+#include <Qt3DInput/private/inputhandler_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/inputchord_p.h b/src/input/backend/inputchord_p.h
index 7f51f5d96..95557a00d 100644
--- a/src/input/backend/inputchord_p.h
+++ b/src/input/backend/inputchord_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DInput/private/abstractactioninput_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DInput/private/abstractactioninput_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/inputhandler.cpp b/src/input/backend/inputhandler.cpp
index aebf2c8f1..985d67470 100644
--- a/src/input/backend/inputhandler.cpp
+++ b/src/input/backend/inputhandler.cpp
@@ -38,16 +38,17 @@
****************************************************************************/
#include "inputhandler_p.h"
-#include "inputmanagers_p.h"
-#include "keyboardeventfilter_p.h"
-#include "mouseeventfilter_p.h"
-#include "assignkeyboardfocusjob_p.h"
-#include "keyeventdispatcherjob_p.h"
-#include "mouseeventdispatcherjob_p.h"
-#include <Qt3DCore/private/qeventfilterservice_p.h>
-#include "inputsettings_p.h"
-#include "eventsourcesetterhelper_p.h"
+
+#include <Qt3DInput/private/assignkeyboardfocusjob_p.h>
+#include <Qt3DInput/private/eventsourcesetterhelper_p.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/inputsettings_p.h>
+#include <Qt3DInput/private/keyboardeventfilter_p.h>
+#include <Qt3DInput/private/keyeventdispatcherjob_p.h>
+#include <Qt3DInput/private/mouseeventdispatcherjob_p.h>
+#include <Qt3DInput/private/mouseeventfilter_p.h>
#include <Qt3DInput/private/qinputdeviceintegration_p.h>
+#include <Qt3DCore/private/qeventfilterservice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/inputhandler_p.h b/src/input/backend/inputhandler_p.h
index eff0c0c24..e80441f1a 100644
--- a/src/input/backend/inputhandler_p.h
+++ b/src/input/backend/inputhandler_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
+#include <Qt3DInput/QKeyEvent>
#include <Qt3DInput/qt3dinput_global.h>
-#include <Qt3DInput/private/handle_types_p.h>
#include <Qt3DCore/qaspectjob.h>
-#include <QKeyEvent>
-#include <QMutex>
+#include <QtCore/QMutex>
+
+#include <Qt3DInput/private/handle_types_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/inputmanagers_p.h b/src/input/backend/inputmanagers_p.h
index 473042867..a0cb127b1 100644
--- a/src/input/backend/inputmanagers_p.h
+++ b/src/input/backend/inputmanagers_p.h
@@ -51,13 +51,13 @@
// We mean it.
//
-#include <QtGlobal>
+#include <QtCore/QtGlobal>
+
#include <Qt3DInput/private/handle_types_p.h>
#include <Qt3DInput/private/keyboarddevice_p.h>
#include <Qt3DInput/private/keyboardhandler_p.h>
#include <Qt3DInput/private/mousehandler_p.h>
#include <Qt3DInput/private/mousedevice_p.h>
-#include <Qt3DCore/private/qresourcemanager_p.h>
#include <Qt3DInput/private/actioninput_p.h>
#include <Qt3DInput/private/inputsequence_p.h>
#include <Qt3DInput/private/inputchord_p.h>
@@ -70,6 +70,7 @@
#include <Qt3DInput/private/logicaldevice_p.h>
#include <Qt3DInput/private/genericdevicebackendnode_p.h>
#include <Qt3DInput/private/physicaldeviceproxy_p.h>
+#include <Qt3DCore/private/qresourcemanager_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/inputsequence.cpp b/src/input/backend/inputsequence.cpp
index ee31cb1de..e45fae364 100644
--- a/src/input/backend/inputsequence.cpp
+++ b/src/input/backend/inputsequence.cpp
@@ -38,14 +38,16 @@
****************************************************************************/
#include "inputsequence_p.h"
-#include <Qt3DInput/qinputsequence.h>
+
#include <Qt3DInput/qabstractphysicaldevice.h>
-#include <Qt3DInput/private/qinputsequence_p.h>
-#include <Qt3DInput/private/inputhandler_p.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DInput/qinputsequence.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
-#include <QDateTime>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <QtCore/QDateTime>
+
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/qinputsequence_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/inputsequence_p.h b/src/input/backend/inputsequence_p.h
index 28cb1c0e1..a9fa2dd2f 100644
--- a/src/input/backend/inputsequence_p.h
+++ b/src/input/backend/inputsequence_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DInput/private/abstractactioninput_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DInput/private/abstractactioninput_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/inputsettings.cpp b/src/input/backend/inputsettings.cpp
index 587e4ce1a..b695ed600 100644
--- a/src/input/backend/inputsettings.cpp
+++ b/src/input/backend/inputsettings.cpp
@@ -38,10 +38,12 @@
****************************************************************************/
#include "inputsettings_p.h"
+
#include <Qt3DInput/qinputsettings.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
#include <Qt3DInput/private/inputhandler_p.h>
#include <Qt3DInput/private/qinputsettings_p.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/inputsettings_p.h b/src/input/backend/inputsettings_p.h
index 386716bc5..2fee6c946 100644
--- a/src/input/backend/inputsettings_p.h
+++ b/src/input/backend/inputsettings_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
-#include <QPointer>
#include <Qt3DCore/qbackendnode.h>
+#include <QtCore/QPointer>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/keyboarddevice.cpp b/src/input/backend/keyboarddevice.cpp
index 2566dacd2..33578bdad 100644
--- a/src/input/backend/keyboarddevice.cpp
+++ b/src/input/backend/keyboarddevice.cpp
@@ -38,11 +38,13 @@
****************************************************************************/
#include "keyboarddevice_p.h"
-#include "inputhandler_p.h"
-#include "inputmanagers_p.h"
+
+#include <Qt3DInput/QKeyEvent>
#include <Qt3DCore/qnode.h>
-#include <QKeyEvent>
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/keyboarddevice_p.h b/src/input/backend/keyboarddevice_p.h
index 0ab7d22e8..611a06233 100644
--- a/src/input/backend/keyboarddevice_p.h
+++ b/src/input/backend/keyboarddevice_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
+#include <Qt3DInput/QKeyEvent>
#include <Qt3DCore/qnodeid.h>
+
#include <Qt3DInput/private/handle_types_p.h>
-#include <QKeyEvent>
+#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/keyboardeventfilter.cpp b/src/input/backend/keyboardeventfilter.cpp
index e94af9ade..bd3bac5a7 100644
--- a/src/input/backend/keyboardeventfilter.cpp
+++ b/src/input/backend/keyboardeventfilter.cpp
@@ -38,9 +38,11 @@
****************************************************************************/
#include "keyboardeventfilter_p.h"
-#include "inputhandler_p.h"
-#include <QEvent>
-#include <QKeyEvent>
+
+#include <Qt3DInput/QKeyEvent>
+#include <QtCore/QEvent>
+
+#include <Qt3DInput/private/inputhandler_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/keyboardeventfilter_p.h b/src/input/backend/keyboardeventfilter_p.h
index a06b4cdd5..46b8071cd 100644
--- a/src/input/backend/keyboardeventfilter_p.h
+++ b/src/input/backend/keyboardeventfilter_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <QObject>
+#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/keyboardhandler.cpp b/src/input/backend/keyboardhandler.cpp
index b96334e50..ae1e6d03c 100644
--- a/src/input/backend/keyboardhandler.cpp
+++ b/src/input/backend/keyboardhandler.cpp
@@ -38,13 +38,15 @@
****************************************************************************/
#include "keyboardhandler_p.h"
+
+#include <Qt3DInput/qkeyboarddevice.h>
#include <Qt3DInput/qkeyboardhandler.h>
-#include <Qt3DInput/private/qkeyboardhandler_p.h>
-#include "qkeyboarddevice.h"
-#include "inputhandler_p.h"
-#include "inputmanagers_p.h"
#include <Qt3DCore/qpropertyupdatedchange.h>
-#include <QVariant>
+#include <QtCore/QVariant>
+
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/qkeyboardhandler_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/keyboardhandler_p.h b/src/input/backend/keyboardhandler_p.h
index 6dd3a2c5e..e2aeab4f3 100644
--- a/src/input/backend/keyboardhandler_p.h
+++ b/src/input/backend/keyboardhandler_p.h
@@ -51,9 +51,9 @@
// We mean it.
//
+#include <Qt3DInput/qkeyevent.h>
#include <Qt3DCore/qbackendnode.h>
#include <Qt3DCore/qnodeid.h>
-#include <Qt3DInput/qkeyevent.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/keyboardmousegenericdeviceintegration.cpp b/src/input/backend/keyboardmousegenericdeviceintegration.cpp
index 31d0ea981..05430b0e8 100644
--- a/src/input/backend/keyboardmousegenericdeviceintegration.cpp
+++ b/src/input/backend/keyboardmousegenericdeviceintegration.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "keyboardmousegenericdeviceintegration_p.h"
+
#include <Qt3DInput/private/inputhandler_p.h>
#include <Qt3DInput/private/inputmanagers_p.h>
diff --git a/src/input/backend/keyeventdispatcherjob.cpp b/src/input/backend/keyeventdispatcherjob.cpp
index bbf703a56..ac90e9e37 100644
--- a/src/input/backend/keyeventdispatcherjob.cpp
+++ b/src/input/backend/keyeventdispatcherjob.cpp
@@ -38,10 +38,11 @@
****************************************************************************/
#include "keyeventdispatcherjob_p.h"
-#include "inputhandler_p.h"
-#include "keyboardhandler_p.h"
-#include "inputmanagers_p.h"
-#include "job_common_p.h"
+
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/job_common_p.h>
+#include <Qt3DInput/private/keyboardhandler_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/keyeventdispatcherjob_p.h b/src/input/backend/keyeventdispatcherjob_p.h
index b89d8ced2..1456f0878 100644
--- a/src/input/backend/keyeventdispatcherjob_p.h
+++ b/src/input/backend/keyeventdispatcherjob_p.h
@@ -51,9 +51,9 @@
// We mean it.
//
+#include <Qt3DInput/QKeyEvent>
#include <Qt3DCore/qaspectjob.h>
#include <Qt3DCore/qnodeid.h>
-#include <QKeyEvent>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/loadproxydevicejob.cpp b/src/input/backend/loadproxydevicejob.cpp
index 622d7ab83..2ea29b4a9 100644
--- a/src/input/backend/loadproxydevicejob.cpp
+++ b/src/input/backend/loadproxydevicejob.cpp
@@ -38,9 +38,10 @@
****************************************************************************/
#include "loadproxydevicejob_p.h"
+
#include <Qt3DInput/private/inputhandler_p.h>
#include <Qt3DInput/private/inputmanagers_p.h>
-#include "job_common_p.h"
+#include <Qt3DInput/private/job_common_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/logicaldevice.cpp b/src/input/backend/logicaldevice.cpp
index fd4a637f2..5fcfb07bb 100644
--- a/src/input/backend/logicaldevice.cpp
+++ b/src/input/backend/logicaldevice.cpp
@@ -38,14 +38,16 @@
****************************************************************************/
#include "logicaldevice_p.h"
-#include <Qt3DInput/qlogicaldevice.h>
-#include <Qt3DInput/qaxis.h>
+
#include <Qt3DInput/qaction.h>
-#include <Qt3DInput/private/inputmanagers_p.h>
-#include <Qt3DInput/private/qlogicaldevice_p.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DInput/qaxis.h>
+#include <Qt3DInput/qlogicaldevice.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/qlogicaldevice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/mousedevice.cpp b/src/input/backend/mousedevice.cpp
index 918fdecb0..1d329252d 100644
--- a/src/input/backend/mousedevice.cpp
+++ b/src/input/backend/mousedevice.cpp
@@ -38,15 +38,16 @@
****************************************************************************/
#include "mousedevice_p.h"
-#include "inputmanagers_p.h"
-#include "inputhandler_p.h"
-#include "qmousedevice.h"
-#include <Qt3DInput/private/qmousedevice_p.h>
-#include <Qt3DCore/qnode.h>
+#include <Qt3DInput/qmousedevice.h>
#include <Qt3DCore/qentity.h>
+#include <Qt3DCore/qnode.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/qmousedevice_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/backend/mousedevice_p.h b/src/input/backend/mousedevice_p.h
index 8b85ee34a..0b95c6183 100644
--- a/src/input/backend/mousedevice_p.h
+++ b/src/input/backend/mousedevice_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
+#include <Qt3DInput/QMouseEvent>
+
#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
-#include <QMouseEvent>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/mouseeventdispatcherjob.cpp b/src/input/backend/mouseeventdispatcherjob.cpp
index 167560e39..77eb69712 100644
--- a/src/input/backend/mouseeventdispatcherjob.cpp
+++ b/src/input/backend/mouseeventdispatcherjob.cpp
@@ -38,10 +38,11 @@
****************************************************************************/
#include "mouseeventdispatcherjob_p.h"
-#include "inputhandler_p.h"
-#include "mousehandler_p.h"
-#include "inputmanagers_p.h"
-#include "job_common_p.h"
+
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/job_common_p.h>
+#include <Qt3DInput/private/mousehandler_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/mouseeventdispatcherjob_p.h b/src/input/backend/mouseeventdispatcherjob_p.h
index defe3c3a3..ebf1538e4 100644
--- a/src/input/backend/mouseeventdispatcherjob_p.h
+++ b/src/input/backend/mouseeventdispatcherjob_p.h
@@ -51,9 +51,9 @@
// We mean it.
//
+#include <Qt3DInput/QMouseEvent>
#include <Qt3DCore/qaspectjob.h>
#include <Qt3DCore/qnodeid.h>
-#include <QMouseEvent>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/mouseeventfilter.cpp b/src/input/backend/mouseeventfilter.cpp
index f12127c3b..bc2473a33 100644
--- a/src/input/backend/mouseeventfilter.cpp
+++ b/src/input/backend/mouseeventfilter.cpp
@@ -38,9 +38,11 @@
****************************************************************************/
#include "mouseeventfilter_p.h"
-#include "inputhandler_p.h"
-#include <QEvent>
-#include <QKeyEvent>
+
+#include <Qt3DInput/QKeyEvent>
+#include <QtCore/QEvent>
+
+#include <Qt3DInput/private/inputhandler_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/mouseeventfilter_p.h b/src/input/backend/mouseeventfilter_p.h
index a733b3ad1..340524a61 100644
--- a/src/input/backend/mouseeventfilter_p.h
+++ b/src/input/backend/mouseeventfilter_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <QObject>
+#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/mousehandler.cpp b/src/input/backend/mousehandler.cpp
index b7b748843..a0619aaf2 100644
--- a/src/input/backend/mousehandler.cpp
+++ b/src/input/backend/mousehandler.cpp
@@ -38,15 +38,16 @@
****************************************************************************/
#include "mousehandler_p.h"
-#include "inputmanagers_p.h"
-#include "inputhandler_p.h"
-#include "mousedevice_p.h"
#include <Qt3DInput/qmousehandler.h>
-#include <Qt3DInput/private/qmousehandler_p.h>
#include <Qt3DInput/qmousedevice.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/mousedevice_p.h>
+#include <Qt3DInput/private/qmousehandler_p.h>
+
QT_BEGIN_NAMESPACE
using namespace Qt3DCore;
diff --git a/src/input/backend/mousehandler_p.h b/src/input/backend/mousehandler_p.h
index b2ae4f9ed..867764017 100644
--- a/src/input/backend/mousehandler_p.h
+++ b/src/input/backend/mousehandler_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
-#include <Qt3DCore/qbackendnode.h>
#include <Qt3DInput/qmouseevent.h>
+#include <Qt3DCore/qbackendnode.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/physicaldeviceproxy.cpp b/src/input/backend/physicaldeviceproxy.cpp
index 2e46309fd..9512296b8 100644
--- a/src/input/backend/physicaldeviceproxy.cpp
+++ b/src/input/backend/physicaldeviceproxy.cpp
@@ -38,11 +38,13 @@
****************************************************************************/
#include "physicaldeviceproxy_p.h"
-#include <Qt3DCore/qpropertyupdatedchange.h>
+
#include <Qt3DInput/qabstractphysicaldevice.h>
-#include <Qt3DInput/private/qabstractphysicaldeviceproxy_p_p.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <QtCore/QCoreApplication>
+
#include <Qt3DInput/private/inputmanagers_p.h>
-#include <QCoreApplication>
+#include <Qt3DInput/private/qabstractphysicaldeviceproxy_p_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/qabstractphysicaldevicebackendnode.cpp b/src/input/backend/qabstractphysicaldevicebackendnode.cpp
index 45f228e1a..5006d702a 100644
--- a/src/input/backend/qabstractphysicaldevicebackendnode.cpp
+++ b/src/input/backend/qabstractphysicaldevicebackendnode.cpp
@@ -39,22 +39,22 @@
#include "qabstractphysicaldevicebackendnode_p.h"
#include "qabstractphysicaldevicebackendnode_p_p.h"
-#include "qabstractphysicaldevice.h"
-#include "qaxissetting.h"
-#include "inputhandler_p.h"
-#include "inputmanagers_p.h"
+#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DInput/qaxissetting.h>
#include <Qt3DInput/qinputaspect.h>
#include <Qt3DInput/qphysicaldevicecreatedchange.h>
-#include <Qt3DInput/private/qinputaspect_p.h>
-
-#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
-#include <Qt3DCore/private/qabstractaspect_p.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
#include <cmath>
+#include <Qt3DInput/private/inputhandler_p.h>
+#include <Qt3DInput/private/inputmanagers_p.h>
+#include <Qt3DInput/private/qinputaspect_p.h>
+#include <Qt3DCore/private/qabstractaspect_p.h>
+
QT_BEGIN_NAMESPACE
namespace {
diff --git a/src/input/backend/qabstractphysicaldevicebackendnode_p.h b/src/input/backend/qabstractphysicaldevicebackendnode_p.h
index aa789fe27..272143c45 100644
--- a/src/input/backend/qabstractphysicaldevicebackendnode_p.h
+++ b/src/input/backend/qabstractphysicaldevicebackendnode_p.h
@@ -52,6 +52,7 @@
//
#include <Qt3DCore/qbackendnode.h>
+
#include <Qt3DInput/private/qt3dinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h b/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h
index 8d9ee0617..d6928aced 100644
--- a/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h
+++ b/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
-#include <Qt3DCore/private/qbackendnode_p.h>
-#include <Qt3DCore/qnodeid.h>
#include <QtCore/qvector.h>
-#include <Qt3DInput/private/qt3dinput_global_p.h>
+#include <Qt3DCore/qnodeid.h>
+
#include <Qt3DInput/private/movingaverage_p.h>
+#include <Qt3DInput/private/qt3dinput_global_p.h>
+#include <Qt3DCore/private/qbackendnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/backend/updateaxisactionjob.cpp b/src/input/backend/updateaxisactionjob.cpp
index 4e990ff0e..03690479a 100644
--- a/src/input/backend/updateaxisactionjob.cpp
+++ b/src/input/backend/updateaxisactionjob.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "updateaxisactionjob_p.h"
+
#include <Qt3DInput/private/inputhandler_p.h>
#include <Qt3DInput/private/inputmanagers_p.h>
#include <Qt3DInput/private/job_common_p.h>
diff --git a/src/input/backend/updateaxisactionjob_p.h b/src/input/backend/updateaxisactionjob_p.h
index ea590a1b2..b65cbec87 100644
--- a/src/input/backend/updateaxisactionjob_p.h
+++ b/src/input/backend/updateaxisactionjob_p.h
@@ -53,6 +53,7 @@
#include <Qt3DCore/qaspectjob.h>
#include <Qt3DCore/qnodeid.h>
+
#include <Qt3DInput/private/handle_types_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qabstractactioninput.cpp b/src/input/frontend/qabstractactioninput.cpp
index f5e9ff33e..5d7af72f8 100644
--- a/src/input/frontend/qabstractactioninput.cpp
+++ b/src/input/frontend/qabstractactioninput.cpp
@@ -37,6 +37,7 @@
****************************************************************************/
#include "qabstractactioninput_p.h"
+
#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qabstractactioninput_p.h b/src/input/frontend/qabstractactioninput_p.h
index 6741bc4dc..b7494ee38 100644
--- a/src/input/frontend/qabstractactioninput_p.h
+++ b/src/input/frontend/qabstractactioninput_p.h
@@ -50,7 +50,8 @@
// We mean it.
//
-#include <Qt3DInput/qabstractactioninput.h>
+#include "qabstractactioninput.h"
+
#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qabstractaxisinput.cpp b/src/input/frontend/qabstractaxisinput.cpp
index bcce50a33..e3974421a 100644
--- a/src/input/frontend/qabstractaxisinput.cpp
+++ b/src/input/frontend/qabstractaxisinput.cpp
@@ -37,8 +37,9 @@
**
****************************************************************************/
-#include "qabstractaxisinput.h"
#include "qabstractaxisinput_p.h"
+
+#include <Qt3DInput/qabstractaxisinput.h>
#include <Qt3DCore/qnodecreatedchange.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qabstractaxisinput.h b/src/input/frontend/qabstractaxisinput.h
index b26d3249a..c0a93da31 100644
--- a/src/input/frontend/qabstractaxisinput.h
+++ b/src/input/frontend/qabstractaxisinput.h
@@ -40,9 +40,9 @@
#ifndef QT3DINPUT_QABSTRACTAXISINPUT_H
#define QT3DINPUT_QABSTRACTAXISINPUT_H
+#include <Qt3DInput/qabstractphysicaldevice.h>
#include <Qt3DInput/qt3dinput_global.h>
#include <Qt3DCore/qnode.h>
-#include <Qt3DInput/qabstractphysicaldevice.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qabstractaxisinput_p.h b/src/input/frontend/qabstractaxisinput_p.h
index f64a140f4..91e02719e 100644
--- a/src/input/frontend/qabstractaxisinput_p.h
+++ b/src/input/frontend/qabstractaxisinput_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DCore/private/qnode_p.h>
#include <Qt3DCore/qnodeid.h>
#include <QtCore/qvariant.h>
+#include <Qt3DCore/private/qnode_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qabstractphysicaldevice.cpp b/src/input/frontend/qabstractphysicaldevice.cpp
index 4984b4300..8a0e81e0c 100644
--- a/src/input/frontend/qabstractphysicaldevice.cpp
+++ b/src/input/frontend/qabstractphysicaldevice.cpp
@@ -39,11 +39,13 @@
#include "qabstractphysicaldevice.h"
#include "qabstractphysicaldevice_p.h"
-#include <Qt3DInput/qphysicaldevicecreatedchange.h>
+
#include <Qt3DInput/qaxissetting.h>
+#include <Qt3DInput/qphysicaldevicecreatedchange.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
+
#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qabstractphysicaldevice_p.h b/src/input/frontend/qabstractphysicaldevice_p.h
index 55e98723c..e2b67a815 100644
--- a/src/input/frontend/qabstractphysicaldevice_p.h
+++ b/src/input/frontend/qabstractphysicaldevice_p.h
@@ -52,11 +52,12 @@
//
#include <Qt3DInput/qt3dinput_global.h>
-#include <Qt3DCore/private/qnode_p.h>
#include <QtCore/qhash.h>
#include <QtCore/qmutex.h>
#include <QtCore/qvector.h>
+
#include <Qt3DInput/private/qt3dinput_global_p.h>
+#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qabstractphysicaldeviceproxy.cpp b/src/input/frontend/qabstractphysicaldeviceproxy.cpp
index 03e59761b..34b7db2a4 100644
--- a/src/input/frontend/qabstractphysicaldeviceproxy.cpp
+++ b/src/input/frontend/qabstractphysicaldeviceproxy.cpp
@@ -39,9 +39,11 @@
#include "qabstractphysicaldeviceproxy_p.h"
#include "qabstractphysicaldeviceproxy_p_p.h"
+
#include <Qt3DInput/qphysicaldevicecreatedchange.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qabstractphysicaldeviceproxy_p.h b/src/input/frontend/qabstractphysicaldeviceproxy_p.h
index 1175f53bb..6d44ad2cd 100644
--- a/src/input/frontend/qabstractphysicaldeviceproxy_p.h
+++ b/src/input/frontend/qabstractphysicaldeviceproxy_p.h
@@ -52,6 +52,7 @@
//
#include <Qt3DInput/qabstractphysicaldevice.h>
+
#include <Qt3DInput/private/qt3dinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp
index 3a6e6dc4f..1006c0cec 100644
--- a/src/input/frontend/qaction.cpp
+++ b/src/input/frontend/qaction.cpp
@@ -39,12 +39,14 @@
#include "qaction.h"
#include "qaction_p.h"
-#include <Qt3DCore/private/qnode_p.h>
+
+#include <Qt3DInput/qabstractactioninput.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
#include <Qt3DCore/qnodecreatedchange.h>
-#include <Qt3DInput/qabstractactioninput.h>
+
+#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp
index 5bee62cb9..b8db101d8 100644
--- a/src/input/frontend/qactioninput.cpp
+++ b/src/input/frontend/qactioninput.cpp
@@ -38,8 +38,9 @@
#include "qactioninput.h"
#include "qactioninput_p.h"
+
#include <Qt3DInput/qabstractphysicaldevice.h>
-#include <Qt3DInput/QAbstractActionInput>
+#include <Qt3DInput/qabstractactioninput.h>
#include <Qt3DCore/qnodecreatedchange.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qactioninput.h b/src/input/frontend/qactioninput.h
index 9b06047b2..580afaf2e 100644
--- a/src/input/frontend/qactioninput.h
+++ b/src/input/frontend/qactioninput.h
@@ -40,9 +40,9 @@
#ifndef QT3DINPUT_QACTIONINPUT_H
#define QT3DINPUT_QACTIONINPUT_H
+#include <Qt3DInput/qabstractactioninput.h>
#include <Qt3DInput/qt3dinput_global.h>
#include <Qt3DCore/qnode.h>
-#include <Qt3DInput/qabstractactioninput.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qactioninput_p.h b/src/input/frontend/qactioninput_p.h
index d1e9f88dc..74a69d68c 100644
--- a/src/input/frontend/qactioninput_p.h
+++ b/src/input/frontend/qactioninput_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DInput/private/qabstractactioninput_p.h>
#include <QtCore/qvariant.h>
+#include <Qt3DInput/private/qabstractactioninput_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qanalogaxisinput.cpp b/src/input/frontend/qanalogaxisinput.cpp
index 6d50af45c..7b85983e3 100644
--- a/src/input/frontend/qanalogaxisinput.cpp
+++ b/src/input/frontend/qanalogaxisinput.cpp
@@ -39,6 +39,7 @@
#include "qanalogaxisinput.h"
#include "qanalogaxisinput_p.h"
+
#include <Qt3DInput/qabstractphysicaldevice.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp
index 6b19e43fe..01e28e9cf 100644
--- a/src/input/frontend/qaxis.cpp
+++ b/src/input/frontend/qaxis.cpp
@@ -38,6 +38,7 @@
#include "qaxis.h"
#include "qaxis_p.h"
+
#include <Qt3DInput/qabstractaxisinput.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
diff --git a/src/input/frontend/qaxisaccumulator.cpp b/src/input/frontend/qaxisaccumulator.cpp
index 257d43c1d..5f10d81a7 100644
--- a/src/input/frontend/qaxisaccumulator.cpp
+++ b/src/input/frontend/qaxisaccumulator.cpp
@@ -39,6 +39,7 @@
#include "qaxisaccumulator.h"
#include "qaxisaccumulator_p.h"
+
#include <Qt3DInput/qaxis.h>
#include <Qt3DCore/qnodecreatedchange.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
diff --git a/src/input/frontend/qaxisaccumulator_p.h b/src/input/frontend/qaxisaccumulator_p.h
index 532f01b6b..a936f54aa 100644
--- a/src/input/frontend/qaxisaccumulator_p.h
+++ b/src/input/frontend/qaxisaccumulator_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qcomponent_p.h>
#include <Qt3DInput/qaxisaccumulator.h>
+#include <Qt3DCore/private/qcomponent_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qaxissetting.cpp b/src/input/frontend/qaxissetting.cpp
index 987cd246a..8f1a8d797 100644
--- a/src/input/frontend/qaxissetting.cpp
+++ b/src/input/frontend/qaxissetting.cpp
@@ -39,6 +39,7 @@
#include "qaxissetting.h"
#include "qaxissetting_p.h"
+
#include <Qt3DCore/qnodecreatedchange.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qaxissetting.h b/src/input/frontend/qaxissetting.h
index 483c6c2a0..b3d244e15 100644
--- a/src/input/frontend/qaxissetting.h
+++ b/src/input/frontend/qaxissetting.h
@@ -40,9 +40,8 @@
#ifndef QT3DINPUT_QAXISSETTING_H
#define QT3DINPUT_QAXISSETTING_H
-#include <Qt3DCore/qnode.h>
#include <Qt3DInput/qt3dinput_global.h>
-
+#include <Qt3DCore/qnode.h>
#include <QtCore/qvector.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qbuttonaxisinput.cpp b/src/input/frontend/qbuttonaxisinput.cpp
index e6bfe4f8c..fb74b8efd 100644
--- a/src/input/frontend/qbuttonaxisinput.cpp
+++ b/src/input/frontend/qbuttonaxisinput.cpp
@@ -39,6 +39,7 @@
#include "qbuttonaxisinput.h"
#include "qbuttonaxisinput_p.h"
+
#include <Qt3DInput/qabstractphysicaldevice.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qgamepadinput.cpp b/src/input/frontend/qgamepadinput.cpp
index faf62ae88..a0efecfc0 100644
--- a/src/input/frontend/qgamepadinput.cpp
+++ b/src/input/frontend/qgamepadinput.cpp
@@ -35,10 +35,11 @@
****************************************************************************/
#include "qgamepadinput_p.h"
-#include "qabstractphysicaldevice_p.h"
-#include <QGamepadManager>
-#include <QMetaEnum>
+#include <QtCore/QMetaEnum>
+#include <QtGamepad/QGamepadManager>
+
+#include <Qt3DInput/private/qabstractphysicaldevice_p.h>
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qgamepadinput_p.h b/src/input/frontend/qgamepadinput_p.h
index c1990030e..c064f1c94 100644
--- a/src/input/frontend/qgamepadinput_p.h
+++ b/src/input/frontend/qgamepadinput_p.h
@@ -49,6 +49,7 @@
//
#include <Qt3DInput/qabstractphysicaldevice.h>
+
#include <Qt3DInput/private/qt3dinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qgenericinputdevice.cpp b/src/input/frontend/qgenericinputdevice.cpp
index 8c4b44992..84a1699fc 100644
--- a/src/input/frontend/qgenericinputdevice.cpp
+++ b/src/input/frontend/qgenericinputdevice.cpp
@@ -39,7 +39,7 @@
#include "qgenericinputdevice_p.h"
-#include "qabstractphysicaldevice_p.h"
+#include <Qt3DInput/private/qabstractphysicaldevice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qgenericinputdevice_p.h b/src/input/frontend/qgenericinputdevice_p.h
index f4af03975..b46eada67 100644
--- a/src/input/frontend/qgenericinputdevice_p.h
+++ b/src/input/frontend/qgenericinputdevice_p.h
@@ -52,6 +52,7 @@
//
#include <Qt3DInput/qabstractphysicaldevice.h>
+
#include <Qt3DInput/private/qt3dinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp
index 6b912359b..a3bf58f08 100644
--- a/src/input/frontend/qinputaspect.cpp
+++ b/src/input/frontend/qinputaspect.cpp
@@ -39,58 +39,60 @@
#include "qinputaspect.h"
#include "qinputaspect_p.h"
-#include "inputhandler_p.h"
-#include "buttonaxisinput_p.h"
-#include "keyboarddevice_p.h"
-#include "keyboardhandler_p.h"
-#include "mousedevice_p.h"
-#include "mousehandler_p.h"
-#include <Qt3DInput/qkeyboarddevice.h>
-#include <Qt3DInput/qkeyboardhandler.h>
-#include <Qt3DInput/qmousedevice.h>
-#include <Qt3DInput/qmousehandler.h>
-#include <Qt3DInput/private/qinputdeviceintegration_p.h>
-#include <Qt3DInput/qinputsettings.h>
-#include <Qt3DInput/private/qgenericinputdevice_p.h>
-#include <Qt3DInput/private/qinputdeviceintegrationfactory_p.h>
-#include <Qt3DCore/private/qservicelocator_p.h>
-#include <Qt3DCore/private/qeventfilterservice_p.h>
-#include <QDir>
-#if QT_CONFIG(library)
-#include <QLibrary>
-#endif
-#include <QLibraryInfo>
-#include <QPluginLoader>
-#include <Qt3DInput/qaxis.h>
-#include <Qt3DInput/qaxisaccumulator.h>
+#include <Qt3DInput/qabstractphysicaldevice.h>
#include <Qt3DInput/qaction.h>
-#include <Qt3DInput/qaxissetting.h>
#include <Qt3DInput/qactioninput.h>
#include <Qt3DInput/qanalogaxisinput.h>
+#include <Qt3DInput/qaxis.h>
+#include <Qt3DInput/qaxisaccumulator.h>
+#include <Qt3DInput/qaxissetting.h>
#include <Qt3DInput/qbuttonaxisinput.h>
#include <Qt3DInput/qinputchord.h>
#include <Qt3DInput/qinputsequence.h>
+#include <Qt3DInput/qinputsettings.h>
+#include <Qt3DInput/qkeyboarddevice.h>
+#include <Qt3DInput/qkeyboardhandler.h>
#include <Qt3DInput/qlogicaldevice.h>
-#include <Qt3DInput/qabstractphysicaldevice.h>
-#include <Qt3DInput/private/qabstractphysicaldeviceproxy_p.h>
+#include <Qt3DInput/qmousedevice.h>
+#include <Qt3DInput/qmousehandler.h>
+#include <QtCore/QDir>
+
+#if QT_CONFIG(library)
+#include <QtCore/QLibrary>
+#endif
+#include <QtCore/QLibraryInfo>
+#include <QtCore/QPluginLoader>
+
+#include <Qt3DInput/private/action_p.h>
+#include <Qt3DInput/private/actioninput_p.h>
#include <Qt3DInput/private/axis_p.h>
#include <Qt3DInput/private/axisaccumulator_p.h>
-#include <Qt3DInput/private/action_p.h>
+#include <Qt3DInput/private/axisaccumulatorjob_p.h>
#include <Qt3DInput/private/axissetting_p.h>
-#include <Qt3DInput/private/actioninput_p.h>
-#include <Qt3DInput/private/inputchord_p.h>
-#include <Qt3DInput/private/inputsequence_p.h>
-#include <Qt3DInput/private/logicaldevice_p.h>
+#include <Qt3DInput/private/buttonaxisinput_p.h>
+#include <Qt3DInput/private/eventsourcesetterhelper_p.h>
+#include <Qt3DInput/private/genericdevicebackendnode_p.h>
#include <Qt3DInput/private/inputbackendnodefunctor_p.h>
+#include <Qt3DInput/private/inputchord_p.h>
+#include <Qt3DInput/private/inputhandler_p.h>
#include <Qt3DInput/private/inputmanagers_p.h>
-#include <Qt3DInput/private/updateaxisactionjob_p.h>
-#include <Qt3DInput/private/keyboardmousegenericdeviceintegration_p.h>
-#include <Qt3DInput/private/genericdevicebackendnode_p.h>
+#include <Qt3DInput/private/inputsequence_p.h>
#include <Qt3DInput/private/inputsettings_p.h>
-#include <Qt3DInput/private/eventsourcesetterhelper_p.h>
+#include <Qt3DInput/private/keyboarddevice_p.h>
+#include <Qt3DInput/private/keyboardhandler_p.h>
+#include <Qt3DInput/private/keyboardmousegenericdeviceintegration_p.h>
#include <Qt3DInput/private/loadproxydevicejob_p.h>
-#include <Qt3DInput/private/axisaccumulatorjob_p.h>
+#include <Qt3DInput/private/logicaldevice_p.h>
+#include <Qt3DInput/private/mousedevice_p.h>
+#include <Qt3DInput/private/mousehandler_p.h>
+#include <Qt3DInput/private/qabstractphysicaldeviceproxy_p.h>
+#include <Qt3DInput/private/qgenericinputdevice_p.h>
+#include <Qt3DInput/private/qinputdeviceintegration_p.h>
+#include <Qt3DInput/private/qinputdeviceintegrationfactory_p.h>
+#include <Qt3DInput/private/updateaxisactionjob_p.h>
+#include <Qt3DCore/private/qeventfilterservice_p.h>
+#include <Qt3DCore/private/qservicelocator_p.h>
#ifdef HAVE_QGAMEPAD
# include <Qt3DInput/private/qgamepadinput_p.h>
diff --git a/src/input/frontend/qinputaspect_p.h b/src/input/frontend/qinputaspect_p.h
index 35a4ffa02..bcdd8d4ed 100644
--- a/src/input/frontend/qinputaspect_p.h
+++ b/src/input/frontend/qinputaspect_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qabstractaspect_p.h>
+#include <Qt3DCore/private/qabstractaspect_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp
index 372c61990..7c986f297 100644
--- a/src/input/frontend/qinputchord.cpp
+++ b/src/input/frontend/qinputchord.cpp
@@ -38,8 +38,9 @@
#include "qinputchord.h"
#include "qinputchord_p.h"
-#include <Qt3DCore/qnodecreatedchange.h>
+
#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DCore/qnodecreatedchange.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
diff --git a/src/input/frontend/qinputchord.h b/src/input/frontend/qinputchord.h
index f3e603eb5..1fc69bd1b 100644
--- a/src/input/frontend/qinputchord.h
+++ b/src/input/frontend/qinputchord.h
@@ -40,9 +40,9 @@
#ifndef QT3DINPUT_QINPUTCHORD_H
#define QT3DINPUT_QINPUTCHORD_H
+#include <Qt3DInput/qabstractactioninput.h>
#include <Qt3DInput/qt3dinput_global.h>
#include <Qt3DCore/qnode.h>
-#include <Qt3DInput/qabstractactioninput.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputchord_p.h b/src/input/frontend/qinputchord_p.h
index bd49f93d6..37cbbd9f2 100644
--- a/src/input/frontend/qinputchord_p.h
+++ b/src/input/frontend/qinputchord_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DInput/private/qabstractactioninput_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DInput/private/qabstractactioninput_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qinputdeviceintegration_p.h b/src/input/frontend/qinputdeviceintegration_p.h
index 248243fa2..a066d7629 100644
--- a/src/input/frontend/qinputdeviceintegration_p.h
+++ b/src/input/frontend/qinputdeviceintegration_p.h
@@ -51,12 +51,12 @@
// We mean it.
//
-#include <QObject>
#include <Qt3DInput/qt3dinput_global.h>
-#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
-
#include <Qt3DCore/qaspectjob.h>
#include <Qt3DCore/qnodeid.h>
+#include <QtCore/QObject>
+
+#include <Qt3DInput/private/qabstractphysicaldevicebackendnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputdeviceintegration_p_p.h b/src/input/frontend/qinputdeviceintegration_p_p.h
index c8557eac5..31eea4cdf 100644
--- a/src/input/frontend/qinputdeviceintegration_p_p.h
+++ b/src/input/frontend/qinputdeviceintegration_p_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
-#include <private/qobject_p.h>
-#include <private/qt3dinput_global_p.h>
+#include <Qt3DInput/private/qt3dinput_global_p.h>
+#include <QtCore/private/qobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputdeviceintegrationfactory.cpp b/src/input/frontend/qinputdeviceintegrationfactory.cpp
index 22e93294e..052f2d2b2 100644
--- a/src/input/frontend/qinputdeviceintegrationfactory.cpp
+++ b/src/input/frontend/qinputdeviceintegrationfactory.cpp
@@ -38,11 +38,13 @@
****************************************************************************/
#include "qinputdeviceintegrationfactory_p.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+
#include <Qt3DInput/private/qinputdeviceintegration_p.h>
#include <Qt3DInput/private/qinputdeviceplugin_p.h>
#include <QtCore/private/qfactoryloader_p.h>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputdeviceplugin_p.h b/src/input/frontend/qinputdeviceplugin_p.h
index ca77441af..a2f93eb3f 100644
--- a/src/input/frontend/qinputdeviceplugin_p.h
+++ b/src/input/frontend/qinputdeviceplugin_p.h
@@ -52,8 +52,8 @@
//
#include <QtCore/QObject>
-#include <QtCore/QtPlugin>
#include <QtCore/QFactoryInterface>
+#include <QtCore/QtPlugin>
#include <Qt3DInput/private/qt3dinput_global_p.h>
diff --git a/src/input/frontend/qinputsequence.cpp b/src/input/frontend/qinputsequence.cpp
index 99eff289b..17499b59b 100644
--- a/src/input/frontend/qinputsequence.cpp
+++ b/src/input/frontend/qinputsequence.cpp
@@ -38,13 +38,15 @@
#include "qinputsequence.h"
#include "qinputsequence_p.h"
-#include <Qt3DCore/private/qnode_p.h>
-#include <Qt3DCore/qnodecreatedchange.h>
-#include <Qt3DInput/qabstractphysicaldevice.h>
+
#include <Qt3DInput/qabstractactioninput.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DCore/qnodecreatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+
+#include <Qt3DCore/private/qnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputsequence.h b/src/input/frontend/qinputsequence.h
index 2baeb40b8..6e08bc649 100644
--- a/src/input/frontend/qinputsequence.h
+++ b/src/input/frontend/qinputsequence.h
@@ -40,9 +40,9 @@
#ifndef QT3DINPUT_QINPUTSEQUENCE_H
#define QT3DINPUT_QINPUTSEQUENCE_H
+#include <Qt3DInput/qabstractactioninput.h>
#include <Qt3DInput/qt3dinput_global.h>
#include <Qt3DCore/qnode.h>
-#include <Qt3DInput/qabstractactioninput.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputsequence_p.h b/src/input/frontend/qinputsequence_p.h
index 3290e4dcc..b2807b2d5 100644
--- a/src/input/frontend/qinputsequence_p.h
+++ b/src/input/frontend/qinputsequence_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DInput/private/qabstractactioninput_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DInput/private/qabstractactioninput_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qinputsettings.cpp b/src/input/frontend/qinputsettings.cpp
index 47c835cea..ccc53e47b 100644
--- a/src/input/frontend/qinputsettings.cpp
+++ b/src/input/frontend/qinputsettings.cpp
@@ -39,6 +39,7 @@
#include "qinputsettings.h"
#include "qinputsettings_p.h"
+
#include <Qt3DCore/qnodecreatedchange.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputsettings.h b/src/input/frontend/qinputsettings.h
index 9e0ea7b6b..4f4d746f6 100644
--- a/src/input/frontend/qinputsettings.h
+++ b/src/input/frontend/qinputsettings.h
@@ -40,8 +40,8 @@
#ifndef QT3DINPUT_QINPUTSETTINGS_H
#define QT3DINPUT_QINPUTSETTINGS_H
-#include <Qt3DCore/qcomponent.h>
#include <Qt3DInput/qt3dinput_global.h>
+#include <Qt3DCore/qcomponent.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qinputsettings_p.h b/src/input/frontend/qinputsettings_p.h
index 13757ac0b..584e597ba 100644
--- a/src/input/frontend/qinputsettings_p.h
+++ b/src/input/frontend/qinputsettings_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qcomponent_p.h>
#include <QtCore/qpointer.h>
+#include <Qt3DCore/private/qcomponent_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qkeyboarddevice.cpp b/src/input/frontend/qkeyboarddevice.cpp
index b2c0975ee..257a5be8c 100644
--- a/src/input/frontend/qkeyboarddevice.cpp
+++ b/src/input/frontend/qkeyboarddevice.cpp
@@ -39,10 +39,12 @@
#include "qkeyboarddevice.h"
#include "qkeyboarddevice_p.h"
-#include "qkeyboardhandler.h"
-#include <Qt3DCore/private/qscene_p.h>
+
+#include <Qt3DInput/qkeyboardhandler.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DCore/private/qscene_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qkeyboarddevice.h b/src/input/frontend/qkeyboarddevice.h
index a86687769..a0baf255e 100644
--- a/src/input/frontend/qkeyboarddevice.h
+++ b/src/input/frontend/qkeyboarddevice.h
@@ -40,9 +40,9 @@
#ifndef QT3DINPUT_INPUT_QKEYBOARDDEVICE_H
#define QT3DINPUT_INPUT_QKEYBOARDDEVICE_H
+#include <Qt3DInput/QKeyboardHandler>
#include <Qt3DInput/qt3dinput_global.h>
#include <Qt3DInput/qabstractphysicaldevice.h>
-#include <Qt3DInput/QKeyboardHandler>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qkeyboarddevice_p.h b/src/input/frontend/qkeyboarddevice_p.h
index e05f7549b..8399b061b 100644
--- a/src/input/frontend/qkeyboarddevice_p.h
+++ b/src/input/frontend/qkeyboarddevice_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
-#include <private/qabstractphysicaldevice_p.h>
#include <Qt3DCore/qnodeid.h>
#include <QtCore/qhash.h>
#include <QtCore/qstring.h>
+#include <Qt3DInput/private/qabstractphysicaldevice_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qkeyboardhandler.cpp b/src/input/frontend/qkeyboardhandler.cpp
index e45609f74..5854a047d 100644
--- a/src/input/frontend/qkeyboardhandler.cpp
+++ b/src/input/frontend/qkeyboardhandler.cpp
@@ -39,7 +39,8 @@
#include "qkeyboardhandler.h"
#include "qkeyboardhandler_p.h"
-#include "qkeyboarddevice.h"
+
+#include <Qt3DInput/qkeyboarddevice.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qkeyboardhandler_p.h b/src/input/frontend/qkeyboardhandler_p.h
index 339d36d26..9de55f9d0 100644
--- a/src/input/frontend/qkeyboardhandler_p.h
+++ b/src/input/frontend/qkeyboardhandler_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qcomponent_p.h>
+#include <Qt3DCore/private/qcomponent_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qkeyevent.h b/src/input/frontend/qkeyevent.h
index 0978a45e7..23fed5545 100644
--- a/src/input/frontend/qkeyevent.h
+++ b/src/input/frontend/qkeyevent.h
@@ -40,9 +40,9 @@
#ifndef QT3DINPUT_QKEYEVENT_H
#define QT3DINPUT_QKEYEVENT_H
-#include <QObject>
-#include <QtGui/QKeyEvent>
#include <Qt3DInput/qt3dinput_global.h>
+#include <QtCore/QObject>
+#include <QtGui/QKeyEvent>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qlogicaldevice.cpp b/src/input/frontend/qlogicaldevice.cpp
index 4794431b8..1e7033962 100644
--- a/src/input/frontend/qlogicaldevice.cpp
+++ b/src/input/frontend/qlogicaldevice.cpp
@@ -39,12 +39,13 @@
#include "qlogicaldevice.h"
#include "qlogicaldevice_p.h"
-#include <Qt3DInput/qaction.h>
-#include <Qt3DInput/qaxis.h>
+
#include <Qt3DCore/qnodecreatedchange.h>
-#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
+#include <Qt3DInput/qaction.h>
+#include <Qt3DInput/qaxis.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qlogicaldevice_p.h b/src/input/frontend/qlogicaldevice_p.h
index c8940e6b9..e04d238c5 100644
--- a/src/input/frontend/qlogicaldevice_p.h
+++ b/src/input/frontend/qlogicaldevice_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qcomponent_p.h>
#include <Qt3DCore/qnodeid.h>
+#include <Qt3DCore/private/qcomponent_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/input/frontend/qmousedevice.cpp b/src/input/frontend/qmousedevice.cpp
index 744d289f3..b5123533f 100644
--- a/src/input/frontend/qmousedevice.cpp
+++ b/src/input/frontend/qmousedevice.cpp
@@ -39,8 +39,9 @@
#include "qmousedevice.h"
#include "qmousedevice_p.h"
-#include <Qt3DInput/qphysicaldevicecreatedchange.h>
+
#include <Qt3DInput/qmouseevent.h>
+#include <Qt3DInput/qphysicaldevicecreatedchange.h>
#include <Qt3DCore/qentity.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qmousedevice.h b/src/input/frontend/qmousedevice.h
index 620c41edc..93ee99256 100644
--- a/src/input/frontend/qmousedevice.h
+++ b/src/input/frontend/qmousedevice.h
@@ -40,8 +40,8 @@
#ifndef QT3DINPUT_QMOUSEDEVICE_H
#define QT3DINPUT_QMOUSEDEVICE_H
-#include <Qt3DInput/qt3dinput_global.h>
#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DInput/qt3dinput_global.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qmousedevice_p.h b/src/input/frontend/qmousedevice_p.h
index 92718dffa..49c1c6191 100644
--- a/src/input/frontend/qmousedevice_p.h
+++ b/src/input/frontend/qmousedevice_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qabstractphysicaldevice_p.h>
+#include <Qt3DInput/private/qabstractphysicaldevice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qmouseevent.h b/src/input/frontend/qmouseevent.h
index c1051dc1f..043f1023d 100644
--- a/src/input/frontend/qmouseevent.h
+++ b/src/input/frontend/qmouseevent.h
@@ -41,9 +41,9 @@
#define QT3DINPUT_QMOUSEEVENT_H
#include <Qt3DInput/qt3dinput_global.h>
-#include <QObject>
+#include <QtCore/QtGlobal>
+#include <QtCore/QObject>
#include <QtGui/QMouseEvent>
-#include <QtGlobal>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qmousehandler.cpp b/src/input/frontend/qmousehandler.cpp
index 75e68b819..750251be9 100644
--- a/src/input/frontend/qmousehandler.cpp
+++ b/src/input/frontend/qmousehandler.cpp
@@ -39,10 +39,11 @@
#include "qmousehandler.h"
#include "qmousehandler_p.h"
-#include "qmousedevice.h"
-#include "qmouseevent.h"
+
+#include <Qt3DInput/qmousedevice.h>
+#include <Qt3DInput/qmouseevent.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
-#include <QTimer>
+#include <QtCore/QTimer>
QT_BEGIN_NAMESPACE
diff --git a/src/input/frontend/qmousehandler_p.h b/src/input/frontend/qmousehandler_p.h
index 2d82ca1ad..bb82334a0 100644
--- a/src/input/frontend/qmousehandler_p.h
+++ b/src/input/frontend/qmousehandler_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <private/qcomponent_p.h>
#include <Qt3DInput/qmouseevent.h>
+#include <Qt3DCore/private/qcomponent_p.h>
+
QT_BEGIN_NAMESPACE
class QTimer;
diff --git a/src/input/frontend/qphysicaldevicecreatedchange.cpp b/src/input/frontend/qphysicaldevicecreatedchange.cpp
index 17edde76a..2f2452187 100644
--- a/src/input/frontend/qphysicaldevicecreatedchange.cpp
+++ b/src/input/frontend/qphysicaldevicecreatedchange.cpp
@@ -36,10 +36,12 @@
#include "qphysicaldevicecreatedchange.h"
#include "qphysicaldevicecreatedchange_p.h"
+
#include <Qt3DInput/qabstractphysicaldevice.h>
#include <Qt3DInput/qaxissetting.h>
#include <Qt3DCore/qnodeid.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
diff --git a/src/plugins/sceneparsers/assimp/assimphelpers.cpp b/src/plugins/sceneparsers/assimp/assimphelpers.cpp
index 02799beaf..ce6619541 100644
--- a/src/plugins/sceneparsers/assimp/assimphelpers.cpp
+++ b/src/plugins/sceneparsers/assimp/assimphelpers.cpp
@@ -39,11 +39,11 @@
#include "assimphelpers.h"
-#include <QFileDevice>
-#include <QFileInfo>
-#include <QUrl>
-#include <QDir>
-#include <QDebug>
+#include <QtCore/QFileDevice>
+#include <QtCore/QFileInfo>
+#include <QtCore/QUrl>
+#include <QtCore/QDir>
+#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/sceneparsers/assimp/assimphelpers.h b/src/plugins/sceneparsers/assimp/assimphelpers.h
index 21ac1b1ef..64a6d4abe 100644
--- a/src/plugins/sceneparsers/assimp/assimphelpers.h
+++ b/src/plugins/sceneparsers/assimp/assimphelpers.h
@@ -54,9 +54,8 @@
// ASSIMP INCLUDES
#include <assimp/IOStream.hpp>
#include <assimp/IOSystem.hpp>
-
-#include <QIODevice>
-#include <QMap>
+#include <QtCore/QIODevice>
+#include <QtCore/QMap>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/sceneparsers/assimp/assimpimporter.cpp b/src/plugins/sceneparsers/assimp/assimpimporter.cpp
index 40db838b7..7e8681981 100644
--- a/src/plugins/sceneparsers/assimp/assimpimporter.cpp
+++ b/src/plugins/sceneparsers/assimp/assimpimporter.cpp
@@ -39,16 +39,20 @@
#include "assimpimporter.h"
-#include <Qt3DCore/private/qabstractnodefactory_p.h>
#include <Qt3DCore/qentity.h>
#include <Qt3DCore/qtransform.h>
+#include <Qt3DExtras/qdiffusemapmaterial.h>
+#include <Qt3DExtras/qdiffusespecularmapmaterial.h>
+#include <Qt3DExtras/qphongmaterial.h>
+#include <Qt3DRender/qattribute.h>
+#include <Qt3DRender/qbuffer.h>
#include <Qt3DRender/qcameralens.h>
-#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qeffect.h>
-#include <Qt3DRender/qmesh.h>
+#include <Qt3DRender/qgeometry.h>
+#include <Qt3DRender/qgeometryrenderer.h>
#include <Qt3DRender/qmaterial.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DRender/qmesh.h>
+#include <Qt3DRender/qparameter.h>
#include <Qt3DRender/qtexture.h>
#include <Qt3DRender/qtextureimagedatagenerator.h>
#include <Qt3DExtras/qmorphphongmaterial.h>
@@ -57,13 +61,14 @@
#include <Qt3DExtras/qphongmaterial.h>
#include <Qt3DAnimation/qkeyframeanimation.h>
#include <Qt3DAnimation/qmorphinganimation.h>
-#include <QFileInfo>
-#include <QColor>
+#include <QtCore/QFileInfo>
+#include <QtGui/QColor>
+
#include <qmath.h>
+
+#include <Qt3DCore/private/qabstractnodefactory_p.h>
#include <Qt3DRender/private/renderlogging_p.h>
#include <Qt3DRender/private/qurlhelper_p.h>
-#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/qgeometry.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/sceneparsers/assimp/assimpimporter.h b/src/plugins/sceneparsers/assimp/assimpimporter.h
index aa7258840..7335830f5 100644
--- a/src/plugins/sceneparsers/assimp/assimpimporter.h
+++ b/src/plugins/sceneparsers/assimp/assimpimporter.h
@@ -56,13 +56,15 @@
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <assimp/DefaultLogger.hpp>
-#include <Qt3DRender/private/qsceneimporter_p.h>
+
+#include <QtCore/QMap>
+#include <QtCore/QDir>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QVector>
+
#include "assimphelpers.h"
-#include <QMap>
-#include <QDir>
-#include <QVector>
-#include <QLoggingCategory>
+#include <Qt3DRender/private/qsceneimporter_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/sceneparsers/gltf/gltfimporter.h b/src/plugins/sceneparsers/gltf/gltfimporter.h
index e97148600..975a9ef01 100644
--- a/src/plugins/sceneparsers/gltf/gltfimporter.h
+++ b/src/plugins/sceneparsers/gltf/gltfimporter.h
@@ -52,13 +52,13 @@
// We mean it.
//
+#include <Qt3DRender/qattribute.h>
+#include <Qt3DRender/qbuffer.h>
#include <QtCore/qjsondocument.h>
#include <QtCore/qjsonobject.h>
#include <QtCore/qhash.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <private/qsceneimporter_p.h>
+#include <Qt3DRender/private/qsceneimporter_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/sceneparsers/gltf/gltfio.cpp b/src/plugins/sceneparsers/gltf/gltfio.cpp
new file mode 100644
index 000000000..c7c7a00dd
--- /dev/null
+++ b/src/plugins/sceneparsers/gltf/gltfio.cpp
@@ -0,0 +1,1588 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** 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-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <Qt3DCore/QEntity>
+#include <Qt3DCore/QTransform>
+#include <Qt3DExtras/QDiffuseMapMaterial>
+#include <Qt3DExtras/QDiffuseSpecularMapMaterial>
+#include <Qt3DExtras/QNormalDiffuseMapMaterial>
+#include <Qt3DExtras/QNormalDiffuseSpecularMapMaterial>
+#include <Qt3DExtras/QPhongMaterial>
+#include <Qt3DRender/QAlphaCoverage>
+#include <Qt3DRender/QBlendEquation>
+#include <Qt3DRender/QBlendEquationArguments>
+#include <Qt3DRender/QCameraLens>
+#include <Qt3DRender/QColorMask>
+#include <Qt3DRender/QCullFace>
+#include <Qt3DRender/QDepthTest>
+#include <Qt3DRender/QEffect>
+#include <Qt3DRender/QFrontFace>
+#include <Qt3DRender/QGeometry>
+#include <Qt3DRender/QGeometryRenderer>
+#include <Qt3DRender/QGraphicsApiFilter>
+#include <Qt3DRender/QMaterial>
+#include <Qt3DRender/QNoDepthMask>
+#include <Qt3DRender/QParameter>
+#include <Qt3DRender/QPolygonOffset>
+#include <Qt3DRender/QRenderState>
+#include <Qt3DRender/QScissorTest>
+#include <Qt3DRender/QShaderProgram>
+#include <Qt3DRender/QTechnique>
+#include <Qt3DRender/QTexture>
+#include <QtCore/QDir>
+#include <QtCore/QFileInfo>
+#include <QtCore/QJsonArray>
+#include <QtCore/QJsonObject>
+#include <QtGui/QVector2D>
+
+#include "gltfio.h"
+
+#include <Qt3DRender/private/qurlhelper_p.h>
+
+#ifndef qUtf16PrintableImpl // -Impl is a Qt 5.8 feature
+# define qUtf16PrintableImpl(string) \
+ static_cast<const wchar_t*>(static_cast<const void*>(string.utf16()))
+#endif
+
+QT_BEGIN_NAMESPACE
+
+using namespace Qt3DCore;
+using namespace Qt3DExtras;
+
+namespace Qt3DRender {
+
+Q_LOGGING_CATEGORY(GLTFIOLog, "Qt3D.GLTFIO")
+
+#define KEY_CAMERA QLatin1String("camera")
+#define KEY_CAMERAS QLatin1String("cameras")
+#define KEY_SCENES QLatin1String("scenes")
+#define KEY_NODES QLatin1String("nodes")
+#define KEY_MESHES QLatin1String("meshes")
+#define KEY_CHILDREN QLatin1String("children")
+#define KEY_MATRIX QLatin1String("matrix")
+#define KEY_ROTATION QLatin1String("rotation")
+#define KEY_SCALE QLatin1String("scale")
+#define KEY_TRANSLATION QLatin1String("translation")
+#define KEY_TYPE QLatin1String("type")
+#define KEY_PERSPECTIVE QLatin1String("perspective")
+#define KEY_NAME QLatin1String("name")
+#define KEY_COUNT QLatin1String("count")
+#define KEY_YFOV QLatin1String("yfov")
+#define KEY_ZNEAR QLatin1String("znear")
+#define KEY_ZFAR QLatin1String("zfar")
+#define KEY_MATERIALS QLatin1String("materials")
+#define KEY_EXTENSIONS QLatin1String("extensions")
+#define KEY_COMMON_MAT QLatin1String("KHR_materials_common")
+#define KEY_TECHNIQUE QLatin1String("technique")
+#define KEY_VALUES QLatin1String("values")
+#define KEY_BUFFERS QLatin1String("buffers")
+#define KEY_SHADERS QLatin1String("shaders")
+#define KEY_PROGRAMS QLatin1String("programs")
+#define KEY_PROGRAM QLatin1String("program")
+#define KEY_TECHNIQUES QLatin1String("techniques")
+#define KEY_ACCESSORS QLatin1String("accessors")
+#define KEY_IMAGES QLatin1String("images")
+#define KEY_TEXTURES QLatin1String("textures")
+#define KEY_SCENE QLatin1String("scene")
+#define KEY_BUFFER QLatin1String("buffer")
+#define KEY_TARGET QLatin1String("target")
+#define KEY_BYTE_OFFSET QLatin1String("byteOffset")
+#define KEY_BYTE_LENGTH QLatin1String("byteLength")
+#define KEY_BYTE_STRIDE QLatin1String("byteStride")
+#define KEY_PRIMITIVES QLatin1String("primitives")
+#define KEY_MODE QLatin1String("mode")
+#define KEY_MATERIAL QLatin1String("material")
+#define KEY_ATTRIBUTES QLatin1String("attributes")
+#define KEY_INDICES QLatin1String("indices")
+#define KEY_URI QLatin1String("uri")
+#define KEY_FORMAT QLatin1String("format")
+#define KEY_PASSES QLatin1String("passes")
+#define KEY_SOURCE QLatin1String("source")
+#define KEY_SAMPLER QLatin1String("sampler")
+#define KEY_SAMPLERS QLatin1String("samplers")
+#define KEY_SEMANTIC QLatin1String("semantic")
+#define KEY_STATES QLatin1String("states")
+#define KEY_UNIFORMS QLatin1String("uniforms")
+#define KEY_PARAMETERS QLatin1String("parameters")
+#define KEY_WRAP_S QLatin1String("wrapS")
+#define KEY_MIN_FILTER QLatin1String("minFilter")
+#define KEY_MAG_FILTER QLatin1String("magFilter")
+
+#define KEY_INSTANCE_TECHNIQUE QLatin1String("instanceTechnique")
+#define KEY_INSTANCE_PROGRAM QLatin1String("instanceProgram")
+#define KEY_BUFFER_VIEWS QLatin1String("bufferViews")
+#define KEY_BUFFER_VIEW QLatin1String("bufferView")
+#define KEY_VERTEX_SHADER QLatin1String("vertexShader")
+#define KEY_FRAGMENT_SHADER QLatin1String("fragmentShader")
+#define KEY_INTERNAL_FORMAT QLatin1String("internalFormat")
+#define KEY_COMPONENT_TYPE QLatin1String("componentType")
+#define KEY_ASPECT_RATIO QLatin1String("aspect_ratio")
+#define KEY_VALUE QLatin1String("value")
+#define KEY_ENABLE QLatin1String("enable")
+#define KEY_FUNCTIONS QLatin1String("functions")
+#define KEY_TECHNIQUE_CORE QLatin1String("techniqueCore")
+#define KEY_TECHNIQUE_GL2 QLatin1String("techniqueGL2")
+
+GLTFIO::GLTFIO() : QSceneIOHandler(),
+ m_parseDone(false)
+{
+}
+
+GLTFIO::~GLTFIO()
+{
+
+}
+
+void GLTFIO::setBasePath(const QString& path)
+{
+ m_basePath = path;
+}
+
+bool GLTFIO::setJSON(const QJsonDocument &json )
+{
+ if ( !json.isObject() ) {
+ return false;
+ }
+
+ m_json = json;
+ m_parseDone = false;
+
+ cleanup();
+
+ return true;
+}
+
+/*!
+ * Sets the \a path used by the parser to load the scene file.
+ * If the file is valid, parsing is automatically triggered.
+ */
+void GLTFIO::setSource(const QUrl &source)
+{
+ const QString path = QUrlHelper::urlToLocalFileOrQrc(source);
+ QFileInfo finfo(path);
+ if (Q_UNLIKELY(!finfo.exists())) {
+ qCWarning(GLTFIOLog, "missing file: %ls", qUtf16PrintableImpl(path));
+ return;
+ }
+ QFile f(path);
+ f.open(QIODevice::ReadOnly);
+
+ QByteArray jsonData = f.readAll();
+ QJsonDocument sceneDocument = QJsonDocument::fromBinaryData(jsonData);
+ if (sceneDocument.isNull())
+ sceneDocument = QJsonDocument::fromJson(jsonData);
+
+ if (Q_UNLIKELY(!setJSON(sceneDocument))) {
+ qCWarning(GLTFIOLog, "not a JSON document");
+ return;
+ }
+
+ setBasePath(finfo.dir().absolutePath());
+}
+
+/*!
+ * Returns true if the extension of \a path is supported by the
+ * GLTF parser.
+ */
+bool GLTFIO::isFileTypeSupported(const QUrl &source) const
+{
+ const QString path = QUrlHelper::urlToLocalFileOrQrc(source);
+ return GLTFIO::isGLTFPath(path);
+}
+
+Qt3DCore::QEntity* GLTFIO::node(const QString &id)
+{
+ QJsonObject nodes = m_json.object().value(KEY_NODES).toObject();
+ const auto jsonVal = nodes.value(id);
+ if (Q_UNLIKELY(jsonVal.isUndefined())) {
+ qCWarning(GLTFIOLog, "unknown node %ls in GLTF file %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(m_basePath));
+ return NULL;
+ }
+
+ const QJsonObject jsonObj = jsonVal.toObject();
+ QEntity* result = nullptr;
+
+ // Qt3D has a limitation that a QEntity can only have 1 mesh and 1 material component
+ // So if the node has only 1 mesh, we only create 1 QEntity
+ // Otherwise if there are n meshes, there is 1 QEntity, with n children for each mesh/material combo
+ {
+ QVector<QEntity *> entities;
+
+ const auto meshes = jsonObj.value(KEY_MESHES).toArray();
+ for (const QJsonValue &mesh : meshes) {
+ const QString meshName = mesh.toString();
+ const auto geometryRenderers = qAsConst(m_meshDict).equal_range(meshName);
+ if (Q_UNLIKELY(geometryRenderers.first == geometryRenderers.second)) {
+ qCWarning(GLTFIOLog, "node %ls references unknown mesh %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(meshName));
+ continue;
+ }
+
+ for (auto it = geometryRenderers.first; it != geometryRenderers.second; ++it) {
+ QGeometryRenderer *geometryRenderer = it.value();
+ QEntity *entity = new QEntity;
+ entity->addComponent(geometryRenderer);
+ QMaterial *mat = material(m_meshMaterialDict[geometryRenderer]);
+ if (mat)
+ entity->addComponent(mat);
+ entities.append(entity);
+ }
+
+ }
+
+ switch (entities.size()) {
+ case 0:
+ break;
+ case 1:
+ result = qAsConst(entities).first();
+ break;
+ default:
+ result = new QEntity;
+ for (QEntity *entity : qAsConst(entities))
+ entity->setParent(result);
+ }
+ }
+
+ //If the entity contains no meshes, results will still be null here
+ if (result == nullptr)
+ result = new QEntity;
+
+ {
+ const auto children = jsonObj.value(KEY_CHILDREN).toArray();
+ for (const QJsonValue &c : children) {
+ QEntity* child = node(c.toString());
+ if (!child)
+ continue;
+ child->setParent(result);
+ }
+ }
+
+ renameFromJson(jsonObj, result);
+
+
+ // Node Transforms
+ Qt3DCore::QTransform *trans = nullptr;
+ const auto matrix = jsonObj.value(KEY_MATRIX);
+ if (!matrix.isUndefined()) {
+ QMatrix4x4 m(Qt::Uninitialized);
+
+ QJsonArray matrixValues = matrix.toArray();
+ for (int i=0; i<16; ++i) {
+ double v = matrixValues.at( i ).toDouble();
+ m(i % 4, i >> 2) = v;
+ }
+
+ // ADD MATRIX TRANSFORM COMPONENT TO ENTITY
+ if (trans == nullptr)
+ trans = new Qt3DCore::QTransform;
+ trans->setMatrix(m);
+ }
+
+ // Rotation quaternion
+ const auto rotation = jsonObj.value(KEY_ROTATION);
+ if (!rotation.isUndefined()) {
+ if (!trans)
+ trans = new Qt3DCore::QTransform;
+
+ const QJsonArray quaternionValues = rotation.toArray();
+ QQuaternion quaternion(quaternionValues[0].toDouble(),
+ quaternionValues[1].toDouble(),
+ quaternionValues[2].toDouble(),
+ quaternionValues[3].toDouble());
+ trans->setRotation(quaternion);
+ }
+
+ // Translation
+ const auto translation = jsonObj.value(KEY_TRANSLATION);
+ if (!translation.isUndefined()) {
+ if (!trans)
+ trans = new Qt3DCore::QTransform;
+
+ const QJsonArray translationValues = translation.toArray();
+ trans->setTranslation(QVector3D(translationValues[0].toDouble(),
+ translationValues[1].toDouble(),
+ translationValues[2].toDouble()));
+ }
+
+ // Scale
+ const auto scale = jsonObj.value(KEY_SCALE);
+ if (!scale.isUndefined()) {
+ if (!trans)
+ trans = new Qt3DCore::QTransform;
+
+ const QJsonArray scaleValues = scale.toArray();
+ trans->setScale3D(QVector3D(scaleValues[0].toDouble(),
+ scaleValues[1].toDouble(),
+ scaleValues[2].toDouble()));
+ }
+
+ // Add the Transform component
+ if (trans != nullptr)
+ result->addComponent(trans);
+
+ const auto cameraVal = jsonObj.value(KEY_CAMERA);
+ if (!cameraVal.isUndefined()) {
+ QCameraLens* cam = camera(cameraVal.toString());
+ if (Q_UNLIKELY(!cam)) {
+ qCWarning(GLTFIOLog) << "failed to build camera:" << cameraVal
+ << "on node" << id;
+ } else {
+ result->addComponent(cam);
+ }
+ } // of have camera attribute
+
+ return result;
+}
+
+Qt3DCore::QEntity* GLTFIO::scene(const QString &id)
+{
+ parse();
+
+ QJsonObject scenes = m_json.object().value(KEY_SCENES).toObject();
+ const auto sceneVal = scenes.value(id);
+ if (Q_UNLIKELY(sceneVal.isUndefined())) {
+ if (Q_UNLIKELY(!id.isNull()))
+ qCWarning(GLTFIOLog, "GLTF: no such scene %ls in file %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(m_basePath));
+ return defaultScene();
+ }
+
+ QJsonObject sceneObj = sceneVal.toObject();
+ QEntity* sceneEntity = new QEntity;
+ const auto nodes = sceneObj.value(KEY_NODES).toArray();
+ for (const QJsonValue &nnv : nodes) {
+ QString nodeName = nnv.toString();
+ QEntity* child = node(nodeName);
+ if (!child)
+ continue;
+ child->setParent(sceneEntity);
+ }
+
+ return sceneEntity;
+}
+
+GLTFIO::BufferData::BufferData()
+ : length(0)
+ , data(nullptr)
+{
+}
+
+GLTFIO::BufferData::BufferData(const QJsonObject &json)
+ : length(json.value(KEY_BYTE_LENGTH).toInt()),
+ path(json.value(KEY_URI).toString()),
+ data(nullptr)
+{
+}
+
+GLTFIO::ParameterData::ParameterData() :
+ type(0)
+{
+
+}
+
+GLTFIO::ParameterData::ParameterData(const QJsonObject &json)
+ : semantic(json.value(KEY_SEMANTIC).toString()),
+ type(json.value(KEY_TYPE).toInt())
+{
+}
+
+GLTFIO::AccessorData::AccessorData()
+ : type(QAttribute::Float)
+ , dataSize(0)
+ , count(0)
+ , offset(0)
+ , stride(0)
+{
+
+}
+
+GLTFIO::AccessorData::AccessorData(const QJsonObject &json)
+ : bufferViewName(json.value(KEY_BUFFER_VIEW).toString()),
+ type(accessorTypeFromJSON(json.value(KEY_COMPONENT_TYPE).toInt())),
+ dataSize(accessorDataSizeFromJson(json.value(KEY_TYPE).toString())),
+ count(json.value(KEY_COUNT).toInt()),
+ offset(0),
+ stride(0)
+{
+ const auto byteOffset = json.value(KEY_BYTE_OFFSET);
+ if (!byteOffset.isUndefined())
+ offset = byteOffset.toInt();
+ const auto byteStride = json.value(KEY_BYTE_STRIDE);
+ if (!byteStride.isUndefined())
+ stride = byteStride.toInt();
+}
+
+bool GLTFIO::isGLTFPath(const QString& path)
+{
+ QFileInfo finfo(path);
+ if (!finfo.exists())
+ return false;
+
+ // might need to detect other things in the future, but would
+ // prefer to avoid doing a full parse.
+ QString suffix = finfo.suffix().toLower();
+ return suffix == QLatin1String("json") || suffix == QLatin1String("gltf") || suffix == QLatin1String("qgltf");
+}
+
+void GLTFIO::renameFromJson(const QJsonObject &json, QObject * const object)
+{
+ const auto name = json.value(KEY_NAME);
+ if (!name.isUndefined())
+ object->setObjectName(name.toString());
+}
+
+bool GLTFIO::hasStandardUniformNameFromSemantic(const QString &semantic)
+{
+ //Standard Uniforms
+ if (semantic.isEmpty())
+ return false;
+ switch (semantic.at(0).toLatin1()) {
+ case 'L':
+ // return semantic == QLatin1String("LOCAL");
+ return false;
+ case 'M':
+ return semantic == QLatin1String("MODEL")
+ || semantic == QLatin1String("MODELVIEW")
+ || semantic == QLatin1String("MODELVIEWPROJECTION")
+ || semantic == QLatin1String("MODELINVERSE")
+ || semantic == QLatin1String("MODELVIEWPROJECTIONINVERSE")
+ || semantic == QLatin1String("MODELINVERSETRANSPOSE")
+ || semantic == QLatin1String("MODELVIEWINVERSETRANSPOSE");
+ case 'V':
+ return semantic == QLatin1String("VIEW")
+ || semantic == QLatin1String("VIEWINVERSE")
+ || semantic == QLatin1String("VIEWPORT");
+ case 'P':
+ return semantic == QLatin1String("PROJECTION")
+ || semantic == QLatin1String("PROJECTIONINVERSE");
+ }
+ return false;
+}
+
+QString GLTFIO::standardAttributeNameFromSemantic(const QString &semantic)
+{
+ //Standard Attributes
+ if (semantic.startsWith(QLatin1String("POSITION")))
+ return QAttribute::defaultPositionAttributeName();
+ if (semantic.startsWith(QLatin1String("NORMAL")))
+ return QAttribute::defaultNormalAttributeName();
+ if (semantic.startsWith(QLatin1String("TEXCOORD")))
+ return QAttribute::defaultTextureCoordinateAttributeName();
+ if (semantic.startsWith(QLatin1String("COLOR")))
+ return QAttribute::defaultColorAttributeName();
+ if (semantic.startsWith(QLatin1String("TANGENT")))
+ return QAttribute::defaultTangentAttributeName();
+
+// if (semantic.startsWith(QLatin1String("JOINT")));
+// if (semantic.startsWith(QLatin1String("JOINTMATRIX")));
+// if (semantic.startsWith(QLatin1String("WEIGHT")));
+
+ return QString();
+}
+
+QParameter *GLTFIO::parameterFromTechnique(QTechnique *technique, const QString &parameterName)
+{
+ const auto parameters = technique->parameters();
+ for (QParameter *parameter : parameters) {
+ if (parameter->name() == parameterName) {
+ return parameter;
+ }
+ }
+
+ return nullptr;
+}
+
+Qt3DCore::QEntity* GLTFIO::defaultScene()
+{
+ if (Q_UNLIKELY(m_defaultScene.isEmpty())) {
+ qCWarning(GLTFIOLog, "no default scene");
+ return NULL;
+ }
+
+ return scene(m_defaultScene);
+}
+
+QMaterial *GLTFIO::materialWithCustomShader(const QString &id, const QJsonObject &jsonObj)
+{
+ //Default ES2 Technique
+ QString techniqueName = jsonObj.value(KEY_TECHNIQUE).toString();
+ const auto it = qAsConst(m_techniques).find(techniqueName);
+ if (Q_UNLIKELY(it == m_techniques.cend())) {
+ qCWarning(GLTFIOLog, "unknown technique %ls for material %ls in GLTF file %ls",
+ qUtf16PrintableImpl(techniqueName), qUtf16PrintableImpl(id), qUtf16PrintableImpl(m_basePath));
+ return NULL;
+ }
+ QTechnique *technique = *it;
+ technique->graphicsApiFilter()->setApi(QGraphicsApiFilter::OpenGLES);
+ technique->graphicsApiFilter()->setMajorVersion(2);
+ technique->graphicsApiFilter()->setMinorVersion(0);
+ technique->graphicsApiFilter()->setProfile(QGraphicsApiFilter::NoProfile);
+
+
+ //Optional Core technique
+ QTechnique *coreTechnique = nullptr;
+ QTechnique *gl2Technique = nullptr;
+ QString coreTechniqueName = jsonObj.value(KEY_TECHNIQUE_CORE).toString();
+ if (!coreTechniqueName.isNull()) {
+ const auto it = qAsConst(m_techniques).find(coreTechniqueName);
+ if (Q_UNLIKELY(it == m_techniques.cend())) {
+ qCWarning(GLTFIOLog, "unknown technique %ls for material %ls in GLTF file %ls",
+ qUtf16PrintableImpl(coreTechniqueName), qUtf16PrintableImpl(id), qUtf16PrintableImpl(m_basePath));
+ } else {
+ coreTechnique = it.value();
+ coreTechnique->graphicsApiFilter()->setApi(QGraphicsApiFilter::OpenGL);
+ coreTechnique->graphicsApiFilter()->setMajorVersion(3);
+ coreTechnique->graphicsApiFilter()->setMinorVersion(1);
+ coreTechnique->graphicsApiFilter()->setProfile(QGraphicsApiFilter::CoreProfile);
+ }
+ }
+ //Optional GL2 technique
+ QString gl2TechniqueName = jsonObj.value(KEY_TECHNIQUE_GL2).toString();
+ if (!gl2TechniqueName.isNull()) {
+ const auto it = qAsConst(m_techniques).find(gl2TechniqueName);
+ if (Q_UNLIKELY(it == m_techniques.cend())) {
+ qCWarning(GLTFIOLog, "unknown technique %ls for material %ls in GLTF file %ls",
+ qUtf16PrintableImpl(gl2TechniqueName), qUtf16PrintableImpl(id), qUtf16PrintableImpl(m_basePath));
+ } else {
+ gl2Technique = it.value();
+ gl2Technique->graphicsApiFilter()->setApi(QGraphicsApiFilter::OpenGL);
+ gl2Technique->graphicsApiFilter()->setMajorVersion(2);
+ gl2Technique->graphicsApiFilter()->setMinorVersion(0);
+ gl2Technique->graphicsApiFilter()->setProfile(QGraphicsApiFilter::NoProfile);
+ }
+ }
+
+
+ // glTF doesn't deal in effects, but we need a trivial one to wrap
+ // up our techniques
+ // However we need to create a unique effect for each material instead
+ // of caching because QMaterial does not keep up with effects
+ // its not the parent of.
+ QEffect* effect = new QEffect;
+ effect->setObjectName(techniqueName);
+ effect->addTechnique(technique);
+ if (coreTechnique != nullptr)
+ effect->addTechnique(coreTechnique);
+ if (gl2Technique != nullptr)
+ effect->addTechnique(gl2Technique);
+
+ QMaterial* mat = new QMaterial;
+ mat->setEffect(effect);
+
+ renameFromJson(jsonObj, mat);
+
+ const QJsonObject values = jsonObj.value(KEY_VALUES).toObject();
+ for (auto it = values.begin(), end = values.end(); it != end; ++it) {
+ const QString vName = it.key();
+ QParameter *param = parameterFromTechnique(technique, vName);
+
+ if (param == nullptr && coreTechnique != nullptr) {
+ param = parameterFromTechnique(coreTechnique, vName);
+ }
+
+ if (param == nullptr && gl2Technique != nullptr) {
+ param = parameterFromTechnique(gl2Technique, vName);
+ }
+
+ if (Q_UNLIKELY(!param)) {
+ qCWarning(GLTFIOLog, "unknown parameter: %ls in technique %ls processing material %ls",
+ qUtf16PrintableImpl(vName), qUtf16PrintableImpl(techniqueName), qUtf16PrintableImpl(id));
+ continue;
+ }
+
+ ParameterData paramData = m_parameterDataDict.value(param);
+ QVariant var = parameterValueFromJSON(paramData.type, it.value());
+
+ mat->addParameter(new QParameter(param->name(), var));
+ } // of material technique-instance values iteration
+
+ return mat;
+}
+
+static inline QVariant vec4ToRgb(const QVariant &vec4Var)
+{
+ const QVector4D v = vec4Var.value<QVector4D>();
+ return QVariant(QColor::fromRgbF(v.x(), v.y(), v.z()));
+}
+
+QMaterial *GLTFIO::commonMaterial(const QJsonObject &jsonObj)
+{
+ QVariantHash params;
+ bool hasDiffuseMap = false;
+ bool hasSpecularMap = false;
+ bool hasNormalMap = false;
+
+ const QJsonObject values = jsonObj.value(KEY_VALUES).toObject();
+ for (auto it = values.begin(), end = values.end(); it != end; ++it) {
+ const QString vName = it.key();
+ const QJsonValue val = it.value();
+ QVariant var;
+ QString propertyName = vName;
+ if (vName == QLatin1String("ambient") && val.isArray()) {
+ var = vec4ToRgb(parameterValueFromJSON(GL_FLOAT_VEC4, val));
+ } else if (vName == QLatin1String("diffuse")) {
+ if (val.isString()) {
+ var = parameterValueFromJSON(GL_SAMPLER_2D, val);
+ hasDiffuseMap = true;
+ } else if (val.isArray()) {
+ var = vec4ToRgb(parameterValueFromJSON(GL_FLOAT_VEC4, val));
+ }
+ } else if (vName == QLatin1String("specular")) {
+ if (val.isString()) {
+ var = parameterValueFromJSON(GL_SAMPLER_2D, val);
+ hasSpecularMap = true;
+ } else if (val.isArray()) {
+ var = vec4ToRgb(parameterValueFromJSON(GL_FLOAT_VEC4, val));
+ }
+ } else if (vName == QLatin1String("shininess") && val.isDouble()) {
+ var = parameterValueFromJSON(GL_FLOAT, val);
+ } else if (vName == QLatin1String("normalmap") && val.isString()) {
+ var = parameterValueFromJSON(GL_SAMPLER_2D, val);
+ propertyName = QStringLiteral("normal");
+ hasNormalMap = true;
+ } else if (vName == QLatin1String("transparency")) {
+ qCWarning(GLTFIOLog, "Semi-transparent common materials are not currently supported, ignoring alpha");
+ }
+ if (var.isValid())
+ params[propertyName] = var;
+ }
+
+ QMaterial *mat = nullptr;
+ if (hasNormalMap) {
+ if (hasSpecularMap) {
+ mat = new QNormalDiffuseSpecularMapMaterial;
+ } else {
+ if (Q_UNLIKELY(!hasDiffuseMap))
+ qCWarning(GLTFIOLog, "Common material with normal and specular maps needs a diffuse map as well");
+ else
+ mat = new QNormalDiffuseMapMaterial;
+ }
+ } else {
+ if (hasSpecularMap) {
+ if (Q_UNLIKELY(!hasDiffuseMap))
+ qCWarning(GLTFIOLog, "Common material with specular map needs a diffuse map as well");
+ else
+ mat = new QDiffuseSpecularMapMaterial;
+ } else if (hasDiffuseMap) {
+ mat = new QDiffuseMapMaterial;
+ } else {
+ mat = new QPhongMaterial;
+ }
+ }
+
+ if (Q_UNLIKELY(!mat)) {
+ qCWarning(GLTFIOLog, "Could not find a suitable built-in material for KHR_materials_common");
+ } else {
+ for (QVariantHash::const_iterator it = params.constBegin(), itEnd = params.constEnd(); it != itEnd; ++it)
+ mat->setProperty(it.key().toUtf8(), it.value());
+ }
+
+ return mat;
+}
+
+QMaterial* GLTFIO::material(const QString &id)
+{
+ const auto it = qAsConst(m_materialCache).find(id);
+ if (it != m_materialCache.cend())
+ return it.value();
+
+ QJsonObject mats = m_json.object().value(KEY_MATERIALS).toObject();
+ const auto jsonVal = mats.value(id);
+ if (Q_UNLIKELY(jsonVal.isUndefined())) {
+ qCWarning(GLTFIOLog, "unknown material %ls in GLTF file %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(m_basePath));
+ return NULL;
+ }
+
+ const QJsonObject jsonObj = jsonVal.toObject();
+
+ QMaterial *mat = nullptr;
+
+ // Prefer common materials over custom shaders.
+ const auto extensionMat = jsonObj.value(KEY_EXTENSIONS).toObject().value(KEY_COMMON_MAT);
+ if (!extensionMat.isUndefined())
+ mat = commonMaterial(extensionMat.toObject());
+
+ if (!mat)
+ mat = materialWithCustomShader(id, jsonObj);
+
+ m_materialCache[id] = mat;
+ return mat;
+}
+
+QCameraLens* GLTFIO::camera(const QString &id) const
+{
+ const auto jsonVal = m_json.object().value(KEY_CAMERAS).toObject().value(id);
+ if (Q_UNLIKELY(jsonVal.isUndefined())) {
+ qCWarning(GLTFIOLog, "unknown camera %ls in GLTF file %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(m_basePath));
+ return nullptr;
+ }
+
+ QJsonObject jsonObj = jsonVal.toObject();
+ QString camTy = jsonObj.value(KEY_TYPE).toString();
+
+ if (camTy == QLatin1String("perspective")) {
+ const auto pVal = jsonObj.value(KEY_PERSPECTIVE);
+ if (Q_UNLIKELY(pVal.isUndefined())) {
+ qCWarning(GLTFIOLog, "camera: %ls missing 'perspective' object",
+ qUtf16PrintableImpl(id));
+ return nullptr;
+ }
+
+ const QJsonObject pObj = pVal.toObject();
+ double aspectRatio = pObj.value(KEY_ASPECT_RATIO).toDouble();
+ double yfov = pObj.value(KEY_YFOV).toDouble();
+ double frustumNear = pObj.value(KEY_ZNEAR).toDouble();
+ double frustumFar = pObj.value(KEY_ZFAR).toDouble();
+
+ QCameraLens* result = new QCameraLens;
+ result->setPerspectiveProjection(yfov, aspectRatio, frustumNear, frustumFar);
+ return result;
+ } else if (camTy == QLatin1String("orthographic")) {
+ qCWarning(GLTFIOLog, "implement me");
+
+ return nullptr;
+ } else {
+ qCWarning(GLTFIOLog, "camera: %ls has unsupported type: %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(camTy));
+ return nullptr;
+ }
+}
+
+
+void GLTFIO::parse()
+{
+ if (m_parseDone)
+ return;
+
+ const QJsonObject buffers = m_json.object().value(KEY_BUFFERS).toObject();
+ for (auto it = buffers.begin(), end = buffers.end(); it != end; ++it)
+ processJSONBuffer(it.key(), it.value().toObject());
+
+ const QJsonObject views = m_json.object().value(KEY_BUFFER_VIEWS).toObject();
+ loadBufferData();
+ for (auto it = views.begin(), end = views.end(); it != end; ++it)
+ processJSONBufferView(it.key(), it.value().toObject());
+ unloadBufferData();
+
+ const QJsonObject shaders = m_json.object().value(KEY_SHADERS).toObject();
+ for (auto it = shaders.begin(), end = shaders.end(); it != end; ++it)
+ processJSONShader(it.key(), it.value().toObject());
+
+ const QJsonObject programs = m_json.object().value(KEY_PROGRAMS).toObject();
+ for (auto it = programs.begin(), end = programs.end(); it != end; ++it)
+ processJSONProgram(it.key(), it.value().toObject());
+
+ const QJsonObject techniques = m_json.object().value(KEY_TECHNIQUES).toObject();
+ for (auto it = techniques.begin(), end = techniques.end(); it != end; ++it)
+ processJSONTechnique(it.key(), it.value().toObject());
+
+ const QJsonObject attrs = m_json.object().value(KEY_ACCESSORS).toObject();
+ for (auto it = attrs.begin(), end = attrs.end(); it != end; ++it)
+ processJSONAccessor(it.key(), it.value().toObject());
+
+ const QJsonObject meshes = m_json.object().value(KEY_MESHES).toObject();
+ for (auto it = meshes.begin(), end = meshes.end(); it != end; ++it)
+ processJSONMesh(it.key(), it.value().toObject());
+
+ const QJsonObject images = m_json.object().value(KEY_IMAGES).toObject();
+ for (auto it = images.begin(), end = images.end(); it != end; ++it)
+ processJSONImage(it.key(), it.value().toObject());
+
+ const QJsonObject textures = m_json.object().value(KEY_TEXTURES).toObject();
+ for (auto it = textures.begin(), end = textures.end(); it != end; ++it)
+ processJSONTexture(it.key(), it.value().toObject());
+
+ m_defaultScene = m_json.object().value(KEY_SCENE).toString();
+ m_parseDone = true;
+}
+
+namespace {
+template <typename C>
+void delete_if_without_parent(const C &c)
+{
+ for (const auto *e : c) {
+ if (!e->parent())
+ delete e;
+ }
+}
+} // unnamed namespace
+
+void GLTFIO::cleanup()
+{
+ m_meshDict.clear();
+ m_meshMaterialDict.clear();
+ m_accessorDict.clear();
+ delete_if_without_parent(m_materialCache);
+ m_materialCache.clear();
+ m_bufferDatas.clear();
+ m_buffers.clear();
+ m_shaderPaths.clear();
+ delete_if_without_parent(m_programs);
+ m_programs.clear();
+ delete_if_without_parent(m_techniques);
+ m_techniques.clear();
+ delete_if_without_parent(m_textures);
+ m_textures.clear();
+ m_imagePaths.clear();
+ m_defaultScene.clear();
+ m_parameterDataDict.clear();
+}
+
+void GLTFIO::processJSONBuffer(const QString &id, const QJsonObject& json)
+{
+ // simply cache buffers for lookup by buffer-views
+ m_bufferDatas[id] = BufferData(json);
+}
+
+void GLTFIO::processJSONBufferView(const QString &id, const QJsonObject& json)
+{
+ QString bufName = json.value(KEY_BUFFER).toString();
+ const auto it = qAsConst(m_bufferDatas).find(bufName);
+ if (Q_UNLIKELY(it == m_bufferDatas.cend())) {
+ qCWarning(GLTFIOLog, "unknown buffer: %ls processing view: %ls",
+ qUtf16PrintableImpl(bufName), qUtf16PrintableImpl(id));
+ return;
+ }
+ const auto &bufferData = *it;
+
+ int target = json.value(KEY_TARGET).toInt();
+ Qt3DRender::QBuffer::BufferType ty(Qt3DRender::QBuffer::VertexBuffer);
+
+ switch (target) {
+ case GL_ARRAY_BUFFER: ty = Qt3DRender::QBuffer::VertexBuffer; break;
+ case GL_ELEMENT_ARRAY_BUFFER: ty = Qt3DRender::QBuffer::IndexBuffer; break;
+ default:
+ qCWarning(GLTFIOLog, "buffer %ls unsupported target: %d",
+ qUtf16PrintableImpl(id), target);
+ return;
+ }
+
+ quint64 offset = 0;
+ const auto byteOffset = json.value(KEY_BYTE_OFFSET);
+ if (!byteOffset.isUndefined()) {
+ offset = byteOffset.toInt();
+ qCDebug(GLTFIOLog, "bv: %ls has offset: %lld", qUtf16PrintableImpl(id), offset);
+ }
+
+ quint64 len = json.value(KEY_BYTE_LENGTH).toInt();
+
+ QByteArray bytes = bufferData.data->mid(offset, len);
+ if (Q_UNLIKELY(bytes.count() != int(len))) {
+ qCWarning(GLTFIOLog, "failed to read sufficient bytes from: %ls for view %ls",
+ qUtf16PrintableImpl(bufferData.path), qUtf16PrintableImpl(id));
+ }
+
+ Qt3DRender::QBuffer *b(new Qt3DRender::QBuffer(ty));
+ b->setData(bytes);
+ m_buffers[id] = b;
+}
+
+void GLTFIO::processJSONShader(const QString &id, const QJsonObject &jsonObject)
+{
+ // shaders are trivial for the moment, defer the real work
+ // to the program section
+ QString path = jsonObject.value(KEY_URI).toString();
+
+ QFileInfo info(m_basePath, path);
+ if (Q_UNLIKELY(!info.exists())) {
+ qCWarning(GLTFIOLog, "can't find shader %ls from path %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(path));
+ return;
+ }
+
+ m_shaderPaths[id] = info.absoluteFilePath();
+}
+
+void GLTFIO::processJSONProgram(const QString &id, const QJsonObject &jsonObject)
+{
+ QString fragName = jsonObject.value(KEY_FRAGMENT_SHADER).toString(),
+ vertName = jsonObject.value(KEY_VERTEX_SHADER).toString();
+ const auto fragIt = qAsConst(m_shaderPaths).find(fragName),
+ vertIt = qAsConst(m_shaderPaths).find(vertName);
+ if (Q_UNLIKELY(fragIt == m_shaderPaths.cend() || vertIt == m_shaderPaths.cend())) {
+ qCWarning(GLTFIOLog, "program: %ls missing shader: %ls %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(fragName), qUtf16PrintableImpl(vertName));
+ return;
+ }
+
+ QShaderProgram* prog = new QShaderProgram;
+ prog->setObjectName(id);
+ prog->setFragmentShaderCode(QShaderProgram::loadSource(QUrl::fromLocalFile(fragIt.value())));
+ prog->setVertexShaderCode(QShaderProgram::loadSource(QUrl::fromLocalFile(vertIt.value())));
+ m_programs[id] = prog;
+}
+
+void GLTFIO::processJSONTechnique(const QString &id, const QJsonObject &jsonObject )
+{
+ QTechnique *t = new QTechnique;
+ t->setObjectName(id);
+
+ // Parameters
+ QHash<QString, QParameter*> paramDict;
+ const QJsonObject params = jsonObject.value(KEY_PARAMETERS).toObject();
+ for (auto it = params.begin(), end = params.end(); it != end; ++it) {
+ const QString pname = it.key();
+ const QJsonObject po = it.value().toObject();
+
+ //QString semantic = po.value(KEY_SEMANTIC).toString();
+ QParameter *p = new QParameter(t);
+ p->setName(pname);
+ m_parameterDataDict.insert(p, ParameterData(po));
+
+ //If the parameter has default value, set it
+ QJsonValue value = po.value(KEY_VALUE);
+ if (!value.isUndefined()) {
+ int dataType = po.value(KEY_TYPE).toInt();
+ p->setValue(parameterValueFromJSON(dataType, value));
+ }
+
+ t->addParameter(p);
+
+ paramDict[pname] = p;
+ } // of parameters iteration
+
+ // Program
+ QRenderPass* pass = new QRenderPass;
+ QString programName = jsonObject.value(KEY_PROGRAM).toString();
+ const auto progIt = qAsConst(m_programs).find(programName);
+ if (Q_UNLIKELY(progIt == m_programs.cend())) {
+ qCWarning(GLTFIOLog, "technique %ls: missing program %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(programName));
+ } else {
+ pass->setShaderProgram(progIt.value());
+ }
+
+ // Attributes
+ const QJsonObject attrs = jsonObject.value(KEY_ATTRIBUTES).toObject();
+ for (auto it = attrs.begin(), end = attrs.end(); it != end; ++it) {
+ QString pname = it.value().toString();
+ QParameter *parameter = paramDict.value(pname, nullptr);
+ QString attributeName = pname;
+ if (Q_UNLIKELY(!parameter)) {
+ qCWarning(GLTFIOLog, "attribute %ls defined in instanceProgram but not as parameter",
+ qUtf16PrintableImpl(pname));
+ continue;
+ }
+ //Check if the parameter has a standard attribute semantic
+ const auto paramDataIt = m_parameterDataDict.find(parameter);
+ QString standardAttributeName = standardAttributeNameFromSemantic(paramDataIt->semantic);
+ if (!standardAttributeName.isNull()) {
+ attributeName = standardAttributeName;
+ t->removeParameter(parameter);
+ m_parameterDataDict.erase(paramDataIt);
+ delete parameter;
+ }
+
+ } // of program-instance attributes
+
+ // Uniforms
+ const QJsonObject uniforms = jsonObject.value(KEY_UNIFORMS).toObject();
+ for (auto it = uniforms.begin(), end = uniforms.end(); it != end; ++it) {
+ const QString pname = it.value().toString();
+ QParameter *parameter = paramDict.value(pname, nullptr);
+ if (Q_UNLIKELY(!parameter)) {
+ qCWarning(GLTFIOLog, "uniform %ls defined in instanceProgram but not as parameter",
+ qUtf16PrintableImpl(pname));
+ continue;
+ }
+ //Check if the parameter has a standard uniform semantic
+ const auto paramDataIt = m_parameterDataDict.find(parameter);
+ if (hasStandardUniformNameFromSemantic(paramDataIt->semantic)) {
+ t->removeParameter(parameter);
+ m_parameterDataDict.erase(paramDataIt);
+ delete parameter;
+ }
+ } // of program-instance uniforms
+
+
+ // States
+ QJsonObject states = jsonObject.value(KEY_STATES).toObject();
+
+ //Process states to enable
+ const QJsonArray enableStatesArray = states.value(KEY_ENABLE).toArray();
+ QVector<int> enableStates;
+ for (const QJsonValue &enableValue : enableStatesArray)
+ enableStates.append(enableValue.toInt());
+
+ //Process the list of state functions
+ const QJsonObject functions = states.value(KEY_FUNCTIONS).toObject();
+ for (auto it = functions.begin(), end = functions.end(); it != end; ++it) {
+ int enableStateType = 0;
+ QRenderState *renderState = buildState(it.key(), it.value(), enableStateType);
+ if (renderState != nullptr) {
+ //Remove the need to set a default state values for enableStateType
+ enableStates.removeOne(enableStateType);
+ pass->addRenderState(renderState);
+ }
+ }
+
+ //Create render states with default values for any remaining enable states
+ for (int enableState : qAsConst(enableStates)) {
+ QRenderState *renderState = buildStateEnable(enableState);
+ if (renderState != nullptr)
+ pass->addRenderState(renderState);
+ }
+
+
+ t->addRenderPass(pass);
+
+ m_techniques[id] = t;
+}
+
+void GLTFIO::processJSONAccessor( const QString &id, const QJsonObject& json )
+{
+ m_accessorDict[id] = AccessorData(json);
+}
+
+void GLTFIO::processJSONMesh(const QString &id, const QJsonObject &json)
+{
+ const QJsonArray primitivesArray = json.value(KEY_PRIMITIVES).toArray();
+ for (const QJsonValue &primitiveValue : primitivesArray) {
+ QJsonObject primitiveObject = primitiveValue.toObject();
+ int type = primitiveObject.value(KEY_MODE).toInt();
+ QString material = primitiveObject.value(KEY_MATERIAL).toString();
+
+ if (Q_UNLIKELY(material.isEmpty())) {
+ qCWarning(GLTFIOLog, "malformed primitive on %ls, missing material value %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(material));
+ continue;
+ }
+
+ QGeometryRenderer *geometryRenderer = new QGeometryRenderer;
+ QGeometry *meshGeometry = new QGeometry(geometryRenderer);
+
+ //Set Primitive Type
+ geometryRenderer->setPrimitiveType(static_cast<QGeometryRenderer::PrimitiveType>(type));
+
+ //Save Material for mesh
+ m_meshMaterialDict[geometryRenderer] = material;
+
+ const QJsonObject attrs = primitiveObject.value(KEY_ATTRIBUTES).toObject();
+ for (auto it = attrs.begin(), end = attrs.end(); it != end; ++it) {
+ QString k = it.value().toString();
+ const auto accessorIt = qAsConst(m_accessorDict).find(k);
+ if (Q_UNLIKELY(accessorIt == m_accessorDict.cend())) {
+ qCWarning(GLTFIOLog, "unknown attribute accessor: %ls on mesh %ls",
+ qUtf16PrintableImpl(k), qUtf16PrintableImpl(id));
+ continue;
+ }
+
+ const QString attrName = it.key();
+ QString attributeName = standardAttributeNameFromSemantic(attrName);
+ if (attributeName.isEmpty())
+ attributeName = attrName;
+
+ //Get buffer handle for accessor
+ Qt3DRender::QBuffer *buffer = m_buffers.value(accessorIt->bufferViewName, nullptr);
+ if (Q_UNLIKELY(!buffer)) {
+ qCWarning(GLTFIOLog, "unknown buffer-view: %ls processing accessor: %ls",
+ qUtf16PrintableImpl(accessorIt->bufferViewName), qUtf16PrintableImpl(id));
+ continue;
+ }
+
+ QAttribute *attribute = new QAttribute(buffer,
+ attributeName,
+ accessorIt->type,
+ accessorIt->dataSize,
+ accessorIt->count,
+ accessorIt->offset,
+ accessorIt->stride);
+ attribute->setAttributeType(QAttribute::VertexAttribute);
+ meshGeometry->addAttribute(attribute);
+ }
+
+ const auto indices = primitiveObject.value(KEY_INDICES);
+ if (!indices.isUndefined()) {
+ QString k = indices.toString();
+ const auto accessorIt = qAsConst(m_accessorDict).find(k);
+ if (Q_UNLIKELY(accessorIt == m_accessorDict.cend())) {
+ qCWarning(GLTFIOLog, "unknown index accessor: %ls on mesh %ls",
+ qUtf16PrintableImpl(k), qUtf16PrintableImpl(id));
+ } else {
+ //Get buffer handle for accessor
+ Qt3DRender::QBuffer *buffer = m_buffers.value(accessorIt->bufferViewName, nullptr);
+ if (Q_UNLIKELY(!buffer)) {
+ qCWarning(GLTFIOLog, "unknown buffer-view: %ls processing accessor: %ls",
+ qUtf16PrintableImpl(accessorIt->bufferViewName), qUtf16PrintableImpl(id));
+ continue;
+ }
+
+ QAttribute *attribute = new QAttribute(buffer,
+ accessorIt->type,
+ accessorIt->dataSize,
+ accessorIt->count,
+ accessorIt->offset,
+ accessorIt->stride);
+ attribute->setAttributeType(QAttribute::IndexAttribute);
+ meshGeometry->addAttribute(attribute);
+ }
+ } // of has indices
+
+ geometryRenderer->setGeometry(meshGeometry);
+
+ m_meshDict.insert( id, geometryRenderer);
+ } // of primitives iteration
+}
+
+void GLTFIO::processJSONImage(const QString &id, const QJsonObject &jsonObject)
+{
+ QString path = jsonObject.value(KEY_URI).toString();
+ QFileInfo info(m_basePath, path);
+ if (Q_UNLIKELY(!info.exists())) {
+ qCWarning(GLTFIOLog, "can't find image %ls from path %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(path));
+ return;
+ }
+
+ m_imagePaths[id] = info.absoluteFilePath();
+}
+
+void GLTFIO::processJSONTexture(const QString &id, const QJsonObject &jsonObject)
+{
+ int target = jsonObject.value(KEY_TARGET).toInt(GL_TEXTURE_2D);
+ //TODO: support other targets that GL_TEXTURE_2D (though the spec doesn't support anything else)
+ if (Q_UNLIKELY(target != GL_TEXTURE_2D)) {
+ qCWarning(GLTFIOLog, "unsupported texture target: %d", target);
+ return;
+ }
+
+ QTextureLoader* tex = new QTextureLoader;
+ tex->setMirrored(false);
+
+ QString samplerId = jsonObject.value(KEY_SAMPLER).toString();
+ QString source = jsonObject.value(KEY_SOURCE).toString();
+ const auto imagIt = qAsConst(m_imagePaths).find(source);
+ if (Q_UNLIKELY(imagIt == m_imagePaths.cend())) {
+ qCWarning(GLTFIOLog, "texture %ls references missing image %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(source));
+ return;
+ }
+
+ tex->setSource(QUrl::fromLocalFile(imagIt.value()));
+
+ const auto samplersDictValue = m_json.object().value(KEY_SAMPLERS).toObject().value(samplerId);
+ if (Q_UNLIKELY(samplersDictValue.isUndefined())) {
+ qCWarning(GLTFIOLog, "texture %ls references unknown sampler %ls",
+ qUtf16PrintableImpl(id), qUtf16PrintableImpl(samplerId));
+ return;
+ }
+
+ QJsonObject sampler = samplersDictValue.toObject();
+
+ tex->setWrapMode(QTextureWrapMode(static_cast<QTextureWrapMode::WrapMode>(sampler.value(KEY_WRAP_S).toInt())));
+ tex->setMinificationFilter(static_cast<QAbstractTexture::Filter>(sampler.value(KEY_MIN_FILTER).toInt()));
+ if (tex->minificationFilter() == QAbstractTexture::NearestMipMapLinear ||
+ tex->minificationFilter() == QAbstractTexture::LinearMipMapNearest ||
+ tex->minificationFilter() == QAbstractTexture::NearestMipMapNearest ||
+ tex->minificationFilter() == QAbstractTexture::LinearMipMapLinear) {
+
+ tex->setGenerateMipMaps(true);
+ }
+ tex->setMagnificationFilter(static_cast<QAbstractTexture::Filter>(sampler.value(KEY_MAG_FILTER).toInt()));
+
+ m_textures[id] = tex;
+}
+
+void GLTFIO::loadBufferData()
+{
+ for (auto &bufferData : m_bufferDatas) {
+ if (!bufferData.data) {
+ bufferData.data = new QByteArray(resolveLocalData(bufferData.path));
+ }
+ }
+}
+
+void GLTFIO::unloadBufferData()
+{
+ for (const auto &bufferData : qAsConst(m_bufferDatas)) {
+ QByteArray *data = bufferData.data;
+ delete data;
+ }
+}
+
+QByteArray GLTFIO::resolveLocalData(const QString &path) const
+{
+ QDir d(m_basePath);
+ Q_ASSERT(d.exists());
+
+ QString absPath = d.absoluteFilePath(path);
+ QFile f(absPath);
+ f.open(QIODevice::ReadOnly);
+ return f.readAll();
+}
+
+QVariant GLTFIO::parameterValueFromJSON(int type, const QJsonValue &value) const
+{
+ if (value.isBool()) {
+ if (type == GL_BOOL)
+ return QVariant(static_cast<GLboolean>(value.toBool()));
+ } else if (value.isString()) {
+ if (type == GL_SAMPLER_2D) {
+ //Textures are special because we need to do a lookup to return the
+ //QAbstractTexture
+ QString textureId = value.toString();
+ const auto it = m_textures.find(textureId);
+ if (Q_UNLIKELY(it == m_textures.end())) {
+ qCWarning(GLTFIOLog, "unknown texture %ls", qUtf16PrintableImpl(textureId));
+ return QVariant();
+ } else {
+ return QVariant::fromValue(it.value());
+ }
+ }
+ } else if (value.isDouble()) {
+ switch (type) {
+ case GL_BYTE:
+ return QVariant(static_cast<GLbyte>(value.toInt()));
+ case GL_UNSIGNED_BYTE:
+ return QVariant(static_cast<GLubyte>(value.toInt()));
+ case GL_SHORT:
+ return QVariant(static_cast<GLshort>(value.toInt()));
+ case GL_UNSIGNED_SHORT:
+ return QVariant(static_cast<GLushort>(value.toInt()));
+ case GL_INT:
+ return QVariant(static_cast<GLint>(value.toInt()));
+ case GL_UNSIGNED_INT:
+ return QVariant(static_cast<GLuint>(value.toInt()));
+ case GL_FLOAT:
+ return QVariant(static_cast<GLfloat>(value.toDouble()));
+ }
+ } else if (value.isArray()) {
+
+ const QJsonArray valueArray = value.toArray();
+
+ QVector2D vector2D;
+ QVector3D vector3D;
+ QVector4D vector4D;
+ QVector<float> dataMat2(4, 0.0f);
+ QVector<float> dataMat3(9, 0.0f);
+
+ switch (type) {
+ case GL_BYTE:
+ return QVariant(static_cast<GLbyte>(valueArray.first().toInt()));
+ case GL_UNSIGNED_BYTE:
+ return QVariant(static_cast<GLubyte>(valueArray.first().toInt()));
+ case GL_SHORT:
+ return QVariant(static_cast<GLshort>(valueArray.first().toInt()));
+ case GL_UNSIGNED_SHORT:
+ return QVariant(static_cast<GLushort>(valueArray.first().toInt()));
+ case GL_INT:
+ return QVariant(static_cast<GLint>(valueArray.first().toInt()));
+ case GL_UNSIGNED_INT:
+ return QVariant(static_cast<GLuint>(valueArray.first().toInt()));
+ case GL_FLOAT:
+ return QVariant(static_cast<GLfloat>(valueArray.first().toDouble()));
+ case GL_FLOAT_VEC2:
+ vector2D.setX(static_cast<GLfloat>(valueArray.at(0).toDouble()));
+ vector2D.setY(static_cast<GLfloat>(valueArray.at(1).toDouble()));
+ return QVariant(vector2D);
+ case GL_FLOAT_VEC3:
+ vector3D.setX(static_cast<GLfloat>(valueArray.at(0).toDouble()));
+ vector3D.setY(static_cast<GLfloat>(valueArray.at(1).toDouble()));
+ vector3D.setZ(static_cast<GLfloat>(valueArray.at(2).toDouble()));
+ return QVariant(vector3D);
+ case GL_FLOAT_VEC4:
+ vector4D.setX(static_cast<GLfloat>(valueArray.at(0).toDouble()));
+ vector4D.setY(static_cast<GLfloat>(valueArray.at(1).toDouble()));
+ vector4D.setZ(static_cast<GLfloat>(valueArray.at(2).toDouble()));
+ vector4D.setW(static_cast<GLfloat>(valueArray.at(3).toDouble()));
+ return QVariant(vector4D);
+ case GL_INT_VEC2:
+ vector2D.setX(static_cast<GLint>(valueArray.at(0).toInt()));
+ vector2D.setY(static_cast<GLint>(valueArray.at(1).toInt()));
+ return QVariant(vector2D);
+ case GL_INT_VEC3:
+ vector3D.setX(static_cast<GLint>(valueArray.at(0).toInt()));
+ vector3D.setY(static_cast<GLint>(valueArray.at(1).toInt()));
+ vector3D.setZ(static_cast<GLint>(valueArray.at(2).toInt()));
+ return QVariant(vector3D);
+ case GL_INT_VEC4:
+ vector4D.setX(static_cast<GLint>(valueArray.at(0).toInt()));
+ vector4D.setY(static_cast<GLint>(valueArray.at(1).toInt()));
+ vector4D.setZ(static_cast<GLint>(valueArray.at(2).toInt()));
+ vector4D.setW(static_cast<GLint>(valueArray.at(3).toInt()));
+ return QVariant(vector4D);
+ case GL_BOOL:
+ return QVariant(static_cast<GLboolean>(valueArray.first().toBool()));
+ case GL_BOOL_VEC2:
+ vector2D.setX(static_cast<GLboolean>(valueArray.at(0).toBool()));
+ vector2D.setY(static_cast<GLboolean>(valueArray.at(1).toBool()));
+ return QVariant(vector2D);
+ case GL_BOOL_VEC3:
+ vector3D.setX(static_cast<GLboolean>(valueArray.at(0).toBool()));
+ vector3D.setY(static_cast<GLboolean>(valueArray.at(1).toBool()));
+ vector3D.setZ(static_cast<GLboolean>(valueArray.at(2).toBool()));
+ return QVariant(vector3D);
+ case GL_BOOL_VEC4:
+ vector4D.setX(static_cast<GLboolean>(valueArray.at(0).toBool()));
+ vector4D.setY(static_cast<GLboolean>(valueArray.at(1).toBool()));
+ vector4D.setZ(static_cast<GLboolean>(valueArray.at(2).toBool()));
+ vector4D.setW(static_cast<GLboolean>(valueArray.at(3).toBool()));
+ return QVariant(vector4D);
+ case GL_FLOAT_MAT2:
+ //Matrix2x2 is in Row Major ordering (so we need to convert)
+ dataMat2[0] = static_cast<GLfloat>(valueArray.at(0).toDouble());
+ dataMat2[1] = static_cast<GLfloat>(valueArray.at(2).toDouble());
+ dataMat2[2] = static_cast<GLfloat>(valueArray.at(1).toDouble());
+ dataMat2[3] = static_cast<GLfloat>(valueArray.at(3).toDouble());
+ return QVariant::fromValue(QMatrix2x2(dataMat2.constData()));
+ case GL_FLOAT_MAT3:
+ //Matrix3x3 is in Row Major ordering (so we need to convert)
+ dataMat3[0] = static_cast<GLfloat>(valueArray.at(0).toDouble());
+ dataMat3[1] = static_cast<GLfloat>(valueArray.at(3).toDouble());
+ dataMat3[2] = static_cast<GLfloat>(valueArray.at(6).toDouble());
+ dataMat3[3] = static_cast<GLfloat>(valueArray.at(1).toDouble());
+ dataMat3[4] = static_cast<GLfloat>(valueArray.at(4).toDouble());
+ dataMat3[5] = static_cast<GLfloat>(valueArray.at(7).toDouble());
+ dataMat3[6] = static_cast<GLfloat>(valueArray.at(2).toDouble());
+ dataMat3[7] = static_cast<GLfloat>(valueArray.at(5).toDouble());
+ dataMat3[8] = static_cast<GLfloat>(valueArray.at(8).toDouble());
+ return QVariant::fromValue(QMatrix3x3(dataMat3.constData()));
+ case GL_FLOAT_MAT4:
+ //Matrix4x4 is Column Major ordering
+ return QVariant(QMatrix4x4(static_cast<GLfloat>(valueArray.at(0).toDouble()),
+ static_cast<GLfloat>(valueArray.at(1).toDouble()),
+ static_cast<GLfloat>(valueArray.at(2).toDouble()),
+ static_cast<GLfloat>(valueArray.at(3).toDouble()),
+ static_cast<GLfloat>(valueArray.at(4).toDouble()),
+ static_cast<GLfloat>(valueArray.at(5).toDouble()),
+ static_cast<GLfloat>(valueArray.at(6).toDouble()),
+ static_cast<GLfloat>(valueArray.at(7).toDouble()),
+ static_cast<GLfloat>(valueArray.at(8).toDouble()),
+ static_cast<GLfloat>(valueArray.at(9).toDouble()),
+ static_cast<GLfloat>(valueArray.at(10).toDouble()),
+ static_cast<GLfloat>(valueArray.at(11).toDouble()),
+ static_cast<GLfloat>(valueArray.at(12).toDouble()),
+ static_cast<GLfloat>(valueArray.at(13).toDouble()),
+ static_cast<GLfloat>(valueArray.at(14).toDouble()),
+ static_cast<GLfloat>(valueArray.at(15).toDouble())));
+ case GL_SAMPLER_2D:
+ return QVariant(valueArray.at(0).toString());
+ }
+ }
+ return QVariant();
+}
+
+QAttribute::VertexBaseType GLTFIO::accessorTypeFromJSON(int componentType)
+{
+ if (componentType == GL_BYTE) {
+ return QAttribute::Byte;
+ } else if (componentType == GL_UNSIGNED_BYTE) {
+ return QAttribute::UnsignedByte;
+ } else if (componentType == GL_SHORT) {
+ return QAttribute::Short;
+ } else if (componentType == GL_UNSIGNED_SHORT) {
+ return QAttribute::UnsignedShort;
+ } else if (componentType == GL_UNSIGNED_INT) {
+ return QAttribute::UnsignedInt;
+ } else if (componentType == GL_FLOAT) {
+ return QAttribute::Float;
+ }
+
+ //There shouldn't be an invalid case here
+ qCWarning(GLTFIOLog, "unsupported accessor type %d", componentType);
+ return QAttribute::Float;
+}
+
+uint GLTFIO::accessorDataSizeFromJson(const QString &type)
+{
+ QString typeName = type.toUpper();
+ if (typeName == QLatin1String("SCALAR"))
+ return 1;
+ if (typeName == QLatin1String("VEC2"))
+ return 2;
+ if (typeName == QLatin1String("VEC3"))
+ return 3;
+ if (typeName == QLatin1String("VEC4"))
+ return 4;
+ if (typeName == QLatin1String("MAT2"))
+ return 4;
+ if (typeName == QLatin1String("MAT3"))
+ return 9;
+ if (typeName == QLatin1String("MAT4"))
+ return 16;
+
+ return 0;
+}
+
+QRenderState *GLTFIO::buildStateEnable(int state)
+{
+ int type = 0;
+ //By calling buildState with QJsonValue(), a Render State with
+ //default values is created.
+
+ if (state == GL_BLEND) {
+ //It doesn't make sense to handle this state alone
+ return nullptr;
+ }
+
+ if (state == GL_CULL_FACE) {
+ return buildState(QStringLiteral("cullFace"), QJsonValue(), type);
+ }
+
+ if (state == GL_DEPTH_TEST) {
+ return buildState(QStringLiteral("depthFunc"), QJsonValue(), type);
+ }
+
+ if (state == GL_POLYGON_OFFSET_FILL) {
+ return buildState(QStringLiteral("polygonOffset"), QJsonValue(), type);
+ }
+
+ if (state == GL_SAMPLE_ALPHA_TO_COVERAGE) {
+ return new QAlphaCoverage();
+ }
+
+ if (state == GL_SCISSOR_TEST) {
+ return buildState(QStringLiteral("scissor"), QJsonValue(), type);
+ }
+
+ qCWarning(GLTFIOLog, "unsupported render state: %d", state);
+
+ return nullptr;
+}
+
+QRenderState* GLTFIO::buildState(const QString& functionName, const QJsonValue &value, int &type)
+{
+ type = -1;
+ QJsonArray values = value.toArray();
+
+ if (functionName == QLatin1String("blendColor")) {
+ type = GL_BLEND;
+ //TODO: support render state blendColor
+ qCWarning(GLTFIOLog, "unsupported render state: %ls", qUtf16PrintableImpl(functionName));
+ return nullptr;
+ }
+
+ if (functionName == QLatin1String("blendEquationSeparate")) {
+ type = GL_BLEND;
+ //TODO: support settings blendEquation alpha
+ QBlendEquation *blendEquation = new QBlendEquation;
+ blendEquation->setBlendFunction((QBlendEquation::BlendFunction)values.at(0).toInt(GL_FUNC_ADD));
+ return blendEquation;
+ }
+
+ if (functionName == QLatin1String("blendFuncSeparate")) {
+ type = GL_BLEND;
+ QBlendEquationArguments *blendArgs = new QBlendEquationArguments;
+ blendArgs->setSourceRgb((QBlendEquationArguments::Blending)values.at(0).toInt(GL_ONE));
+ blendArgs->setSourceAlpha((QBlendEquationArguments::Blending)values.at(1).toInt(GL_ONE));
+ blendArgs->setDestinationRgb((QBlendEquationArguments::Blending)values.at(2).toInt(GL_ZERO));
+ blendArgs->setDestinationAlpha((QBlendEquationArguments::Blending)values.at(3).toInt(GL_ZERO));
+ return blendArgs;
+ }
+
+ if (functionName == QLatin1String("colorMask")) {
+ QColorMask *colorMask = new QColorMask;
+ colorMask->setRedMasked(values.at(0).toBool(true));
+ colorMask->setGreenMasked(values.at(1).toBool(true));
+ colorMask->setBlueMasked(values.at(2).toBool(true));
+ colorMask->setAlphaMasked(values.at(3).toBool(true));
+ return colorMask;
+ }
+
+ if (functionName == QLatin1String("cullFace")) {
+ type = GL_CULL_FACE;
+ QCullFace *cullFace = new QCullFace;
+ cullFace->setMode((QCullFace::CullingMode)values.at(0).toInt(GL_BACK));
+ return cullFace;
+ }
+
+ if (functionName == QLatin1String("depthFunc")) {
+ type = GL_DEPTH_TEST;
+ QDepthTest *depthTest = new QDepthTest;
+ depthTest->setDepthFunction((QDepthTest::DepthFunction)values.at(0).toInt(GL_LESS));
+ return depthTest;
+ }
+
+ if (functionName == QLatin1String("depthMask")) {
+ if (!values.at(0).toBool(true)) {
+ QNoDepthMask *depthMask = new QNoDepthMask;
+ return depthMask;
+ }
+ return nullptr;
+ }
+
+ if (functionName == QLatin1String("depthRange")) {
+ //TODO: support render state depthRange
+ qCWarning(GLTFIOLog, "unsupported render state: %ls", qUtf16PrintableImpl(functionName));
+ return nullptr;
+ }
+
+ if (functionName == QLatin1String("frontFace")) {
+ QFrontFace *frontFace = new QFrontFace;
+ frontFace->setDirection((QFrontFace::WindingDirection)values.at(0).toInt(GL_CCW));
+ return frontFace;
+ }
+
+ if (functionName == QLatin1String("lineWidth")) {
+ //TODO: support render state lineWidth
+ qCWarning(GLTFIOLog, "unsupported render state: %ls", qUtf16PrintableImpl(functionName));
+ return nullptr;
+ }
+
+ if (functionName == QLatin1String("polygonOffset")) {
+ type = GL_POLYGON_OFFSET_FILL;
+ QPolygonOffset *polygonOffset = new QPolygonOffset;
+ polygonOffset->setScaleFactor((float)values.at(0).toDouble(0.0f));
+ polygonOffset->setDepthSteps((float)values.at(1).toDouble(0.0f));
+ return polygonOffset;
+ }
+
+ if (functionName == QLatin1String("scissor")) {
+ type = GL_SCISSOR_TEST;
+ QScissorTest *scissorTest = new QScissorTest;
+ scissorTest->setLeft(values.at(0).toDouble(0.0f));
+ scissorTest->setBottom(values.at(1).toDouble(0.0f));
+ scissorTest->setWidth(values.at(2).toDouble(0.0f));
+ scissorTest->setHeight(values.at(3).toDouble(0.0f));
+ return scissorTest;
+ }
+
+ qCWarning(GLTFIOLog, "unsupported render state: %ls", qUtf16PrintableImpl(functionName));
+ return nullptr;
+}
+
+} // namespace Qt3DRender
+
+QT_END_NAMESPACE
+
+#include "moc_gltfio.cpp"
diff --git a/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp b/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp
index 51509f4ab..6d2a78166 100644
--- a/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp
+++ b/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp
@@ -38,15 +38,17 @@
****************************************************************************/
#include "qt3dquick3dcoreplugin.h"
+
#include <Qt3DCore/qtransform.h>
-#include <private/quick3dentity_p.h>
-#include <private/quick3dentityloader_p.h>
-#include <private/quick3dnodeinstantiator_p.h>
-#include <Qt3DQuick/private/quick3dnodev9_p.h>
-#include <private/qquaternionanimation_p.h>
-#include <private/qt3dquick_global_p.h>
#include <QtCore/qvariantanimation.h>
+#include <Qt3DQuick/private/quick3dnodev9_p.h>
+#include <Qt3DQuick/private/quick3dentity_p.h>
+#include <Qt3DQuick/private/quick3dentityloader_p.h>
+#include <Qt3DQuick/private/quick3dnodeinstantiator_p.h>
+#include <Qt3DQuick/private/qquaternionanimation_p.h>
+#include <Qt3DQuick/private/qt3dquick_global_p.h>
+
QT_BEGIN_NAMESPACE
void Qt3DQuick3DCorePlugin::registerTypes(const char *uri)
diff --git a/src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp b/src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp
index 95924182d..647eb003b 100644
--- a/src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp
+++ b/src/quick3d/imports/extras/qt3dquick3dextrasplugin.cpp
@@ -38,15 +38,22 @@
****************************************************************************/
#include "qt3dquick3dextrasplugin.h"
-#include <Qt3DExtras/qcuboidmesh.h>
+
+#include <Qt3DExtras/qconegeometry.h>
#include <Qt3DExtras/qconemesh.h>
+#include <Qt3DExtras/qcuboidgeometry.h>
+#include <Qt3DExtras/qcuboidmesh.h>
+#include <Qt3DExtras/qcylindergeometry.h>
#include <Qt3DExtras/qcylindermesh.h>
#include <Qt3DExtras/qdiffusemapmaterial.h>
#include <Qt3DExtras/qdiffusespecularmapmaterial.h>
+#include <Qt3DExtras/qextrudedtextgeometry.h>
+#include <Qt3DExtras/qextrudedtextmesh.h>
#include <Qt3DExtras/qfirstpersoncameracontroller.h>
#include <Qt3DExtras/qforwardrenderer.h>
#include <Qt3DExtras/qgoochmaterial.h>
#include <Qt3DExtras/qmetalroughmaterial.h>
+#include <Qt3DExtras/qmorphphongmaterial.h>
#include <Qt3DExtras/qnormaldiffusemapalphamaterial.h>
#include <Qt3DExtras/qnormaldiffusemapmaterial.h>
#include <Qt3DExtras/qnormaldiffusespecularmapmaterial.h>
@@ -54,22 +61,17 @@
#include <Qt3DExtras/qpervertexcolormaterial.h>
#include <Qt3DExtras/qphongalphamaterial.h>
#include <Qt3DExtras/qphongmaterial.h>
+#include <Qt3DExtras/qplanegeometry.h>
#include <Qt3DExtras/qplanemesh.h>
#include <Qt3DExtras/qskyboxentity.h>
+#include <Qt3DExtras/qspheregeometry.h>
#include <Qt3DExtras/qspheremesh.h>
-#include <Qt3DExtras/qtexturematerial.h>
+#include <Qt3DExtras/qtext2dentity.h>
#include <Qt3DExtras/qtexturedmetalroughmaterial.h>
-#include <Qt3DExtras/qtorusmesh.h>
+#include <Qt3DExtras/qtexturematerial.h>
#include <Qt3DExtras/qtorusgeometry.h>
-#include <Qt3DExtras/qspheregeometry.h>
-#include <Qt3DExtras/qcuboidgeometry.h>
-#include <Qt3DExtras/qplanegeometry.h>
-#include <Qt3DExtras/qconegeometry.h>
-#include <Qt3DExtras/qcylindergeometry.h>
-#include <Qt3DExtras/qextrudedtextgeometry.h>
-#include <Qt3DExtras/qextrudedtextmesh.h>
-#include <Qt3DExtras/qtext2dentity.h>
-#include <Qt3DExtras/qmorphphongmaterial.h>
+#include <Qt3DExtras/qtorusmesh.h>
+
#include <Qt3DQuickExtras/private/quick3dlevelofdetailloader_p.h>
#include <QtQml/qqml.h>
diff --git a/src/quick3d/imports/input/qt3dquick3dinputplugin.cpp b/src/quick3d/imports/input/qt3dquick3dinputplugin.cpp
index d31680b4d..9d83f964f 100644
--- a/src/quick3d/imports/input/qt3dquick3dinputplugin.cpp
+++ b/src/quick3d/imports/input/qt3dquick3dinputplugin.cpp
@@ -37,29 +37,31 @@
**
****************************************************************************/
-#include <QtQml>
-#include <Qt3DInput/qkeyboarddevice.h>
-#include <Qt3DInput/qkeyboardhandler.h>
-#include <Qt3DInput/qkeyevent.h>
-#include <Qt3DInput/qmousedevice.h>
-#include <Qt3DInput/qmousehandler.h>
-#include <Qt3DInput/qmouseevent.h>
+#include "qt3dquick3dinputplugin.h"
-#include <Qt3DInput/qaxis.h>
-#include <Qt3DInput/qaxisaccumulator.h>
-#include <Qt3DInput/qaxissetting.h>
+#include <Qt3DInput/qabstractphysicaldevice.h>
#include <Qt3DInput/qaction.h>
#include <Qt3DInput/qactioninput.h>
#include <Qt3DInput/qanalogaxisinput.h>
+#include <Qt3DInput/qaxis.h>
+#include <Qt3DInput/qaxisaccumulator.h>
+#include <Qt3DInput/qaxissetting.h>
#include <Qt3DInput/qbuttonaxisinput.h>
-#include <Qt3DInput/qinputsequence.h>
#include <Qt3DInput/qinputchord.h>
-#include <Qt3DInput/qlogicaldevice.h>
-#include <Qt3DInput/qabstractphysicaldevice.h>
+#include <Qt3DInput/qinputsequence.h>
#include <Qt3DInput/qinputsettings.h>
+#include <Qt3DInput/qkeyboarddevice.h>
+#include <Qt3DInput/qkeyboardhandler.h>
+#include <Qt3DInput/qkeyevent.h>
+#include <Qt3DInput/qlogicaldevice.h>
+#include <Qt3DInput/qmousedevice.h>
+#include <Qt3DInput/qmouseevent.h>
+#include <Qt3DInput/qmousehandler.h>
+#include <QtQml>
+
#include <Qt3DInput/private/qgenericinputdevice_p.h>
-#include <Qt3DQuickInput/private/quick3daxis_p.h>
#include <Qt3DQuickInput/private/quick3daction_p.h>
+#include <Qt3DQuickInput/private/quick3daxis_p.h>
#include <Qt3DQuickInput/private/quick3dinputchord_p.h>
#include <Qt3DQuickInput/private/quick3dinputsequence_p.h>
#include <Qt3DQuickInput/private/quick3dlogicaldevice_p.h>
@@ -69,8 +71,6 @@
# include <Qt3DInput/private/qgamepadinput_p.h>
#endif
-#include "qt3dquick3dinputplugin.h"
-
QT_BEGIN_NAMESPACE
void Qt3DQuick3DInputPlugin::registerTypes(const char *uri)
diff --git a/src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp b/src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp
index 3f96928b7..f97bc8fc6 100644
--- a/src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp
+++ b/src/quick3d/imports/logic/qt3dquick3dlogicplugin.cpp
@@ -37,10 +37,11 @@
**
****************************************************************************/
-#include <QtQml>
-#include <Qt3DLogic/qframeaction.h>
#include "qt3dquick3dlogicplugin.h"
+#include <Qt3DLogic/qframeaction.h>
+#include <QtQml>
+
QT_BEGIN_NAMESPACE
void Qt3DQuick3DLogicPlugin::registerTypes(const char *uri)
diff --git a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
index e79c31761..f81b1fa53 100644
--- a/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
+++ b/src/quick3d/imports/render/qt3dquick3drenderplugin.cpp
@@ -39,97 +39,99 @@
****************************************************************************/
#include "qt3dquick3drenderplugin.h"
-#include <Qt3DRender/qsceneloader.h>
-#include <Qt3DRender/qmesh.h>
-#include <Qt3DRender/qrenderpass.h>
-#include <Qt3DRender/qshaderprogram.h>
-#include <Qt3DRender/qviewport.h>
-#include <Qt3DRender/qrenderpassfilter.h>
-#include <Qt3DRender/qtechniquefilter.h>
-#include <Qt3DRender/qrendertargetselector.h>
-#include <Qt3DRender/qrendersurfaceselector.h>
-#include <Qt3DRender/qtexture.h>
-#include <Qt3DRender/qtechnique.h>
+#include <Qt3DRender/qabstractlight.h>
+#include <Qt3DRender/qalphacoverage.h>
+#include <Qt3DRender/qalphatest.h>
+#include <Qt3DRender/qattribute.h>
+#include <Qt3DRender/qblendequation.h>
+#include <Qt3DRender/qblendequationarguments.h>
+#include <Qt3DRender/qbuffer.h>
+#include <Qt3DRender/qbuffercapture.h>
+#include <Qt3DRender/qcamera.h>
+#include <Qt3DRender/qcameralens.h>
#include <Qt3DRender/qcameraselector.h>
+#include <Qt3DRender/qclearbuffers.h>
+#include <Qt3DRender/qclipplane.h>
+#include <Qt3DRender/qcolormask.h>
+#include <Qt3DRender/qcomputecommand.h>
+#include <Qt3DRender/qcullface.h>
+#include <Qt3DRender/qdepthtest.h>
+#include <Qt3DRender/qdirectionallight.h>
+#include <Qt3DRender/qdispatchcompute.h>
+#include <Qt3DRender/qdithering.h>
#include <Qt3DRender/qeffect.h>
-#include <Qt3DRender/qparameter.h>
+#include <Qt3DRender/qenvironmentlight.h>
#include <Qt3DRender/qfilterkey.h>
+#include <Qt3DRender/qfrontface.h>
+#include <Qt3DRender/qfrustumculling.h>
+#include <Qt3DRender/qgeometry.h>
+#include <Qt3DRender/qgeometryrenderer.h>
+#include <Qt3DRender/qgraphicsapifilter.h>
#include <Qt3DRender/qlayer.h>
#include <Qt3DRender/qlevelofdetail.h>
-#include <Qt3DRender/qlevelofdetailswitch.h>
#include <Qt3DRender/qlevelofdetailboundingsphere.h>
-#include <Qt3DRender/qabstractlight.h>
-#include <Qt3DRender/qspotlight.h>
-#include <Qt3DRender/qdirectionallight.h>
-#include <Qt3DRender/qenvironmentlight.h>
-#include <Qt3DRender/qpointlight.h>
-#include <Qt3DRender/qgraphicsapifilter.h>
-#include <Qt3DRender/qrenderstate.h>
-#include <Qt3DRender/qblendequationarguments.h>
-#include <Qt3DRender/qblendequation.h>
-#include <Qt3DRender/qalphatest.h>
-#include <Qt3DRender/qdepthtest.h>
-#include <Qt3DRender/qnodepthmask.h>
-#include <Qt3DRender/qcullface.h>
-#include <Qt3DRender/qfrontface.h>
-#include <Qt3DRender/qstenciltest.h>
-#include <Qt3DRender/qstenciltestarguments.h>
-#include <Qt3DRender/qscissortest.h>
-#include <Qt3DRender/qdithering.h>
-#include <Qt3DRender/qrendertargetoutput.h>
-#include <Qt3DRender/qclearbuffers.h>
-#include <Qt3DRender/qalphacoverage.h>
+#include <Qt3DRender/qlevelofdetailswitch.h>
+#include <Qt3DRender/qmemorybarrier.h>
+#include <Qt3DRender/qmesh.h>
#include <Qt3DRender/qmultisampleantialiasing.h>
+#include <Qt3DRender/qnodepthmask.h>
+#include <Qt3DRender/qnodraw.h>
+#include <Qt3DRender/qobjectpicker.h>
+#include <Qt3DRender/qparameter.h>
+#include <Qt3DRender/qpickevent.h>
+#include <Qt3DRender/qpickingsettings.h>
+#include <Qt3DRender/qpointlight.h>
#include <Qt3DRender/qpointsize.h>
#include <Qt3DRender/qpolygonoffset.h>
-#include <Qt3DRender/qcolormask.h>
-#include <Qt3DRender/qshaderdata.h>
-#include <Qt3DRender/qnodraw.h>
-#include <Qt3DRender/qclipplane.h>
+#include <Qt3DRender/qrendercapture.h>
+#include <Qt3DRender/qrenderpass.h>
+#include <Qt3DRender/qrenderpassfilter.h>
+#include <Qt3DRender/qrendersettings.h>
+#include <Qt3DRender/qrenderstate.h>
+#include <Qt3DRender/qrendersurfaceselector.h>
+#include <Qt3DRender/qrendertargetoutput.h>
+#include <Qt3DRender/qrendertargetselector.h>
+#include <Qt3DRender/qsceneloader.h>
+#include <Qt3DRender/qscissortest.h>
#include <Qt3DRender/qseamlesscubemap.h>
+#include <Qt3DRender/qshaderdata.h>
+#include <Qt3DRender/qshaderprogram.h>
#include <Qt3DRender/qsortpolicy.h>
+#include <Qt3DRender/qspotlight.h>
+#include <Qt3DRender/qstencilmask.h>
#include <Qt3DRender/qstenciloperation.h>
#include <Qt3DRender/qstenciloperationarguments.h>
-#include <Qt3DRender/qstencilmask.h>
-#include <Qt3DRender/qattribute.h>
-#include <Qt3DRender/qbuffer.h>
-#include <Qt3DRender/qgeometry.h>
-#include <Qt3DRender/qgeometryrenderer.h>
-#include <Qt3DRender/qobjectpicker.h>
-#include <Qt3DRender/qpickevent.h>
-#include <Qt3DRender/qfrustumculling.h>
-#include <Qt3DRender/qdispatchcompute.h>
-#include <Qt3DRender/qcomputecommand.h>
-#include <Qt3DRender/qcameralens.h>
-#include <Qt3DRender/qcamera.h>
-#include <Qt3DRender/qrendersettings.h>
-#include <Qt3DRender/qpickingsettings.h>
-#include <Qt3DRender/qrendercapture.h>
-#include <Qt3DRender/qbuffercapture.h>
-#include <Qt3DRender/qmemorybarrier.h>
+#include <Qt3DRender/qstenciltest.h>
+#include <Qt3DRender/qstenciltestarguments.h>
+#include <Qt3DRender/qtechnique.h>
+#include <Qt3DRender/qtechniquefilter.h>
+#include <Qt3DRender/qtexture.h>
+#include <Qt3DRender/qviewport.h>
+
+#include <QtGui/qwindow.h>
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuickRender/private/quick3dbuffer_p.h>
+#include <Qt3DQuickRender/private/quick3deffect_p.h>
+#include <Qt3DQuickRender/private/quick3dgeometry_p.h>
#include <Qt3DQuickRender/private/quick3dlayerfilter_p.h>
-#include <Qt3DQuickRender/private/quick3dtechnique_p.h>
#include <Qt3DQuickRender/private/quick3dmaterial_p.h>
-#include <Qt3DQuickRender/private/quick3dtechniquefilter_p.h>
-#include <Qt3DQuickRender/private/quick3dviewport_p.h>
+#include <Qt3DQuickRender/private/quick3dmemorybarrier_p.h>
+#include <Qt3DQuickRender/private/quick3dparameter_p.h>
+#include <Qt3DQuickRender/private/quick3drenderpass_p.h>
#include <Qt3DQuickRender/private/quick3drenderpassfilter_p.h>
#include <Qt3DQuickRender/private/quick3drendertargetoutput_p.h>
-#include <Qt3DQuickRender/private/quick3deffect_p.h>
+#include <Qt3DQuickRender/private/quick3drendertargetselector_p.h>
#include <Qt3DQuickRender/private/quick3dscene_p.h>
-#include <Qt3DQuickRender/private/quick3dtexture_p.h>
-#include <Qt3DQuickRender/private/quick3drenderpass_p.h>
-#include <Qt3DQuickRender/private/quick3dparameter_p.h>
#include <Qt3DQuickRender/private/quick3dshaderdata_p.h>
#include <Qt3DQuickRender/private/quick3dshaderdataarray_p.h>
#include <Qt3DQuickRender/private/quick3dstateset_p.h>
-#include <Qt3DQuickRender/private/quick3drendertargetselector_p.h>
-#include <Qt3DQuickRender/private/quick3dgeometry_p.h>
-#include <Qt3DQuickRender/private/quick3dbuffer_p.h>
-#include <Qt3DQuickRender/private/quick3dmemorybarrier_p.h>
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuickRender/private/quick3dtechnique_p.h>
+#include <Qt3DQuickRender/private/quick3dtechniquefilter_p.h>
+#include <Qt3DQuickRender/private/quick3dtexture_p.h>
+#include <Qt3DQuickRender/private/quick3dviewport_p.h>
-#include <QtGui/qwindow.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp b/src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp
index 7103a1bb8..6b9ec96f8 100644
--- a/src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp
+++ b/src/quick3d/imports/scene3d/qtquickscene3dplugin.cpp
@@ -37,9 +37,11 @@
**
****************************************************************************/
-#include <QtQml>
#include "qtquickscene3dplugin.h"
-#include "scene3ditem_p.h"
+
+#include <QtQml>
+
+#include <scene3ditem_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/imports/scene3d/scene3dcleaner.cpp b/src/quick3d/imports/scene3d/scene3dcleaner.cpp
index 06b795c8a..ec371410d 100644
--- a/src/quick3d/imports/scene3d/scene3dcleaner.cpp
+++ b/src/quick3d/imports/scene3d/scene3dcleaner.cpp
@@ -38,13 +38,13 @@
****************************************************************************/
#include "scene3dcleaner_p.h"
-#include "scene3dlogging_p.h"
-#include "scene3drenderer_p.h"
#include <Qt3DCore/qaspectengine.h>
-
#include <QtCore/qthread.h>
+#include <scene3dlogging_p.h>
+#include <scene3drenderer_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/imports/scene3d/scene3dcleaner_p.h b/src/quick3d/imports/scene3d/scene3dcleaner_p.h
index 6ec2c7e6b..a246cbde7 100644
--- a/src/quick3d/imports/scene3d/scene3dcleaner_p.h
+++ b/src/quick3d/imports/scene3d/scene3dcleaner_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <QObject>
+#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/imports/scene3d/scene3ditem.cpp b/src/quick3d/imports/scene3d/scene3ditem.cpp
index 2c3cc4384..a156b9ef3 100644
--- a/src/quick3d/imports/scene3d/scene3ditem.cpp
+++ b/src/quick3d/imports/scene3d/scene3ditem.cpp
@@ -38,24 +38,23 @@
****************************************************************************/
#include "scene3ditem_p.h"
-#include "scene3dcleaner_p.h"
-#include "scene3dlogging_p.h"
-#include "scene3drenderer_p.h"
-#include "scene3dsgnode_p.h"
#include <Qt3DCore/QAspectEngine>
#include <Qt3DCore/qentity.h>
-#include <Qt3DRender/qcamera.h>
-#include <Qt3DRender/QRenderAspect>
-#include <Qt3DRender/qrendersurfaceselector.h>
-#include <Qt3DRender/private/qrendersurfaceselector_p.h>
#include <Qt3DInput/QInputAspect>
#include <Qt3DInput/qinputsettings.h>
#include <Qt3DLogic/qlogicaspect.h>
-
-
+#include <Qt3DRender/QRenderAspect>
+#include <Qt3DRender/qcamera.h>
+#include <Qt3DRender/qrendersurfaceselector.h>
#include <QtQuick/qquickwindow.h>
+#include <Qt3DRender/private/qrendersurfaceselector_p.h>
+#include <scene3dcleaner_p.h>
+#include <scene3dlogging_p.h>
+#include <scene3drenderer_p.h>
+#include <scene3dsgnode_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/imports/scene3d/scene3ditem_p.h b/src/quick3d/imports/scene3d/scene3ditem_p.h
index 09859a763..f3d452d3d 100644
--- a/src/quick3d/imports/scene3d/scene3ditem_p.h
+++ b/src/quick3d/imports/scene3d/scene3ditem_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
-#include <QQuickItem>
#include <QtCore/qpointer.h>
+#include <QtQuick/QQuickItem>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/imports/scene3d/scene3dlogging_p.h b/src/quick3d/imports/scene3d/scene3dlogging_p.h
index 0f9448d42..91430939f 100644
--- a/src/quick3d/imports/scene3d/scene3dlogging_p.h
+++ b/src/quick3d/imports/scene3d/scene3dlogging_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <QLoggingCategory>
+#include <QtCore/QLoggingCategory>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/imports/scene3d/scene3drenderer.cpp b/src/quick3d/imports/scene3d/scene3drenderer.cpp
index d3b9efdb1..f52a071eb 100644
--- a/src/quick3d/imports/scene3d/scene3drenderer.cpp
+++ b/src/quick3d/imports/scene3d/scene3drenderer.cpp
@@ -38,22 +38,20 @@
****************************************************************************/
#include "scene3drenderer_p.h"
-#include "scene3dcleaner_p.h"
-#include "scene3ditem_p.h"
-#include "scene3dlogging_p.h"
-#include "scene3dsgnode_p.h"
-#include <Qt3DRender/qrenderaspect.h>
-#include <Qt3DRender/private/qrenderaspect_p.h>
#include <Qt3DCore/qaspectengine.h>
-#include <Qt3DCore/private/qaspectengine_p.h>
-
-#include <QtQuick/qquickwindow.h>
-
+#include <Qt3DRender/qrenderaspect.h>
+#include <QtCore/qthread.h>
#include <QtGui/qopenglcontext.h>
#include <QtGui/qopenglframebufferobject.h>
+#include <QtQuick/qquickwindow.h>
-#include <QtCore/qthread.h>
+#include <Qt3DRender/private/qrenderaspect_p.h>
+#include <Qt3DCore/private/qaspectengine_p.h>
+#include <scene3dcleaner_p.h>
+#include <scene3ditem_p.h>
+#include <scene3dlogging_p.h>
+#include <scene3dsgnode_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/imports/scene3d/scene3drenderer_p.h b/src/quick3d/imports/scene3d/scene3drenderer_p.h
index 9ff5e7f36..f28501f31 100644
--- a/src/quick3d/imports/scene3d/scene3drenderer_p.h
+++ b/src/quick3d/imports/scene3d/scene3drenderer_p.h
@@ -51,8 +51,7 @@
// We mean it.
//
-#include <QObject>
-
+#include <QtCore/QObject>
#include <QtCore/qsize.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/imports/scene3d/scene3dsgmaterial_p.h b/src/quick3d/imports/scene3d/scene3dsgmaterial_p.h
index f3817dc05..df431e452 100644
--- a/src/quick3d/imports/scene3d/scene3dsgmaterial_p.h
+++ b/src/quick3d/imports/scene3d/scene3dsgmaterial_p.h
@@ -52,10 +52,10 @@
//
#include <QtQuick/QSGMaterial>
-#include "scene3dsgmaterialshader_p.h"
-
#include <QtQuick/qsgtexture.h>
+#include <scene3dsgmaterialshader_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp b/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
index 6cef032f7..8a4585558 100644
--- a/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
+++ b/src/quick3d/imports/scene3d/scene3dsgmaterialshader.cpp
@@ -38,12 +38,13 @@
****************************************************************************/
#include "scene3dsgmaterialshader_p.h"
-#include "scene3dsgmaterial_p.h"
#include <QtGui/qopenglcontext.h>
#include <QtGui/qopenglfunctions.h>
#include <QtGui/qsurfaceformat.h>
+#include <scene3dsgmaterial_p.h>
+
QT_BEGIN_NAMESPACE
namespace {
diff --git a/src/quick3d/imports/scene3d/scene3dsgnode.cpp b/src/quick3d/imports/scene3d/scene3dsgnode.cpp
index ae0a07350..8806b59a9 100644
--- a/src/quick3d/imports/scene3d/scene3dsgnode.cpp
+++ b/src/quick3d/imports/scene3d/scene3dsgnode.cpp
@@ -38,10 +38,11 @@
****************************************************************************/
#include "scene3dsgnode_p.h"
-#include "scene3dlogging_p.h"
#include <QtCore/qthread.h>
+#include <scene3dlogging_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/imports/scene3d/scene3dsgnode_p.h b/src/quick3d/imports/scene3d/scene3dsgnode_p.h
index f7b21e2b9..68b68eea5 100644
--- a/src/quick3d/imports/scene3d/scene3dsgnode_p.h
+++ b/src/quick3d/imports/scene3d/scene3dsgnode_p.h
@@ -53,7 +53,7 @@
#include <QtQuick/QSGGeometryNode>
-#include "scene3dsgmaterial_p.h"
+#include <scene3dsgmaterial_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dentity.cpp b/src/quick3d/quick3d/items/quick3dentity.cpp
index 0a95815af..c2814a79e 100644
--- a/src/quick3d/quick3d/items/quick3dentity.cpp
+++ b/src/quick3d/quick3d/items/quick3dentity.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "quick3dentity_p.h"
+
#include <Qt3DCore/qcomponent.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dentity_p.h b/src/quick3d/quick3d/items/quick3dentity_p.h
index 519ea4bd1..7ba5c62c2 100644
--- a/src/quick3d/quick3d/items/quick3dentity_p.h
+++ b/src/quick3d/quick3d/items/quick3dentity_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
-#include <QQmlListProperty>
#include <Qt3DCore/qentity.h>
+#include <QtQml/QQmlListProperty>
+
#include <Qt3DQuick/private/quick3dnode_p.h>
#include <Qt3DQuick/private/qt3dquick_global_p.h>
diff --git a/src/quick3d/quick3d/items/quick3dentityloader.cpp b/src/quick3d/quick3d/items/quick3dentityloader.cpp
index c978e22cb..8a9b19024 100644
--- a/src/quick3d/quick3d/items/quick3dentityloader.cpp
+++ b/src/quick3d/quick3d/items/quick3dentityloader.cpp
@@ -39,9 +39,9 @@
#include "quick3dentityloader_p_p.h"
-#include <QQmlContext>
-#include <QQmlEngine>
-#include <QQmlIncubator>
+#include <QtQml/QQmlContext>
+#include <QtQml/QQmlEngine>
+#include <QtQml/QQmlIncubator>
#include <QtQml/private/qqmlengine_p.h>
diff --git a/src/quick3d/quick3d/items/quick3dentityloader_p.h b/src/quick3d/quick3d/items/quick3dentityloader_p.h
index 9cd0eff2e..6a2fe5473 100644
--- a/src/quick3d/quick3d/items/quick3dentityloader_p.h
+++ b/src/quick3d/quick3d/items/quick3dentityloader_p.h
@@ -51,10 +51,9 @@
// We mean it.
//
-#include <QObject>
-#include <QUrl>
-
#include <Qt3DCore/QEntity>
+#include <QtCore/QObject>
+#include <QtCore/QUrl>
#include <Qt3DQuick/private/qt3dquick_global_p.h>
diff --git a/src/quick3d/quick3d/items/quick3dentityloader_p_p.h b/src/quick3d/quick3d/items/quick3dentityloader_p_p.h
index 1ff1459cb..4d067f0e6 100644
--- a/src/quick3d/quick3d/items/quick3dentityloader_p_p.h
+++ b/src/quick3d/quick3d/items/quick3dentityloader_p_p.h
@@ -51,11 +51,10 @@
// We mean it.
//
-#include "quick3dentityloader_p.h"
-
-#include <QQmlComponent>
+#include <QtQml/QQmlComponent>
#include <Qt3DCore/private/qentity_p.h>
+#include <Qt3DQuick/private/quick3dentityloader_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dnode.cpp b/src/quick3d/quick3d/items/quick3dnode.cpp
index 3761f8d64..fb91f4ae0 100644
--- a/src/quick3d/quick3d/items/quick3dnode.cpp
+++ b/src/quick3d/quick3d/items/quick3dnode.cpp
@@ -38,7 +38,8 @@
****************************************************************************/
#include "quick3dnode_p.h"
-#include <QDebug>
+
+#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dnode_p.h b/src/quick3d/quick3d/items/quick3dnode_p.h
index 9798d0d4c..640a58149 100644
--- a/src/quick3d/quick3d/items/quick3dnode_p.h
+++ b/src/quick3d/quick3d/items/quick3dnode_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
-#include <QQmlListProperty>
#include <Qt3DCore/qnode.h>
+#include <QtQml/QQmlListProperty>
+
#include <Qt3DQuick/private/qt3dquick_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
index eb6df2756..1626554ea 100644
--- a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
+++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
@@ -42,13 +42,13 @@
#include <QtQml/QQmlContext>
#include <QtQml/QQmlComponent>
-#include <QtQml/QQmlInfo>
#include <QtQml/QQmlError>
-#include <QtQml/private/qqmlobjectmodel_p.h>
+#include <QtQml/QQmlInfo>
+
+#include <Qt3DCore/private/qnode_p.h>
+#include <QtQml/private/qqmlchangeset_p.h>
#include <QtQml/private/qqmldelegatemodel_p.h>
-#include <private/qnode_p.h>
-#include <private/qqmlchangeset_p.h>
-#include <private/qqmlobjectmodel_p.h>
+#include <QtQml/private/qqmlobjectmodel_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h b/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h
index d861fc2fe..fd7a1d83d 100644
--- a/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h
+++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h
@@ -52,11 +52,12 @@
// We mean it.
//
-#include <Qt3DQuick/private/qt3dquick_global_p.h>
#include <Qt3DCore/qnode.h>
#include <QtQml/qqmlcomponent.h>
#include <QtQml/qqmlparserstatus.h>
+#include <Qt3DQuick/private/qt3dquick_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/quick3d/quick3d/qqmlaspectengine.cpp b/src/quick3d/quick3d/qqmlaspectengine.cpp
index 4b694d26e..912c71fb3 100644
--- a/src/quick3d/quick3d/qqmlaspectengine.cpp
+++ b/src/quick3d/quick3d/qqmlaspectengine.cpp
@@ -38,10 +38,11 @@
****************************************************************************/
#include "qqmlaspectengine_p.h"
-#include <QQmlComponent>
-#include <QQmlContext>
-#include <QDebug>
+
#include <Qt3DCore/qentity.h>
+#include <QtCore/QDebug>
+#include <QtQml/QQmlComponent>
+#include <QtQml/QQmlContext>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/qqmlaspectengine.h b/src/quick3d/quick3d/qqmlaspectengine.h
index c85cbb8ea..a7b09ec8a 100644
--- a/src/quick3d/quick3d/qqmlaspectengine.h
+++ b/src/quick3d/quick3d/qqmlaspectengine.h
@@ -40,9 +40,9 @@
#ifndef QT3D_QUICK_QQMLASPECTENGINE_H
#define QT3D_QUICK_QQMLASPECTENGINE_H
-#include <QQmlEngine>
#include <Qt3DCore/QAspectEngine>
#include <Qt3DQuick/qt3dquick_global.h>
+#include <QtQml/QQmlEngine>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/qqmlaspectengine_p.h b/src/quick3d/quick3d/qqmlaspectengine_p.h
index f9343ae68..960ecb344 100644
--- a/src/quick3d/quick3d/qqmlaspectengine_p.h
+++ b/src/quick3d/quick3d/qqmlaspectengine_p.h
@@ -53,8 +53,9 @@
#include <Qt3DQuick/qt3dquick_global.h>
#include <Qt3DQuick/qqmlaspectengine.h>
-#include <private/qobject_p.h>
-#include <QScopedPointer>
+#include <QtCore/QScopedPointer>
+
+#include <QtCore/private/qobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/qquaternionanimation.cpp b/src/quick3d/quick3d/qquaternionanimation.cpp
index 25cad523b..adccf4d97 100644
--- a/src/quick3d/quick3d/qquaternionanimation.cpp
+++ b/src/quick3d/quick3d/qquaternionanimation.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qquaternionanimation_p.h"
+
#include <QtQuick/private/qquickanimation_p_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/qquaternionanimation_p.h b/src/quick3d/quick3d/qquaternionanimation_p.h
index 3c5f092c4..172d3bc85 100644
--- a/src/quick3d/quick3d/qquaternionanimation_p.h
+++ b/src/quick3d/quick3d/qquaternionanimation_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
+#include <QtGui/qquaternion.h>
+
#include <Qt3DQuick/private/qt3dquick_global_p.h>
#include <QtQuick/private/qquickanimation_p.h>
-#include <QtGui/qquaternion.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/qt3dquick_global.cpp b/src/quick3d/quick3d/qt3dquick_global.cpp
index f25aae268..97be0b636 100644
--- a/src/quick3d/quick3d/qt3dquick_global.cpp
+++ b/src/quick3d/quick3d/qt3dquick_global.cpp
@@ -38,12 +38,13 @@
****************************************************************************/
#include "qt3dquick_global_p.h"
-#include "qt3dquicknodefactory_p.h"
-#include <private/qqmlglobal_p.h>
-#include <private/qt3dquickvaluetypes_p.h>
-#include <private/qv8engine_p.h>
-#include <private/qv4engine_p.h>
-#include <private/qv4object_p.h>
+
+#include <Qt3DQuick/private/qt3dquicknodefactory_p.h>
+#include <Qt3DQuick/private/qt3dquickvaluetypes_p.h>
+#include <QtQml/private/qqmlglobal_p.h>
+#include <QtQml/private/qv4engine_p.h>
+#include <QtQml/private/qv4object_p.h>
+#include <QtQml/private/qv8engine_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/qt3dquicknodefactory.cpp b/src/quick3d/quick3d/qt3dquicknodefactory.cpp
index 923793506..a8c021754 100644
--- a/src/quick3d/quick3d/qt3dquicknodefactory.cpp
+++ b/src/quick3d/quick3d/qt3dquicknodefactory.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qt3dquicknodefactory_p.h"
+
#include <QtQml/private/qqmlmetatype_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/qt3dquicknodefactory_p.h b/src/quick3d/quick3d/qt3dquicknodefactory_p.h
index 4dd455461..6c074da04 100644
--- a/src/quick3d/quick3d/qt3dquicknodefactory_p.h
+++ b/src/quick3d/quick3d/qt3dquicknodefactory_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qabstractnodefactory_p.h>
#include <QtCore/qhash.h>
+#include <Qt3DCore/private/qabstractnodefactory_p.h>
+
QT_BEGIN_NAMESPACE
class QQmlType;
diff --git a/src/quick3d/quick3d/qt3dquickvaluetypes_p.h b/src/quick3d/quick3d/qt3dquickvaluetypes_p.h
index ed80d0426..46500b935 100644
--- a/src/quick3d/quick3d/qt3dquickvaluetypes_p.h
+++ b/src/quick3d/quick3d/qt3dquickvaluetypes_p.h
@@ -52,15 +52,15 @@
// We mean it.
//
-#include <private/qt3dquick_global_p.h>
-#include <private/qqmlvaluetype_p.h>
-
#include <QtGui/QColor>
+#include <QtGui/QMatrix4x4>
+#include <QtGui/QQuaternion>
#include <QtGui/QVector2D>
#include <QtGui/QVector3D>
#include <QtGui/QVector4D>
-#include <QtGui/QQuaternion>
-#include <QtGui/QMatrix4x4>
+
+#include <Qt3DQuick/private/qt3dquick_global_p.h>
+#include <QtQml/private/qqmlvaluetype_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dextras/qt3dquickwindow.cpp b/src/quick3d/quick3dextras/qt3dquickwindow.cpp
index 7fecf0d46..7f32f03f0 100644
--- a/src/quick3d/quick3dextras/qt3dquickwindow.cpp
+++ b/src/quick3d/quick3dextras/qt3dquickwindow.cpp
@@ -49,22 +49,22 @@
****************************************************************************/
#include <Qt3DQuickExtras/qt3dquickwindow.h>
-#include <Qt3DQuickExtras/private/qt3dquickwindowlogging_p.h>
#include <Qt3DQuick/QQmlAspectEngine>
-#include <Qt3DRender/qcamera.h>
-#include <Qt3DRender/qrenderaspect.h>
-#include <Qt3DRender/qrendersurfaceselector.h>
-#include <Qt3DRender/private/qrendersurfaceselector_p.h>
+#include <Qt3DQuickExtras/qt3dquickwindow.h>
#include <Qt3DInput/qinputaspect.h>
#include <Qt3DInput/qinputsettings.h>
#include <Qt3DLogic/qlogicaspect.h>
-
-#include <QQmlContext>
-#include <qqmlincubator.h>
-#include <QGuiApplication>
-#include <QScreen>
-
+#include <Qt3DRender/qcamera.h>
+#include <Qt3DRender/qrenderaspect.h>
+#include <Qt3DRender/qrendersurfaceselector.h>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QScreen>
#include <QtGui/qopenglcontext.h>
+#include <QtQml/QQmlContext>
+#include <QtQml/qqmlincubator.h>
+
+#include <Qt3DQuickExtras/private/qt3dquickwindowlogging_p.h>
+#include <Qt3DRender/private/qrendersurfaceselector_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dextras/qt3dquickwindow.h b/src/quick3d/quick3dextras/qt3dquickwindow.h
index a8703093e..1b4d3fabf 100644
--- a/src/quick3d/quick3dextras/qt3dquickwindow.h
+++ b/src/quick3d/quick3dextras/qt3dquickwindow.h
@@ -52,9 +52,9 @@
#define QT3DEXTRAS_QUICK_QT3DQUICKWINDOW_H
#include <Qt3DQuickExtras/qt3dquickextras_global.h>
-#include <QQuickWindow>
+#include <QtCore/QUrl>
#include <QtCore/qpointer.h>
-#include <QUrl>
+#include <QtQuick/QQuickWindow>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3daction.cpp b/src/quick3d/quick3dinput/items/quick3daction.cpp
index b3b99e504..33752c6e0 100644
--- a/src/quick3d/quick3dinput/items/quick3daction.cpp
+++ b/src/quick3d/quick3dinput/items/quick3daction.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3daction_p.h"
+#include <Qt3DQuickInput/private/quick3daction_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3daction_p.h b/src/quick3d/quick3dinput/items/quick3daction_p.h
index 8394f9c48..86e52eb33 100644
--- a/src/quick3d/quick3dinput/items/quick3daction_p.h
+++ b/src/quick3d/quick3dinput/items/quick3daction_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
#include <Qt3DInput/QAction>
#include <Qt3DInput/QAbstractActionInput>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3daxis.cpp b/src/quick3d/quick3dinput/items/quick3daxis.cpp
index 2857e4c48..966aa250d 100644
--- a/src/quick3d/quick3dinput/items/quick3daxis.cpp
+++ b/src/quick3d/quick3dinput/items/quick3daxis.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3daxis_p.h"
+#include <Qt3DQuickInput/private/quick3daxis_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3daxis_p.h b/src/quick3d/quick3dinput/items/quick3daxis_p.h
index 400bd5ea0..58ba32ae7 100644
--- a/src/quick3d/quick3dinput/items/quick3daxis_p.h
+++ b/src/quick3d/quick3dinput/items/quick3daxis_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
-#include <Qt3DInput/QAxis>
#include <Qt3DInput/QAbstractAxisInput>
-#include <QQmlListProperty>
+#include <Qt3DInput/QAxis>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3dinputchord.cpp b/src/quick3d/quick3dinput/items/quick3dinputchord.cpp
index 0d214a5ec..16a5e8181 100644
--- a/src/quick3d/quick3dinput/items/quick3dinputchord.cpp
+++ b/src/quick3d/quick3dinput/items/quick3dinputchord.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dinputchord_p.h"
+#include <Qt3DQuickInput/private/quick3dinputchord_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3dinputchord_p.h b/src/quick3d/quick3dinput/items/quick3dinputchord_p.h
index d9759b856..3380fefa4 100644
--- a/src/quick3d/quick3dinput/items/quick3dinputchord_p.h
+++ b/src/quick3d/quick3dinput/items/quick3dinputchord_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
#include <Qt3DInput/qinputchord.h>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp b/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp
index 02539443e..4f4eed9d3 100644
--- a/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp
+++ b/src/quick3d/quick3dinput/items/quick3dinputsequence.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dinputsequence_p.h"
+#include <Qt3DQuickInput/private/quick3dinputsequence_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h b/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h
index ccf872675..aea671f12 100644
--- a/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h
+++ b/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
#include <Qt3DInput/qinputsequence.h>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp b/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp
index 72be7e7ac..50218dd25 100644
--- a/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp
+++ b/src/quick3d/quick3dinput/items/quick3dlogicaldevice.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dlogicaldevice_p.h"
+#include <Qt3DQuickInput/private/quick3dlogicaldevice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h b/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h
index 5b3b36039..050d81ab8 100644
--- a/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h
+++ b/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
-#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
#include <Qt3DInput/QAxis>
#include <Qt3DInput/QAction>
#include <Qt3DInput/QLogicalDevice>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp b/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp
index ead311135..5c8d55b54 100644
--- a/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp
+++ b/src/quick3d/quick3dinput/items/quick3dphysicaldevice.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dphysicaldevice_p.h"
+#include <Qt3DQuickInput/private/quick3dphysicaldevice_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h b/src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h
index 9a97d152c..b4c96ac14 100644
--- a/src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h
+++ b/src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
-#include <QObject>
-#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
#include <Qt3DInput/qabstractphysicaldevice.h>
#include <Qt3DInput/qaxissetting.h>
-#include <QQmlListProperty>
+#include <QtCore/QObject>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/qt3dquickinput_global.cpp b/src/quick3d/quick3dinput/qt3dquickinput_global.cpp
index dd84f9fa4..724a5db86 100644
--- a/src/quick3d/quick3dinput/qt3dquickinput_global.cpp
+++ b/src/quick3d/quick3dinput/qt3dquickinput_global.cpp
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#include "qt3dquickinput_global_p.h"
-#include "qt3dquickinputnodefactory_p.h"
+#include <Qt3DQuickInput/private/qt3dquickinput_global_p.h>
+#include <Qt3DQuickInput/private/qt3dquickinputnodefactory_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp b/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
index 8f9fe81ec..b158e30d5 100644
--- a/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
+++ b/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "qt3dquickinputnodefactory_p.h"
+#include <Qt3DQuickInput/private/qt3dquickinputnodefactory_p.h>
#include <QtQml/private/qqmlmetatype_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h b/src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h
index 3473cf038..f4d4aee27 100644
--- a/src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h
+++ b/src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qabstractnodefactory_p.h>
#include <QtCore/qhash.h>
+#include <Qt3DCore/private/qabstractnodefactory_p.h>
+
QT_BEGIN_NAMESPACE
class QQmlType;
diff --git a/src/quick3d/quick3drender/items/quick3dbuffer.cpp b/src/quick3d/quick3drender/items/quick3dbuffer.cpp
index d36ce8341..362e60328 100644
--- a/src/quick3d/quick3drender/items/quick3dbuffer.cpp
+++ b/src/quick3d/quick3drender/items/quick3dbuffer.cpp
@@ -37,10 +37,10 @@
**
****************************************************************************/
-#include <QJSValue>
-#include <QQmlEngine>
+#include <QtQml/QJSValue>
+#include <QtQml/QQmlEngine>
-#include "quick3dbuffer_p.h"
+#include <Qt3DQuickRender/private/quick3dbuffer_p.h>
#include <QtQml/private/qqmlengine_p.h>
#include <QtQml/private/qjsvalue_p.h>
#include <QtQml/private/qv4typedarray_p.h>
diff --git a/src/quick3d/quick3drender/items/quick3dbuffer_p.h b/src/quick3d/quick3drender/items/quick3dbuffer_p.h
index d8dbafcb2..712e11078 100644
--- a/src/quick3d/quick3drender/items/quick3dbuffer_p.h
+++ b/src/quick3d/quick3drender/items/quick3dbuffer_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DRender/QBuffer>
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+
QT_BEGIN_NAMESPACE
class QQmlEngine;
diff --git a/src/quick3d/quick3drender/items/quick3deffect.cpp b/src/quick3d/quick3drender/items/quick3deffect.cpp
index 9d4ce934a..fa82c6eff 100644
--- a/src/quick3d/quick3drender/items/quick3deffect.cpp
+++ b/src/quick3d/quick3drender/items/quick3deffect.cpp
@@ -37,9 +37,10 @@
**
****************************************************************************/
-#include "quick3deffect_p.h"
#include <Qt3DRender/qeffect.h>
+#include <Qt3DQuickRender/private/quick3deffect_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/quick3drender/items/quick3deffect_p.h b/src/quick3d/quick3drender/items/quick3deffect_p.h
index 50152e2af..3b778563d 100644
--- a/src/quick3d/quick3drender/items/quick3deffect_p.h
+++ b/src/quick3d/quick3drender/items/quick3deffect_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
-#include <QQmlListProperty>
#include <Qt3DRender/qeffect.h>
#include <Qt3DRender/qtechnique.h>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dgeometry.cpp b/src/quick3d/quick3drender/items/quick3dgeometry.cpp
index 84c02d7c9..3f70ea572 100644
--- a/src/quick3d/quick3drender/items/quick3dgeometry.cpp
+++ b/src/quick3d/quick3drender/items/quick3dgeometry.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dgeometry_p.h"
+#include <Qt3DQuickRender/private/quick3dgeometry_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dgeometry_p.h b/src/quick3d/quick3drender/items/quick3dgeometry_p.h
index 4c020b0e2..6bf7faf58 100644
--- a/src/quick3d/quick3drender/items/quick3dgeometry_p.h
+++ b/src/quick3d/quick3drender/items/quick3dgeometry_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
-#include <QQmlListProperty>
#include <Qt3DRender/QGeometry>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp b/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp
index 6f7efcd23..951b4f82f 100644
--- a/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp
+++ b/src/quick3d/quick3drender/items/quick3dlayerfilter.cpp
@@ -37,9 +37,10 @@
**
****************************************************************************/
-#include "quick3dlayerfilter_p.h"
#include <Qt3DRender/qtexture.h>
+#include <Qt3DQuickRender/private/quick3dlayerfilter_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/quick3drender/items/quick3dlayerfilter_p.h b/src/quick3d/quick3drender/items/quick3dlayerfilter_p.h
index b2e7e2d11..f59be2787 100644
--- a/src/quick3d/quick3drender/items/quick3dlayerfilter_p.h
+++ b/src/quick3d/quick3drender/items/quick3dlayerfilter_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DRender/qlayerfilter.h>
#include <Qt3DRender/qlayer.h>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dmaterial.cpp b/src/quick3d/quick3drender/items/quick3dmaterial.cpp
index 50b064bc2..3dfbec83e 100644
--- a/src/quick3d/quick3drender/items/quick3dmaterial.cpp
+++ b/src/quick3d/quick3drender/items/quick3dmaterial.cpp
@@ -37,9 +37,10 @@
**
****************************************************************************/
-#include "quick3dmaterial_p.h"
#include <Qt3DRender/qtexture.h>
+#include <Qt3DQuickRender/private/quick3dmaterial_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/quick3drender/items/quick3dmaterial_p.h b/src/quick3d/quick3drender/items/quick3dmaterial_p.h
index 48b60df62..646e3b154 100644
--- a/src/quick3d/quick3drender/items/quick3dmaterial_p.h
+++ b/src/quick3d/quick3drender/items/quick3dmaterial_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DRender/qmaterial.h>
#include <Qt3DRender/qparameter.h>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dparameter.cpp b/src/quick3d/quick3drender/items/quick3dparameter.cpp
index 783f152c1..2ef95a4d4 100644
--- a/src/quick3d/quick3drender/items/quick3dparameter.cpp
+++ b/src/quick3d/quick3drender/items/quick3dparameter.cpp
@@ -37,10 +37,10 @@
**
****************************************************************************/
-#include <QJSValue>
-#include <QJSValueIterator>
+#include <QtQml/QJSValue>
+#include <QtQml/QJSValueIterator>
-#include "quick3dparameter_p_p.h"
+#include <Qt3DQuickRender/private/quick3dparameter_p_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dparameter_p.h b/src/quick3d/quick3drender/items/quick3dparameter_p.h
index 60493973d..948df22a7 100644
--- a/src/quick3d/quick3drender/items/quick3dparameter_p.h
+++ b/src/quick3d/quick3drender/items/quick3dparameter_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DRender/qparameter.h>
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/quick3drender/items/quick3dparameter_p_p.h b/src/quick3d/quick3drender/items/quick3dparameter_p_p.h
index 0432642f3..2e680b852 100644
--- a/src/quick3d/quick3drender/items/quick3dparameter_p_p.h
+++ b/src/quick3d/quick3drender/items/quick3dparameter_p_p.h
@@ -51,10 +51,10 @@
// We mean it.
//
-#include "quick3dparameter_p.h"
-
+#include <Qt3DQuickRender/private/quick3dparameter_p.h>
#include <Qt3DRender/private/qparameter_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/quick3drender/items/quick3drenderpass.cpp b/src/quick3d/quick3drender/items/quick3drenderpass.cpp
index d5f16fab6..7bd50a0d5 100644
--- a/src/quick3d/quick3drender/items/quick3drenderpass.cpp
+++ b/src/quick3d/quick3drender/items/quick3drenderpass.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include "quick3drenderpass_p.h"
+#include <Qt3DQuickRender/private/quick3drenderpass_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3drenderpass_p.h b/src/quick3d/quick3drender/items/quick3drenderpass_p.h
index 6ac940e23..c9d2fce59 100644
--- a/src/quick3d/quick3drender/items/quick3drenderpass_p.h
+++ b/src/quick3d/quick3drender/items/quick3drenderpass_p.h
@@ -52,9 +52,10 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DRender/qrenderpass.h>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp b/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp
index 8b51a79ef..0a8fa8a3a 100644
--- a/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp
+++ b/src/quick3d/quick3drender/items/quick3drenderpassfilter.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3drenderpassfilter_p.h"
+#include <Qt3DQuickRender/private/quick3drenderpassfilter_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h b/src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h
index 3acd32270..cab75f4a6 100644
--- a/src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h
+++ b/src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
-#include <Qt3DQuick/private/quick3dnode_p.h>
-#include <Qt3DRender/qrenderpassfilter.h>
#include <Qt3DRender/qfilterkey.h>
+#include <Qt3DRender/qrenderpassfilter.h>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuick/private/quick3dnode_p.h>
#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
-#include <QQmlListProperty>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp b/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
index e3b40243a..024789a4c 100644
--- a/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
+++ b/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3drendertargetoutput_p.h"
+#include <Qt3DQuickRender/private/quick3drendertargetoutput_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h b/src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h
index 5a2c8ea54..7626a2db7 100644
--- a/src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h
+++ b/src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DRender/qrendertarget.h>
#include <Qt3DRender/qrendertargetoutput.h>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3drendertargetselector.cpp b/src/quick3d/quick3drender/items/quick3drendertargetselector.cpp
index b61c7ed12..1ace5950a 100644
--- a/src/quick3d/quick3drender/items/quick3drendertargetselector.cpp
+++ b/src/quick3d/quick3drender/items/quick3drendertargetselector.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3drendertargetselector_p.h"
+#include <Qt3DQuickRender/private/quick3drendertargetselector_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3drendertargetselector_p.h b/src/quick3d/quick3drender/items/quick3drendertargetselector_p.h
index a24a6a71f..610ea1a49 100644
--- a/src/quick3d/quick3drender/items/quick3drendertargetselector_p.h
+++ b/src/quick3d/quick3drender/items/quick3drendertargetselector_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DRender/qrendertargetoutput.h>
#include <Qt3DRender/qrendertargetselector.h>
-#include <QQmlListProperty>
-#include <QVariantList>
+#include <QtCore/QVariantList>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dscene.cpp b/src/quick3d/quick3drender/items/quick3dscene.cpp
index 4062904f2..af4f44f0e 100644
--- a/src/quick3d/quick3drender/items/quick3dscene.cpp
+++ b/src/quick3d/quick3drender/items/quick3dscene.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dscene_p.h"
+#include <Qt3DQuickRender/private/quick3dscene_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dscene_p.h b/src/quick3d/quick3drender/items/quick3dscene_p.h
index 60c2d2ab5..a7173a6c7 100644
--- a/src/quick3d/quick3drender/items/quick3dscene_p.h
+++ b/src/quick3d/quick3drender/items/quick3dscene_p.h
@@ -51,10 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
-#include <Qt3DQuick/private/quick3dentity_p.h>
#include <Qt3DRender/qsceneloader.h>
+#include <Qt3DQuick/private/quick3dentity_p.h>
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
diff --git a/src/quick3d/quick3drender/items/quick3dshaderdata.cpp b/src/quick3d/quick3drender/items/quick3dshaderdata.cpp
index 1287f1603..116f057c1 100644
--- a/src/quick3d/quick3drender/items/quick3dshaderdata.cpp
+++ b/src/quick3d/quick3drender/items/quick3dshaderdata.cpp
@@ -37,11 +37,11 @@
**
****************************************************************************/
-#include <Qt3DQuickRender/private/quick3dshaderdataarray_p.h>
-#include <QMetaProperty>
+#include <QtCore/QMetaProperty>
-#include "quick3dshaderdata_p.h"
-#include <private/qshaderdata_p.h>
+#include <Qt3DQuickRender/private/quick3dshaderdataarray_p.h>
+#include <Qt3DQuickRender/private/quick3dshaderdata_p.h>
+#include <Qt3DRender/private/qshaderdata_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dshaderdata_p.h b/src/quick3d/quick3drender/items/quick3dshaderdata_p.h
index 15e127b78..207096149 100644
--- a/src/quick3d/quick3drender/items/quick3dshaderdata_p.h
+++ b/src/quick3d/quick3drender/items/quick3dshaderdata_p.h
@@ -51,11 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
-#include <Qt3DRender/qshaderdata.h>
+#include <QtQml/QJSValue>
+#include <QtQml/QJSValueIterator>
-#include <QJSValue>
-#include <QJSValueIterator>
+#include <Qt3DRender/qshaderdata.h>
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp b/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp
index 21dd2525a..9dac7bbc6 100644
--- a/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp
+++ b/src/quick3d/quick3drender/items/quick3dshaderdataarray.cpp
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#include "quick3dshaderdataarray_p.h"
-#include <private/qshaderdata_p.h>
+#include <Qt3DQuickRender/private/quick3dshaderdataarray_p.h>
+#include <Qt3DRender/private/qshaderdata_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h b/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h
index 9d33df208..162f402aa 100644
--- a/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h
+++ b/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h
@@ -52,9 +52,10 @@
//
#include <Qt3DCore/qnode.h>
+#include <QtQml/QQmlListProperty>
+
#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DQuickRender/private/quick3dshaderdata_p.h>
-#include <QQmlListProperty>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dstateset.cpp b/src/quick3d/quick3drender/items/quick3dstateset.cpp
index d7d74e5ad..468364493 100644
--- a/src/quick3d/quick3drender/items/quick3dstateset.cpp
+++ b/src/quick3d/quick3drender/items/quick3dstateset.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dstateset_p.h"
+#include <Qt3DQuickRender/private/quick3dstateset_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dstateset_p.h b/src/quick3d/quick3drender/items/quick3dstateset_p.h
index 4bb9b6cec..b2e63c066 100644
--- a/src/quick3d/quick3drender/items/quick3dstateset_p.h
+++ b/src/quick3d/quick3drender/items/quick3dstateset_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DRender/qrenderstateset.h>
-#include <QQmlListProperty>
+#include <QtQml/QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dtechnique.cpp b/src/quick3d/quick3drender/items/quick3dtechnique.cpp
index 123050645..0a15c9f7e 100644
--- a/src/quick3d/quick3drender/items/quick3dtechnique.cpp
+++ b/src/quick3d/quick3drender/items/quick3dtechnique.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dtechnique_p.h"
+#include <Qt3DQuickRender/private/quick3dtechnique_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dtechnique_p.h b/src/quick3d/quick3drender/items/quick3dtechnique_p.h
index 203befcb7..9cdfdfefe 100644
--- a/src/quick3d/quick3drender/items/quick3dtechnique_p.h
+++ b/src/quick3d/quick3drender/items/quick3dtechnique_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <QtQml/QQmlListProperty>
#include <Qt3DRender/qtechnique.h>
-#include <QQmlListProperty>
+
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp b/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp
index b27d46c31..2019093c9 100644
--- a/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp
+++ b/src/quick3d/quick3drender/items/quick3dtechniquefilter.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dtechniquefilter_p.h"
+#include <Qt3DQuickRender/private/quick3dtechniquefilter_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h b/src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h
index 27d637e23..2b10bc108 100644
--- a/src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h
+++ b/src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h
@@ -51,11 +51,12 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
-#include <Qt3DRender/qtechniquefilter.h>
#include <Qt3DRender/qfilterkey.h>
+#include <Qt3DRender/qtechniquefilter.h>
+#include <QtQml/QQmlListProperty>
+
#include <Qt3DQuick/private/quick3dnode_p.h>
-#include <QQmlListProperty>
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dtexture.cpp b/src/quick3d/quick3drender/items/quick3dtexture.cpp
index 9c528996c..7627a3283 100644
--- a/src/quick3d/quick3drender/items/quick3dtexture.cpp
+++ b/src/quick3d/quick3drender/items/quick3dtexture.cpp
@@ -37,8 +37,9 @@
**
****************************************************************************/
-#include "quick3dtexture_p.h"
-#include <QDebug>
+#include <QtCore/QDebug>
+
+#include <Qt3DQuickRender/private/quick3dtexture_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dtexture_p.h b/src/quick3d/quick3drender/items/quick3dtexture_p.h
index a1e2ad6b8..6b0430211 100644
--- a/src/quick3d/quick3drender/items/quick3dtexture_p.h
+++ b/src/quick3d/quick3drender/items/quick3dtexture_p.h
@@ -51,11 +51,11 @@
// We mean it.
//
-#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
-#include <Qt3DQuick/private/quick3dnode_p.h>
#include <Qt3DRender/qtexture.h>
+#include <QtCore/QUrl>
-#include <QUrl>
+#include <Qt3DQuick/private/quick3dnode_p.h>
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dviewport.cpp b/src/quick3d/quick3drender/items/quick3dviewport.cpp
index 5d490018f..3b4bf33f5 100644
--- a/src/quick3d/quick3drender/items/quick3dviewport.cpp
+++ b/src/quick3d/quick3drender/items/quick3dviewport.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "quick3dviewport_p.h"
+#include <Qt3DQuickRender/private/quick3dviewport_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/items/quick3dviewport_p.h b/src/quick3d/quick3drender/items/quick3dviewport_p.h
index 877900365..adf0c983f 100644
--- a/src/quick3d/quick3drender/items/quick3dviewport_p.h
+++ b/src/quick3d/quick3drender/items/quick3dviewport_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
+#include <Qt3DRender/qviewport.h>
+
#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
#include <Qt3DQuick/private/quick3dnode_p.h>
-#include <Qt3DRender/qviewport.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/qt3dquickrender_global.cpp b/src/quick3d/quick3drender/qt3dquickrender_global.cpp
index 0706185fe..bf7d68e71 100644
--- a/src/quick3d/quick3drender/qt3dquickrender_global.cpp
+++ b/src/quick3d/quick3drender/qt3dquickrender_global.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include "qt3dquickrender_global_p.h"
-#include "qt3dquickrendernodefactory_p.h"
+#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
+#include <Qt3DQuickRender/private/qt3dquickrendernodefactory_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp b/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
index 2d9456d12..f57451379 100644
--- a/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
+++ b/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "qt3dquickrendernodefactory_p.h"
+#include <Qt3DQuickRender/private/qt3dquickrendernodefactory_p.h>
#include <QtQml/private/qqmlmetatype_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h b/src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h
index 863a97f0b..6068124e5 100644
--- a/src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h
+++ b/src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h
@@ -51,9 +51,10 @@
// We mean it.
//
-#include <Qt3DCore/private/qabstractnodefactory_p.h>
#include <QtCore/qhash.h>
+#include <Qt3DCore/private/qabstractnodefactory_p.h>
+
QT_BEGIN_NAMESPACE
class QQmlType;