summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/qt3d/assimp/main.cpp2
-rw-r--r--examples/qt3d/basicshapes-cpp/scenemodifier.cpp12
-rw-r--r--examples/qt3d/simple-cpp/orbittransformcontroller.cpp2
-rw-r--r--examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp2
-rw-r--r--src/core/aspects/qabstractaspect.cpp16
-rw-r--r--src/core/aspects/qabstractaspect.h4
-rw-r--r--src/core/aspects/qaspectengine.cpp6
-rw-r--r--src/core/aspects/qaspectengine.h2
-rw-r--r--src/core/aspects/qaspectfactory.cpp2
-rw-r--r--src/core/aspects/qaspectmanager.cpp4
-rw-r--r--src/core/aspects/qaspectthread.cpp2
-rw-r--r--src/core/jobs/qabstractaspectjobmanager_p.h2
-rw-r--r--src/core/jobs/qthreadpooler.cpp4
-rw-r--r--src/core/jobs/task.cpp4
-rw-r--r--src/core/nodes/propertychangehandler_p.h4
-rw-r--r--src/core/nodes/qbackendnode.cpp8
-rw-r--r--src/core/nodes/qcomponent.cpp4
-rw-r--r--src/core/nodes/qcomponent.h4
-rw-r--r--src/core/nodes/qentity.cpp2
-rw-r--r--src/core/nodes/qentity.h4
-rw-r--r--src/core/nodes/qnode.cpp30
-rw-r--r--src/core/nodes/qnode.h6
-rw-r--r--src/core/nodes/qnodevisitor_p.h4
-rw-r--r--src/core/qchangearbiter.cpp14
-rw-r--r--src/core/qpostman.cpp10
-rw-r--r--src/core/qscene.cpp14
-rw-r--r--src/core/qscene_p.h2
-rw-r--r--src/core/resources/qcircularbuffer_p.h18
-rw-r--r--src/core/resources/qframeallocator.cpp20
-rw-r--r--src/core/resources/qhandlemanager_p.h8
-rw-r--r--src/core/resources/qresourcemanager_p.h2
-rw-r--r--src/core/services/qeventfilterservice.cpp4
-rw-r--r--src/core/services/qservicelocator.cpp2
-rw-r--r--src/core/transforms/qtransform.h4
-rw-r--r--src/extras/defaults/qdiffusemapmaterial.h2
-rw-r--r--src/extras/defaults/qdiffusespecularmapmaterial.h2
-rw-r--r--src/extras/defaults/qfirstpersoncameracontroller.cpp4
-rw-r--r--src/extras/defaults/qfirstpersoncameracontroller.h2
-rw-r--r--src/extras/defaults/qforwardrenderer.h2
-rw-r--r--src/extras/defaults/qgoochmaterial.h4
-rw-r--r--src/extras/defaults/qnormaldiffusemapalphamaterial.h2
-rw-r--r--src/extras/defaults/qnormaldiffusemapmaterial.h4
-rw-r--r--src/extras/defaults/qnormaldiffusespecularmapmaterial.h4
-rw-r--r--src/extras/defaults/qorbitcontrol.cpp4
-rw-r--r--src/extras/defaults/qpervertexcolormaterial.h2
-rw-r--r--src/extras/defaults/qphongalphamaterial.h2
-rw-r--r--src/extras/defaults/qphongmaterial.h2
-rw-r--r--src/extras/defaults/qskyboxentity.h2
-rw-r--r--src/extras/geometries/qconegeometry.cpp16
-rw-r--r--src/extras/geometries/qcuboidgeometry.cpp18
-rw-r--r--src/extras/geometries/qcuboidgeometry.h4
-rw-r--r--src/extras/geometries/qcuboidmesh.h2
-rw-r--r--src/extras/geometries/qcylindergeometry.cpp16
-rw-r--r--src/extras/geometries/qcylindergeometry.h4
-rw-r--r--src/extras/geometries/qcylindermesh.h2
-rw-r--r--src/extras/geometries/qplanegeometry.cpp18
-rw-r--r--src/extras/geometries/qplanegeometry.h4
-rw-r--r--src/extras/geometries/qplanemesh.h2
-rw-r--r--src/extras/geometries/qspheregeometry.cpp18
-rw-r--r--src/extras/geometries/qspheregeometry.h4
-rw-r--r--src/extras/geometries/qspheremesh.h2
-rw-r--r--src/extras/geometries/qtorusgeometry.cpp16
-rw-r--r--src/extras/geometries/qtorusgeometry.h4
-rw-r--r--src/extras/geometries/qtorusmesh.h2
-rw-r--r--src/input/backend/assignkeyboardfocusjob.cpp2
-rw-r--r--src/input/backend/eventsourcesetterhelper.cpp4
-rw-r--r--src/input/backend/inputhandler.cpp4
-rw-r--r--src/input/backend/inputsettings.cpp18
-rw-r--r--src/input/backend/keyboarddevice.cpp2
-rw-r--r--src/input/backend/keyboardhandler.cpp4
-rw-r--r--src/input/backend/keyboardmousegenericdeviceintegration.cpp2
-rw-r--r--src/input/backend/keyeventdispatcherjob.cpp2
-rw-r--r--src/input/backend/mouseeventdispatcherjob.cpp2
-rw-r--r--src/input/backend/mousehandler.cpp4
-rw-r--r--src/input/backend/qabstractphysicaldevicebackendnode.cpp4
-rw-r--r--src/input/backend/updateaxisactionjob.cpp12
-rw-r--r--src/input/frontend/qabstractphysicaldevice.h4
-rw-r--r--src/input/frontend/qaction.cpp4
-rw-r--r--src/input/frontend/qaction.h2
-rw-r--r--src/input/frontend/qactioninput.h2
-rw-r--r--src/input/frontend/qactioninput_p.h2
-rw-r--r--src/input/frontend/qaxis.cpp4
-rw-r--r--src/input/frontend/qaxis.h2
-rw-r--r--src/input/frontend/qaxisinput.h2
-rw-r--r--src/input/frontend/qaxisinput_p.h2
-rw-r--r--src/input/frontend/qaxissetting.h2
-rw-r--r--src/input/frontend/qgamepadinput_p.h2
-rw-r--r--src/input/frontend/qgenericinputdevice_p.h2
-rw-r--r--src/input/frontend/qinputaspect.cpp8
-rw-r--r--src/input/frontend/qinputchord.cpp4
-rw-r--r--src/input/frontend/qinputchord.h2
-rw-r--r--src/input/frontend/qinputdeviceintegration.cpp2
-rw-r--r--src/input/frontend/qinputdeviceintegration.h4
-rw-r--r--src/input/frontend/qinputdeviceintegrationfactory.cpp2
-rw-r--r--src/input/frontend/qinputdeviceplugin.cpp2
-rw-r--r--src/input/frontend/qinputdeviceplugin.h2
-rw-r--r--src/input/frontend/qinputsequence.cpp4
-rw-r--r--src/input/frontend/qinputsequence.h2
-rw-r--r--src/input/frontend/qinputsettings.cpp2
-rw-r--r--src/input/frontend/qinputsettings.h2
-rw-r--r--src/input/frontend/qkeyboardhandler.cpp2
-rw-r--r--src/input/frontend/qlogicaldevice.cpp8
-rw-r--r--src/input/frontend/qlogicaldevice.h2
-rw-r--r--src/input/frontend/qmousehandler.cpp2
-rw-r--r--src/logic/callbackjob.cpp2
-rw-r--r--src/logic/executor.cpp2
-rw-r--r--src/logic/handler.cpp2
-rw-r--r--src/logic/qlogicaspect.h2
-rw-r--r--src/plugins/sceneparsers/assimp/assimphelpers.cpp4
-rw-r--r--src/plugins/sceneparsers/assimp/assimpparser.cpp36
-rw-r--r--src/plugins/sceneparsers/gltf/gltfparser.cpp92
-rw-r--r--src/quick3d/imports/scene3d/scene3dcleaner.cpp6
-rw-r--r--src/quick3d/imports/scene3d/scene3ditem.cpp8
-rw-r--r--src/quick3d/imports/scene3d/scene3drenderer.cpp14
-rw-r--r--src/quick3d/imports/scene3d/scene3dsgmaterial.cpp2
-rw-r--r--src/quick3d/quick3d/items/quick3dentity.cpp2
-rw-r--r--src/quick3d/quick3d/items/quick3dentityloader.cpp34
-rw-r--r--src/quick3d/quick3d/items/quick3dnode.cpp2
-rw-r--r--src/quick3d/quick3d/qqmlaspectengine.cpp4
-rw-r--r--src/quick3d/quick3d/qqmlaspectengine.h2
-rw-r--r--src/quick3d/quick3d/qt3dquick_global.cpp2
-rw-r--r--src/quick3d/quick3d/qt3dquicknodefactory.cpp4
-rw-r--r--src/quick3d/quick3d/qt3dquicknodefactory_p.h4
-rw-r--r--src/quick3d/quick3dextras/qt3dquickwindow.cpp8
-rw-r--r--src/quick3d/quick3dextras/qt3dquickwindow.h2
-rw-r--r--src/quick3d/quick3dinput/items/quick3daction_p.h2
-rw-r--r--src/quick3d/quick3dinput/items/quick3daxis_p.h2
-rw-r--r--src/quick3d/quick3dinput/items/quick3dinputchord_p.h2
-rw-r--r--src/quick3d/quick3dinput/items/quick3dinputsequence_p.h2
-rw-r--r--src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h2
-rw-r--r--src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp4
-rw-r--r--src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h4
-rw-r--r--src/quick3d/quick3drender/items/quick3dbuffer.cpp6
-rw-r--r--src/quick3d/quick3drender/items/quick3dbuffer_p.h2
-rw-r--r--src/quick3d/quick3drender/items/quick3deffect.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp2
-rw-r--r--src/quick3d/quick3drender/items/quick3dtexture.cpp2
-rw-r--r--src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp4
-rw-r--r--src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h4
-rw-r--r--src/render/backend/backendnode.cpp2
-rw-r--r--src/render/backend/computecommand.cpp2
-rw-r--r--src/render/backend/entity.cpp34
-rw-r--r--src/render/backend/entity_p.h2
-rw-r--r--src/render/backend/managers.cpp2
-rw-r--r--src/render/backend/nodemanagers_p.h12
-rw-r--r--src/render/backend/platformsurfacefilter.cpp4
-rw-r--r--src/render/backend/qgraphicsutils_p.h2
-rw-r--r--src/render/backend/rendercommand.cpp2
-rw-r--r--src/render/backend/renderer.cpp54
-rw-r--r--src/render/backend/renderer_p.h2
-rw-r--r--src/render/backend/rendersettings.cpp12
-rw-r--r--src/render/backend/renderview.cpp64
-rw-r--r--src/render/backend/renderview_p.h10
-rw-r--r--src/render/backend/triangleboundingvolume.cpp2
-rw-r--r--src/render/backend/trianglesvisitor.cpp10
-rw-r--r--src/render/framegraph/cameraselectornode.cpp2
-rw-r--r--src/render/framegraph/framegraphnode.cpp12
-rw-r--r--src/render/framegraph/framegraphnode_p.h4
-rw-r--r--src/render/framegraph/framegraphvisitor.cpp6
-rw-r--r--src/render/framegraph/qcameraselector.cpp2
-rw-r--r--src/render/framegraph/qcameraselector.h4
-rw-r--r--src/render/framegraph/qdispatchcompute.h2
-rw-r--r--src/render/framegraph/qframegraphnode.cpp4
-rw-r--r--src/render/framegraph/qframegraphnode.h4
-rw-r--r--src/render/framegraph/qfrustumculling.h2
-rw-r--r--src/render/framegraph/qlayerfilter.h4
-rw-r--r--src/render/framegraph/qnodraw.h2
-rw-r--r--src/render/framegraph/qrenderpassfilter.cpp9
-rw-r--r--src/render/framegraph/qrenderpassfilter.h4
-rw-r--r--src/render/framegraph/qrenderstateset.cpp5
-rw-r--r--src/render/framegraph/qrendersurfaceselector.cpp8
-rw-r--r--src/render/framegraph/qrendertargetselector.cpp4
-rw-r--r--src/render/framegraph/qrendertargetselector.h4
-rw-r--r--src/render/framegraph/qsortpolicy.cpp4
-rw-r--r--src/render/framegraph/qtechniquefilter.cpp8
-rw-r--r--src/render/framegraph/qtechniquefilter.h4
-rw-r--r--src/render/framegraph/qviewport.h4
-rw-r--r--src/render/framegraph/rendersurfaceselector.cpp2
-rw-r--r--src/render/framegraph/rendertargetselectornode.cpp2
-rw-r--r--src/render/frontend/qabstractfunctor.h6
-rw-r--r--src/render/frontend/qboundingvolumedebug.cpp18
-rw-r--r--src/render/frontend/qboundingvolumedebug_p.h2
-rw-r--r--src/render/frontend/qcamera.h4
-rw-r--r--src/render/frontend/qcameralens.h4
-rw-r--r--src/render/frontend/qcomputecommand.h2
-rw-r--r--src/render/frontend/qitemmodelbuffer.cpp8
-rw-r--r--src/render/frontend/qlayer.h4
-rw-r--r--src/render/frontend/qrenderaspect.cpp10
-rw-r--r--src/render/frontend/qrenderaspect.h4
-rw-r--r--src/render/frontend/qrendersettings.cpp4
-rw-r--r--src/render/frontend/qrendersettings.h4
-rw-r--r--src/render/frontend/qrendertarget.cpp4
-rw-r--r--src/render/frontend/qrendertarget.h4
-rw-r--r--src/render/frontend/qrendertargetoutput.cpp2
-rw-r--r--src/render/frontend/sphere.cpp6
-rw-r--r--src/render/geometry/buffer.cpp8
-rw-r--r--src/render/geometry/geometry.cpp4
-rw-r--r--src/render/geometry/geometryrenderer.cpp8
-rw-r--r--src/render/geometry/qattribute.cpp2
-rw-r--r--src/render/geometry/qbuffer.cpp2
-rw-r--r--src/render/geometry/qbuffer.h2
-rw-r--r--src/render/geometry/qgeometry.cpp4
-rw-r--r--src/render/geometry/qgeometry.h4
-rw-r--r--src/render/geometry/qgeometry_p.h2
-rw-r--r--src/render/geometry/qgeometryrenderer.cpp6
-rw-r--r--src/render/geometry/qgeometryrenderer.h4
-rw-r--r--src/render/geometry/qmesh.cpp6
-rw-r--r--src/render/geometry/qmesh.h4
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp66
-rw-r--r--src/render/graphicshelpers/graphicshelpergl2.cpp16
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3.cpp2
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_3.cpp2
-rw-r--r--src/render/graphicshelpers/graphicshelpergl4.cpp2
-rw-r--r--src/render/io/qsceneloader.h2
-rw-r--r--src/render/io/qsceneparserfactory.cpp2
-rw-r--r--src/render/io/qsceneparserplugin.cpp2
-rw-r--r--src/render/io/qsceneparserplugin.h2
-rw-r--r--src/render/io/scene.cpp2
-rw-r--r--src/render/jobs/calcboundingvolumejob.cpp2
-rw-r--r--src/render/jobs/calcgeometrytrianglevolumes.cpp2
-rw-r--r--src/render/jobs/framecleanupjob.cpp2
-rw-r--r--src/render/jobs/framepreparationjob.cpp14
-rw-r--r--src/render/jobs/loadbufferjob.cpp2
-rw-r--r--src/render/jobs/loadgeometryjob.cpp2
-rw-r--r--src/render/jobs/loadscenejob.cpp2
-rw-r--r--src/render/jobs/loadtexturedatajob.cpp8
-rw-r--r--src/render/jobs/pickboundingvolumejob.cpp26
-rw-r--r--src/render/jobs/renderviewjobutils.cpp12
-rw-r--r--src/render/jobs/updateboundingvolumejob.cpp2
-rw-r--r--src/render/jobs/updateworldtransformjob.cpp6
-rw-r--r--src/render/lights/light.cpp2
-rw-r--r--src/render/lights/qabstractlight.h2
-rw-r--r--src/render/lights/qdirectionallight.h4
-rw-r--r--src/render/lights/qpointlight.h2
-rw-r--r--src/render/lights/qspotlight.h4
-rw-r--r--src/render/materialsystem/material.cpp2
-rw-r--r--src/render/materialsystem/qeffect.cpp8
-rw-r--r--src/render/materialsystem/qeffect.h4
-rw-r--r--src/render/materialsystem/qgraphicsapifilter.h2
-rw-r--r--src/render/materialsystem/qmaterial.cpp6
-rw-r--r--src/render/materialsystem/qmaterial.h4
-rw-r--r--src/render/materialsystem/qparameter.cpp4
-rw-r--r--src/render/materialsystem/qrenderpass.cpp18
-rw-r--r--src/render/materialsystem/qrenderpass.h4
-rw-r--r--src/render/materialsystem/qshaderdata.h4
-rw-r--r--src/render/materialsystem/qshaderdata_p.h4
-rw-r--r--src/render/materialsystem/qshaderprogram.h4
-rw-r--r--src/render/materialsystem/qtechnique.cpp12
-rw-r--r--src/render/materialsystem/qtechnique.h4
-rw-r--r--src/render/materialsystem/renderpass.cpp2
-rw-r--r--src/render/materialsystem/shader.cpp4
-rw-r--r--src/render/materialsystem/shaderdata.cpp10
-rw-r--r--src/render/materialsystem/technique.cpp2
-rw-r--r--src/render/picking/pickeventfilter_p.h2
-rw-r--r--src/render/picking/qobjectpicker.cpp8
-rw-r--r--src/render/picking/qobjectpicker.h2
-rw-r--r--src/render/picking/qpickevent.h2
-rw-r--r--src/render/raycasting/qboundingvolume_p.h2
-rw-r--r--src/render/renderstates/qalphacoverage.h2
-rw-r--r--src/render/renderstates/qalphatest.h2
-rw-r--r--src/render/renderstates/qblendequation.h2
-rw-r--r--src/render/renderstates/qblendequationarguments.h2
-rw-r--r--src/render/renderstates/qclipplane.h2
-rw-r--r--src/render/renderstates/qcolormask.h2
-rw-r--r--src/render/renderstates/qcullface.h2
-rw-r--r--src/render/renderstates/qdepthtest.h2
-rw-r--r--src/render/renderstates/qdithering.h2
-rw-r--r--src/render/renderstates/qfrontface.h2
-rw-r--r--src/render/renderstates/qnodepthmask.h2
-rw-r--r--src/render/renderstates/qpointsize.h2
-rw-r--r--src/render/renderstates/qpolygonoffset.h2
-rw-r--r--src/render/renderstates/qrenderstate.h2
-rw-r--r--src/render/renderstates/qscissortest.h2
-rw-r--r--src/render/renderstates/qstencilmask.h2
-rw-r--r--src/render/renderstates/qstenciltest.h2
-rw-r--r--src/render/renderstates/renderstatenode.cpp4
-rw-r--r--src/render/renderstates/renderstateset.cpp4
-rw-r--r--src/render/texture/qabstracttexture.cpp4
-rw-r--r--src/render/texture/qabstracttextureimage.cpp2
-rw-r--r--src/render/texture/qabstracttextureimage.h2
-rw-r--r--src/render/texture/qtexturedata.cpp4
-rw-r--r--src/render/texture/qtextureimage.h2
-rw-r--r--src/render/texture/qtexturewrapmode.h4
-rw-r--r--src/render/texture/texture.cpp36
-rw-r--r--src/render/texture/textureimage.cpp16
-rw-r--r--tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp24
-rw-r--r--tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp24
-rw-r--r--tests/auto/core/handlemanager/tst_handlemanager.cpp2
-rw-r--r--tests/auto/core/nodes/tst_nodes.cpp58
-rw-r--r--tests/auto/core/qaspectengine/tst_qaspectengine.cpp2
-rw-r--r--tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp6
-rw-r--r--tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp4
-rw-r--r--tests/auto/core/qentity/tst_qentity.cpp6
-rw-r--r--tests/auto/core/qframeallocator/tst_qframeallocator.cpp44
-rw-r--r--tests/auto/core/qscene/tst_qscene.cpp10
-rw-r--r--tests/auto/core/qservicelocator/tst_qservicelocator.cpp8
-rw-r--r--tests/auto/input/commons/testdevice.h2
-rw-r--r--tests/auto/render/buffer/tst_buffer.cpp2
-rw-r--r--tests/auto/render/commons/testpostmanarbiter.cpp2
-rw-r--r--tests/auto/render/commons/testpostmanarbiter.h2
-rw-r--r--tests/auto/render/commons/testrenderer.h12
-rw-r--r--tests/auto/render/framegraphnode/tst_framegraphnode.cpp6
-rw-r--r--tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp4
-rw-r--r--tests/auto/render/meshfunctors/tst_meshfunctors.cpp4
-rw-r--r--tests/auto/render/picking/tst_picking.cpp4
-rw-r--r--tests/auto/render/qabstractlight/tst_qabstractlight.cpp2
-rw-r--r--tests/auto/render/qbuffer/tst_qbuffer.cpp2
-rw-r--r--tests/auto/render/qcameraselector/tst_qcameraselector.cpp4
-rw-r--r--tests/auto/render/qframegraphnode/tst_qframegraphnode.cpp4
-rw-r--r--tests/auto/render/qgeometry/tst_qgeometry.cpp10
-rw-r--r--tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp6
-rw-r--r--tests/auto/render/qmaterial/tst_qmaterial.cpp4
-rw-r--r--tests/auto/render/qobjectpicker/tst_qobjectpicker.cpp4
-rw-r--r--tests/auto/render/qrenderstateset/tst_qrenderstateset.cpp2
-rw-r--r--tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp6
-rw-r--r--tests/auto/render/raycasting/tst_raycasting.cpp10
-rw-r--r--tests/auto/render/renderviewutils/tst_renderviewutils.cpp20
-rw-r--r--tools/qgltf/qgltf.cpp14
318 files changed, 1005 insertions, 1003 deletions
diff --git a/examples/qt3d/assimp/main.cpp b/examples/qt3d/assimp/main.cpp
index 78d2035d9..5df575e32 100644
--- a/examples/qt3d/assimp/main.cpp
+++ b/examples/qt3d/assimp/main.cpp
@@ -92,7 +92,7 @@ QObject *SceneHelper::findComponent(Qt3DCore::QEntity *entity, const QString &co
return component;
}
}
- return Q_NULLPTR;
+ return nullptr;
}
void SceneHelper::addListEntry(const QVariant &list, QObject *entry)
diff --git a/examples/qt3d/basicshapes-cpp/scenemodifier.cpp b/examples/qt3d/basicshapes-cpp/scenemodifier.cpp
index 798d3aeb6..cadfa517e 100644
--- a/examples/qt3d/basicshapes-cpp/scenemodifier.cpp
+++ b/examples/qt3d/basicshapes-cpp/scenemodifier.cpp
@@ -197,31 +197,31 @@ SceneModifier::~SceneModifier()
//! [4]
void SceneModifier::enableTorus(bool enabled)
{
- m_torusEntity->setParent(enabled ? m_rootEntity : Q_NULLPTR);
+ m_torusEntity->setParent(enabled ? m_rootEntity : nullptr);
}
//! [4]
void SceneModifier::enableCone(bool enabled)
{
- m_coneEntity->setParent(enabled ? m_rootEntity : Q_NULLPTR);
+ m_coneEntity->setParent(enabled ? m_rootEntity : nullptr);
}
void SceneModifier::enableCylinder(bool enabled)
{
- m_cylinderEntity->setParent(enabled ? m_rootEntity : Q_NULLPTR);
+ m_cylinderEntity->setParent(enabled ? m_rootEntity : nullptr);
}
void SceneModifier::enableCuboid(bool enabled)
{
- m_cuboidEntity->setParent(enabled ? m_rootEntity : Q_NULLPTR);
+ m_cuboidEntity->setParent(enabled ? m_rootEntity : nullptr);
}
void SceneModifier::enablePlane(bool enabled)
{
- m_planeEntity->setParent(enabled ? m_rootEntity : Q_NULLPTR);
+ m_planeEntity->setParent(enabled ? m_rootEntity : nullptr);
}
void SceneModifier::enableSphere(bool enabled)
{
- m_sphereEntity->setParent(enabled ? m_rootEntity : Q_NULLPTR);
+ m_sphereEntity->setParent(enabled ? m_rootEntity : nullptr);
}
diff --git a/examples/qt3d/simple-cpp/orbittransformcontroller.cpp b/examples/qt3d/simple-cpp/orbittransformcontroller.cpp
index e2759d202..0aa7a68e4 100644
--- a/examples/qt3d/simple-cpp/orbittransformcontroller.cpp
+++ b/examples/qt3d/simple-cpp/orbittransformcontroller.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
OrbitTransformController::OrbitTransformController(QObject *parent)
: QObject(parent)
- , m_target(Q_NULLPTR)
+ , m_target(nullptr)
, m_matrix()
, m_radius(1.0f)
, m_angle(0.0f)
diff --git a/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp b/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp
index 33e062971..e98ee8936 100644
--- a/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp
+++ b/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp
@@ -58,7 +58,7 @@ class TessellatedGeometry : public Qt3DRender::QGeometry
{
Q_OBJECT
public:
- TessellatedGeometry(Qt3DCore::QNode *parent = Q_NULLPTR)
+ TessellatedGeometry(Qt3DCore::QNode *parent = nullptr)
: Qt3DRender::QGeometry(parent)
, m_positionAttribute(new Qt3DRender::QAttribute(this))
, m_vertexBuffer(new Qt3DRender::QBuffer(Qt3DRender::QBuffer::VertexBuffer, this))
diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp
index 83ed84cec..96e8c13af 100644
--- a/src/core/aspects/qabstractaspect.cpp
+++ b/src/core/aspects/qabstractaspect.cpp
@@ -54,11 +54,11 @@ namespace Qt3DCore {
QAbstractAspectPrivate::QAbstractAspectPrivate()
: QObjectPrivate()
- , m_root(Q_NULLPTR)
+ , m_root(nullptr)
, m_rootId()
- , m_aspectManager(Q_NULLPTR)
- , m_jobManager(Q_NULLPTR)
- , m_arbiter(Q_NULLPTR)
+ , m_aspectManager(nullptr)
+ , m_jobManager(nullptr)
+ , m_arbiter(nullptr)
{
}
@@ -179,7 +179,7 @@ QBackendNode *QAbstractAspectPrivate::createBackendNode(const QNodeCreatedChange
{
const QMetaObject *metaObj = change->metaObject();
QBackendNodeMapperPtr backendNodeMapper;
- while (metaObj != Q_NULLPTR && backendNodeMapper.isNull()) {
+ while (metaObj != nullptr && backendNodeMapper.isNull()) {
backendNodeMapper = m_backendCreatorFunctors.value(metaObj);
metaObj = metaObj->superClass();
}
@@ -188,7 +188,7 @@ QBackendNode *QAbstractAspectPrivate::createBackendNode(const QNodeCreatedChange
return nullptr;
QBackendNode *backend = backendNodeMapper->get(change->subjectId());
- if (backend != Q_NULLPTR)
+ if (backend != nullptr)
return backend;
backend = backendNodeMapper->create(change);
@@ -207,7 +207,7 @@ QBackendNode *QAbstractAspectPrivate::createBackendNode(const QNodeCreatedChange
backendPriv->setEnabled(change->isNodeEnabled());
// TO DO: Find a way to specify the changes to observe
// Register backendNode with QChangeArbiter
- if (m_arbiter != Q_NULLPTR) { // Unit tests may not have the arbiter registered
+ if (m_arbiter != nullptr) { // Unit tests may not have the arbiter registered
qCDebug(Nodes) << q_func()->objectName() << "Creating backend node for node id"
<< change->subjectId() << "of type" << change->metaObject()->className();
m_arbiter->registerObserver(backendPriv, backend->peerId(), AllChanges);
@@ -226,7 +226,7 @@ void QAbstractAspectPrivate::clearBackendNode(const QNodeDestroyedChangePtr &cha
QBackendNodeMapperPtr backendNodeMapper;
// Find backend node mapper for this type
- while (metaObj != Q_NULLPTR && backendNodeMapper.isNull()) {
+ while (metaObj != nullptr && backendNodeMapper.isNull()) {
backendNodeMapper = m_backendCreatorFunctors.value(metaObj);
metaObj = metaObj->superClass();
}
diff --git a/src/core/aspects/qabstractaspect.h b/src/core/aspects/qabstractaspect.h
index 0be1ecca3..48076c1f1 100644
--- a/src/core/aspects/qabstractaspect.h
+++ b/src/core/aspects/qabstractaspect.h
@@ -65,11 +65,11 @@ class QT3DCORESHARED_EXPORT QAbstractAspect : public QObject
Q_OBJECT
public:
- explicit QAbstractAspect(QObject *parent = Q_NULLPTR);
+ explicit QAbstractAspect(QObject *parent = nullptr);
~QAbstractAspect();
protected:
- QAbstractAspect(QAbstractAspectPrivate &dd, QObject *parent = Q_NULLPTR);
+ QAbstractAspect(QAbstractAspectPrivate &dd, QObject *parent = nullptr);
QNodeId rootEntityId() const Q_DECL_NOEXCEPT;
diff --git a/src/core/aspects/qaspectengine.cpp b/src/core/aspects/qaspectengine.cpp
index 2cbbe5f97..418129b26 100644
--- a/src/core/aspects/qaspectengine.cpp
+++ b/src/core/aspects/qaspectengine.cpp
@@ -65,8 +65,8 @@ namespace Qt3DCore {
QAspectEnginePrivate::QAspectEnginePrivate()
: QObjectPrivate()
- , m_postman(Q_NULLPTR)
- , m_scene(Q_NULLPTR)
+ , m_postman(nullptr)
+ , m_scene(nullptr)
{
qRegisterMetaType<Qt3DCore::QAbstractAspect *>();
qRegisterMetaType<Qt3DCore::QObserverInterface *>();
@@ -196,7 +196,7 @@ void QAspectEnginePrivate::shutdown()
qCDebug(Aspects) << Q_FUNC_INFO;
// Cleanup the scene before quitting the backend
- m_scene->setArbiter(Q_NULLPTR);
+ m_scene->setArbiter(nullptr);
QChangeArbiter *arbiter = m_aspectThread->aspectManager()->changeArbiter();
QChangeArbiter::destroyUnmanagedThreadLocalChangeQueue(arbiter);
}
diff --git a/src/core/aspects/qaspectengine.h b/src/core/aspects/qaspectengine.h
index b884b93a7..6de5df42c 100644
--- a/src/core/aspects/qaspectengine.h
+++ b/src/core/aspects/qaspectengine.h
@@ -61,7 +61,7 @@ class QT3DCORESHARED_EXPORT QAspectEngine : public QObject
{
Q_OBJECT
public:
- explicit QAspectEngine(QObject *parent = Q_NULLPTR);
+ explicit QAspectEngine(QObject *parent = nullptr);
~QAspectEngine();
void setRootEntity(QEntityPtr root);
diff --git a/src/core/aspects/qaspectfactory.cpp b/src/core/aspects/qaspectfactory.cpp
index eb5c08fdb..cc9ce91a9 100644
--- a/src/core/aspects/qaspectfactory.cpp
+++ b/src/core/aspects/qaspectfactory.cpp
@@ -96,7 +96,7 @@ QAbstractAspect *QAspectFactory::createAspect(const QString &aspect, QObject *pa
return m_factories.value(aspect)(parent);
} else {
qWarning() << "Unsupported aspect name:" << aspect << "please check registrations";
- return Q_NULLPTR;
+ return nullptr;
}
}
diff --git a/src/core/aspects/qaspectmanager.cpp b/src/core/aspects/qaspectmanager.cpp
index c5ecb2964..9cecba577 100644
--- a/src/core/aspects/qaspectmanager.cpp
+++ b/src/core/aspects/qaspectmanager.cpp
@@ -68,7 +68,7 @@ namespace Qt3DCore {
QAspectManager::QAspectManager(QObject *parent)
: QObject(parent)
- , m_root(Q_NULLPTR)
+ , m_root(nullptr)
, m_scheduler(new QScheduler(this))
, m_jobManager(new QAspectJobManager(this))
, m_changeArbiter(new QChangeArbiter(this))
@@ -175,7 +175,7 @@ void QAspectManager::registerAspect(QAbstractAspect *aspect)
{
qCDebug(Aspects) << "Registering aspect";
- if (aspect != Q_NULLPTR) {
+ if (aspect != nullptr) {
m_aspects.append(aspect);
QAbstractAspectPrivate::get(aspect)->m_aspectManager = this;
QAbstractAspectPrivate::get(aspect)->m_jobManager = m_jobManager;
diff --git a/src/core/aspects/qaspectthread.cpp b/src/core/aspects/qaspectthread.cpp
index 03b863037..9e6961901 100644
--- a/src/core/aspects/qaspectthread.cpp
+++ b/src/core/aspects/qaspectthread.cpp
@@ -49,7 +49,7 @@ namespace Qt3DCore {
QAspectThread::QAspectThread(QObject *parent)
: QThread(parent),
- m_aspectManager(Q_NULLPTR),
+ m_aspectManager(nullptr),
m_semaphore(0)
{
qCDebug(Aspects) << Q_FUNC_INFO;
diff --git a/src/core/jobs/qabstractaspectjobmanager_p.h b/src/core/jobs/qabstractaspectjobmanager_p.h
index 33d05455c..32e6e499e 100644
--- a/src/core/jobs/qabstractaspectjobmanager_p.h
+++ b/src/core/jobs/qabstractaspectjobmanager_p.h
@@ -63,7 +63,7 @@ class QT3DCORESHARED_EXPORT QAbstractAspectJobManager : public QObject
{
Q_OBJECT
public:
- explicit QAbstractAspectJobManager(QObject *p = Q_NULLPTR);
+ explicit QAbstractAspectJobManager(QObject *p = nullptr);
virtual void initialize() {}
virtual void enqueueJobs(const QVector<QAspectJobPtr> &jobQueue) = 0;
diff --git a/src/core/jobs/qthreadpooler.cpp b/src/core/jobs/qthreadpooler.cpp
index 017b7f8db..edd589045 100644
--- a/src/core/jobs/qthreadpooler.cpp
+++ b/src/core/jobs/qthreadpooler.cpp
@@ -57,7 +57,7 @@ QElapsedTimer QThreadPooler::m_jobsStatTimer;
QThreadPooler::QThreadPooler(QObject *parent)
: QObject(parent),
- m_futureInterface(Q_NULLPTR),
+ m_futureInterface(nullptr),
m_mutex(),
m_taskCount(0)
{
@@ -113,7 +113,7 @@ void QThreadPooler::taskFinished(RunnableInterface *task)
m_futureInterface->reportFinished();
delete m_futureInterface;
}
- m_futureInterface = Q_NULLPTR;
+ m_futureInterface = nullptr;
}
}
diff --git a/src/core/jobs/task.cpp b/src/core/jobs/task.cpp
index 544fddb5d..45da858f4 100644
--- a/src/core/jobs/task.cpp
+++ b/src/core/jobs/task.cpp
@@ -109,7 +109,7 @@ SyncTaskRunnable::SyncTaskRunnable(QAbstractAspectJobManager::JobFunction func,
: m_func(func),
m_arg(arg),
m_atomicCount(atomicCount),
- m_pooler(Q_NULLPTR),
+ m_pooler(nullptr),
m_reserved(false)
{
}
@@ -141,7 +141,7 @@ void SyncTaskRunnable::setDependencyHandler(DependencyHandler *handler)
DependencyHandler *SyncTaskRunnable::dependencyHandler()
{
- return Q_NULLPTR;
+ return nullptr;
}
} // namespace Qt3DCore {
diff --git a/src/core/nodes/propertychangehandler_p.h b/src/core/nodes/propertychangehandler_p.h
index afb9866ff..e91df5016 100644
--- a/src/core/nodes/propertychangehandler_p.h
+++ b/src/core/nodes/propertychangehandler_p.h
@@ -67,7 +67,7 @@ class QT3DCORESHARED_EXPORT PropertyChangeHandlerBase : public QObject
{
Q_OBJECT
public:
- PropertyChangeHandlerBase(QObject *parent = Q_NULLPTR);
+ PropertyChangeHandlerBase(QObject *parent = nullptr);
/**
* Connect to the change signal of @p property in @p object.
@@ -90,7 +90,7 @@ template<class Receiver>
class PropertyChangeHandler : public PropertyChangeHandlerBase
{
public:
- PropertyChangeHandler(Receiver *receiver, QObject *parent = Q_NULLPTR);
+ PropertyChangeHandler(Receiver *receiver, QObject *parent = nullptr);
/**
* @internal
diff --git a/src/core/nodes/qbackendnode.cpp b/src/core/nodes/qbackendnode.cpp
index a812734b1..198bafc4e 100644
--- a/src/core/nodes/qbackendnode.cpp
+++ b/src/core/nodes/qbackendnode.cpp
@@ -49,9 +49,9 @@ QT_BEGIN_NAMESPACE
namespace Qt3DCore {
QBackendNodePrivate::QBackendNodePrivate(QBackendNode::Mode mode)
- : q_ptr(Q_NULLPTR)
+ : q_ptr(nullptr)
, m_mode(mode)
- , m_arbiter(Q_NULLPTR)
+ , m_arbiter(nullptr)
, m_enabled(false)
{
}
@@ -68,7 +68,7 @@ void QBackendNodePrivate::setArbiter(QLockableObserverInterface *arbiter)
void QBackendNodePrivate::notifyObservers(const QSceneChangePtr &e)
{
Q_ASSERT(m_mode == QBackendNode::ReadWrite);
- if (m_arbiter != Q_NULLPTR)
+ if (m_arbiter != nullptr)
m_arbiter->sceneChangeEvent(e);
}
@@ -166,7 +166,7 @@ void QBackendNode::setPeer(QNode *peer)
{
Q_D(QBackendNode);
QNodeId peerId;
- if (peer != Q_NULLPTR)
+ if (peer != nullptr)
peerId = peer->id();
d->m_peerId = peerId;
d->m_enabled = peer->isEnabled();
diff --git a/src/core/nodes/qcomponent.cpp b/src/core/nodes/qcomponent.cpp
index 81573442d..e94732bd6 100644
--- a/src/core/nodes/qcomponent.cpp
+++ b/src/core/nodes/qcomponent.cpp
@@ -58,7 +58,7 @@ void QComponentPrivate::addEntity(QEntity *entity)
{
m_entities.append(entity);
- if (m_scene != Q_NULLPTR && !m_scene->hasEntityForComponent(m_id, entity->id())) {
+ if (m_scene != nullptr && !m_scene->hasEntityForComponent(m_id, entity->id())) {
if (!m_shareable && !m_scene->entitiesForComponent(m_id).isEmpty())
qWarning() << "Trying to assign a non shareable component to more than one Entity";
m_scene->addEntityForComponent(m_id, entity->id());
@@ -71,7 +71,7 @@ void QComponentPrivate::removeEntity(QEntity *entity)
{
// TODO: Add QRemovedFromEntityChange to be delivered to components on the backend
- if (m_scene != Q_NULLPTR)
+ if (m_scene != nullptr)
m_scene->removeEntityForComponent(m_id, entity->id());
m_entities.removeAll(entity);
diff --git a/src/core/nodes/qcomponent.h b/src/core/nodes/qcomponent.h
index a303b4d5b..c25ec304a 100644
--- a/src/core/nodes/qcomponent.h
+++ b/src/core/nodes/qcomponent.h
@@ -55,7 +55,7 @@ class QT3DCORESHARED_EXPORT QComponent : public QNode
Q_PROPERTY(bool isShareable READ isShareable WRITE setShareable NOTIFY shareableChanged)
public:
- explicit QComponent(QNode *parent = Q_NULLPTR);
+ explicit QComponent(QNode *parent = nullptr);
~QComponent();
bool isShareable() const;
@@ -69,7 +69,7 @@ Q_SIGNALS:
void shareableChanged(bool isShareable);
protected:
- QComponent(QComponentPrivate &dd, QNode *parent = Q_NULLPTR);
+ QComponent(QComponentPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QComponent)
diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp
index 6e8fbfcb8..190618608 100644
--- a/src/core/nodes/qentity.cpp
+++ b/src/core/nodes/qentity.cpp
@@ -181,7 +181,7 @@ QEntity *QEntity::parentEntity() const
QNode *parentNode = QNode::parentNode();
QEntity *parentEntity = qobject_cast<QEntity *>(parentNode);
- while (parentEntity == Q_NULLPTR && parentNode != Q_NULLPTR) {
+ while (parentEntity == nullptr && parentNode != nullptr) {
parentNode = parentNode->parentNode();
parentEntity = qobject_cast<QEntity*>(parentNode);
}
diff --git a/src/core/nodes/qentity.h b/src/core/nodes/qentity.h
index aa064071c..2d4c02555 100644
--- a/src/core/nodes/qentity.h
+++ b/src/core/nodes/qentity.h
@@ -58,7 +58,7 @@ class QT3DCORESHARED_EXPORT QEntity : public QNode
{
Q_OBJECT
public:
- explicit QEntity(QNode *parent = Q_NULLPTR);
+ explicit QEntity(QNode *parent = nullptr);
virtual ~QEntity();
QComponentVector components() const;
@@ -69,7 +69,7 @@ public:
QEntity *parentEntity() const;
protected:
- QEntity(QEntityPrivate &dd, QNode *parent = Q_NULLPTR);
+ QEntity(QEntityPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QEntity)
diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp
index 5703e6a46..8cc899232 100644
--- a/src/core/nodes/qnode.cpp
+++ b/src/core/nodes/qnode.cpp
@@ -67,9 +67,9 @@ const bool QNodePrivate::ms_useCloning = !qEnvironmentVariableIsSet("QT3D_NO_CLO
QNodePrivate::QNodePrivate()
: QObjectPrivate()
- , m_changeArbiter(Q_NULLPTR)
- , m_typeInfo(Q_NULLPTR)
- , m_scene(Q_NULLPTR)
+ , m_changeArbiter(nullptr)
+ , m_typeInfo(nullptr)
+ , m_scene(nullptr)
, m_id(QNodeId::createId())
, m_blockNotifications(false)
, m_hasBackendNode(false)
@@ -91,7 +91,7 @@ void QNodePrivate::_q_addChild(QNode *childNode)
// We need to send a QNodeAddedChange to the backend
// We notify the backend that we have a new child
- if (m_changeArbiter != Q_NULLPTR) {
+ if (m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(m_id, childNode);
change->setPropertyName("children");
notifyObservers(change);
@@ -111,7 +111,7 @@ void QNodePrivate::_q_removeChild(QNode *childNode)
Q_ASSERT_X(childNode->parent() == q_func(), Q_FUNC_INFO, "not a child of this node");
// We notify the backend that we lost a child
- if (m_changeArbiter != Q_NULLPTR) {
+ if (m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(m_id, childNode);
change->setPropertyName("children");
notifyObservers(change);
@@ -267,9 +267,9 @@ void QNodePrivate::unsetSceneHelper(QNode *root)
}
}
- if (m_scene != Q_NULLPTR)
+ if (m_scene != nullptr)
m_scene->removeObservable(root);
- root->d_func()->setScene(Q_NULLPTR);
+ root->d_func()->setScene(nullptr);
}
/*!
@@ -356,9 +356,9 @@ void QNodePrivate::notifyObservers(const QSceneChangePtr &change)
if (m_blockNotifications && change->type() == NodeUpdated)
return;
- if (m_changeArbiter != Q_NULLPTR) {
+ if (m_changeArbiter != nullptr) {
QAbstractPostman *postman = m_changeArbiter->postman();
- if (postman != Q_NULLPTR)
+ if (postman != nullptr)
postman->notifyBackend(change);
}
}
@@ -375,14 +375,14 @@ void QNodePrivate::notifyObservers(const QSceneChangePtr &change)
*/
void QNodePrivate::insertTree(QNode *treeRoot, int depth)
{
- if (m_scene != Q_NULLPTR) {
+ if (m_scene != nullptr) {
treeRoot->d_func()->setScene(m_scene);
m_scene->addObservable(treeRoot);
}
for (QObject *c : treeRoot->children()) {
- QNode *n = Q_NULLPTR;
- if ((n = qobject_cast<QNode *>(c)) != Q_NULLPTR)
+ QNode *n = nullptr;
+ if ((n = qobject_cast<QNode *>(c)) != nullptr)
insertTree(n, depth + 1);
}
@@ -404,7 +404,7 @@ QNodePrivate *QNodePrivate::get(QNode *q)
void QNodePrivate::nodePtrDeleter(QNode *q)
{
QObject *p = q->parent();
- if (p == Q_NULLPTR)
+ if (p == nullptr)
p = q;
p->deleteLater();
}
@@ -468,7 +468,7 @@ QNode::QNode(QNode *parent)
{
// We need to add ourselves with the parent if it is valid
// This will notify the backend about the new child
- if (parent/* && QNodePrivate::get(parent)->m_changeArbiter != Q_NULLPTR*/) {
+ if (parent/* && QNodePrivate::get(parent)->m_changeArbiter != nullptr*/) {
// This needs to be invoked only after the QNode has been fully constructed
QMetaObject::invokeMethod(this, "_q_setParentHelper", Qt::QueuedConnection, Q_ARG(Qt3DCore::QNode*, parent));
}
@@ -480,7 +480,7 @@ QNode::QNode(QNodePrivate &dd, QNode *parent)
{
// We need to add ourselves with the parent if it is valid
// This will notify the backend about the new child
- if (parent/* && QNodePrivate::get(parent)->m_changeArbiter != Q_NULLPTR*/) {
+ if (parent/* && QNodePrivate::get(parent)->m_changeArbiter != nullptr*/) {
// This needs to be invoked only after the QNode has been fully constructed
QMetaObject::invokeMethod(this, "_q_setParentHelper", Qt::QueuedConnection, Q_ARG(Qt3DCore::QNode*, parent));
}
diff --git a/src/core/nodes/qnode.h b/src/core/nodes/qnode.h
index eeea0eb7a..6de0e85c4 100644
--- a/src/core/nodes/qnode.h
+++ b/src/core/nodes/qnode.h
@@ -47,7 +47,7 @@
#include <Qt3DCore/qnodecreatedchange.h>
#include <Qt3DCore/qabstractnodefactory.h>
-#define Q_NODE_NULLPTR static_cast<Qt3DCore::QNode *>(Q_NULLPTR)
+#define Q_NODE_NULLPTR static_cast<Qt3DCore::QNode *>(nullptr)
QT_BEGIN_NAMESPACE
@@ -71,7 +71,7 @@ class QT3DCORESHARED_EXPORT QNode : public QObject
Q_PROPERTY(Qt3DCore::QNode *parent READ parentNode WRITE setParent NOTIFY parentChanged)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
public:
- explicit QNode(QNode *parent = Q_NULLPTR);
+ explicit QNode(QNode *parent = nullptr);
virtual ~QNode();
const QNodeId id() const;
@@ -93,7 +93,7 @@ Q_SIGNALS:
void enabledChanged(bool enabled);
protected:
- QNode(QNodePrivate &dd, QNode *parent = Q_NULLPTR);
+ QNode(QNodePrivate &dd, QNode *parent = nullptr);
virtual void sceneChangeEvent(const QSceneChangePtr &change);
private:
diff --git a/src/core/nodes/qnodevisitor_p.h b/src/core/nodes/qnodevisitor_p.h
index b6a65191a..3637293f5 100644
--- a/src/core/nodes/qnodevisitor_p.h
+++ b/src/core/nodes/qnodevisitor_p.h
@@ -147,7 +147,7 @@ private:
{
for (QObject *n : currentNode()->children()) {
QNode *node = qobject_cast<QNode *>(n);
- if (node != Q_NULLPTR)
+ if (node != nullptr)
outerVisitNode(node, fN, fE);
} // of children iteration
}
@@ -157,7 +157,7 @@ private:
{
for (QObject *n : currentNode()->children()) {
QNode *node = qobject_cast<QNode *>(n);
- if (node != Q_NULLPTR)
+ if (node != nullptr)
outerVisitNode(node, fN);
} // of children iteration
}
diff --git a/src/core/qchangearbiter.cpp b/src/core/qchangearbiter.cpp
index e9a332d65..34a9518d8 100644
--- a/src/core/qchangearbiter.cpp
+++ b/src/core/qchangearbiter.cpp
@@ -76,9 +76,9 @@ namespace Qt3DCore {
QChangeArbiter::QChangeArbiter(QObject *parent)
: QObject(parent)
, m_mutex(QMutex::Recursive)
- , m_jobManager(Q_NULLPTR)
- , m_postman(Q_NULLPTR)
- , m_scene(Q_NULLPTR)
+ , m_jobManager(nullptr)
+ , m_postman(nullptr)
+ , m_scene(nullptr)
{
// The QMutex has to be recursive to handle the case where :
// 1) SyncChanges is called, mutex is locked
@@ -91,7 +91,7 @@ QChangeArbiter::QChangeArbiter(QObject *parent)
QChangeArbiter::~QChangeArbiter()
{
- if (m_jobManager != Q_NULLPTR)
+ if (m_jobManager != nullptr)
m_jobManager->waitForPerThreadFunction(QChangeArbiter::destroyThreadLocalChangeQueue, this);
m_lockingChangeQueues.clear();
m_changeQueues.clear();
@@ -226,7 +226,7 @@ void QChangeArbiter::unregisterObserver(QObserverInterface *observer, QNodeId no
// Called from the QAspectThread context, no need to lock
void QChangeArbiter::unregisterSceneObserver(QSceneObserverInterface *observer)
{
- if (observer != Q_NULLPTR)
+ if (observer != nullptr)
m_sceneObservers.removeOne(observer);
}
@@ -288,7 +288,7 @@ void QChangeArbiter::destroyUnmanagedThreadLocalChangeQueue(void *changeArbiter)
if (arbiter->tlsChangeQueue()->hasLocalData()) {
QChangeQueue *localChangeQueue = arbiter->tlsChangeQueue()->localData();
arbiter->removeLockingChangeQueue(localChangeQueue);
- arbiter->tlsChangeQueue()->setLocalData(Q_NULLPTR);
+ arbiter->tlsChangeQueue()->setLocalData(nullptr);
}
}
@@ -314,7 +314,7 @@ void QChangeArbiter::destroyThreadLocalChangeQueue(void *changeArbiter)
if (arbiter->tlsChangeQueue()->hasLocalData()) {
QChangeQueue *localChangeQueue = arbiter->tlsChangeQueue()->localData();
arbiter->removeChangeQueue(localChangeQueue);
- arbiter->tlsChangeQueue()->setLocalData(Q_NULLPTR);
+ arbiter->tlsChangeQueue()->setLocalData(nullptr);
}
}
diff --git a/src/core/qpostman.cpp b/src/core/qpostman.cpp
index 41451d51b..7c4253221 100644
--- a/src/core/qpostman.cpp
+++ b/src/core/qpostman.cpp
@@ -55,7 +55,7 @@ class QPostmanPrivate : public QObjectPrivate
public:
QPostmanPrivate()
: QObjectPrivate()
- , m_scene(Q_NULLPTR)
+ , m_scene(nullptr)
{
}
@@ -123,9 +123,9 @@ void QPostman::notifyFrontendNode(const QSceneChangePtr &e)
{
Q_D(QPostman);
QBackendNodePropertyChangePtr change = qSharedPointerCast<QBackendNodePropertyChange>(e);
- if (!change.isNull() && d->m_scene != Q_NULLPTR) {
+ if (!change.isNull() && d->m_scene != nullptr) {
QNode *n = d->m_scene->lookupNode(change->targetNode());
- if (n != Q_NULLPTR)
+ if (n != nullptr)
n->sceneChangeEvent(change);
}
}
@@ -133,8 +133,8 @@ void QPostman::notifyFrontendNode(const QSceneChangePtr &e)
void QPostman::submitChangeBatch()
{
Q_D(QPostman);
- QLockableObserverInterface *arbiter = Q_NULLPTR;
- if (d->m_scene && (arbiter = d->m_scene->arbiter()) != Q_NULLPTR) {
+ QLockableObserverInterface *arbiter = nullptr;
+ if (d->m_scene && (arbiter = d->m_scene->arbiter()) != nullptr) {
arbiter->sceneChangeEventWithLock(d->m_batch);
d->m_batch.clear();
}
diff --git a/src/core/qscene.cpp b/src/core/qscene.cpp
index cbbdca01c..5fbfce7c9 100644
--- a/src/core/qscene.cpp
+++ b/src/core/qscene.cpp
@@ -54,7 +54,7 @@ class QScenePrivate
public:
QScenePrivate(QAspectEngine *engine)
: m_engine(engine)
- , m_arbiter(Q_NULLPTR)
+ , m_arbiter(nullptr)
{
}
@@ -91,7 +91,7 @@ void QScene::addObservable(QObservableInterface *observable, QNodeId id)
QWriteLocker lock(&d->m_lock);
d->m_observablesLookupTable.insert(id, observable);
d->m_observableToUuid.insert(observable, id);
- if (d->m_arbiter != Q_NULLPTR)
+ if (d->m_arbiter != nullptr)
observable->setArbiter(d->m_arbiter);
}
@@ -99,10 +99,10 @@ void QScene::addObservable(QObservableInterface *observable, QNodeId id)
void QScene::addObservable(QNode *observable)
{
Q_D(QScene);
- if (observable != Q_NULLPTR) {
+ if (observable != nullptr) {
QWriteLocker lock(&d->m_lock);
d->m_nodeLookupTable.insert(observable->id(), observable);
- if (d->m_arbiter != Q_NULLPTR)
+ if (d->m_arbiter != nullptr)
observable->d_func()->setArbiter(d->m_arbiter);
}
}
@@ -114,14 +114,14 @@ void QScene::removeObservable(QObservableInterface *observable, QNodeId id)
QWriteLocker lock(&d->m_lock);
d->m_observablesLookupTable.remove(id, observable);
d->m_observableToUuid.remove(observable);
- observable->setArbiter(Q_NULLPTR);
+ observable->setArbiter(nullptr);
}
// Called by main thread
void QScene::removeObservable(QNode *observable)
{
Q_D(QScene);
- if (observable != Q_NULLPTR) {
+ if (observable != nullptr) {
QWriteLocker lock(&d->m_lock);
QNodeId nodeUuid = observable->id();
const auto p = d->m_observablesLookupTable.equal_range(nodeUuid); // must be non-const equal_range to ensure p.second stays valid
@@ -132,7 +132,7 @@ void QScene::removeObservable(QNode *observable)
it = d->m_observablesLookupTable.erase(it);
}
d->m_nodeLookupTable.remove(nodeUuid);
- observable->d_func()->setArbiter(Q_NULLPTR);
+ observable->d_func()->setArbiter(nullptr);
}
}
diff --git a/src/core/qscene_p.h b/src/core/qscene_p.h
index 4bd773eac..59c609de7 100644
--- a/src/core/qscene_p.h
+++ b/src/core/qscene_p.h
@@ -68,7 +68,7 @@ typedef QList<QObservableInterface *> QObservableList;
class QT3DCORE_PRIVATE_EXPORT QScene
{
public:
- QScene(QAspectEngine *engine = Q_NULLPTR);
+ QScene(QAspectEngine *engine = nullptr);
~QScene();
QAspectEngine *engine() const;
diff --git a/src/core/resources/qcircularbuffer_p.h b/src/core/resources/qcircularbuffer_p.h
index 72496945d..08665f4b5 100644
--- a/src/core/resources/qcircularbuffer_p.h
+++ b/src/core/resources/qcircularbuffer_p.h
@@ -75,7 +75,7 @@ class CircularBufferData : public QSharedData
{
protected:
CircularBufferData()
- : data(Q_NULLPTR),
+ : data(nullptr),
capacity(0),
size(0),
first(-1),
@@ -210,7 +210,7 @@ public:
typedef T *pointer;
typedef T &reference;
- Q_DECL_CONSTEXPR iterator() : buffer(Q_NULLPTR), index(-1) {}
+ Q_DECL_CONSTEXPR iterator() : buffer(nullptr), index(-1) {}
iterator(QCircularBuffer<T> *buf, int idx)
: buffer(buf), index(idx)
{}
@@ -295,7 +295,7 @@ public:
typedef const T *pointer;
typedef const T &reference;
- Q_DECL_CONSTEXPR const_iterator() : buffer(Q_NULLPTR), index(-1) {}
+ Q_DECL_CONSTEXPR const_iterator() : buffer(nullptr), index(-1) {}
const_iterator(const QCircularBuffer<T> *buff, int idx)
: buffer(buff), index(idx)
{}
@@ -463,7 +463,7 @@ public:
{
d.detach();
if (d->size == 0)
- return array_range(Q_NULLPTR, 0);
+ return array_range(nullptr, 0);
if (!isLinearised())
linearise();
return array_range(d->data() + d->first, d->last - d->first + 1);
@@ -472,7 +472,7 @@ public:
const_array_range constData() const
{
if (!isLinearised() || d->size == 0)
- return const_array_range(Q_NULLPTR, 0);
+ return const_array_range(nullptr, 0);
return const_array_range(d->data() + d->first, d->last - d->first + 1);
}
@@ -480,7 +480,7 @@ public:
{
d.detach();
if (d->size == 0)
- return array_range(Q_NULLPTR, 0);
+ return array_range(nullptr, 0);
if (isLinearised())
return array_range(d->data() + d->first, d->last - d->first + 1);
else
@@ -490,7 +490,7 @@ public:
const_array_range constDataOne() const
{
if (d->size == 0)
- return const_array_range(Q_NULLPTR, 0);
+ return const_array_range(nullptr, 0);
if (isLinearised())
return const_array_range(d->data() + d->first, d->last - d->first + 1);
else
@@ -501,14 +501,14 @@ public:
{
d.detach();
if (d->size == 0 || isLinearised())
- return array_range(Q_NULLPTR, 0);
+ return array_range(nullptr, 0);
return array_range(d->data(), d->last + 1);
}
const_array_range dataTwo() const { return constDataTwo(); }
const_array_range constDataTwo() const
{
if (d->size == 0 || isLinearised())
- return const_array_range(Q_NULLPTR, 0);
+ return const_array_range(nullptr, 0);
return const_array_range(d->data(), d->last + 1);
}
diff --git a/src/core/resources/qframeallocator.cpp b/src/core/resources/qframeallocator.cpp
index 054a30b7d..ff15dadf6 100644
--- a/src/core/resources/qframeallocator.cpp
+++ b/src/core/resources/qframeallocator.cpp
@@ -129,8 +129,8 @@ uint QFrameAllocator::totalChunkCount() const
QFixedFrameAllocator::QFixedFrameAllocator()
: m_blockSize(0)
, m_nbrBlock(0)
- , m_lastAllocatedChunck(Q_NULLPTR)
- , m_lastFreedChunck(Q_NULLPTR)
+ , m_lastAllocatedChunck(nullptr)
+ , m_lastFreedChunck(nullptr)
{
}
@@ -148,7 +148,7 @@ void QFixedFrameAllocator::init(uint blockSize, uchar pageSize)
void *QFixedFrameAllocator::allocate()
{
Q_ASSERT(m_blockSize && m_nbrBlock);
- if (m_lastAllocatedChunck == Q_NULLPTR ||
+ if (m_lastAllocatedChunck == nullptr ||
m_lastAllocatedChunck->m_blocksAvailable == 0) {
int i = 0;
for (; i < m_chunks.size(); i++) {
@@ -171,8 +171,8 @@ void *QFixedFrameAllocator::allocate()
void QFixedFrameAllocator::deallocate(void *ptr)
{
Q_ASSERT(m_blockSize && m_nbrBlock);
- if (!m_chunks.empty() && ptr != Q_NULLPTR) {
- if (m_lastFreedChunck != Q_NULLPTR && m_lastFreedChunck->contains(ptr, m_blockSize))
+ if (!m_chunks.empty() && ptr != nullptr) {
+ if (m_lastFreedChunck != nullptr && m_lastFreedChunck->contains(ptr, m_blockSize))
m_lastFreedChunck->deallocate(ptr, m_blockSize);
else {
for (int i = 0; i < m_chunks.size(); i++) {
@@ -192,9 +192,9 @@ void QFixedFrameAllocator::trim()
if (m_chunks.at(i).isEmpty()) {
m_chunks[i].release();
if (m_lastAllocatedChunck == &m_chunks[i])
- m_lastAllocatedChunck = Q_NULLPTR;
+ m_lastAllocatedChunck = nullptr;
if (m_lastFreedChunck == &m_chunks[i])
- m_lastFreedChunck = Q_NULLPTR;
+ m_lastFreedChunck = nullptr;
m_chunks.removeAt(i);
}
}
@@ -205,8 +205,8 @@ void QFixedFrameAllocator::release()
for (int i = m_chunks.size() - 1; i >= 0; i--)
m_chunks[i].release();
m_chunks.clear();
- m_lastAllocatedChunck = Q_NULLPTR;
- m_lastFreedChunck = Q_NULLPTR;
+ m_lastAllocatedChunck = nullptr;
+ m_lastFreedChunck = nullptr;
}
// Allows to reuse chunks without having to reinitialize and reallocate them
@@ -248,7 +248,7 @@ void QFrameChunk::init(uint blockSize, uchar blocks)
void *QFrameChunk::allocate(uint blockSize)
{
if (m_blocksAvailable == 0)
- return Q_NULLPTR;
+ return nullptr;
uchar *r = m_data + (m_firstAvailableBlock * blockSize);
m_firstAvailableBlock = *r;
--m_blocksAvailable;
diff --git a/src/core/resources/qhandlemanager_p.h b/src/core/resources/qhandlemanager_p.h
index c0b14374a..61e87ba1e 100644
--- a/src/core/resources/qhandlemanager_p.h
+++ b/src/core/resources/qhandlemanager_p.h
@@ -99,7 +99,7 @@ private:
struct HandleEntry
{
HandleEntry()
- : m_data(Q_NULLPTR)
+ : m_data(nullptr)
, m_nextFreeIndex(0)
, m_counter(0)
, m_active(false)
@@ -107,7 +107,7 @@ private:
{}
explicit HandleEntry(quint32 nextFreeIndex)
- : m_data(Q_NULLPTR)
+ : m_data(nullptr)
, m_nextFreeIndex(nextFreeIndex)
, m_counter(0)
, m_active(false)
@@ -195,7 +195,7 @@ T *QHandleManager<T, INDEXBITS>::data(const QHandle<T, INDEXBITS> &handle, bool
m_entries[index].m_active == false) {
if (ok)
*ok = false;
- return Q_NULLPTR;
+ return nullptr;
}
T *d = m_entries[index].m_data;
@@ -212,7 +212,7 @@ const T *QHandleManager<T, INDEXBITS>::constData(const QHandle<T, INDEXBITS> &ha
m_entries[index].m_active == false) {
if (ok)
*ok = false;
- return Q_NULLPTR;
+ return nullptr;
}
const T *d = m_entries[index].m_data;
diff --git a/src/core/resources/qresourcemanager_p.h b/src/core/resources/qresourcemanager_p.h
index ad337adaf..4a6001a59 100644
--- a/src/core/resources/qresourcemanager_p.h
+++ b/src/core/resources/qresourcemanager_p.h
@@ -464,7 +464,7 @@ public:
ValueType *lookupResource(const KeyType &id)
{
- ValueType* ret = Q_NULLPTR;
+ ValueType* ret = nullptr;
{
typename LockingPolicy<QResourceManager>::ReadLocker lock(this);
QHandle<ValueType, INDEXBITS> handle = m_keyToHandleMap.value(id);
diff --git a/src/core/services/qeventfilterservice.cpp b/src/core/services/qeventfilterservice.cpp
index e185206c4..c5aa13ce1 100644
--- a/src/core/services/qeventfilterservice.cpp
+++ b/src/core/services/qeventfilterservice.cpp
@@ -109,7 +109,7 @@ class InternalEventListener : public QObject
{
Q_OBJECT
public:
- explicit InternalEventListener(QEventFilterServicePrivate *filterService, QObject *parent = Q_NULLPTR)
+ explicit InternalEventListener(QEventFilterServicePrivate *filterService, QObject *parent = nullptr)
: QObject(parent)
, m_filterService(filterService)
{
@@ -156,7 +156,7 @@ QEventFilterService::~QEventFilterService()
void QEventFilterService::initialize(QObject *eventSource)
{
Q_D(QEventFilterService);
- if (eventSource == Q_NULLPTR) {
+ if (eventSource == nullptr) {
d->m_eventDispatcher.reset();
} else {
d->m_eventDispatcher.reset(new InternalEventListener(d));
diff --git a/src/core/services/qservicelocator.cpp b/src/core/services/qservicelocator.cpp
index 54747e4ba..3d3d56386 100644
--- a/src/core/services/qservicelocator.cpp
+++ b/src/core/services/qservicelocator.cpp
@@ -245,7 +245,7 @@ QAbstractServiceProvider *QServiceLocator::_q_getServiceHelper(int type)
case EventFilterService:
return eventFilterService();
default:
- return d->m_services.value(type, Q_NULLPTR);
+ return d->m_services.value(type, nullptr);
}
}
diff --git a/src/core/transforms/qtransform.h b/src/core/transforms/qtransform.h
index a07da2533..aafbb6da3 100644
--- a/src/core/transforms/qtransform.h
+++ b/src/core/transforms/qtransform.h
@@ -64,7 +64,7 @@ class QT3DCORESHARED_EXPORT QTransform : public QComponent
Q_PROPERTY(float rotationZ READ rotationZ WRITE setRotationZ NOTIFY rotationZChanged)
public:
- explicit QTransform(QNode *parent = Q_NULLPTR);
+ explicit QTransform(QNode *parent = nullptr);
float scale() const;
QVector3D scale3D() const;
@@ -113,7 +113,7 @@ Q_SIGNALS:
void rotationZChanged(float rotationZ);
protected:
- QTransform(QTransformPrivate &dd, QNode *parent = Q_NULLPTR);
+ QTransform(QTransformPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QTransform)
diff --git a/src/extras/defaults/qdiffusemapmaterial.h b/src/extras/defaults/qdiffusemapmaterial.h
index a0e6a88cf..b6bba9b36 100644
--- a/src/extras/defaults/qdiffusemapmaterial.h
+++ b/src/extras/defaults/qdiffusemapmaterial.h
@@ -66,7 +66,7 @@ class QT3DEXTRASSHARED_EXPORT QDiffuseMapMaterial : public Qt3DRender::QMaterial
Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged)
public:
- explicit QDiffuseMapMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QDiffuseMapMaterial(Qt3DCore::QNode *parent = nullptr);
~QDiffuseMapMaterial();
QColor ambient() const;
diff --git a/src/extras/defaults/qdiffusespecularmapmaterial.h b/src/extras/defaults/qdiffusespecularmapmaterial.h
index 43e84bf90..d5dd053bd 100644
--- a/src/extras/defaults/qdiffusespecularmapmaterial.h
+++ b/src/extras/defaults/qdiffusespecularmapmaterial.h
@@ -65,7 +65,7 @@ class QT3DEXTRASSHARED_EXPORT QDiffuseSpecularMapMaterial : public Qt3DRender::Q
Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged)
public:
- explicit QDiffuseSpecularMapMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QDiffuseSpecularMapMaterial(Qt3DCore::QNode *parent = nullptr);
~QDiffuseSpecularMapMaterial();
QColor ambient() const;
diff --git a/src/extras/defaults/qfirstpersoncameracontroller.cpp b/src/extras/defaults/qfirstpersoncameracontroller.cpp
index 57cf3ba88..2558dc7b6 100644
--- a/src/extras/defaults/qfirstpersoncameracontroller.cpp
+++ b/src/extras/defaults/qfirstpersoncameracontroller.cpp
@@ -67,7 +67,7 @@ namespace Qt3DExtras {
QFirstPersonCameraControllerPrivate::QFirstPersonCameraControllerPrivate()
: Qt3DCore::QEntityPrivate()
- , m_camera(Q_NULLPTR)
+ , m_camera(nullptr)
, m_leftMouseButtonAction(new Qt3DInput::QAction())
, m_fineMotionAction(new Qt3DInput::QAction())
, m_rxAxis(new Qt3DInput::QAxis())
@@ -178,7 +178,7 @@ void QFirstPersonCameraControllerPrivate::init()
void QFirstPersonCameraControllerPrivate::_q_onTriggered(float dt)
{
- if (m_camera != Q_NULLPTR) {
+ if (m_camera != nullptr) {
m_camera->translate(QVector3D(m_txAxis->value() * m_linearSpeed,
m_tyAxis->value() * m_linearSpeed,
m_tzAxis->value() * m_linearSpeed) * dt);
diff --git a/src/extras/defaults/qfirstpersoncameracontroller.h b/src/extras/defaults/qfirstpersoncameracontroller.h
index 358f69160..e50d4db5a 100644
--- a/src/extras/defaults/qfirstpersoncameracontroller.h
+++ b/src/extras/defaults/qfirstpersoncameracontroller.h
@@ -72,7 +72,7 @@ class QT3DEXTRASSHARED_EXPORT QFirstPersonCameraController : public Qt3DCore::QE
Q_PROPERTY(float lookSpeed READ lookSpeed WRITE setLookSpeed NOTIFY lookSpeedChanged)
public:
- explicit QFirstPersonCameraController(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QFirstPersonCameraController(Qt3DCore::QNode *parent = nullptr);
~QFirstPersonCameraController();
Qt3DRender::QCamera *camera() const;
diff --git a/src/extras/defaults/qforwardrenderer.h b/src/extras/defaults/qforwardrenderer.h
index 34ea9055b..a744b3caf 100644
--- a/src/extras/defaults/qforwardrenderer.h
+++ b/src/extras/defaults/qforwardrenderer.h
@@ -61,7 +61,7 @@ class QT3DEXTRASSHARED_EXPORT QForwardRenderer : public Qt3DRender::QTechniqueFi
Q_PROPERTY(QColor clearColor READ clearColor WRITE setClearColor NOTIFY clearColorChanged)
Q_PROPERTY(Qt3DCore::QEntity *camera READ camera WRITE setCamera NOTIFY cameraChanged)
public:
- explicit QForwardRenderer(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QForwardRenderer(Qt3DCore::QNode *parent = nullptr);
~QForwardRenderer();
QRectF viewportRect() const;
diff --git a/src/extras/defaults/qgoochmaterial.h b/src/extras/defaults/qgoochmaterial.h
index 170c391ac..dc8bcf2e0 100644
--- a/src/extras/defaults/qgoochmaterial.h
+++ b/src/extras/defaults/qgoochmaterial.h
@@ -62,7 +62,7 @@ class QT3DEXTRASSHARED_EXPORT QGoochMaterial : public Qt3DRender::QMaterial
Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged)
public:
- explicit QGoochMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QGoochMaterial(Qt3DCore::QNode *parent = nullptr);
QColor diffuse() const;
QColor specular() const;
QColor cool() const;
@@ -90,7 +90,7 @@ Q_SIGNALS:
void shininessChanged(float shininess);
protected:
- QGoochMaterial(QGoochMaterialPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QGoochMaterial(QGoochMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QGoochMaterial)
diff --git a/src/extras/defaults/qnormaldiffusemapalphamaterial.h b/src/extras/defaults/qnormaldiffusemapalphamaterial.h
index ad4dd6c53..040199b26 100644
--- a/src/extras/defaults/qnormaldiffusemapalphamaterial.h
+++ b/src/extras/defaults/qnormaldiffusemapalphamaterial.h
@@ -53,7 +53,7 @@ class QT3DEXTRASSHARED_EXPORT QNormalDiffuseMapAlphaMaterial : public QNormalDif
{
Q_OBJECT
public:
- explicit QNormalDiffuseMapAlphaMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QNormalDiffuseMapAlphaMaterial(Qt3DCore::QNode *parent = nullptr);
~QNormalDiffuseMapAlphaMaterial();
private:
diff --git a/src/extras/defaults/qnormaldiffusemapmaterial.h b/src/extras/defaults/qnormaldiffusemapmaterial.h
index 7152d64d5..f60a27b86 100644
--- a/src/extras/defaults/qnormaldiffusemapmaterial.h
+++ b/src/extras/defaults/qnormaldiffusemapmaterial.h
@@ -67,7 +67,7 @@ class QT3DEXTRASSHARED_EXPORT QNormalDiffuseMapMaterial : public Qt3DRender::QMa
Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged)
public:
- explicit QNormalDiffuseMapMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QNormalDiffuseMapMaterial(Qt3DCore::QNode *parent = nullptr);
~QNormalDiffuseMapMaterial();
QColor ambient() const;
@@ -94,7 +94,7 @@ Q_SIGNALS:
void textureScaleChanged(float textureScale);
protected:
- QNormalDiffuseMapMaterial(QNormalDiffuseMapMaterialPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QNormalDiffuseMapMaterial(QNormalDiffuseMapMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QNormalDiffuseMapMaterial)
diff --git a/src/extras/defaults/qnormaldiffusespecularmapmaterial.h b/src/extras/defaults/qnormaldiffusespecularmapmaterial.h
index a2f32d2ae..586715971 100644
--- a/src/extras/defaults/qnormaldiffusespecularmapmaterial.h
+++ b/src/extras/defaults/qnormaldiffusespecularmapmaterial.h
@@ -61,7 +61,7 @@ class QT3DEXTRASSHARED_EXPORT QNormalDiffuseSpecularMapMaterial : public Qt3DRen
Q_PROPERTY(float textureScale READ textureScale WRITE setTextureScale NOTIFY textureScaleChanged)
public:
- explicit QNormalDiffuseSpecularMapMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QNormalDiffuseSpecularMapMaterial(Qt3DCore::QNode *parent = nullptr);
~QNormalDiffuseSpecularMapMaterial();
QColor ambient() const;
@@ -88,7 +88,7 @@ Q_SIGNALS:
void textureScaleChanged(float textureScale);
protected:
- QNormalDiffuseSpecularMapMaterial(QNormalDiffuseSpecularMapMaterialPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QNormalDiffuseSpecularMapMaterial(QNormalDiffuseSpecularMapMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QNormalDiffuseSpecularMapMaterial)
diff --git a/src/extras/defaults/qorbitcontrol.cpp b/src/extras/defaults/qorbitcontrol.cpp
index 65810e1a0..fbcaa9902 100644
--- a/src/extras/defaults/qorbitcontrol.cpp
+++ b/src/extras/defaults/qorbitcontrol.cpp
@@ -59,7 +59,7 @@ namespace Qt3DExtras {
QOrbitControlPrivate::QOrbitControlPrivate()
: Qt3DCore::QEntityPrivate()
- , m_camera(Q_NULLPTR)
+ , m_camera(nullptr)
, m_leftMouseButtonAction(new Qt3DInput::QAction())
, m_rightMouseButtonAction(new Qt3DInput::QAction())
, m_altButtonAction(new Qt3DInput::QAction())
@@ -198,7 +198,7 @@ float zoomDistance(QVector3D firstPoint, QVector3D secondPoint)
void QOrbitControlPrivate::_q_onTriggered(float dt)
{
- if (m_camera != Q_NULLPTR) {
+ if (m_camera != nullptr) {
// Mouse input
if (m_leftMouseButtonAction->isActive()) {
if (m_rightMouseButtonAction->isActive()) {
diff --git a/src/extras/defaults/qpervertexcolormaterial.h b/src/extras/defaults/qpervertexcolormaterial.h
index 86d169715..485e2fe0e 100644
--- a/src/extras/defaults/qpervertexcolormaterial.h
+++ b/src/extras/defaults/qpervertexcolormaterial.h
@@ -55,7 +55,7 @@ class QT3DEXTRASSHARED_EXPORT QPerVertexColorMaterial : public Qt3DRender::QMate
Q_OBJECT
public:
- explicit QPerVertexColorMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QPerVertexColorMaterial(Qt3DCore::QNode *parent = nullptr);
~QPerVertexColorMaterial();
private:
diff --git a/src/extras/defaults/qphongalphamaterial.h b/src/extras/defaults/qphongalphamaterial.h
index d4d46f756..fb2ae1857 100644
--- a/src/extras/defaults/qphongalphamaterial.h
+++ b/src/extras/defaults/qphongalphamaterial.h
@@ -60,7 +60,7 @@ class QT3DEXTRASSHARED_EXPORT QPhongAlphaMaterial : public Qt3DRender::QMaterial
Q_PROPERTY(float alpha READ alpha WRITE setAlpha NOTIFY alphaChanged)
public:
- explicit QPhongAlphaMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QPhongAlphaMaterial(Qt3DCore::QNode *parent = nullptr);
~QPhongAlphaMaterial();
QColor ambient() const;
diff --git a/src/extras/defaults/qphongmaterial.h b/src/extras/defaults/qphongmaterial.h
index 112482dee..d4b8a0f0e 100644
--- a/src/extras/defaults/qphongmaterial.h
+++ b/src/extras/defaults/qphongmaterial.h
@@ -59,7 +59,7 @@ class QT3DEXTRASSHARED_EXPORT QPhongMaterial : public Qt3DRender::QMaterial
Q_PROPERTY(float shininess READ shininess WRITE setShininess NOTIFY shininessChanged)
public:
- explicit QPhongMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QPhongMaterial(Qt3DCore::QNode *parent = nullptr);
~QPhongMaterial();
QColor ambient() const;
diff --git a/src/extras/defaults/qskyboxentity.h b/src/extras/defaults/qskyboxentity.h
index b0b97cc3e..4295c2332 100644
--- a/src/extras/defaults/qskyboxentity.h
+++ b/src/extras/defaults/qskyboxentity.h
@@ -53,7 +53,7 @@ class QT3DEXTRASSHARED_EXPORT QSkyboxEntity : public Qt3DCore::QEntity
{
Q_OBJECT
public:
- explicit QSkyboxEntity(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QSkyboxEntity(Qt3DCore::QNode *parent = nullptr);
void setBaseName(const QString &path);
QString baseName() const;
diff --git a/src/extras/geometries/qconegeometry.cpp b/src/extras/geometries/qconegeometry.cpp
index ee6e64c1b..64cc569e8 100644
--- a/src/extras/geometries/qconegeometry.cpp
+++ b/src/extras/geometries/qconegeometry.cpp
@@ -238,7 +238,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_OVERRIDE
{
const ConeVertexDataFunctor *otherFunctor = functor_cast<ConeVertexDataFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_hasTopEndcap == m_hasTopEndcap &&
otherFunctor->m_hasBottomEndcap == m_hasBottomEndcap &&
otherFunctor->m_rings == m_rings &&
@@ -301,7 +301,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_OVERRIDE
{
const ConeIndexDataFunctor *otherFunctor = functor_cast<ConeIndexDataFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_hasTopEndcap == m_hasTopEndcap &&
otherFunctor->m_hasBottomEndcap == m_hasBottomEndcap &&
otherFunctor->m_rings == m_rings &&
@@ -330,12 +330,12 @@ QConeGeometryPrivate::QConeGeometryPrivate()
, m_topRadius(0.0f)
, m_bottomRadius(1.0f)
, m_length(1.0f)
- , m_positionAttribute(Q_NULLPTR)
- , m_normalAttribute(Q_NULLPTR)
- , m_texCoordAttribute(Q_NULLPTR)
- , m_indexAttribute(Q_NULLPTR)
- , m_vertexBuffer(Q_NULLPTR)
- , m_indexBuffer(Q_NULLPTR)
+ , m_positionAttribute(nullptr)
+ , m_normalAttribute(nullptr)
+ , m_texCoordAttribute(nullptr)
+ , m_indexAttribute(nullptr)
+ , m_vertexBuffer(nullptr)
+ , m_indexBuffer(nullptr)
{
}
diff --git a/src/extras/geometries/qcuboidgeometry.cpp b/src/extras/geometries/qcuboidgeometry.cpp
index 78eab4537..dc76edbf6 100644
--- a/src/extras/geometries/qcuboidgeometry.cpp
+++ b/src/extras/geometries/qcuboidgeometry.cpp
@@ -344,7 +344,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_FINAL
{
const CuboidVertexBufferFunctor *otherFunctor = functor_cast<CuboidVertexBufferFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_xExtent == m_xExtent &&
otherFunctor->m_yExtent == m_yExtent &&
otherFunctor->m_zExtent == m_zExtent &&
@@ -386,7 +386,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_FINAL
{
const CuboidIndexBufferFunctor *otherFunctor = functor_cast<CuboidIndexBufferFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_yzFaceResolution == m_yzFaceResolution &&
otherFunctor->m_xzFaceResolution == m_xzFaceResolution &&
otherFunctor->m_xyFaceResolution == m_xyFaceResolution);
@@ -409,13 +409,13 @@ QCuboidGeometryPrivate::QCuboidGeometryPrivate()
, m_yzFaceResolution(2, 2)
, m_xzFaceResolution(2, 2)
, m_xyFaceResolution(2, 2)
- , m_positionAttribute(Q_NULLPTR)
- , m_normalAttribute(Q_NULLPTR)
- , m_texCoordAttribute(Q_NULLPTR)
- , m_tangentAttribute(Q_NULLPTR)
- , m_indexAttribute(Q_NULLPTR)
- , m_vertexBuffer(Q_NULLPTR)
- , m_indexBuffer(Q_NULLPTR)
+ , m_positionAttribute(nullptr)
+ , m_normalAttribute(nullptr)
+ , m_texCoordAttribute(nullptr)
+ , m_tangentAttribute(nullptr)
+ , m_indexAttribute(nullptr)
+ , m_vertexBuffer(nullptr)
+ , m_indexBuffer(nullptr)
{
}
diff --git a/src/extras/geometries/qcuboidgeometry.h b/src/extras/geometries/qcuboidgeometry.h
index 3ce52e3bd..1bf7905ea 100644
--- a/src/extras/geometries/qcuboidgeometry.h
+++ b/src/extras/geometries/qcuboidgeometry.h
@@ -72,7 +72,7 @@ class QT3DEXTRASSHARED_EXPORT QCuboidGeometry : public Qt3DRender::QGeometry
Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
- explicit QCuboidGeometry(QNode *parent = Q_NULLPTR);
+ explicit QCuboidGeometry(QNode *parent = nullptr);
void updateIndices();
void updateVertices();
@@ -108,7 +108,7 @@ Q_SIGNALS:
void xyMeshResolutionChanged(const QSize &xyMeshResolution);
protected:
- QCuboidGeometry(QCuboidGeometryPrivate &dd, QNode *parent = Q_NULLPTR);
+ QCuboidGeometry(QCuboidGeometryPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QCuboidGeometry)
diff --git a/src/extras/geometries/qcuboidmesh.h b/src/extras/geometries/qcuboidmesh.h
index e06d09306..93d386d2c 100644
--- a/src/extras/geometries/qcuboidmesh.h
+++ b/src/extras/geometries/qcuboidmesh.h
@@ -60,7 +60,7 @@ class QT3DEXTRASSHARED_EXPORT QCuboidMesh : public Qt3DRender::QGeometryRenderer
Q_PROPERTY(QSize xyMeshResolution READ xyMeshResolution WRITE setXYMeshResolution NOTIFY xyMeshResolutionChanged)
public:
- explicit QCuboidMesh(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QCuboidMesh(Qt3DCore::QNode *parent = nullptr);
float xExtent() const;
float yExtent() const;
diff --git a/src/extras/geometries/qcylindergeometry.cpp b/src/extras/geometries/qcylindergeometry.cpp
index f42cb0a46..de9d25f9b 100644
--- a/src/extras/geometries/qcylindergeometry.cpp
+++ b/src/extras/geometries/qcylindergeometry.cpp
@@ -198,7 +198,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_OVERRIDE
{
const CylinderVertexDataFunctor *otherFunctor = functor_cast<CylinderVertexDataFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_rings == m_rings &&
otherFunctor->m_slices == m_slices &&
otherFunctor->m_radius == m_radius &&
@@ -247,7 +247,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_OVERRIDE
{
const CylinderIndexDataFunctor *otherFunctor = functor_cast<CylinderIndexDataFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_rings == m_rings &&
otherFunctor->m_slices == m_slices &&
otherFunctor->m_length == m_length);
@@ -269,12 +269,12 @@ QCylinderGeometryPrivate::QCylinderGeometryPrivate()
, m_slices(16)
, m_radius(1.0f)
, m_length(1.0f)
- , m_positionAttribute(Q_NULLPTR)
- , m_normalAttribute(Q_NULLPTR)
- , m_texCoordAttribute(Q_NULLPTR)
- , m_indexAttribute(Q_NULLPTR)
- , m_vertexBuffer(Q_NULLPTR)
- , m_indexBuffer(Q_NULLPTR)
+ , m_positionAttribute(nullptr)
+ , m_normalAttribute(nullptr)
+ , m_texCoordAttribute(nullptr)
+ , m_indexAttribute(nullptr)
+ , m_vertexBuffer(nullptr)
+ , m_indexBuffer(nullptr)
{
}
diff --git a/src/extras/geometries/qcylindergeometry.h b/src/extras/geometries/qcylindergeometry.h
index 4d524b4f8..9be49c67c 100644
--- a/src/extras/geometries/qcylindergeometry.h
+++ b/src/extras/geometries/qcylindergeometry.h
@@ -67,7 +67,7 @@ class QT3DEXTRASSHARED_EXPORT QCylinderGeometry : public Qt3DRender::QGeometry
Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
- explicit QCylinderGeometry(QNode *parent = Q_NULLPTR);
+ explicit QCylinderGeometry(QNode *parent = nullptr);
void updateVertices();
void updateIndices();
@@ -95,7 +95,7 @@ Q_SIGNALS:
void lengthChanged(float length);
protected:
- QCylinderGeometry(QCylinderGeometryPrivate &dd, QNode *parent = Q_NULLPTR);
+ QCylinderGeometry(QCylinderGeometryPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QCylinderGeometry)
diff --git a/src/extras/geometries/qcylindermesh.h b/src/extras/geometries/qcylindermesh.h
index 63a497607..0da4b9555 100644
--- a/src/extras/geometries/qcylindermesh.h
+++ b/src/extras/geometries/qcylindermesh.h
@@ -56,7 +56,7 @@ class QT3DEXTRASSHARED_EXPORT QCylinderMesh : public Qt3DRender::QGeometryRender
Q_PROPERTY(float radius READ radius WRITE setRadius NOTIFY radiusChanged)
Q_PROPERTY(float length READ length WRITE setLength NOTIFY lengthChanged)
public:
- explicit QCylinderMesh(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QCylinderMesh(Qt3DCore::QNode *parent = nullptr);
int rings() const;
int slices() const;
diff --git a/src/extras/geometries/qplanegeometry.cpp b/src/extras/geometries/qplanegeometry.cpp
index 59e2dbad4..29ec8256e 100644
--- a/src/extras/geometries/qplanegeometry.cpp
+++ b/src/extras/geometries/qplanegeometry.cpp
@@ -163,7 +163,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_FINAL
{
const PlaneVertexBufferFunctor *otherFunctor = functor_cast<PlaneVertexBufferFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_width == m_width &&
otherFunctor->m_height == m_height &&
otherFunctor->m_resolution == m_resolution);
@@ -195,7 +195,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_FINAL
{
const PlaneIndexBufferFunctor *otherFunctor = functor_cast<PlaneIndexBufferFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_resolution == m_resolution);
return false;
}
@@ -439,13 +439,13 @@ QPlaneGeometryPrivate::QPlaneGeometryPrivate()
, m_width(1.0f)
, m_height(1.0f)
, m_meshResolution(QSize(2, 2))
- , m_positionAttribute(Q_NULLPTR)
- , m_normalAttribute(Q_NULLPTR)
- , m_texCoordAttribute(Q_NULLPTR)
- , m_tangentAttribute(Q_NULLPTR)
- , m_indexAttribute(Q_NULLPTR)
- , m_vertexBuffer(Q_NULLPTR)
- , m_indexBuffer(Q_NULLPTR)
+ , m_positionAttribute(nullptr)
+ , m_normalAttribute(nullptr)
+ , m_texCoordAttribute(nullptr)
+ , m_tangentAttribute(nullptr)
+ , m_indexAttribute(nullptr)
+ , m_vertexBuffer(nullptr)
+ , m_indexBuffer(nullptr)
{
}
diff --git a/src/extras/geometries/qplanegeometry.h b/src/extras/geometries/qplanegeometry.h
index a9031f780..d082269c3 100644
--- a/src/extras/geometries/qplanegeometry.h
+++ b/src/extras/geometries/qplanegeometry.h
@@ -69,7 +69,7 @@ class QT3DEXTRASSHARED_EXPORT QPlaneGeometry : public Qt3DRender::QGeometry
Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
- explicit QPlaneGeometry(QNode *parent = Q_NULLPTR);
+ explicit QPlaneGeometry(QNode *parent = nullptr);
void updateVertices();
void updateIndices();
@@ -95,7 +95,7 @@ Q_SIGNALS:
void heightChanged(float height);
protected:
- QPlaneGeometry(QPlaneGeometryPrivate &dd, QNode *parent = Q_NULLPTR);
+ QPlaneGeometry(QPlaneGeometryPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QPlaneGeometry)
diff --git a/src/extras/geometries/qplanemesh.h b/src/extras/geometries/qplanemesh.h
index 4f05a3896..b308908e8 100644
--- a/src/extras/geometries/qplanemesh.h
+++ b/src/extras/geometries/qplanemesh.h
@@ -56,7 +56,7 @@ class QT3DEXTRASSHARED_EXPORT QPlaneMesh : public Qt3DRender::QGeometryRenderer
Q_PROPERTY(QSize meshResolution READ meshResolution WRITE setMeshResolution NOTIFY meshResolutionChanged)
public:
- explicit QPlaneMesh(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QPlaneMesh(Qt3DCore::QNode *parent = nullptr);
float width() const;
float height() const;
diff --git a/src/extras/geometries/qspheregeometry.cpp b/src/extras/geometries/qspheregeometry.cpp
index 21633f3cd..38af69fe5 100644
--- a/src/extras/geometries/qspheregeometry.cpp
+++ b/src/extras/geometries/qspheregeometry.cpp
@@ -183,7 +183,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_OVERRIDE
{
const SphereVertexDataFunctor *otherFunctor = functor_cast<SphereVertexDataFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_rings == m_rings &&
otherFunctor->m_slices == m_slices &&
otherFunctor->m_radius == m_radius);
@@ -215,7 +215,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_OVERRIDE
{
const SphereIndexDataFunctor *otherFunctor = functor_cast<SphereIndexDataFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_rings == m_rings &&
otherFunctor->m_slices == m_slices);
return false;
@@ -234,13 +234,13 @@ QSphereGeometryPrivate::QSphereGeometryPrivate()
, m_rings(16)
, m_slices(16)
, m_radius(1.0f)
- , m_positionAttribute(Q_NULLPTR)
- , m_normalAttribute(Q_NULLPTR)
- , m_texCoordAttribute(Q_NULLPTR)
- , m_tangentAttribute(Q_NULLPTR)
- , m_indexAttribute(Q_NULLPTR)
- , m_vertexBuffer(Q_NULLPTR)
- , m_indexBuffer(Q_NULLPTR)
+ , m_positionAttribute(nullptr)
+ , m_normalAttribute(nullptr)
+ , m_texCoordAttribute(nullptr)
+ , m_tangentAttribute(nullptr)
+ , m_indexAttribute(nullptr)
+ , m_vertexBuffer(nullptr)
+ , m_indexBuffer(nullptr)
{
}
diff --git a/src/extras/geometries/qspheregeometry.h b/src/extras/geometries/qspheregeometry.h
index 9f2d661e4..5deb8a171 100644
--- a/src/extras/geometries/qspheregeometry.h
+++ b/src/extras/geometries/qspheregeometry.h
@@ -69,7 +69,7 @@ class QT3DEXTRASSHARED_EXPORT QSphereGeometry : public Qt3DRender::QGeometry
Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
- explicit QSphereGeometry(QNode *parent = Q_NULLPTR);
+ explicit QSphereGeometry(QNode *parent = nullptr);
void updateVertices();
void updateIndices();
@@ -98,7 +98,7 @@ Q_SIGNALS:
void generateTangentsChanged(bool generateTangents);
protected:
- QSphereGeometry(QSphereGeometryPrivate &dd, QNode *parent = Q_NULLPTR);
+ QSphereGeometry(QSphereGeometryPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QSphereGeometry)
diff --git a/src/extras/geometries/qspheremesh.h b/src/extras/geometries/qspheremesh.h
index ac13cb563..5880f7188 100644
--- a/src/extras/geometries/qspheremesh.h
+++ b/src/extras/geometries/qspheremesh.h
@@ -58,7 +58,7 @@ class QT3DEXTRASSHARED_EXPORT QSphereMesh : public Qt3DRender::QGeometryRenderer
Q_PROPERTY(bool generateTangents READ generateTangents WRITE setGenerateTangents NOTIFY generateTangentsChanged)
public:
- explicit QSphereMesh(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QSphereMesh(Qt3DCore::QNode *parent = nullptr);
int rings() const;
int slices() const;
diff --git a/src/extras/geometries/qtorusgeometry.cpp b/src/extras/geometries/qtorusgeometry.cpp
index b9055e332..f62700755 100644
--- a/src/extras/geometries/qtorusgeometry.cpp
+++ b/src/extras/geometries/qtorusgeometry.cpp
@@ -144,7 +144,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_OVERRIDE
{
const TorusVertexDataFunctor *otherFunctor = functor_cast<TorusVertexDataFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_rings == m_rings &&
otherFunctor->m_sides == m_sides &&
otherFunctor->m_radius == m_radius &&
@@ -178,7 +178,7 @@ public:
bool operator ==(const QBufferDataGenerator &other) const Q_DECL_OVERRIDE
{
const TorusIndexDataFunctor *otherFunctor = functor_cast<TorusIndexDataFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_rings == m_rings &&
otherFunctor->m_sides == m_sides);
return false;
@@ -197,12 +197,12 @@ QTorusGeometryPrivate::QTorusGeometryPrivate()
, m_slices(16)
, m_radius(1.0f)
, m_minorRadius(1.0f)
- , m_positionAttribute(Q_NULLPTR)
- , m_normalAttribute(Q_NULLPTR)
- , m_texCoordAttribute(Q_NULLPTR)
- , m_indexAttribute(Q_NULLPTR)
- , m_vertexBuffer(Q_NULLPTR)
- , m_indexBuffer(Q_NULLPTR)
+ , m_positionAttribute(nullptr)
+ , m_normalAttribute(nullptr)
+ , m_texCoordAttribute(nullptr)
+ , m_indexAttribute(nullptr)
+ , m_vertexBuffer(nullptr)
+ , m_indexBuffer(nullptr)
{
}
diff --git a/src/extras/geometries/qtorusgeometry.h b/src/extras/geometries/qtorusgeometry.h
index 46637156d..89e205a3f 100644
--- a/src/extras/geometries/qtorusgeometry.h
+++ b/src/extras/geometries/qtorusgeometry.h
@@ -68,7 +68,7 @@ class QT3DEXTRASSHARED_EXPORT QTorusGeometry : public Qt3DRender::QGeometry
Q_PROPERTY(Qt3DRender::QAttribute *indexAttribute READ indexAttribute CONSTANT)
public:
- explicit QTorusGeometry(QNode *parent = Q_NULLPTR);
+ explicit QTorusGeometry(QNode *parent = nullptr);
void updateVertices();
void updateIndices();
@@ -97,7 +97,7 @@ Q_SIGNALS:
protected:
- QTorusGeometry(QTorusGeometryPrivate &dd, QNode *parent = Q_NULLPTR);
+ QTorusGeometry(QTorusGeometryPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QTorusGeometry)
diff --git a/src/extras/geometries/qtorusmesh.h b/src/extras/geometries/qtorusmesh.h
index 064a589ce..f75ec913a 100644
--- a/src/extras/geometries/qtorusmesh.h
+++ b/src/extras/geometries/qtorusmesh.h
@@ -55,7 +55,7 @@ class QT3DEXTRASSHARED_EXPORT QTorusMesh : public Qt3DRender::QGeometryRenderer
Q_PROPERTY(float radius READ radius WRITE setRadius NOTIFY radiusChanged)
Q_PROPERTY(float minorRadius READ minorRadius WRITE setMinorRadius NOTIFY minorRadiusChanged)
public:
- explicit QTorusMesh(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QTorusMesh(Qt3DCore::QNode *parent = nullptr);
int rings() const;
int slices() const;
diff --git a/src/input/backend/assignkeyboardfocusjob.cpp b/src/input/backend/assignkeyboardfocusjob.cpp
index bedb3e025..43f5950b3 100644
--- a/src/input/backend/assignkeyboardfocusjob.cpp
+++ b/src/input/backend/assignkeyboardfocusjob.cpp
@@ -50,7 +50,7 @@ namespace Input {
AssignKeyboardFocusJob::AssignKeyboardFocusJob(Qt3DCore::QNodeId keyboardDevice)
: QAspectJob()
- , m_inputHandler(Q_NULLPTR)
+ , m_inputHandler(nullptr)
, m_keyboardDevice(keyboardDevice)
{
}
diff --git a/src/input/backend/eventsourcesetterhelper.cpp b/src/input/backend/eventsourcesetterhelper.cpp
index ad69e4803..9d4439800 100644
--- a/src/input/backend/eventsourcesetterhelper.cpp
+++ b/src/input/backend/eventsourcesetterhelper.cpp
@@ -49,9 +49,9 @@ namespace Input {
EventSourceSetterHelper::EventSourceSetterHelper(InputHandler *inputHandler)
: QObject()
- , m_service(Q_NULLPTR)
+ , m_service(nullptr)
, m_inputHandler(inputHandler)
- , m_lastEventSource(Q_NULLPTR)
+ , m_lastEventSource(nullptr)
{
}
diff --git a/src/input/backend/inputhandler.cpp b/src/input/backend/inputhandler.cpp
index 5647d6369..dd4491506 100644
--- a/src/input/backend/inputhandler.cpp
+++ b/src/input/backend/inputhandler.cpp
@@ -71,7 +71,7 @@ InputHandler::InputHandler()
, m_inputSequenceManager(new InputSequenceManager())
, m_logicalDeviceManager(new LogicalDeviceManager())
, m_genericPhysicalDeviceBackendNodeManager(new GenericDeviceBackendNodeManager)
- , m_settings(Q_NULLPTR)
+ , m_settings(nullptr)
, m_eventSourceSetter(new Qt3DInput::Input::EventSourceSetterHelper(this))
{
m_keyboardEventFilter->setInputHandler(this);
@@ -284,7 +284,7 @@ EventSourceSetterHelper *InputHandler::eventSourceHelper() const
void InputHandler::updateEventSource()
{
- if (m_settings != Q_NULLPTR) {
+ if (m_settings != nullptr) {
// Will be updated only if eventSource is different than
// what was set last
QObject *eventSource = m_settings->eventSource();
diff --git a/src/input/backend/inputsettings.cpp b/src/input/backend/inputsettings.cpp
index 32858b916..7931d238e 100644
--- a/src/input/backend/inputsettings.cpp
+++ b/src/input/backend/inputsettings.cpp
@@ -51,7 +51,7 @@ namespace Input {
InputSettings::InputSettings()
: QBackendNode(QBackendNode::ReadOnly)
- , m_eventSource(Q_NULLPTR)
+ , m_eventSource(nullptr)
{
}
@@ -86,9 +86,9 @@ InputSettingsFunctor::InputSettingsFunctor(InputHandler *handler)
Qt3DCore::QBackendNode *InputSettingsFunctor::create(Qt3DCore::QNode *frontend) const
{
- if (m_handler->inputSettings() != Q_NULLPTR) {
+ if (m_handler->inputSettings() != nullptr) {
qWarning() << "Input settings already specified";
- return Q_NULLPTR;
+ return nullptr;
}
InputSettings *settings = new InputSettings();
@@ -100,9 +100,9 @@ Qt3DCore::QBackendNode *InputSettingsFunctor::create(Qt3DCore::QNode *frontend)
Qt3DCore::QBackendNode *InputSettingsFunctor::create(const Qt3DCore::QNodeCreatedChangeBasePtr &change) const
{
Q_UNUSED(change);
- if (m_handler->inputSettings() != Q_NULLPTR) {
+ if (m_handler->inputSettings() != nullptr) {
qWarning() << "Input settings already specified";
- return Q_NULLPTR;
+ return nullptr;
}
InputSettings *settings = new InputSettings();
@@ -113,16 +113,16 @@ Qt3DCore::QBackendNode *InputSettingsFunctor::create(const Qt3DCore::QNodeCreate
Qt3DCore::QBackendNode *InputSettingsFunctor::get(Qt3DCore::QNodeId id) const
{
InputSettings *settings = m_handler->inputSettings();
- if (settings != Q_NULLPTR && settings->peerId() == id)
+ if (settings != nullptr && settings->peerId() == id)
return settings;
- return Q_NULLPTR;
+ return nullptr;
}
void InputSettingsFunctor::destroy(Qt3DCore::QNodeId id) const
{
InputSettings *settings = m_handler->inputSettings();
- if (settings != Q_NULLPTR && settings->peerId() == id) {
- m_handler->setInputSettings(Q_NULLPTR);
+ if (settings != nullptr && settings->peerId() == id) {
+ m_handler->setInputSettings(nullptr);
delete settings;
}
}
diff --git a/src/input/backend/keyboarddevice.cpp b/src/input/backend/keyboarddevice.cpp
index f48566302..04832e6ea 100644
--- a/src/input/backend/keyboarddevice.cpp
+++ b/src/input/backend/keyboarddevice.cpp
@@ -357,7 +357,7 @@ QPair<int, int> getKeyPosition(int key)
KeyboardDevice::KeyboardDevice()
: QAbstractPhysicalDeviceBackendNode(QBackendNode::ReadOnly)
- , m_inputHandler(Q_NULLPTR)
+ , m_inputHandler(nullptr)
{
m_keyStates.keys[0] = 0;
m_keyStates.keys[1] = 0;
diff --git a/src/input/backend/keyboardhandler.cpp b/src/input/backend/keyboardhandler.cpp
index d21cad5eb..f085e87d6 100644
--- a/src/input/backend/keyboardhandler.cpp
+++ b/src/input/backend/keyboardhandler.cpp
@@ -56,7 +56,7 @@ namespace Input {
KeyboardHandler::KeyboardHandler()
: QBackendNode(QBackendNode::ReadWrite)
- , m_inputHandler(Q_NULLPTR)
+ , m_inputHandler(nullptr)
, m_focus(false)
{
}
@@ -64,7 +64,7 @@ KeyboardHandler::KeyboardHandler()
void KeyboardHandler::updateFromPeer(Qt3DCore::QNode *peer)
{
QKeyboardHandler *input = static_cast<QKeyboardHandler *>(peer);
- if (input->sourceDevice() != Q_NULLPTR)
+ if (input->sourceDevice() != nullptr)
setSourcerDevice(input->sourceDevice()->id());
m_focus = false;
if (input->focus())
diff --git a/src/input/backend/keyboardmousegenericdeviceintegration.cpp b/src/input/backend/keyboardmousegenericdeviceintegration.cpp
index 6539aec89..31d0ea981 100644
--- a/src/input/backend/keyboardmousegenericdeviceintegration.cpp
+++ b/src/input/backend/keyboardmousegenericdeviceintegration.cpp
@@ -70,7 +70,7 @@ QVector<Qt3DCore::QAspectJobPtr> KeyboardMouseGenericDeviceIntegration::jobsToEx
QAbstractPhysicalDevice *KeyboardMouseGenericDeviceIntegration::createPhysicalDevice(const QString &name)
{
Q_UNUSED(name)
- return Q_NULLPTR;
+ return nullptr;
}
QVector<Qt3DCore::QNodeId> KeyboardMouseGenericDeviceIntegration::physicalDevices() const
diff --git a/src/input/backend/keyeventdispatcherjob.cpp b/src/input/backend/keyeventdispatcherjob.cpp
index d259f2c73..d38961704 100644
--- a/src/input/backend/keyeventdispatcherjob.cpp
+++ b/src/input/backend/keyeventdispatcherjob.cpp
@@ -49,7 +49,7 @@ namespace Input {
KeyEventDispatcherJob::KeyEventDispatcherJob(Qt3DCore::QNodeId input, const QList<QT_PREPEND_NAMESPACE(QKeyEvent)> &events)
: QAspectJob()
- , m_inputHandler(Q_NULLPTR)
+ , m_inputHandler(nullptr)
, m_keyboardHandler(input)
, m_events(events)
{
diff --git a/src/input/backend/mouseeventdispatcherjob.cpp b/src/input/backend/mouseeventdispatcherjob.cpp
index bfde41310..f49f18571 100644
--- a/src/input/backend/mouseeventdispatcherjob.cpp
+++ b/src/input/backend/mouseeventdispatcherjob.cpp
@@ -51,7 +51,7 @@ MouseEventDispatcherJob::MouseEventDispatcherJob(Qt3DCore::QNodeId input,
const QList<QT_PREPEND_NAMESPACE (QMouseEvent)> &mouseEvents,
const QList<QT_PREPEND_NAMESPACE (QWheelEvent)> &wheelEvents)
: QAspectJob()
- , m_inputHandler(Q_NULLPTR)
+ , m_inputHandler(nullptr)
, m_mouseInput(input)
, m_mouseEvents(mouseEvents)
, m_wheelEvents(wheelEvents)
diff --git a/src/input/backend/mousehandler.cpp b/src/input/backend/mousehandler.cpp
index 6bb4cb52e..dceca731d 100644
--- a/src/input/backend/mousehandler.cpp
+++ b/src/input/backend/mousehandler.cpp
@@ -57,7 +57,7 @@ namespace Input {
MouseHandler::MouseHandler()
: QBackendNode(ReadWrite)
- , m_inputHandler(Q_NULLPTR)
+ , m_inputHandler(nullptr)
{
}
@@ -68,7 +68,7 @@ MouseHandler::~MouseHandler()
void MouseHandler::updateFromPeer(Qt3DCore::QNode *peer)
{
QMouseHandler *input = static_cast<QMouseHandler *>(peer);
- if (input->sourceDevice() != Q_NULLPTR)
+ if (input->sourceDevice() != nullptr)
setDevice(input->sourceDevice()->id());
}
diff --git a/src/input/backend/qabstractphysicaldevicebackendnode.cpp b/src/input/backend/qabstractphysicaldevicebackendnode.cpp
index 716e5cbaf..7462bcc83 100644
--- a/src/input/backend/qabstractphysicaldevicebackendnode.cpp
+++ b/src/input/backend/qabstractphysicaldevicebackendnode.cpp
@@ -81,7 +81,7 @@ namespace Qt3DInput {
QAbstractPhysicalDeviceBackendNodePrivate::QAbstractPhysicalDeviceBackendNodePrivate(Qt3DCore::QBackendNode::Mode mode)
: Qt3DCore::QBackendNodePrivate(mode)
, m_axisSettings()
- , m_inputAspect(Q_NULLPTR)
+ , m_inputAspect(nullptr)
{
}
@@ -180,7 +180,7 @@ void QAbstractPhysicalDeviceBackendNode::cleanup()
QBackendNode::setEnabled(false);
d->m_axisSettings.clear();
d->m_axisFilters.clear();
- d->m_inputAspect = Q_NULLPTR;
+ d->m_inputAspect = nullptr;
}
void QAbstractPhysicalDeviceBackendNode::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
diff --git a/src/input/backend/updateaxisactionjob.cpp b/src/input/backend/updateaxisactionjob.cpp
index 741685dc8..97ad15842 100644
--- a/src/input/backend/updateaxisactionjob.cpp
+++ b/src/input/backend/updateaxisactionjob.cpp
@@ -102,15 +102,15 @@ bool UpdateAxisActionJob::processActionInput(const Qt3DCore::QNodeId actionInput
if (m_handler->actionInputManager()->lookupResource(actionInputId)) {
ActionInput *actionInput = m_handler->actionInputManager()->lookupResource(actionInputId);
- QAbstractPhysicalDeviceBackendNode *physicalDeviceBackend = Q_NULLPTR;
+ QAbstractPhysicalDeviceBackendNode *physicalDeviceBackend = nullptr;
const auto integrations = m_handler->inputDeviceIntegrations();
for (QInputDeviceIntegration *integration : integrations) {
- if ((physicalDeviceBackend = integration->physicalDevice(actionInput->sourceDevice())) != Q_NULLPTR)
+ if ((physicalDeviceBackend = integration->physicalDevice(actionInput->sourceDevice())) != nullptr)
break;
}
- if (physicalDeviceBackend != Q_NULLPTR) {
+ if (physicalDeviceBackend != nullptr) {
// Update the value
return anyOfRequiredButtonsPressed(actionInput->buttons(), physicalDeviceBackend);
}
@@ -170,15 +170,15 @@ void UpdateAxisActionJob::updateAxis(LogicalDevice *device)
const auto axisInputIds = axis->inputs();
for (const Qt3DCore::QNodeId axisInputId : axisInputIds) {
AxisInput *axisInput = m_handler->axisInputManager()->lookupResource(axisInputId);
- QAbstractPhysicalDeviceBackendNode *physicalDeviceBackend = Q_NULLPTR;
+ QAbstractPhysicalDeviceBackendNode *physicalDeviceBackend = nullptr;
const auto integrations = m_handler->inputDeviceIntegrations();
for (QInputDeviceIntegration *integration : integrations) {
- if ((physicalDeviceBackend = integration->physicalDevice(axisInput->sourceDevice())) != Q_NULLPTR)
+ if ((physicalDeviceBackend = integration->physicalDevice(axisInput->sourceDevice())) != nullptr)
break;
}
- if (physicalDeviceBackend != Q_NULLPTR) {
+ if (physicalDeviceBackend != nullptr) {
// Update the value
const QVector<int> buttons = axisInput->buttons();
// Axis was specified -> we take this as the base value
diff --git a/src/input/frontend/qabstractphysicaldevice.h b/src/input/frontend/qabstractphysicaldevice.h
index 94b23bd14..3725ae1c4 100644
--- a/src/input/frontend/qabstractphysicaldevice.h
+++ b/src/input/frontend/qabstractphysicaldevice.h
@@ -57,7 +57,7 @@ class QT3DINPUTSHARED_EXPORT QAbstractPhysicalDevice : public Qt3DCore::QNode
{
Q_OBJECT
public:
- explicit QAbstractPhysicalDevice(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QAbstractPhysicalDevice(Qt3DCore::QNode *parent = nullptr);
virtual int axisCount() const;
virtual int buttonCount() const;
@@ -72,7 +72,7 @@ public:
QVector<QAxisSetting *> axisSettings() const;
protected:
- QAbstractPhysicalDevice(QAbstractPhysicalDevicePrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QAbstractPhysicalDevice(QAbstractPhysicalDevicePrivate &dd, Qt3DCore::QNode *parent = nullptr);
Q_DECLARE_PRIVATE(QAbstractPhysicalDevice)
Qt3DCore::QNodeCreatedChangeBasePtr createNodeCreationChange() const Q_DECL_OVERRIDE;
};
diff --git a/src/input/frontend/qaction.cpp b/src/input/frontend/qaction.cpp
index 3eadd9d71..31bac3fa1 100644
--- a/src/input/frontend/qaction.cpp
+++ b/src/input/frontend/qaction.cpp
@@ -120,7 +120,7 @@ void QAction::addInput(QAbstractActionInput *input)
if (!input->parent())
input->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeAddedPropertyChangePtr::create(id(), input);
change->setPropertyName("input");
d->notifyObservers(change);
@@ -136,7 +136,7 @@ void QAction::removeInput(QAbstractActionInput *input)
Q_D(QAction);
if (d->m_inputs.contains(input)) {
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeRemovedPropertyChangePtr::create(id(), input);
change->setPropertyName("input");
d->notifyObservers(change);
diff --git a/src/input/frontend/qaction.h b/src/input/frontend/qaction.h
index 442d58e7c..9dc3ab3f4 100644
--- a/src/input/frontend/qaction.h
+++ b/src/input/frontend/qaction.h
@@ -55,7 +55,7 @@ class QT3DINPUTSHARED_EXPORT QAction : public Qt3DCore::QNode
Q_OBJECT
Q_PROPERTY(bool active READ isActive NOTIFY activeChanged)
public:
- explicit QAction(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QAction(Qt3DCore::QNode *parent = nullptr);
bool isActive() const;
diff --git a/src/input/frontend/qactioninput.h b/src/input/frontend/qactioninput.h
index 89c912ef4..0103e0062 100644
--- a/src/input/frontend/qactioninput.h
+++ b/src/input/frontend/qactioninput.h
@@ -58,7 +58,7 @@ class QT3DINPUTSHARED_EXPORT QActionInput : public Qt3DInput::QAbstractActionInp
Q_PROPERTY(QVariantList buttons READ buttons WRITE setButtons NOTIFY buttonsChanged)
public:
- explicit QActionInput(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QActionInput(Qt3DCore::QNode *parent = nullptr);
QAbstractPhysicalDevice *sourceDevice() const;
QVariantList buttons() const;
diff --git a/src/input/frontend/qactioninput_p.h b/src/input/frontend/qactioninput_p.h
index 0927b9805..84a56689d 100644
--- a/src/input/frontend/qactioninput_p.h
+++ b/src/input/frontend/qactioninput_p.h
@@ -69,7 +69,7 @@ class QActionInputPrivate : public Qt3DCore::QNodePrivate
public:
QActionInputPrivate()
: Qt3DCore::QNodePrivate()
- , m_sourceDevice(Q_NULLPTR)
+ , m_sourceDevice(nullptr)
{}
QVariantList m_buttons;
diff --git a/src/input/frontend/qaxis.cpp b/src/input/frontend/qaxis.cpp
index 9c5b80a1d..3f7fe632e 100644
--- a/src/input/frontend/qaxis.cpp
+++ b/src/input/frontend/qaxis.cpp
@@ -78,7 +78,7 @@ void QAxis::addInput(QAxisInput *input)
if (!input->parent())
input->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeAddedPropertyChangePtr::create(id(), input);
change->setPropertyName("input");
d->notifyObservers(change);
@@ -91,7 +91,7 @@ void QAxis::removeInput(QAxisInput *input)
Q_D(QAxis);
if (d->m_inputs.contains(input)) {
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeRemovedPropertyChangePtr::create(id(), input);
change->setPropertyName("input");
d->notifyObservers(change);
diff --git a/src/input/frontend/qaxis.h b/src/input/frontend/qaxis.h
index d7532d04e..d72ef2c1b 100644
--- a/src/input/frontend/qaxis.h
+++ b/src/input/frontend/qaxis.h
@@ -54,7 +54,7 @@ class QT3DINPUTSHARED_EXPORT QAxis : public Qt3DCore::QNode
Q_OBJECT
Q_PROPERTY(float value READ value NOTIFY valueChanged)
public:
- explicit QAxis(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QAxis(Qt3DCore::QNode *parent = nullptr);
void addInput(QAxisInput *input);
void removeInput(QAxisInput *input);
diff --git a/src/input/frontend/qaxisinput.h b/src/input/frontend/qaxisinput.h
index 97e3f1eeb..1156011e3 100644
--- a/src/input/frontend/qaxisinput.h
+++ b/src/input/frontend/qaxisinput.h
@@ -60,7 +60,7 @@ class QT3DINPUTSHARED_EXPORT QAxisInput : public Qt3DCore::QNode
Q_PROPERTY(QVariantList buttons READ buttons WRITE setButtons NOTIFY buttonsChanged)
public:
- explicit QAxisInput(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QAxisInput(Qt3DCore::QNode *parent = nullptr);
QAbstractPhysicalDevice *sourceDevice() const;
float scale() const;
diff --git a/src/input/frontend/qaxisinput_p.h b/src/input/frontend/qaxisinput_p.h
index b23f27e27..36087564d 100644
--- a/src/input/frontend/qaxisinput_p.h
+++ b/src/input/frontend/qaxisinput_p.h
@@ -66,7 +66,7 @@ class QAxisInputPrivate : public Qt3DCore::QNodePrivate
public:
QAxisInputPrivate()
: Qt3DCore::QNodePrivate()
- , m_sourceDevice(Q_NULLPTR)
+ , m_sourceDevice(nullptr)
, m_scale(0.0f)
, m_axis(-1)
{}
diff --git a/src/input/frontend/qaxissetting.h b/src/input/frontend/qaxissetting.h
index 033b6fa7b..aace04a1b 100644
--- a/src/input/frontend/qaxissetting.h
+++ b/src/input/frontend/qaxissetting.h
@@ -59,7 +59,7 @@ class QT3DINPUTSHARED_EXPORT QAxisSetting : public Qt3DCore::QNode
Q_PROPERTY(bool smooth READ isSmoothEnabled WRITE setSmoothEnabled NOTIFY smoothChanged)
public:
- explicit QAxisSetting(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QAxisSetting(Qt3DCore::QNode *parent = nullptr);
float deadZoneRadius() const;
QVariantList axes() const;
diff --git a/src/input/frontend/qgamepadinput_p.h b/src/input/frontend/qgamepadinput_p.h
index 25c844f47..b30758f82 100644
--- a/src/input/frontend/qgamepadinput_p.h
+++ b/src/input/frontend/qgamepadinput_p.h
@@ -61,7 +61,7 @@ class QT3DINPUTSHARED_PRIVATE_EXPORT QGamepadInput : public QAbstractPhysicalDev
Q_OBJECT
Q_PROPERTY(int deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged)
public:
- explicit QGamepadInput(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QGamepadInput(Qt3DCore::QNode *parent = nullptr);
explicit QGamepadInput(const QGamepadInput &other);
int deviceId() const;
diff --git a/src/input/frontend/qgenericinputdevice_p.h b/src/input/frontend/qgenericinputdevice_p.h
index 011f3864f..f4af03975 100644
--- a/src/input/frontend/qgenericinputdevice_p.h
+++ b/src/input/frontend/qgenericinputdevice_p.h
@@ -64,7 +64,7 @@ class QT3DINPUTSHARED_PRIVATE_EXPORT QGenericInputDevice : public QAbstractPhysi
Q_PROPERTY(QVariantMap axesMap READ axesMap WRITE setAxesMap NOTIFY axesMapChanged)
Q_PROPERTY(QVariantMap buttonsMap READ buttonsMap WRITE setButtonsMap NOTIFY buttonsMapChanged)
public:
- QGenericInputDevice(Qt3DCore::QNode *parent = Q_NULLPTR);
+ QGenericInputDevice(Qt3DCore::QNode *parent = nullptr);
QVariantMap axesMap() const;
void setAxesMap(const QVariantMap &axesMap);
diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp
index a9fd5ccc8..e78b65057 100644
--- a/src/input/frontend/qinputaspect.cpp
+++ b/src/input/frontend/qinputaspect.cpp
@@ -143,7 +143,7 @@ void QInputAspectPrivate::loadInputDevicePlugins()
QStringList keys = QInputDeviceIntegrationFactory::keys();
Q_FOREACH (const QString &key, keys) {
Qt3DInput::QInputDeviceIntegration *integration = QInputDeviceIntegrationFactory::create(key, QStringList());
- if (integration != Q_NULLPTR) {
+ if (integration != nullptr) {
m_inputHandler->addInputDeviceIntegration(integration);
// Initialize will allow the InputDeviceIntegration to
// register their frontend / backend types,
@@ -158,9 +158,9 @@ void QInputAspectPrivate::loadInputDevicePlugins()
QAbstractPhysicalDevice *QInputAspect::createPhysicalDevice(const QString &name)
{
Q_D(QInputAspect);
- QAbstractPhysicalDevice *device = Q_NULLPTR;
+ QAbstractPhysicalDevice *device = nullptr;
Q_FOREACH (Qt3DInput::QInputDeviceIntegration *integration, d->m_inputHandler->inputDeviceIntegrations()) {
- if ((device = integration->createPhysicalDevice(name)) != Q_NULLPTR)
+ if ((device = integration->createPhysicalDevice(name)) != nullptr)
break;
}
return device;
@@ -220,7 +220,7 @@ void QInputAspect::onUnregistered()
Q_D(QInputAspect);
// At this point it is too late to call removeEventFilter as the eventSource (Window)
// may already be destroyed
- d->m_inputHandler.reset(Q_NULLPTR);
+ d->m_inputHandler.reset(nullptr);
}
} // namespace Qt3DInput
diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp
index 8f72049f8..b33e202c4 100644
--- a/src/input/frontend/qinputchord.cpp
+++ b/src/input/frontend/qinputchord.cpp
@@ -150,7 +150,7 @@ void QInputChord::addChord(QAbstractActionInput *input)
if (!input->parent())
input->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeAddedPropertyChangePtr::create(id(), input);
change->setPropertyName("chord");
d->notifyObservers(change);
@@ -168,7 +168,7 @@ void QInputChord::removeChord(QAbstractActionInput *input)
Q_D(QInputChord);
if (d->m_chords.contains(input)) {
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeRemovedPropertyChangePtr::create(id(), input);
change->setPropertyName("chord");
d->notifyObservers(change);
diff --git a/src/input/frontend/qinputchord.h b/src/input/frontend/qinputchord.h
index 404fc8624..5177b84c2 100644
--- a/src/input/frontend/qinputchord.h
+++ b/src/input/frontend/qinputchord.h
@@ -57,7 +57,7 @@ class QT3DINPUTSHARED_EXPORT QInputChord : public Qt3DInput::QAbstractActionInpu
Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged)
public:
- explicit QInputChord(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QInputChord(Qt3DCore::QNode *parent = nullptr);
int timeout() const;
diff --git a/src/input/frontend/qinputdeviceintegration.cpp b/src/input/frontend/qinputdeviceintegration.cpp
index b9a4cbd9c..de9e763b7 100644
--- a/src/input/frontend/qinputdeviceintegration.cpp
+++ b/src/input/frontend/qinputdeviceintegration.cpp
@@ -48,7 +48,7 @@ namespace Qt3DInput {
QInputDeviceIntegrationPrivate::QInputDeviceIntegrationPrivate()
: QObjectPrivate()
- , m_aspect(Q_NULLPTR)
+ , m_aspect(nullptr)
{
}
diff --git a/src/input/frontend/qinputdeviceintegration.h b/src/input/frontend/qinputdeviceintegration.h
index e6aa7540f..c6a78c500 100644
--- a/src/input/frontend/qinputdeviceintegration.h
+++ b/src/input/frontend/qinputdeviceintegration.h
@@ -65,8 +65,8 @@ class QT3DINPUTSHARED_EXPORT QInputDeviceIntegration : public QObject
{
Q_OBJECT
protected:
- explicit QInputDeviceIntegration(QObject *parent = Q_NULLPTR);
- explicit QInputDeviceIntegration(QInputDeviceIntegrationPrivate &dd, QObject *parent = Q_NULLPTR);
+ explicit QInputDeviceIntegration(QObject *parent = nullptr);
+ explicit QInputDeviceIntegration(QInputDeviceIntegrationPrivate &dd, QObject *parent = nullptr);
template<class Frontend>
void registerBackendType(const Qt3DCore::QBackendNodeMapperPtr &functor)
diff --git a/src/input/frontend/qinputdeviceintegrationfactory.cpp b/src/input/frontend/qinputdeviceintegrationfactory.cpp
index 93e2e1626..12520c2fe 100644
--- a/src/input/frontend/qinputdeviceintegrationfactory.cpp
+++ b/src/input/frontend/qinputdeviceintegrationfactory.cpp
@@ -87,7 +87,7 @@ QInputDeviceIntegration *QInputDeviceIntegrationFactory::create(const QString &n
if (QInputDeviceIntegration *ret = qLoadPlugin<QInputDeviceIntegration, QInputDevicePlugin>(loader(), name, args))
return ret;
#endif
- return Q_NULLPTR;
+ return nullptr;
}
} // Qt3DInput
diff --git a/src/input/frontend/qinputdeviceplugin.cpp b/src/input/frontend/qinputdeviceplugin.cpp
index ed2d42d3f..695e85f50 100644
--- a/src/input/frontend/qinputdeviceplugin.cpp
+++ b/src/input/frontend/qinputdeviceplugin.cpp
@@ -56,7 +56,7 @@ QInputDeviceIntegration *QInputDevicePlugin::create(const QString &key, const QS
{
Q_UNUSED(key)
Q_UNUSED(paramList)
- return Q_NULLPTR;
+ return nullptr;
}
} // Qt3DInput
diff --git a/src/input/frontend/qinputdeviceplugin.h b/src/input/frontend/qinputdeviceplugin.h
index 52e0e3c8c..b31f57f51 100644
--- a/src/input/frontend/qinputdeviceplugin.h
+++ b/src/input/frontend/qinputdeviceplugin.h
@@ -56,7 +56,7 @@ class QT3DINPUTSHARED_EXPORT QInputDevicePlugin : public QObject
{
Q_OBJECT
public:
- explicit QInputDevicePlugin(QObject *parent = Q_NULLPTR);
+ explicit QInputDevicePlugin(QObject *parent = nullptr);
~QInputDevicePlugin();
virtual QInputDeviceIntegration *create(const QString &key, const QStringList &paramList);
diff --git a/src/input/frontend/qinputsequence.cpp b/src/input/frontend/qinputsequence.cpp
index ffbb4dfd2..812226753 100644
--- a/src/input/frontend/qinputsequence.cpp
+++ b/src/input/frontend/qinputsequence.cpp
@@ -196,7 +196,7 @@ void QInputSequence::addSequence(QAbstractActionInput *input)
if (!input->parent())
input->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeAddedPropertyChangePtr::create(id(), input);
change->setPropertyName("sequence");
d->notifyObservers(change);
@@ -213,7 +213,7 @@ void QInputSequence::removeSequence(QAbstractActionInput *input)
{
Q_D(QInputSequence);
if (d->m_sequences.contains(input)) {
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeRemovedPropertyChangePtr::create(id(), input);
change->setPropertyName("sequence");
d->notifyObservers(change);
diff --git a/src/input/frontend/qinputsequence.h b/src/input/frontend/qinputsequence.h
index e6b067774..b5a85c8a9 100644
--- a/src/input/frontend/qinputsequence.h
+++ b/src/input/frontend/qinputsequence.h
@@ -58,7 +58,7 @@ class QT3DINPUTSHARED_EXPORT QInputSequence : public Qt3DInput::QAbstractActionI
Q_PROPERTY(int buttonInterval READ buttonInterval WRITE setButtonInterval NOTIFY buttonIntervalChanged)
public:
- explicit QInputSequence(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QInputSequence(Qt3DCore::QNode *parent = nullptr);
int timeout() const;
int buttonInterval() const;
diff --git a/src/input/frontend/qinputsettings.cpp b/src/input/frontend/qinputsettings.cpp
index d696ad894..73f5ec896 100644
--- a/src/input/frontend/qinputsettings.cpp
+++ b/src/input/frontend/qinputsettings.cpp
@@ -47,7 +47,7 @@ namespace Qt3DInput {
QInputSettingsPrivate::QInputSettingsPrivate()
: Qt3DCore::QComponentPrivate()
- , m_eventSource(Q_NULLPTR)
+ , m_eventSource(nullptr)
{
}
diff --git a/src/input/frontend/qinputsettings.h b/src/input/frontend/qinputsettings.h
index c306ddd96..b4ff0cf0f 100644
--- a/src/input/frontend/qinputsettings.h
+++ b/src/input/frontend/qinputsettings.h
@@ -54,7 +54,7 @@ class QT3DINPUTSHARED_EXPORT QInputSettings : public Qt3DCore::QComponent
Q_OBJECT
Q_PROPERTY(QObject *eventSource READ eventSource WRITE setEventSource NOTIFY eventSourceChanged)
public:
- explicit QInputSettings(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QInputSettings(Qt3DCore::QNode *parent = nullptr);
QObject *eventSource() const;
diff --git a/src/input/frontend/qkeyboardhandler.cpp b/src/input/frontend/qkeyboardhandler.cpp
index 0e9b969d9..29b68ad60 100644
--- a/src/input/frontend/qkeyboardhandler.cpp
+++ b/src/input/frontend/qkeyboardhandler.cpp
@@ -108,7 +108,7 @@ const QByteArray keyToSignal(int key)
QKeyboardHandlerPrivate::QKeyboardHandlerPrivate()
: QComponentPrivate()
- , m_keyboardDevice(Q_NULLPTR)
+ , m_keyboardDevice(nullptr)
, m_focus(false)
{
m_shareable = false;
diff --git a/src/input/frontend/qlogicaldevice.cpp b/src/input/frontend/qlogicaldevice.cpp
index eda2cb8ac..dae33d902 100644
--- a/src/input/frontend/qlogicaldevice.cpp
+++ b/src/input/frontend/qlogicaldevice.cpp
@@ -158,7 +158,7 @@ void QLogicalDevice::addAction(QAction *action)
if (!action->parent())
action->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeAddedPropertyChangePtr::create(id(), action);
change->setPropertyName("action");
d->notifyObservers(change);
@@ -174,7 +174,7 @@ void QLogicalDevice::removeAction(QAction *action)
Q_D(QLogicalDevice);
if (d->m_actions.contains(action)) {
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeRemovedPropertyChangePtr::create(id(), action);
change->setPropertyName("action");
d->notifyObservers(change);
@@ -212,7 +212,7 @@ void QLogicalDevice::addAxis(QAxis *axis)
if (!axis->parent())
axis->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeAddedPropertyChangePtr::create(id(), axis);
change->setPropertyName("axis");
d->notifyObservers(change);
@@ -227,7 +227,7 @@ void QLogicalDevice::removeAxis(QAxis *axis)
{
Q_D(QLogicalDevice);
if (d->m_axes.contains(axis)) {
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = Qt3DCore::QNodeRemovedPropertyChangePtr::create(id(), axis);
change->setPropertyName("axis");
d->notifyObservers(change);
diff --git a/src/input/frontend/qlogicaldevice.h b/src/input/frontend/qlogicaldevice.h
index f42deaa73..018d2cb5c 100644
--- a/src/input/frontend/qlogicaldevice.h
+++ b/src/input/frontend/qlogicaldevice.h
@@ -55,7 +55,7 @@ class QT3DINPUTSHARED_EXPORT QLogicalDevice : public Qt3DCore::QComponent
{
Q_OBJECT
public:
- explicit QLogicalDevice(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QLogicalDevice(Qt3DCore::QNode *parent = nullptr);
void addAction(QAction *action);
void removeAction(QAction *action);
diff --git a/src/input/frontend/qmousehandler.cpp b/src/input/frontend/qmousehandler.cpp
index 8ff0b0e17..052565cce 100644
--- a/src/input/frontend/qmousehandler.cpp
+++ b/src/input/frontend/qmousehandler.cpp
@@ -51,7 +51,7 @@ namespace Qt3DInput {
/*! \internal */
QMouseHandlerPrivate::QMouseHandlerPrivate()
: QComponentPrivate()
- , m_mouseDevice(Q_NULLPTR)
+ , m_mouseDevice(nullptr)
, m_containsMouse(false)
{
m_shareable = false;
diff --git a/src/logic/callbackjob.cpp b/src/logic/callbackjob.cpp
index dd2adaee0..9eec09bf5 100644
--- a/src/logic/callbackjob.cpp
+++ b/src/logic/callbackjob.cpp
@@ -47,7 +47,7 @@ namespace Logic {
CallbackJob::CallbackJob()
: QAspectJob()
- , m_logicManager(Q_NULLPTR)
+ , m_logicManager(nullptr)
{
}
diff --git a/src/logic/executor.cpp b/src/logic/executor.cpp
index c8eb6881f..74267379e 100644
--- a/src/logic/executor.cpp
+++ b/src/logic/executor.cpp
@@ -52,7 +52,7 @@ namespace Logic {
Executor::Executor(QObject *parent)
: QObject(parent)
- , m_scene(Q_NULLPTR)
+ , m_scene(nullptr)
{
}
diff --git a/src/logic/handler.cpp b/src/logic/handler.cpp
index 6872aadb2..a4f727efc 100644
--- a/src/logic/handler.cpp
+++ b/src/logic/handler.cpp
@@ -48,7 +48,7 @@ namespace Qt3DLogic {
namespace Logic {
Handler::Handler()
- : m_logicManager(Q_NULLPTR)
+ : m_logicManager(nullptr)
{
}
diff --git a/src/logic/qlogicaspect.h b/src/logic/qlogicaspect.h
index 60e2e5753..4eb90bbca 100644
--- a/src/logic/qlogicaspect.h
+++ b/src/logic/qlogicaspect.h
@@ -53,7 +53,7 @@ class QT3DLOGICSHARED_EXPORT QLogicAspect : public Qt3DCore::QAbstractAspect
{
Q_OBJECT
public:
- explicit QLogicAspect(QObject *parent = Q_NULLPTR);
+ explicit QLogicAspect(QObject *parent = nullptr);
QVector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) Q_DECL_OVERRIDE;
diff --git a/src/plugins/sceneparsers/assimp/assimphelpers.cpp b/src/plugins/sceneparsers/assimp/assimphelpers.cpp
index f07b770c0..a8d935216 100644
--- a/src/plugins/sceneparsers/assimp/assimphelpers.cpp
+++ b/src/plugins/sceneparsers/assimp/assimphelpers.cpp
@@ -65,7 +65,7 @@ AssimpIOStream::AssimpIOStream(QIODevice *device) :
Assimp::IOStream(),
m_device(device)
{
- Q_ASSERT(m_device != Q_NULLPTR);
+ Q_ASSERT(m_device != nullptr);
}
/*!
@@ -213,7 +213,7 @@ Assimp::IOStream *AssimpIOSystem::Open(const char *pFile, const char *pMode)
if (file->open(openMode))
return new AssimpIOStream(file.take());
- return Q_NULLPTR;
+ return nullptr;
}
/*!
diff --git a/src/plugins/sceneparsers/assimp/assimpparser.cpp b/src/plugins/sceneparsers/assimp/assimpparser.cpp
index 38a343d65..780a1e748 100644
--- a/src/plugins/sceneparsers/assimp/assimpparser.cpp
+++ b/src/plugins/sceneparsers/assimp/assimpparser.cpp
@@ -332,7 +332,7 @@ private:
*/
AssimpParser::AssimpParser() : QSceneIOHandler(),
m_sceneParsed(false),
- m_scene(Q_NULLPTR)
+ m_scene(nullptr)
{
}
@@ -389,22 +389,22 @@ bool AssimpParser::isFileTypeSupported(const QUrl &source) const
* node specified by \a id. If \a id is empty, the scene is assumed to be
* the root node of the scene.
*
- * Returns \c Q_NULLPTR if \a id was specified but no node matching it was found.
+ * Returns \c nullptr if \a id was specified but no node matching it was found.
*/
Qt3DCore::QEntity *AssimpParser::scene(const QString &id)
{
// m_aiScene shouldn't be null.
// If it is either, the file failed to be imported or
// setFilePath was not called
- if (m_scene == Q_NULLPTR || m_scene->m_aiScene == Q_NULLPTR)
- return Q_NULLPTR;
+ if (m_scene == nullptr || m_scene->m_aiScene == nullptr)
+ return nullptr;
aiNode *rootNode = m_scene->m_aiScene->mRootNode;
// if id specified, tries to find node
if (!id.isEmpty() &&
!(rootNode = rootNode->FindNode(id.toUtf8().constData()))) {
qCDebug(AssimpParserLog) << Q_FUNC_INFO << " Couldn't find requested scene node";
- return Q_NULLPTR;
+ return nullptr;
}
// Builds the Qt3D scene using the Assimp aiScene
@@ -414,12 +414,12 @@ Qt3DCore::QEntity *AssimpParser::scene(const QString &id)
/*!
* Returns a Node from the scene identified by \a id.
- * Returns \c Q_NULLPTR if the node was not found.
+ * Returns \c nullptr if the node was not found.
*/
Qt3DCore::QEntity *AssimpParser::node(const QString &id)
{
- if (m_scene == Q_NULLPTR || m_scene->m_aiScene == Q_NULLPTR)
- return Q_NULLPTR;
+ if (m_scene == nullptr || m_scene->m_aiScene == nullptr)
+ return nullptr;
parse();
aiNode *n = m_scene->m_aiScene->mRootNode->FindNode(id.toUtf8().constData());
return node(n);
@@ -430,8 +430,8 @@ Qt3DCore::QEntity *AssimpParser::node(const QString &id)
*/
Qt3DCore::QEntity *AssimpParser::node(aiNode *node)
{
- if (node == Q_NULLPTR)
- return Q_NULLPTR;
+ if (node == nullptr)
+ return nullptr;
QEntity *entityNode = QAbstractNodeFactory::createNode<Qt3DCore::QEntity>("QEntity");
entityNode->setObjectName(aiStringToQString(node->mName));
@@ -453,7 +453,7 @@ Qt3DCore::QEntity *AssimpParser::node(aiNode *node)
// it conflicts with the variable node
QEntity *child = this->node(node->mChildren[i]);
// Are we sure each child are unique ???
- if (child != Q_NULLPTR)
+ if (child != nullptr)
child->setParent(entityNode);
}
@@ -496,7 +496,7 @@ void AssimpParser::readSceneFile(const QString &path)
aiProcess_JoinIdenticalVertices|
aiProcess_GenSmoothNormals|
aiProcess_FlipUVs);
- if (m_scene->m_aiScene == Q_NULLPTR) {
+ if (m_scene->m_aiScene == nullptr) {
qCWarning(AssimpParserLog) << "Assimp scene import failed";
return ;
}
@@ -510,7 +510,7 @@ void AssimpParser::cleanup()
{
m_sceneParsed = false;
delete m_scene;
- m_scene = Q_NULLPTR;
+ m_scene = nullptr;
}
/*!
@@ -591,8 +591,8 @@ void AssimpParser::loadMesh(uint meshIndex)
bool hasTangent = mesh->HasTangentsAndBitangents();
bool hasTexture = mesh->HasTextureCoords(0);
bool hasColor = (colors != NULL); // NULL defined by Assimp
- aiVector3D *tangents = hasTangent ? mesh->mTangents : Q_NULLPTR;
- aiVector3D *textureCoord = hasTexture ? mesh->mTextureCoords[0] : Q_NULLPTR;
+ aiVector3D *tangents = hasTangent ? mesh->mTangents : nullptr;
+ aiVector3D *textureCoord = hasTexture ? mesh->mTextureCoords[0] : nullptr;
// Add values in raw float array
ushort chunkSize = 6 + (hasTangent ? 3 : 0) + (hasTexture ? 2 : 0) + (hasColor ? 4 : 0);
@@ -762,7 +762,7 @@ void AssimpParser::loadCamera(uint cameraIndex)
aiNode *cameraNode = m_scene->m_aiScene->mRootNode->FindNode(assimpCamera->mName);
// If no node is associated to the camera in the scene, camera not saved
- if (cameraNode == Q_NULLPTR)
+ if (cameraNode == nullptr)
return ;
QEntity *camera = QAbstractNodeFactory::createNode<Qt3DCore::QEntity>("QEntity");
@@ -958,12 +958,12 @@ QTexImageDataPtr AssimpRawTextureImage::AssimpRawTextureImageFunctor::operator()
bool AssimpRawTextureImage::AssimpRawTextureImageFunctor::operator ==(const QTextureImageDataGenerator &other) const
{
const AssimpRawTextureImageFunctor *otherFunctor = functor_cast<AssimpRawTextureImageFunctor>(&other);
- return (otherFunctor != Q_NULLPTR && otherFunctor->m_data == m_data);
+ return (otherFunctor != nullptr && otherFunctor->m_data == m_data);
}
AssimpParser::SceneImporter::SceneImporter()
: m_importer(new Assimp::Importer())
- , m_aiScene(Q_NULLPTR)
+ , m_aiScene(nullptr)
{
// The Assimp::Importer manages the lifetime of the aiScene object
}
diff --git a/src/plugins/sceneparsers/gltf/gltfparser.cpp b/src/plugins/sceneparsers/gltf/gltfparser.cpp
index b1a5ffb00..a246930bb 100644
--- a/src/plugins/sceneparsers/gltf/gltfparser.cpp
+++ b/src/plugins/sceneparsers/gltf/gltfparser.cpp
@@ -239,7 +239,7 @@ Qt3DCore::QEntity* GLTFParser::node(const QString &id)
}
QJsonObject jsonObj = nodes.value(id).toObject();
- QEntity* result = Q_NULLPTR;
+ 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
@@ -275,7 +275,7 @@ Qt3DCore::QEntity* GLTFParser::node(const QString &id)
}
//If the entity contains no meshes, results will still be null here
- if (result == Q_NULLPTR)
+ if (result == nullptr)
result = new QEntity;
if ( jsonObj.contains(KEY_CHILDREN) ) {
@@ -291,7 +291,7 @@ Qt3DCore::QEntity* GLTFParser::node(const QString &id)
// Node Transforms
- Qt3DCore::QTransform *trans = Q_NULLPTR;
+ Qt3DCore::QTransform *trans = nullptr;
if ( jsonObj.contains(KEY_MATRIX) ) {
QMatrix4x4 m(Qt::Uninitialized);
@@ -302,14 +302,14 @@ Qt3DCore::QEntity* GLTFParser::node(const QString &id)
}
// ADD MATRIX TRANSFORM COMPONENT TO ENTITY
- if (trans == Q_NULLPTR)
+ if (trans == nullptr)
trans = new Qt3DCore::QTransform;
trans->setMatrix(m);
}
// Rotation quaternion
if (jsonObj.contains(KEY_ROTATION)) {
- if (trans == Q_NULLPTR)
+ if (trans == nullptr)
trans = new Qt3DCore::QTransform;
QJsonArray quaternionValues = jsonObj.value(KEY_ROTATION).toArray();
@@ -322,7 +322,7 @@ Qt3DCore::QEntity* GLTFParser::node(const QString &id)
// Translation
if (jsonObj.contains(KEY_TRANSLATION)) {
- if (trans == Q_NULLPTR)
+ if (trans == nullptr)
trans = new Qt3DCore::QTransform;
QJsonArray translationValues = jsonObj.value(KEY_TRANSLATION).toArray();
@@ -333,7 +333,7 @@ Qt3DCore::QEntity* GLTFParser::node(const QString &id)
// Scale
if (jsonObj.contains(KEY_SCALE)) {
- if (trans == Q_NULLPTR)
+ if (trans == nullptr)
trans = new Qt3DCore::QTransform;
QJsonArray scaleValues = jsonObj.value(KEY_SCALE).toArray();
@@ -343,7 +343,7 @@ Qt3DCore::QEntity* GLTFParser::node(const QString &id)
}
// Add the Transform component
- if (trans != Q_NULLPTR)
+ if (trans != nullptr)
result->addComponent(trans);
if ( jsonObj.contains(KEY_CAMERA) ) {
@@ -385,7 +385,7 @@ Qt3DCore::QEntity* GLTFParser::scene(const QString &id)
GLTFParser::BufferData::BufferData()
: length(0)
- , data(Q_NULLPTR)
+ , data(nullptr)
{
}
@@ -393,7 +393,7 @@ GLTFParser::BufferData::BufferData(QJsonObject json)
{
path = json.value(KEY_URI).toString();
length = json.value(KEY_BYTE_LENGTH).toInt();
- data = Q_NULLPTR;
+ data = nullptr;
}
GLTFParser::ParameterData::ParameterData() :
@@ -513,7 +513,7 @@ QParameter *GLTFParser::parameterFromTechnique(QTechnique *technique, const QStr
}
}
- return Q_NULLPTR;
+ return nullptr;
}
Qt3DCore::QEntity* GLTFParser::defaultScene()
@@ -543,8 +543,8 @@ QMaterial *GLTFParser::materialWithCustomShader(const QString &id, const QJsonOb
//Optional Core technique
- QTechnique *coreTechnique = Q_NULLPTR;
- QTechnique *gl2Technique = Q_NULLPTR;
+ QTechnique *coreTechnique = nullptr;
+ QTechnique *gl2Technique = nullptr;
QString coreTechniqueName = jsonObj.value(KEY_TECHNIQUE_CORE).toString();
if (!coreTechniqueName.isNull()) {
if (!m_techniques.contains(coreTechniqueName)) {
@@ -582,9 +582,9 @@ QMaterial *GLTFParser::materialWithCustomShader(const QString &id, const QJsonOb
QEffect* effect = new QEffect;
effect->setObjectName(techniqueName);
effect->addTechnique(technique);
- if (coreTechnique != Q_NULLPTR)
+ if (coreTechnique != nullptr)
effect->addTechnique(coreTechnique);
- if (gl2Technique != Q_NULLPTR)
+ if (gl2Technique != nullptr)
effect->addTechnique(gl2Technique);
QMaterial* mat = new QMaterial;
@@ -596,15 +596,15 @@ QMaterial *GLTFParser::materialWithCustomShader(const QString &id, const QJsonOb
Q_FOREACH (QString vName, values.keys()) {
QParameter *param = parameterFromTechnique(technique, vName);
- if (param == Q_NULLPTR && coreTechnique != Q_NULLPTR) {
+ if (param == nullptr && coreTechnique != nullptr) {
param = parameterFromTechnique(coreTechnique, vName);
}
- if (param == Q_NULLPTR && gl2Technique != Q_NULLPTR) {
+ if (param == nullptr && gl2Technique != nullptr) {
param = parameterFromTechnique(gl2Technique, vName);
}
- if (param == Q_NULLPTR) {
+ if (param == nullptr) {
qCWarning(GLTFParserLog) << "unknown parameter:" << vName << "in technique" << techniqueName
<< "processing material" << id;
continue;
@@ -666,7 +666,7 @@ QMaterial *GLTFParser::commonMaterial(const QJsonObject &jsonObj)
params[propertyName] = var;
}
- QMaterial *mat = Q_NULLPTR;
+ QMaterial *mat = nullptr;
if (hasNormalMap) {
if (hasSpecularMap) {
mat = new QNormalDiffuseSpecularMapMaterial;
@@ -712,7 +712,7 @@ QMaterial* GLTFParser::material(const QString &id)
QJsonObject jsonObj = mats.value(id).toObject();
- QMaterial *mat = Q_NULLPTR;
+ QMaterial *mat = nullptr;
// Prefer common materials over custom shaders.
if (jsonObj.contains(KEY_EXTENSIONS)) {
@@ -733,7 +733,7 @@ QCameraLens* GLTFParser::camera(const QString &id) const
QJsonObject cams = m_json.object().value(KEY_CAMERAS).toObject();
if (!cams.contains(id)) {
qCWarning(GLTFParserLog) << "unknown camera" << id << "in GLTF file" << m_basePath;
- return Q_NULLPTR;
+ return nullptr;
}
QJsonObject jsonObj = cams.value(id).toObject();
@@ -742,7 +742,7 @@ QCameraLens* GLTFParser::camera(const QString &id) const
if (camTy == QStringLiteral("perspective")) {
if (!jsonObj.contains(KEY_PERSPECTIVE)) {
qCWarning(GLTFParserLog) << "camera:" << id << "missing 'perspective' object";
- return Q_NULLPTR;
+ return nullptr;
}
QJsonObject pObj = jsonObj.value(KEY_PERSPECTIVE).toObject();
@@ -757,10 +757,10 @@ QCameraLens* GLTFParser::camera(const QString &id) const
} else if (camTy == QStringLiteral("orthographic")) {
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "implement me";
- return Q_NULLPTR;
+ return nullptr;
} else {
qCWarning(GLTFParserLog) << "camera:" << id << "has unsupported type:" << camTy;
- return Q_NULLPTR;
+ return nullptr;
}
}
@@ -828,7 +828,7 @@ void GLTFParser::cleanup()
m_accessorDict.clear();
//Check for Materials with no parent
Q_FOREACH (QMaterial *material, m_materialCache.values()) {
- if (material->parent() == Q_NULLPTR)
+ if (material->parent() == nullptr)
delete material;
}
m_materialCache.clear();
@@ -837,19 +837,19 @@ void GLTFParser::cleanup()
m_shaderPaths.clear();
//Check for ShaderPrograms with no parent
Q_FOREACH (QShaderProgram *program, m_programs.values()) {
- if (program->parent() == Q_NULLPTR)
+ if (program->parent() == nullptr)
delete program;
}
m_programs.clear();
//Check for Techniques with no parent
Q_FOREACH (QTechnique *technique, m_techniques.values()) {
- if (technique->parent() == Q_NULLPTR)
+ if (technique->parent() == nullptr)
delete technique;
}
m_techniques.clear();
//Check for Textures with no parent
Q_FOREACH (QAbstractTexture *texture, m_textures.values()) {
- if (texture->parent() == Q_NULLPTR)
+ if (texture->parent() == nullptr)
delete texture;
}
m_textures.clear();
@@ -977,9 +977,9 @@ void GLTFParser::processJSONTechnique(const QString &id, const QJsonObject &json
QJsonObject attrs = jsonObject.value(KEY_ATTRIBUTES).toObject();
Q_FOREACH ( QString shaderAttributeName, attrs.keys() ) {
QString pname = attrs.value(shaderAttributeName).toString();
- QParameter *parameter = paramDict.value(pname, Q_NULLPTR);
+ QParameter *parameter = paramDict.value(pname, nullptr);
QString attributeName = pname;
- if (parameter == Q_NULLPTR) {
+ if (parameter == nullptr) {
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "attribute " << pname
<< "defined in instanceProgram but not as parameter";
continue;
@@ -999,8 +999,8 @@ void GLTFParser::processJSONTechnique(const QString &id, const QJsonObject &json
QJsonObject uniforms = jsonObject.value(KEY_UNIFORMS).toObject();
Q_FOREACH (QString shaderUniformName, uniforms.keys()) {
QString pname = uniforms.value(shaderUniformName).toString();
- QParameter *parameter = paramDict.value(pname, Q_NULLPTR);
- if (parameter == Q_NULLPTR) {
+ QParameter *parameter = paramDict.value(pname, nullptr);
+ if (parameter == nullptr) {
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "uniform " << pname
<< "defined in instanceProgram but not as parameter";
continue;
@@ -1031,7 +1031,7 @@ void GLTFParser::processJSONTechnique(const QString &id, const QJsonObject &json
Q_FOREACH (QString functionName, functions.keys()) {
int enableStateType = 0;
QRenderState *renderState = buildState(functionName, functions.value(functionName), enableStateType);
- if (renderState != Q_NULLPTR) {
+ if (renderState != nullptr) {
//Remove the need to set a default state values for enableStateType
enableStates.removeOne(enableStateType);
pass->addRenderState(renderState);
@@ -1041,7 +1041,7 @@ void GLTFParser::processJSONTechnique(const QString &id, const QJsonObject &json
//Create render states with default values for any remaining enable states
Q_FOREACH (int enableState, enableStates) {
QRenderState *renderState = buildStateEnable(enableState);
- if (renderState != Q_NULLPTR)
+ if (renderState != nullptr)
pass->addRenderState(renderState);
}
@@ -1092,8 +1092,8 @@ void GLTFParser::processJSONMesh(const QString &id, const QJsonObject &json)
attributeName = attrName;
//Get buffer handle for accessor
- Qt3DRender::QBuffer *buffer = m_buffers.value(m_accessorDict[k].bufferViewName, Q_NULLPTR);
- if (buffer == Q_NULLPTR) {
+ Qt3DRender::QBuffer *buffer = m_buffers.value(m_accessorDict[k].bufferViewName, nullptr);
+ if (buffer == nullptr) {
qCWarning(GLTFParserLog) << "unknown buffer-view:" << m_accessorDict[k].bufferViewName << "processing accessor:" << id;
continue;
}
@@ -1115,8 +1115,8 @@ void GLTFParser::processJSONMesh(const QString &id, const QJsonObject &json)
qCWarning(GLTFParserLog) << "unknown index accessor:" << k << "on mesh" << id;
} else {
//Get buffer handle for accessor
- Qt3DRender::QBuffer *buffer = m_buffers.value(m_accessorDict[k].bufferViewName, Q_NULLPTR);
- if (buffer == Q_NULLPTR) {
+ Qt3DRender::QBuffer *buffer = m_buffers.value(m_accessorDict[k].bufferViewName, nullptr);
+ if (buffer == nullptr) {
qCWarning(GLTFParserLog) << "unknown buffer-view:" << m_accessorDict[k].bufferViewName << "processing accessor:" << id;
continue;
}
@@ -1203,7 +1203,7 @@ void GLTFParser::processJSONTexture(const QString &id, const QJsonObject &jsonOb
void GLTFParser::loadBufferData()
{
Q_FOREACH (QString bufferName, m_bufferDatas.keys()) {
- if (m_bufferDatas[bufferName].data == Q_NULLPTR) {
+ if (m_bufferDatas[bufferName].data == nullptr) {
QFile* bufferFile = resolveLocalData(m_bufferDatas[bufferName].path);
QByteArray *data = new QByteArray(bufferFile->readAll());
m_bufferDatas[bufferName].data = data;
@@ -1431,7 +1431,7 @@ QRenderState *GLTFParser::buildStateEnable(int state)
if (state == GL_BLEND) {
//It doesn't make sense to handle this state alone
- return Q_NULLPTR;
+ return nullptr;
}
if (state == GL_CULL_FACE) {
@@ -1456,7 +1456,7 @@ QRenderState *GLTFParser::buildStateEnable(int state)
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "unsupported render state:" << state;
- return Q_NULLPTR;
+ return nullptr;
}
QRenderState* GLTFParser::buildState(const QString& functionName, const QJsonValue &value, int &type)
@@ -1468,7 +1468,7 @@ QRenderState* GLTFParser::buildState(const QString& functionName, const QJsonVal
type = GL_BLEND;
//TODO: support render state blendColor
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "unsupported render state:" << functionName;
- return Q_NULLPTR;
+ return nullptr;
}
if (functionName == QStringLiteral("blendEquationSeparate")) {
@@ -1517,13 +1517,13 @@ QRenderState* GLTFParser::buildState(const QString& functionName, const QJsonVal
QNoDepthMask *depthMask = new QNoDepthMask;
return depthMask;
}
- return Q_NULLPTR;
+ return nullptr;
}
if (functionName == QStringLiteral("depthRange")) {
//TODO: support render state depthRange
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "unsupported render state:" << functionName;
- return Q_NULLPTR;
+ return nullptr;
}
if (functionName == QStringLiteral("frontFace")) {
@@ -1535,7 +1535,7 @@ QRenderState* GLTFParser::buildState(const QString& functionName, const QJsonVal
if (functionName == QStringLiteral("lineWidth")) {
//TODO: support render state lineWidth
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "unsupported render state:" << functionName;
- return Q_NULLPTR;
+ return nullptr;
}
if (functionName == QStringLiteral("polygonOffset")) {
@@ -1557,7 +1557,7 @@ QRenderState* GLTFParser::buildState(const QString& functionName, const QJsonVal
}
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "unsupported render state:" << functionName;
- return Q_NULLPTR;
+ return nullptr;
}
} // namespace Qt3DRender
diff --git a/src/quick3d/imports/scene3d/scene3dcleaner.cpp b/src/quick3d/imports/scene3d/scene3dcleaner.cpp
index 75bc98cdf..06b795c8a 100644
--- a/src/quick3d/imports/scene3d/scene3dcleaner.cpp
+++ b/src/quick3d/imports/scene3d/scene3dcleaner.cpp
@@ -51,7 +51,7 @@ namespace Qt3DRender {
Scene3DCleaner::Scene3DCleaner(QObject *parent)
: QObject(parent)
- , m_renderer(Q_NULLPTR)
+ , m_renderer(nullptr)
{
}
@@ -64,8 +64,8 @@ void Scene3DCleaner::cleanup()
{
Q_ASSERT(m_renderer);
delete m_renderer->m_aspectEngine; // also deletes m_renderer->m_renderAspect
- m_renderer->m_aspectEngine = Q_NULLPTR;
- m_renderer->m_renderAspect = Q_NULLPTR;
+ m_renderer->m_aspectEngine = nullptr;
+ m_renderer->m_renderAspect = nullptr;
m_renderer->deleteLater();
deleteLater();
}
diff --git a/src/quick3d/imports/scene3d/scene3ditem.cpp b/src/quick3d/imports/scene3d/scene3ditem.cpp
index 317a858e0..68f8c8aca 100644
--- a/src/quick3d/imports/scene3d/scene3ditem.cpp
+++ b/src/quick3d/imports/scene3d/scene3ditem.cpp
@@ -73,10 +73,10 @@ namespace Qt3DRender {
*/
Scene3DItem::Scene3DItem(QQuickItem *parent)
: QQuickItem(parent)
- , m_entity(Q_NULLPTR)
+ , m_entity(nullptr)
, m_aspectEngine(new Qt3DCore::QAspectEngine())
, m_renderAspect(new QRenderAspect(QRenderAspect::Synchronous))
- , m_renderer(Q_NULLPTR)
+ , m_renderer(nullptr)
, m_rendererCleaner(new Scene3DCleaner())
, m_multisample(true)
, m_cameraAspectRatioMode(AutomaticAspectRatio)
@@ -311,10 +311,10 @@ QSGNode *Scene3DItem::updatePaintNode(QSGNode *node, QQuickItem::UpdatePaintNode
// as we need to resize the FBO
if (node) {
delete node;
- node = Q_NULLPTR;
+ node = nullptr;
}
- if (m_renderer == Q_NULLPTR) {
+ if (m_renderer == nullptr) {
m_renderer = new Scene3DRenderer(this, m_aspectEngine, m_renderAspect);
m_renderer->setCleanerHelper(m_rendererCleaner);
}
diff --git a/src/quick3d/imports/scene3d/scene3drenderer.cpp b/src/quick3d/imports/scene3d/scene3drenderer.cpp
index a4071a2f3..24b42e15d 100644
--- a/src/quick3d/imports/scene3d/scene3drenderer.cpp
+++ b/src/quick3d/imports/scene3d/scene3drenderer.cpp
@@ -63,7 +63,7 @@ class ContextSaver
public:
explicit ContextSaver(QOpenGLContext *context = QOpenGLContext::currentContext())
: m_context(context),
- m_surface(context ? context->surface() : Q_NULLPTR)
+ m_surface(context ? context->surface() : nullptr)
{
}
@@ -116,9 +116,9 @@ Scene3DRenderer::Scene3DRenderer(Scene3DItem *item, Qt3DCore::QAspectEngine *asp
, m_item(item)
, m_aspectEngine(aspectEngine)
, m_renderAspect(renderAspect)
- , m_multisampledFBO(Q_NULLPTR)
- , m_finalFBO(Q_NULLPTR)
- , m_texture(Q_NULLPTR)
+ , m_multisampledFBO(nullptr)
+ , m_finalFBO(nullptr)
+ , m_texture(nullptr)
, m_multisample(false) // this value is not used, will be synced from the Scene3DItem instead
, m_lastMultisample(false)
{
@@ -175,7 +175,7 @@ void Scene3DRenderer::shutdown()
// Set to null so that subsequent calls to render
// would return early
- m_item = Q_NULLPTR;
+ m_item = nullptr;
// Shutdown the Renderer Aspect while the OpenGL context
// is still valid
@@ -186,7 +186,7 @@ void Scene3DRenderer::shutdown()
// SGThread
void Scene3DRenderer::onWindowChangedQueued(QQuickWindow *w)
{
- if (w == Q_NULLPTR) {
+ if (w == nullptr) {
qCDebug(Scene3D) << Q_FUNC_INFO << QThread::currentThread();
shutdown();
// Will only trigger something with the Loader case
@@ -234,7 +234,7 @@ void Scene3DRenderer::render()
if (m_multisampledFBO->format().samples() == 0 || !QOpenGLFramebufferObject::hasOpenGLFramebufferBlit()) {
qCDebug(Scene3D) << Q_FUNC_INFO << "Failed to create multisample framebuffer";
m_multisample = false;
- m_multisampledFBO.reset(Q_NULLPTR);
+ m_multisampledFBO.reset(nullptr);
}
}
diff --git a/src/quick3d/imports/scene3d/scene3dsgmaterial.cpp b/src/quick3d/imports/scene3d/scene3dsgmaterial.cpp
index 0fcf15782..a47d00268 100644
--- a/src/quick3d/imports/scene3d/scene3dsgmaterial.cpp
+++ b/src/quick3d/imports/scene3d/scene3dsgmaterial.cpp
@@ -59,7 +59,7 @@ namespace Qt3DRender {
*/
Scene3DSGMaterial::Scene3DSGMaterial()
: QSGMaterial()
- , m_texture(Q_NULLPTR)
+ , m_texture(nullptr)
{
}
diff --git a/src/quick3d/quick3d/items/quick3dentity.cpp b/src/quick3d/quick3d/items/quick3dentity.cpp
index 8f027e213..2ea80b017 100644
--- a/src/quick3d/quick3d/items/quick3dentity.cpp
+++ b/src/quick3d/quick3d/items/quick3dentity.cpp
@@ -72,7 +72,7 @@ QQmlListProperty<QComponent> Quick3DEntity::componentList()
void Quick3DEntity::qmlAppendComponent(QQmlListProperty<QComponent> *list, QComponent *comp)
{
- if (comp == Q_NULLPTR)
+ if (comp == nullptr)
return;
Quick3DEntity *self = static_cast<Quick3DEntity *>(list->object);
self->parentEntity()->addComponent(comp);
diff --git a/src/quick3d/quick3d/items/quick3dentityloader.cpp b/src/quick3d/quick3d/items/quick3dentityloader.cpp
index 119b2e66d..63f4cceac 100644
--- a/src/quick3d/quick3d/items/quick3dentityloader.cpp
+++ b/src/quick3d/quick3d/items/quick3dentityloader.cpp
@@ -66,9 +66,9 @@ protected:
switch (status) {
case Ready: {
- Q_ASSERT(priv->m_entity == Q_NULLPTR);
+ Q_ASSERT(priv->m_entity == nullptr);
priv->m_entity = qobject_cast<QEntity *>(object());
- Q_ASSERT(priv->m_entity != Q_NULLPTR);
+ Q_ASSERT(priv->m_entity != nullptr);
priv->m_entity->setParent(m_loader);
emit m_loader->entityChanged();
break;
@@ -134,10 +134,10 @@ void Quick3DEntityLoader::setSource(const QUrl &url)
Quick3DEntityLoaderPrivate::Quick3DEntityLoaderPrivate()
: QEntityPrivate(),
- m_incubator(Q_NULLPTR),
- m_context(Q_NULLPTR),
- m_component(Q_NULLPTR),
- m_entity(Q_NULLPTR)
+ m_incubator(nullptr),
+ m_context(nullptr),
+ m_component(nullptr),
+ m_entity(nullptr)
{
}
@@ -146,23 +146,23 @@ void Quick3DEntityLoaderPrivate::clear()
if (m_incubator) {
m_incubator->clear();
delete m_incubator;
- m_incubator = Q_NULLPTR;
+ m_incubator = nullptr;
}
if (m_entity) {
m_entity->setParent(Q_NODE_NULLPTR);
delete m_entity;
- m_entity = Q_NULLPTR;
+ m_entity = nullptr;
}
if (m_component) {
delete m_component;
- m_component = Q_NULLPTR;
+ m_component = nullptr;
}
if (m_context) {
delete m_context;
- m_context = Q_NULLPTR;
+ m_context = nullptr;
}
}
@@ -182,9 +182,9 @@ void Quick3DEntityLoaderPrivate::loadComponent(const QUrl &source)
{
Q_Q(Quick3DEntityLoader);
- Q_ASSERT(m_entity == Q_NULLPTR);
- Q_ASSERT(m_component == Q_NULLPTR);
- Q_ASSERT(m_context == Q_NULLPTR);
+ Q_ASSERT(m_entity == nullptr);
+ Q_ASSERT(m_component == nullptr);
+ Q_ASSERT(m_context == nullptr);
m_component = new QQmlComponent(qmlEngine(q), q);
QObject::connect(m_component, SIGNAL(statusChanged(QQmlComponent::Status)),
@@ -196,10 +196,10 @@ void Quick3DEntityLoaderPrivate::_q_componentStatusChanged(QQmlComponent::Status
{
Q_Q(Quick3DEntityLoader);
- Q_ASSERT(m_entity == Q_NULLPTR);
- Q_ASSERT(m_component != Q_NULLPTR);
- Q_ASSERT(m_context == Q_NULLPTR);
- Q_ASSERT(m_incubator == Q_NULLPTR);
+ Q_ASSERT(m_entity == nullptr);
+ Q_ASSERT(m_component != nullptr);
+ Q_ASSERT(m_context == nullptr);
+ Q_ASSERT(m_incubator == nullptr);
if (!m_component->errors().isEmpty()) {
QQmlEnginePrivate::warning(qmlEngine(q), m_component->errors());
diff --git a/src/quick3d/quick3d/items/quick3dnode.cpp b/src/quick3d/quick3d/items/quick3dnode.cpp
index eb6e75bae..df23b18a1 100644
--- a/src/quick3d/quick3d/items/quick3dnode.cpp
+++ b/src/quick3d/quick3d/items/quick3dnode.cpp
@@ -162,7 +162,7 @@ void Quick3DNode::childRemoved(int, QObject *obj)
if (QNode *n = qobject_cast<QNode *>(obj))
n->setParent(Q_NODE_NULLPTR);
else
- obj->setParent(Q_NULLPTR);
+ obj->setParent(nullptr);
}
} // namespace Quick
diff --git a/src/quick3d/quick3d/qqmlaspectengine.cpp b/src/quick3d/quick3d/qqmlaspectengine.cpp
index d944425c3..786548390 100644
--- a/src/quick3d/quick3d/qqmlaspectengine.cpp
+++ b/src/quick3d/quick3d/qqmlaspectengine.cpp
@@ -59,7 +59,7 @@ QQmlAspectEnginePrivate::QQmlAspectEnginePrivate()
: QObjectPrivate()
, m_qmlEngine(new QQmlEngine())
, m_aspectEngine(new QAspectEngine())
- , m_component(Q_NULLPTR)
+ , m_component(nullptr)
{
}
@@ -127,7 +127,7 @@ void QQmlAspectEngine::setSource(const QUrl &source)
if (d->m_component) {
d->m_aspectEngine->setRootEntity(QEntityPtr());
- d->m_component = Q_NULLPTR;
+ d->m_component = nullptr;
}
if (!source.isEmpty()) {
diff --git a/src/quick3d/quick3d/qqmlaspectengine.h b/src/quick3d/quick3d/qqmlaspectengine.h
index 5d93649d9..af1dd1142 100644
--- a/src/quick3d/quick3d/qqmlaspectengine.h
+++ b/src/quick3d/quick3d/qqmlaspectengine.h
@@ -57,7 +57,7 @@ class QT3DQUICKSHARED_EXPORT QQmlAspectEngine: public QObject
public:
enum Status { Null, Ready, Loading, Error };
- explicit QQmlAspectEngine(QObject *parent = Q_NULLPTR);
+ explicit QQmlAspectEngine(QObject *parent = nullptr);
Status status() const;
void setSource(const QUrl &source);
diff --git a/src/quick3d/quick3d/qt3dquick_global.cpp b/src/quick3d/quick3d/qt3dquick_global.cpp
index 4bbeedd97..78523aa4a 100644
--- a/src/quick3d/quick3d/qt3dquick_global.cpp
+++ b/src/quick3d/quick3d/qt3dquick_global.cpp
@@ -304,7 +304,7 @@ public:
break;
}
- return Q_NULLPTR;
+ return nullptr;
}
bool init(int type, QVariant& dst) Q_DECL_OVERRIDE
diff --git a/src/quick3d/quick3d/qt3dquicknodefactory.cpp b/src/quick3d/quick3d/qt3dquicknodefactory.cpp
index dc23afbb8..923793506 100644
--- a/src/quick3d/quick3d/qt3dquicknodefactory.cpp
+++ b/src/quick3d/quick3d/qt3dquicknodefactory.cpp
@@ -59,7 +59,7 @@ void QuickNodeFactory::registerType(const char *className, const char *quickName
QNode *QuickNodeFactory::createNode(const char *type)
{
if (!m_types.contains(type))
- return Q_NULLPTR;
+ return nullptr;
Type &typeInfo(m_types[type]);
@@ -68,7 +68,7 @@ QNode *QuickNodeFactory::createNode(const char *type)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
}
- return typeInfo.t ? qobject_cast<QNode *>(typeInfo.t->create()) : Q_NULLPTR;
+ return typeInfo.t ? qobject_cast<QNode *>(typeInfo.t->create()) : nullptr;
}
} // namespace Qt3DCore
diff --git a/src/quick3d/quick3d/qt3dquicknodefactory_p.h b/src/quick3d/quick3d/qt3dquicknodefactory_p.h
index dc6c1ea17..ff677da3b 100644
--- a/src/quick3d/quick3d/qt3dquicknodefactory_p.h
+++ b/src/quick3d/quick3d/qt3dquicknodefactory_p.h
@@ -71,9 +71,9 @@ public:
private:
struct Type {
- Type() : t(Q_NULLPTR), resolved(false) { }
+ Type() : t(nullptr), resolved(false) { }
Type(const char *quickName, int major, int minor)
- : quickName(quickName), version(major, minor), t(Q_NULLPTR), resolved(false) { }
+ : quickName(quickName), version(major, minor), t(nullptr), resolved(false) { }
QByteArray quickName;
QPair<int, int> version;
QQmlType *t;
diff --git a/src/quick3d/quick3dextras/qt3dquickwindow.cpp b/src/quick3d/quick3dextras/qt3dquickwindow.cpp
index 96c4bff6a..7d4ad0dd9 100644
--- a/src/quick3d/quick3dextras/qt3dquickwindow.cpp
+++ b/src/quick3d/quick3dextras/qt3dquickwindow.cpp
@@ -70,10 +70,10 @@ namespace Quick {
Qt3DQuickWindow::Qt3DQuickWindow(QWindow *parent)
: QQuickWindow(parent)
- , m_engine(Q_NULLPTR)
- , m_renderAspect(Q_NULLPTR)
- , m_inputAspect(Q_NULLPTR)
- , m_logicAspect(Q_NULLPTR)
+ , m_engine(nullptr)
+ , m_renderAspect(nullptr)
+ , m_inputAspect(nullptr)
+ , m_logicAspect(nullptr)
, m_initialized(false)
, m_cameraAspectRatioMode(AutomaticAspectRatio)
{
diff --git a/src/quick3d/quick3dextras/qt3dquickwindow.h b/src/quick3d/quick3dextras/qt3dquickwindow.h
index 83d31dbc9..321e0c453 100644
--- a/src/quick3d/quick3dextras/qt3dquickwindow.h
+++ b/src/quick3d/quick3dextras/qt3dquickwindow.h
@@ -88,7 +88,7 @@ class QT3DQUICKEXTRASSHARED_EXPORT Qt3DQuickWindow : public QQuickWindow
Q_PROPERTY(CameraAspectRatioMode cameraAspectRatioMode READ cameraAspectRatioMode WRITE setCameraAspectRatioMode NOTIFY cameraAspectRatioModeChanged)
public:
- Qt3DQuickWindow(QWindow *parent = Q_NULLPTR);
+ Qt3DQuickWindow(QWindow *parent = nullptr);
~Qt3DQuickWindow();
void registerAspect(Qt3DCore::QAbstractAspect *aspect);
diff --git a/src/quick3d/quick3dinput/items/quick3daction_p.h b/src/quick3d/quick3dinput/items/quick3daction_p.h
index b16fe32a6..8394f9c48 100644
--- a/src/quick3d/quick3dinput/items/quick3daction_p.h
+++ b/src/quick3d/quick3dinput/items/quick3daction_p.h
@@ -68,7 +68,7 @@ class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DAction : public QObject
Q_PROPERTY(QQmlListProperty<Qt3DInput::QAbstractActionInput> inputs READ qmlActionInputs CONSTANT)
Q_CLASSINFO("DefaultProperty", "inputs")
public:
- explicit Quick3DAction(QObject *parent = Q_NULLPTR);
+ explicit Quick3DAction(QObject *parent = nullptr);
inline QAction *parentAction() const { return qobject_cast<QAction *>(parent()); }
QQmlListProperty<QAbstractActionInput> qmlActionInputs();
diff --git a/src/quick3d/quick3dinput/items/quick3daxis_p.h b/src/quick3d/quick3dinput/items/quick3daxis_p.h
index 819b949d0..7eee3421a 100644
--- a/src/quick3d/quick3dinput/items/quick3daxis_p.h
+++ b/src/quick3d/quick3dinput/items/quick3daxis_p.h
@@ -68,7 +68,7 @@ class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DAxis : public QObject
Q_PROPERTY(QQmlListProperty<Qt3DInput::QAxisInput> inputs READ qmlAxisInputs CONSTANT)
Q_CLASSINFO("DefaultProperty", "inputs")
public:
- explicit Quick3DAxis(QObject *parent = Q_NULLPTR);
+ explicit Quick3DAxis(QObject *parent = nullptr);
inline QAxis *parentAxis() const { return qobject_cast<QAxis *>(parent()); }
QQmlListProperty<QAxisInput> qmlAxisInputs();
diff --git a/src/quick3d/quick3dinput/items/quick3dinputchord_p.h b/src/quick3d/quick3dinput/items/quick3dinputchord_p.h
index b65ec5f75..d9759b856 100644
--- a/src/quick3d/quick3dinput/items/quick3dinputchord_p.h
+++ b/src/quick3d/quick3dinput/items/quick3dinputchord_p.h
@@ -66,7 +66,7 @@ class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DInputChord : public QObject
Q_OBJECT
Q_PROPERTY(QQmlListProperty<Qt3DInput::QAbstractActionInput> chords READ qmlActionInputs CONSTANT)
public:
- explicit Quick3DInputChord(QObject *parent = Q_NULLPTR);
+ explicit Quick3DInputChord(QObject *parent = nullptr);
inline QInputChord *parentChord() const { return qobject_cast<QInputChord *>(parent()); }
QQmlListProperty<QAbstractActionInput> qmlActionInputs();
diff --git a/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h b/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h
index ba0c8f56d..ccf872675 100644
--- a/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h
+++ b/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h
@@ -66,7 +66,7 @@ class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DInputSequence : public QObject
Q_OBJECT
Q_PROPERTY(QQmlListProperty<Qt3DInput::QAbstractActionInput> sequences READ qmlActionInputs CONSTANT)
public:
- explicit Quick3DInputSequence(QObject *parent = Q_NULLPTR);
+ explicit Quick3DInputSequence(QObject *parent = nullptr);
inline QInputSequence *parentSequence() const { return qobject_cast<QInputSequence *>(parent()); }
QQmlListProperty<QAbstractActionInput> qmlActionInputs();
diff --git a/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h b/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h
index f0bde3ba3..5b3b36039 100644
--- a/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h
+++ b/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h
@@ -69,7 +69,7 @@ class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DLogicalDevice : public QObject
Q_PROPERTY(QQmlListProperty<Qt3DInput::QAxis> axes READ qmlAxes CONSTANT)
Q_PROPERTY(QQmlListProperty<Qt3DInput::QAction> actions READ qmlActions CONSTANT)
public:
- explicit Quick3DLogicalDevice(QObject *parent = Q_NULLPTR);
+ explicit Quick3DLogicalDevice(QObject *parent = nullptr);
inline QLogicalDevice *parentLogicalDevice() const { return qobject_cast<QLogicalDevice *>(parent()); }
QQmlListProperty<QAxis> qmlAxes();
diff --git a/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp b/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
index 99fdcccb5..8f9fe81ec 100644
--- a/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
+++ b/src/quick3d/quick3dinput/qt3dquickinputnodefactory.cpp
@@ -59,7 +59,7 @@ void QuickInputNodeFactory::registerType(const char *className, const char *quic
Qt3DCore::QNode *QuickInputNodeFactory::createNode(const char *type)
{
if (!m_types.contains(type))
- return Q_NULLPTR;
+ return nullptr;
Type &typeInfo(m_types[type]);
@@ -68,7 +68,7 @@ Qt3DCore::QNode *QuickInputNodeFactory::createNode(const char *type)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
}
- return typeInfo.t ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t->create()) : Q_NULLPTR;
+ return typeInfo.t ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t->create()) : nullptr;
}
} // namespace Qt3DInput
diff --git a/src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h b/src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h
index f53fca3ff..103152b9d 100644
--- a/src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h
+++ b/src/quick3d/quick3dinput/qt3dquickinputnodefactory_p.h
@@ -71,9 +71,9 @@ public:
private:
struct Type {
- Type() : t(Q_NULLPTR), resolved(false) { }
+ Type() : t(nullptr), resolved(false) { }
Type(const char *quickName, int major, int minor)
- : quickName(quickName), version(major, minor), t(Q_NULLPTR), resolved(false) { }
+ : quickName(quickName), version(major, minor), t(nullptr), resolved(false) { }
QByteArray quickName;
QPair<int, int> version;
QQmlType *t;
diff --git a/src/quick3d/quick3drender/items/quick3dbuffer.cpp b/src/quick3d/quick3drender/items/quick3dbuffer.cpp
index 054fd1a9d..d2f49de6f 100644
--- a/src/quick3d/quick3drender/items/quick3dbuffer.cpp
+++ b/src/quick3d/quick3drender/items/quick3dbuffer.cpp
@@ -55,8 +55,8 @@ namespace Quick {
Quick3DBuffer::Quick3DBuffer(QObject *parent)
: QObject(parent)
- , m_engine(Q_NULLPTR)
- , m_v4engine(Q_NULLPTR)
+ , m_engine(nullptr)
+ , m_v4engine(nullptr)
{
QObject::connect(parentBuffer(), &Qt3DRender::QBuffer::dataChanged, this, &Quick3DBuffer::bufferDataChanged);
}
@@ -90,7 +90,7 @@ void Quick3DBuffer::setBufferData(const QVariant &bufferData)
void Quick3DBuffer::initEngines()
{
- if (m_engine == Q_NULLPTR) {
+ if (m_engine == nullptr) {
m_engine = qmlEngine(parent());
m_v4engine = QQmlEnginePrivate::getV4Engine(m_engine);
}
diff --git a/src/quick3d/quick3drender/items/quick3dbuffer_p.h b/src/quick3d/quick3drender/items/quick3dbuffer_p.h
index da0295a0a..512e6936c 100644
--- a/src/quick3d/quick3drender/items/quick3dbuffer_p.h
+++ b/src/quick3d/quick3drender/items/quick3dbuffer_p.h
@@ -74,7 +74,7 @@ class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DBuffer : public QObject
Q_OBJECT
Q_PROPERTY(QVariant data READ bufferData WRITE setBufferData NOTIFY bufferDataChanged)
public:
- explicit Quick3DBuffer(QObject *parent = Q_NULLPTR);
+ explicit Quick3DBuffer(QObject *parent = nullptr);
inline QBuffer *parentBuffer() const { return qobject_cast<QBuffer *>(parent()); }
QVariant bufferData() const;
diff --git a/src/quick3d/quick3drender/items/quick3deffect.cpp b/src/quick3d/quick3drender/items/quick3deffect.cpp
index 51f4a613a..eb8a7f8f1 100644
--- a/src/quick3d/quick3drender/items/quick3deffect.cpp
+++ b/src/quick3d/quick3drender/items/quick3deffect.cpp
@@ -82,7 +82,7 @@ QTechnique *Quick3DEffect::techniqueAt(QQmlListProperty<QTechnique> *list, int i
Quick3DEffect *eff = qobject_cast<Quick3DEffect*>(list->object);
if (eff)
return qobject_cast<QTechnique*>(eff->parentEffect()->techniques().at(index));
- return Q_NULLPTR;
+ return nullptr;
}
int Quick3DEffect::techniqueCount(QQmlListProperty<QTechnique> *list)
diff --git a/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp b/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
index a72bd560d..2444bef4e 100644
--- a/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
+++ b/src/quick3d/quick3drender/items/quick3drendertargetoutput.cpp
@@ -71,7 +71,7 @@ QRenderTargetOutput *Quick3DRenderTargetOutput::renderAttachmentAt(QQmlListPrope
Quick3DRenderTargetOutput *rT = qobject_cast<Quick3DRenderTargetOutput *>(list->object);
if (rT)
return rT->parentRenderTarget()->outputs().at(index);
- return Q_NULLPTR;
+ return nullptr;
}
int Quick3DRenderTargetOutput::renderAttachmentCount(QQmlListProperty<QRenderTargetOutput> *list)
diff --git a/src/quick3d/quick3drender/items/quick3dtexture.cpp b/src/quick3d/quick3drender/items/quick3dtexture.cpp
index 4c7b7911b..ea0ac3f41 100644
--- a/src/quick3d/quick3drender/items/quick3dtexture.cpp
+++ b/src/quick3d/quick3drender/items/quick3dtexture.cpp
@@ -72,7 +72,7 @@ QAbstractTextureImage *Quick3DTextureExtension::textureImageAt(QQmlListProperty<
Quick3DTextureExtension *self = qobject_cast<Quick3DTextureExtension *>(list->object);
if (self)
return self->parentTexture()->textureImages().at(index);
- return Q_NULLPTR;
+ return nullptr;
}
int Quick3DTextureExtension::textureImageCount(QQmlListProperty<QAbstractTextureImage> *list)
diff --git a/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp b/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
index 044fb40da..2d9456d12 100644
--- a/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
+++ b/src/quick3d/quick3drender/qt3dquickrendernodefactory.cpp
@@ -59,7 +59,7 @@ void QuickRenderNodeFactory::registerType(const char *className, const char *qui
Qt3DCore::QNode *QuickRenderNodeFactory::createNode(const char *type)
{
if (!m_types.contains(type))
- return Q_NULLPTR;
+ return nullptr;
Type &typeInfo(m_types[type]);
@@ -68,7 +68,7 @@ Qt3DCore::QNode *QuickRenderNodeFactory::createNode(const char *type)
typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second);
}
- return typeInfo.t ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t->create()) : Q_NULLPTR;
+ return typeInfo.t ? qobject_cast<Qt3DCore::QNode *>(typeInfo.t->create()) : nullptr;
}
} // namespace Qt3DRender
diff --git a/src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h b/src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h
index 0b2161abe..9877e5b4e 100644
--- a/src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h
+++ b/src/quick3d/quick3drender/qt3dquickrendernodefactory_p.h
@@ -71,9 +71,9 @@ public:
private:
struct Type {
- Type() : t(Q_NULLPTR), resolved(false) { }
+ Type() : t(nullptr), resolved(false) { }
Type(const char *quickName, int major, int minor)
- : quickName(quickName), version(major, minor), t(Q_NULLPTR), resolved(false) { }
+ : quickName(quickName), version(major, minor), t(nullptr), resolved(false) { }
QByteArray quickName;
QPair<int, int> version;
QQmlType *t;
diff --git a/src/render/backend/backendnode.cpp b/src/render/backend/backendnode.cpp
index 89a2c797c..7054db6a4 100644
--- a/src/render/backend/backendnode.cpp
+++ b/src/render/backend/backendnode.cpp
@@ -48,7 +48,7 @@ namespace Render {
BackendNode::BackendNode(Mode mode)
: QBackendNode(mode)
- , m_renderer(Q_NULLPTR)
+ , m_renderer(nullptr)
{
}
diff --git a/src/render/backend/computecommand.cpp b/src/render/backend/computecommand.cpp
index 959dabb58..d17d4d173 100644
--- a/src/render/backend/computecommand.cpp
+++ b/src/render/backend/computecommand.cpp
@@ -75,7 +75,7 @@ void ComputeCommand::updateFromPeer(Qt3DCore::QNode *peer)
m_workGroups[0] = computeCommand->workGroupX();
m_workGroups[1] = computeCommand->workGroupY();
m_workGroups[2] = computeCommand->workGroupZ();
- if (m_renderer != Q_NULLPTR)
+ if (m_renderer != nullptr)
BackendNode::markDirty(AbstractRenderer::ComputeDirty);
}
diff --git a/src/render/backend/entity.cpp b/src/render/backend/entity.cpp
index 612565164..4b6d7b3f8 100644
--- a/src/render/backend/entity.cpp
+++ b/src/render/backend/entity.cpp
@@ -73,7 +73,7 @@ namespace Render {
Entity::Entity()
: BackendNode()
- , m_nodeManagers(Q_NULLPTR)
+ , m_nodeManagers(nullptr)
, m_boundingDirty(false)
{
}
@@ -85,9 +85,9 @@ Entity::~Entity()
void Entity::cleanup()
{
- if (m_nodeManagers != Q_NULLPTR) {
+ if (m_nodeManagers != nullptr) {
Entity *parentEntity = parent();
- if (parentEntity != Q_NULLPTR)
+ if (parentEntity != nullptr)
parentEntity->removeChildHandle(m_handle);
for (int i = 0; i < m_childrenHandles.size(); i++)
m_nodeManagers->renderNodesManager()->release(m_childrenHandles[i]);
@@ -124,11 +124,11 @@ void Entity::setParentHandle(HEntity parentHandle)
Q_ASSERT(m_nodeManagers);
// Remove ourselves from previous parent children list
Entity *parent = m_nodeManagers->renderNodesManager()->data(parentHandle);
- if (parent != Q_NULLPTR && parent->m_childrenHandles.contains(m_handle))
+ if (parent != nullptr && parent->m_childrenHandles.contains(m_handle))
parent->m_childrenHandles.remove(m_handle);
m_parentHandle = parentHandle;
parent = m_nodeManagers->renderNodesManager()->data(parentHandle);
- if (parent != Q_NULLPTR && !parent->m_childrenHandles.contains(m_handle))
+ if (parent != nullptr && !parent->m_childrenHandles.contains(m_handle))
parent->m_childrenHandles.append(m_handle);
}
@@ -260,7 +260,7 @@ void Entity::appendChildHandle(HEntity childHandle)
if (!m_childrenHandles.contains(childHandle)) {
m_childrenHandles.append(childHandle);
Entity *child = m_nodeManagers->renderNodesManager()->data(childHandle);
- if (child != Q_NULLPTR)
+ if (child != nullptr)
child->m_parentHandle = m_handle;
}
}
@@ -279,7 +279,7 @@ QVector<Entity *> Entity::children() const
childrenVector.reserve(m_childrenHandles.size());
for (HEntity handle : m_childrenHandles) {
Entity *child = m_nodeManagers->renderNodesManager()->data(handle);
- if (child != Q_NULLPTR)
+ if (child != nullptr)
childrenVector.append(child);
}
return childrenVector;
@@ -300,26 +300,26 @@ void Entity::addComponent(Qt3DCore::QComponent *component)
// The backend element is always created when this method is called
// If that's not the case something has gone wrong
- if (qobject_cast<Qt3DCore::QTransform*>(component) != Q_NULLPTR) {
+ if (qobject_cast<Qt3DCore::QTransform*>(component) != nullptr) {
m_transformComponent = component->id();
- } else if (qobject_cast<QCameraLens *>(component) != Q_NULLPTR) {
+ } else if (qobject_cast<QCameraLens *>(component) != nullptr) {
m_cameraComponent = component->id();
- } else if (qobject_cast<QLayer *>(component) != Q_NULLPTR) {
+ } else if (qobject_cast<QLayer *>(component) != nullptr) {
m_layerComponents.append(component->id());
- } else if (qobject_cast<QMaterial *>(component) != Q_NULLPTR) {
+ } else if (qobject_cast<QMaterial *>(component) != nullptr) {
m_materialComponent = component->id();
- } else if (qobject_cast<QAbstractLight *>(component) != Q_NULLPTR) {
+ } else if (qobject_cast<QAbstractLight *>(component) != nullptr) {
m_lightComponents.append(component->id());
- } else if (qobject_cast<QShaderData *>(component) != Q_NULLPTR) {
+ } else if (qobject_cast<QShaderData *>(component) != nullptr) {
m_shaderDataComponents.append(component->id());
- } else if (qobject_cast<QGeometryRenderer *>(component) != Q_NULLPTR) {
+ } else if (qobject_cast<QGeometryRenderer *>(component) != nullptr) {
m_geometryRendererComponent = component->id();
m_boundingDirty = true;
- } else if (qobject_cast<QObjectPicker *>(component) != Q_NULLPTR) {
+ } else if (qobject_cast<QObjectPicker *>(component) != nullptr) {
m_objectPickerComponent = component->id();
-// } else if (qobject_cast<QBoundingVolumeDebug *>(component) != Q_NULLPTR) {
+// } else if (qobject_cast<QBoundingVolumeDebug *>(component) != nullptr) {
// m_boundingVolumeDebugComponent = component->id();
- } else if (qobject_cast<QComputeCommand *>(component) != Q_NULLPTR) {
+ } else if (qobject_cast<QComputeCommand *>(component) != nullptr) {
m_computeComponent = component->id();
}
}
diff --git a/src/render/backend/entity_p.h b/src/render/backend/entity_p.h
index d5010e923..b35b31fb4 100644
--- a/src/render/backend/entity_p.h
+++ b/src/render/backend/entity_p.h
@@ -133,7 +133,7 @@ public:
template<class Backend>
Backend *renderComponent() const
{
- return Q_NULLPTR;
+ return nullptr;
}
template<class Backend>
diff --git a/src/render/backend/managers.cpp b/src/render/backend/managers.cpp
index c5a9985ba..7754c8682 100644
--- a/src/render/backend/managers.cpp
+++ b/src/render/backend/managers.cpp
@@ -60,7 +60,7 @@ FrameGraphNode* FrameGraphManager::lookupNode(Qt3DCore::QNodeId id) const
{
const QHash<Qt3DCore::QNodeId, FrameGraphNode*>::const_iterator it = m_nodes.find(id);
if (it == m_nodes.end())
- return Q_NULLPTR;
+ return nullptr;
else
return *it;
}
diff --git a/src/render/backend/nodemanagers_p.h b/src/render/backend/nodemanagers_p.h
index 0dbe04702..7c02216fc 100644
--- a/src/render/backend/nodemanagers_p.h
+++ b/src/render/backend/nodemanagers_p.h
@@ -135,23 +135,23 @@ public:
template<class Backend, typename Manager>
Manager *manager() const Q_DECL_NOEXCEPT
{
- return Q_NULLPTR;
+ return nullptr;
}
template<class Backend, typename Manager, typename Key>
Backend *lookupResource(const Key &id) const
{
Manager *mgr = manager<Backend, Manager>();
- if (mgr != Q_NULLPTR)
+ if (mgr != nullptr)
return mgr->lookupResource(id);
- return Q_NULLPTR;
+ return nullptr;
}
template<class Backend, typename Manager, typename Handle, typename Key>
Handle lookupHandle(const Key &id) const
{
Manager *mgr = manager<Backend, Manager>();
- if (mgr != Q_NULLPTR)
+ if (mgr != nullptr)
return mgr->lookupHandle(id);
return Handle();
}
@@ -160,9 +160,9 @@ public:
Backend *data(Handle handle)
{
Manager *mgr = manager<Backend, Manager>();
- if (mgr != Q_NULLPTR)
+ if (mgr != nullptr)
return mgr->data(handle);
- return Q_NULLPTR;
+ return nullptr;
}
diff --git a/src/render/backend/platformsurfacefilter.cpp b/src/render/backend/platformsurfacefilter.cpp
index 20750a1f8..891e30c44 100644
--- a/src/render/backend/platformsurfacefilter.cpp
+++ b/src/render/backend/platformsurfacefilter.cpp
@@ -75,8 +75,8 @@ QHash<QSurface *, bool> PlatformSurfaceFilter::m_surfacesValidity;
PlatformSurfaceFilter::PlatformSurfaceFilter(QObject *parent)
: QObject(parent)
- , m_obj(Q_NULLPTR)
- , m_surface(Q_NULLPTR)
+ , m_obj(nullptr)
+ , m_surface(nullptr)
{
qRegisterMetaType<QSurface *>("QSurface*");
}
diff --git a/src/render/backend/qgraphicsutils_p.h b/src/render/backend/qgraphicsutils_p.h
index 4992de920..40ff99f0e 100644
--- a/src/render/backend/qgraphicsutils_p.h
+++ b/src/render/backend/qgraphicsutils_p.h
@@ -264,7 +264,7 @@ public:
default: {
- float *data = Q_NULLPTR;
+ float *data = nullptr;
if (v.userType() == QMatrix3x3Type) {
QMatrix3x3 mat = v.value<QMatrix3x3>();
data = mat.data();
diff --git a/src/render/backend/rendercommand.cpp b/src/render/backend/rendercommand.cpp
index cbb24c70b..7ab072e79 100644
--- a/src/render/backend/rendercommand.cpp
+++ b/src/render/backend/rendercommand.cpp
@@ -46,7 +46,7 @@ namespace Render {
RenderCommand::RenderCommand()
: m_instancesCount(0)
- , m_stateSet(Q_NULLPTR)
+ , m_stateSet(nullptr)
, m_depth(0.0f)
, m_changeCost(0)
, m_type(RenderCommand::Draw)
diff --git a/src/render/backend/renderer.cpp b/src/render/backend/renderer.cpp
index c6589fd13..3838adb27 100644
--- a/src/render/backend/renderer.cpp
+++ b/src/render/backend/renderer.cpp
@@ -121,9 +121,9 @@ const QString SCENE_PARSERS_PATH = QStringLiteral("/sceneparsers");
Renderer shutdown procedure:
Since the renderer relies on the surface and OpenGLContext to perform its cleanup,
- it is shutdown when the surface is set to Q_NULLPTR
+ it is shutdown when the surface is set to nullptr
- When the surface is set to Q_NULLPTR this will request the RenderThread to terminate
+ When the surface is set to nullptr this will request the RenderThread to terminate
and will prevent createRenderBinJobs from returning a set of jobs as there is nothing
more to be rendered.
@@ -136,23 +136,23 @@ const QString SCENE_PARSERS_PATH = QStringLiteral("/sceneparsers");
*/
Renderer::Renderer(QRenderAspect::RenderType type)
- : m_services(Q_NULLPTR)
- , m_nodesManager(Q_NULLPTR)
- , m_defaultMaterial(Q_NULLPTR)
- , m_defaultRenderStateSet(Q_NULLPTR)
- , m_graphicsContext(Q_NULLPTR)
+ : m_services(nullptr)
+ , m_nodesManager(nullptr)
+ , m_defaultMaterial(nullptr)
+ , m_defaultRenderStateSet(nullptr)
+ , m_graphicsContext(nullptr)
, m_renderQueue(new RenderQueue())
- , m_renderThread(type == QRenderAspect::Threaded ? new RenderThread(this) : Q_NULLPTR)
+ , m_renderThread(type == QRenderAspect::Threaded ? new RenderThread(this) : nullptr)
, m_vsyncFrameAdvanceService(new VSyncFrameAdvanceService())
, m_waitForInitializationToBeCompleted(0)
, m_pickEventFilter(new PickEventFilter())
, m_exposed(0)
, m_changeSet(0)
, m_lastFrameCorrect(0)
- , m_glContext(Q_NULLPTR)
- , m_pickBoundingVolumeJob(Q_NULLPTR)
+ , m_glContext(nullptr)
+ , m_pickBoundingVolumeJob(nullptr)
, m_time(0)
- , m_settings(Q_NULLPTR)
+ , m_settings(nullptr)
{
// Set renderer as running - it will wait in the context of the
// RenderThread for RenderViews to be submitted
@@ -326,7 +326,7 @@ void Renderer::destroyThreadLocalAllocator(void *renderer)
allocator->clear();
// Setting the local data to null actually deletes the allocatorQeue
// as the tls object takes ownership of pointers
- theRenderer->tlsAllocators()->setLocalData(Q_NULLPTR);
+ theRenderer->tlsAllocators()->setLocalData(nullptr);
}
}
@@ -382,7 +382,7 @@ void Renderer::initialize()
void Renderer::shutdown()
{
// Clean up the graphics context
- m_graphicsContext.reset(Q_NULLPTR);
+ m_graphicsContext.reset(nullptr);
qCDebug(Backend) << Q_FUNC_INFO << "Renderer properly shutdown";
}
@@ -657,9 +657,9 @@ Renderer::ViewSubmissionResultData Renderer::submitRenderViews(const QVector<Ren
// We might not want to render on the default FBO
bool boundFboIdValid = false;
uint lastBoundFBOId = 0;
- QSurface *surface = Q_NULLPTR;
- QSurface *previousSurface = Q_NULLPTR;
- QSurface *lastUsedSurface = Q_NULLPTR;
+ QSurface *surface = nullptr;
+ QSurface *previousSurface = nullptr;
+ QSurface *lastUsedSurface = nullptr;
for (int i = 0; i < renderViewsCount; ++i) {
// Initialize GraphicsContext for drawing
// If the RenderView has a RenderStateSet defined
@@ -858,7 +858,7 @@ QAbstractFrameAdvanceService *Renderer::frameAdvanceService() const
void Renderer::performDraw(GeometryRenderer *rGeometryRenderer, GLsizei primitiveCount, Attribute *indexAttribute)
{
const GLint primType = rGeometryRenderer->primitiveType();
- const bool drawIndexed = indexAttribute != Q_NULLPTR;
+ const bool drawIndexed = indexAttribute != nullptr;
const GLint indexType = drawIndexed ? GraphicsContext::glDataTypeFromAttributeDataType(indexAttribute->vertexBaseType()) : 0;
if (rGeometryRenderer->primitiveType() == QGeometryRenderer::Patches)
@@ -899,7 +899,7 @@ void Renderer::performDraw(GeometryRenderer *rGeometryRenderer, GLsizei primitiv
void Renderer::performCompute(const RenderView *, RenderCommand *command)
{
Shader *shader = m_nodesManager->data<Shader, ShaderManager>(command->m_shader);
- if (shader != Q_NULLPTR) {
+ if (shader != nullptr) {
m_graphicsContext->activateShader(shader);
m_graphicsContext->setParameters(command->m_parameterPack);
m_graphicsContext->dispatchCompute(command->m_workGroups[0],
@@ -956,7 +956,7 @@ bool Renderer::executeCommands(const RenderView *rv)
// Save the RenderView base stateset
RenderStateSet *globalState = m_graphicsContext->currentStateSet();
- OpenGLVertexArrayObject *vao = Q_NULLPTR;
+ OpenGLVertexArrayObject *vao = nullptr;
HVao previousVaoHandle;
for (RenderCommand *command : qAsConst(commands)) {
@@ -968,7 +968,7 @@ bool Renderer::executeCommands(const RenderView *rv)
// Check if we have a valid GeometryRenderer + Geometry
Geometry *rGeometry = m_nodesManager->data<Geometry, GeometryManager>(command->m_geometry);
GeometryRenderer *rGeometryRenderer = m_nodesManager->data<GeometryRenderer, GeometryRendererManager>(command->m_geometryRenderer);
- const bool hasGeometryRenderer = rGeometry != Q_NULLPTR && rGeometryRenderer != Q_NULLPTR && !rGeometry->attributes().isEmpty();
+ const bool hasGeometryRenderer = rGeometry != nullptr && rGeometryRenderer != nullptr && !rGeometry->attributes().isEmpty();
if (!hasGeometryRenderer) {
allCommandsIssued = false;
@@ -977,7 +977,7 @@ bool Renderer::executeCommands(const RenderView *rv)
}
Shader *shader = m_nodesManager->data<Shader, ShaderManager>(command->m_shader);
- if (shader == Q_NULLPTR) {
+ if (shader == nullptr) {
shader = m_defaultRenderShader;
command->m_parameterPack = m_defaultUniformPack;
}
@@ -997,7 +997,7 @@ bool Renderer::executeCommands(const RenderView *rv)
// Uniform and Attributes info from the shader
// Otherwise we might create a VAO without attribute bindings as the RenderCommand had no way to know about attributes
// Before the shader was loader
- Attribute *indexAttribute = Q_NULLPTR;
+ Attribute *indexAttribute = nullptr;
bool specified = false;
const bool requiresVAOUpdate = (!vao || !vao->isSpecified()) || (rGeometry->isDirty() || rGeometryRenderer->isDirty());
GLsizei primitiveCount = rGeometryRenderer->vertexCount();
@@ -1007,7 +1007,7 @@ bool Renderer::executeCommands(const RenderView *rv)
if (rGeometry->isDirty())
m_dirtyGeometry.push_back(rGeometry);
- if (needsToBindVAO && vao != Q_NULLPTR)
+ if (needsToBindVAO && vao != nullptr)
vao->bind();
if (!command->m_attributes.isEmpty()) {
@@ -1026,7 +1026,7 @@ bool Renderer::executeCommands(const RenderView *rv)
RenderStateSet *localState = command->m_stateSet;
// Merge the RenderCommand state with the globalState of the RenderView
// Or restore the globalState if no stateSet for the RenderCommand
- if (localState != Q_NULLPTR) {
+ if (localState != nullptr) {
command->m_stateSet->merge(globalState);
m_graphicsContext->setCurrentStateSet(command->m_stateSet);
} else {
@@ -1067,7 +1067,7 @@ bool Renderer::executeCommands(const RenderView *rv)
Attribute *Renderer::updateBuffersAndAttributes(Geometry *geometry, RenderCommand *command, GLsizei &count, bool forceUpdate)
{
- Attribute *indexAttribute = Q_NULLPTR;
+ Attribute *indexAttribute = nullptr;
uint estimatedCount = 0;
m_dirtyAttributes.reserve(m_dirtyAttributes.size() + geometry->attributes().size());
@@ -1076,12 +1076,12 @@ Attribute *Renderer::updateBuffersAndAttributes(Geometry *geometry, RenderComman
// TO DO: Improvement we could store handles and use the non locking policy on the attributeManager
Attribute *attribute = m_nodesManager->attributeManager()->lookupResource(attributeId);
- if (attribute == Q_NULLPTR)
+ if (attribute == nullptr)
continue;
Buffer *buffer = m_nodesManager->bufferManager()->lookupResource(attribute->bufferId());
- if (buffer == Q_NULLPTR)
+ if (buffer == nullptr)
continue;
if (buffer->isDirty()) {
diff --git a/src/render/backend/renderer_p.h b/src/render/backend/renderer_p.h
index 091365124..3f68f8ca3 100644
--- a/src/render/backend/renderer_p.h
+++ b/src/render/backend/renderer_p.h
@@ -201,7 +201,7 @@ public:
{
ViewSubmissionResultData()
: lastBoundFBOId(0)
- , surface(Q_NULLPTR)
+ , surface(nullptr)
{}
uint lastBoundFBOId;
diff --git a/src/render/backend/rendersettings.cpp b/src/render/backend/rendersettings.cpp
index 2db27c8f2..c17a811cf 100644
--- a/src/render/backend/rendersettings.cpp
+++ b/src/render/backend/rendersettings.cpp
@@ -110,9 +110,9 @@ RenderSettingsFunctor::RenderSettingsFunctor(AbstractRenderer *renderer)
Qt3DCore::QBackendNode *RenderSettingsFunctor::create(Qt3DCore::QNode *frontend) const
{
QRenderSettings *settingsFrontend = static_cast<QRenderSettings *>(frontend);
- if (m_renderer->settings() != Q_NULLPTR) {
+ if (m_renderer->settings() != nullptr) {
qWarning() << "Renderer settings already exists";
- return Q_NULLPTR;
+ return nullptr;
}
RenderSettings *settings = new RenderSettings;
@@ -125,9 +125,9 @@ Qt3DCore::QBackendNode *RenderSettingsFunctor::create(Qt3DCore::QNode *frontend)
Qt3DCore::QBackendNode *RenderSettingsFunctor::create(const Qt3DCore::QNodeCreatedChangeBasePtr &change) const
{
Q_UNUSED(change);
- if (m_renderer->settings() != Q_NULLPTR) {
+ if (m_renderer->settings() != nullptr) {
qWarning() << "Renderer settings already exists";
- return Q_NULLPTR;
+ return nullptr;
}
RenderSettings *settings = new RenderSettings;
@@ -139,14 +139,14 @@ Qt3DCore::QBackendNode *RenderSettingsFunctor::create(const Qt3DCore::QNodeCreat
Qt3DCore::QBackendNode *RenderSettingsFunctor::get(Qt3DCore::QNodeId id) const
{
Q_UNUSED(id);
- return Q_NULLPTR;
+ return nullptr;
}
void RenderSettingsFunctor::destroy(Qt3DCore::QNodeId id) const
{
Q_UNUSED(id);
// Deletes the old settings object
- m_renderer->setSettings(Q_NULLPTR);
+ m_renderer->setSettings(nullptr);
}
} // namespace Render
diff --git a/src/render/backend/renderview.cpp b/src/render/backend/renderview.cpp
index 5ca3f2f3c..10f2d7e4e 100644
--- a/src/render/backend/renderview.cpp
+++ b/src/render/backend/renderview.cpp
@@ -268,15 +268,15 @@ QUniformValue RenderView::eyePosition(const QMatrix4x4 &model) const
}
RenderView::RenderView()
- : m_renderer(Q_NULLPTR)
+ : m_renderer(nullptr)
, m_devicePixelRatio(1.)
- , m_allocator(Q_NULLPTR)
- , m_data(Q_NULLPTR)
- , m_clearColor(Q_NULLPTR)
- , m_viewport(Q_NULLPTR)
- , m_surface(Q_NULLPTR)
+ , m_allocator(nullptr)
+ , m_data(nullptr)
+ , m_clearColor(nullptr)
+ , m_viewport(nullptr)
+ , m_surface(nullptr)
, m_clearBuffer(QClearBuffers::None)
- , m_stateSet(Q_NULLPTR)
+ , m_stateSet(nullptr)
, m_noDraw(false)
, m_compute(false)
, m_frustumCulling(false)
@@ -303,12 +303,12 @@ RenderView::RenderView()
RenderView::~RenderView()
{
- if (m_allocator == Q_NULLPTR) // Mainly needed for unit tests
+ if (m_allocator == nullptr) // Mainly needed for unit tests
return;
for (RenderCommand *command : qAsConst(m_commands)) {
- if (command->m_stateSet != Q_NULLPTR) // We do not delete the RenderState as that is stored statically
+ if (command->m_stateSet != nullptr) // We do not delete the RenderState as that is stored statically
m_allocator->deallocate<RenderStateSet>(command->m_stateSet);
// Deallocate RenderCommand
@@ -334,7 +334,7 @@ RenderView::~RenderView()
void RenderView::operator delete(void *ptr)
{
RenderView *rView = static_cast<RenderView *>(ptr);
- if (rView != Q_NULLPTR && rView->m_allocator != Q_NULLPTR)
+ if (rView != nullptr && rView->m_allocator != nullptr)
rView->m_allocator->deallocateRawMemory(rView, sizeof(RenderView));
}
@@ -342,7 +342,7 @@ void RenderView::operator delete(void *ptr)
void RenderView::operator delete(void *ptr, void *)
{
RenderView *rView = static_cast<RenderView *>(ptr);
- if (rView != Q_NULLPTR && rView->m_allocator != Q_NULLPTR)
+ if (rView != nullptr && rView->m_allocator != nullptr)
rView->m_allocator->deallocateRawMemory(rView, sizeof(RenderView));
}
@@ -405,9 +405,9 @@ void RenderView::setRenderer(Renderer *renderer)
RenderRenderPassList RenderView::passesAndParameters(ParameterInfoList *parameters, Entity *node, bool useDefaultMaterial)
{
// Find the material, effect, technique and set of render passes to use
- Material *material = Q_NULLPTR;
- Effect *effect = Q_NULLPTR;
- if ((material = node->renderComponent<Material>()) != Q_NULLPTR && material->isEnabled())
+ Material *material = nullptr;
+ Effect *effect = nullptr;
+ if ((material = node->renderComponent<Material>()) != nullptr && material->isEnabled())
effect = m_renderer->nodeManagers()->effectManager()->lookupResource(material->effect());
Technique *technique = findTechniqueForEffect(m_renderer, this, effect);
@@ -521,10 +521,10 @@ void RenderView::buildDrawRenderCommands(Entity *node, const Plane *planes)
if (m_frustumCulling && isEntityFrustumCulled(node, planes))
return;
- GeometryRenderer *geometryRenderer = Q_NULLPTR;
+ GeometryRenderer *geometryRenderer = nullptr;
HGeometryRenderer geometryRendererHandle = node->componentHandle<GeometryRenderer, 16>();
if (!geometryRendererHandle.isNull()
- && (geometryRenderer = m_manager->geometryRendererManager()->data(geometryRendererHandle)) != Q_NULLPTR
+ && (geometryRenderer = m_manager->geometryRendererManager()->data(geometryRendererHandle)) != nullptr
&& geometryRenderer->isEnabled()
&& !geometryRenderer->geometryId().isNull()) {
@@ -552,7 +552,7 @@ void RenderView::buildDrawRenderCommands(Entity *node, const Plane *planes)
// Merge per pass stateset with global stateset
// so that the local stateset only overrides
- if (m_stateSet != Q_NULLPTR)
+ if (m_stateSet != nullptr)
command->m_stateSet->merge(m_stateSet);
command->m_changeCost = m_renderer->defaultRenderState()->changeCost(command->m_stateSet);
}
@@ -583,9 +583,9 @@ void RenderView::buildComputeRenderCommands(Entity *node)
// enabled flag
// layer component
// material/effect/technique/parameters/filters/
- ComputeCommand *computeJob = Q_NULLPTR;
+ ComputeCommand *computeJob = nullptr;
if (node->componentHandle<ComputeCommand, 16>() != HComputeCommand()
- && (computeJob = node->renderComponent<ComputeCommand>()) != Q_NULLPTR
+ && (computeJob = node->renderComponent<ComputeCommand>()) != nullptr
&& computeJob->isEnabled()) {
ParameterInfoList parameters;
@@ -613,7 +613,7 @@ void RenderView::buildComputeRenderCommands(Entity *node)
void RenderView::setUniformValue(ShaderParameterPack &uniformPack, int nameId, const QVariant &value)
{
- Texture *tex = Q_NULLPTR;
+ Texture *tex = nullptr;
// At this point a uniform value can only be a scalar type
// or a Qt3DCore::QNodeId corresponding to a Texture
// ShaderData/Buffers would be handled as UBO/SSBO and would therefore
@@ -622,7 +622,7 @@ void RenderView::setUniformValue(ShaderParameterPack &uniformPack, int nameId, c
// Speed up conversion to avoid using QVariant::value()
const Qt3DCore::QNodeId texId = variant_value<Qt3DCore::QNodeId>(value);
if ((tex = m_manager->textureManager()->lookupResource(texId))
- != Q_NULLPTR) {
+ != nullptr) {
uniformPack.setTexture(nameId, tex->peerId());
//TextureUniform *texUniform = m_allocator->allocate<TextureUniform>();
QUniformValue texUniform;
@@ -649,8 +649,8 @@ void RenderView::setUniformBlockValue(ShaderParameterPack &uniformPack,
if (static_cast<QMetaType::Type>(value.userType()) == qNodeIdTypeId) {
- Buffer *buffer = Q_NULLPTR;
- if ((buffer = m_manager->bufferManager()->lookupResource(variant_value<Qt3DCore::QNodeId>(value))) != Q_NULLPTR) {
+ Buffer *buffer = nullptr;
+ if ((buffer = m_manager->bufferManager()->lookupResource(variant_value<Qt3DCore::QNodeId>(value))) != nullptr) {
BlockToUBO uniformBlockUBO;
uniformBlockUBO.m_blockIndex = block.m_index;
uniformBlockUBO.m_bufferID = buffer->peerId();
@@ -659,8 +659,8 @@ void RenderView::setUniformBlockValue(ShaderParameterPack &uniformPack,
}
- //ShaderData *shaderData = Q_NULLPTR;
- // if ((shaderData = m_manager->shaderDataManager()->lookupResource(value.value<Qt3DCore::QNodeId>())) != Q_NULLPTR) {
+ //ShaderData *shaderData = nullptr;
+ // if ((shaderData = m_manager->shaderDataManager()->lookupResource(value.value<Qt3DCore::QNodeId>())) != nullptr) {
// UBO are indexed by <ShaderId, ShaderDataId> so that a same QShaderData can be used among different shaders
// while still making sure that if they have a different layout everything will still work
// If two shaders define the same block with the exact same layout, in that case the UBO could be shared
@@ -717,8 +717,8 @@ void RenderView::setShaderStorageValue(ShaderParameterPack &uniformPack,
{
Q_UNUSED(shader)
if (static_cast<QMetaType::Type>(value.userType()) == qNodeIdTypeId) {
- Buffer *buffer = Q_NULLPTR;
- if ((buffer = m_manager->bufferManager()->lookupResource(variant_value<Qt3DCore::QNodeId>(value))) != Q_NULLPTR) {
+ Buffer *buffer = nullptr;
+ if ((buffer = m_manager->bufferManager()->lookupResource(variant_value<Qt3DCore::QNodeId>(value))) != nullptr) {
BlockToSSBO shaderStorageBlock;
shaderStorageBlock.m_blockIndex = block.m_index;
shaderStorageBlock.m_bufferID = buffer->peerId();
@@ -788,11 +788,11 @@ void RenderView::setShaderAndUniforms(RenderCommand *command, RenderPass *rPass,
// For each ParameterBinder in the RenderPass -> create a QUniformPack
// Once that works, improve that to try and minimize QUniformPack updates
- if (rPass != Q_NULLPTR) {
+ if (rPass != nullptr) {
// Index Shader by Shader UUID
command->m_shader = m_manager->lookupHandle<Shader, ShaderManager, HShader>(rPass->shaderProgram());
- Shader *shader = Q_NULLPTR;
- if ((shader = m_manager->data<Shader, ShaderManager>(command->m_shader)) != Q_NULLPTR) {
+ Shader *shader = nullptr;
+ if ((shader = m_manager->data<Shader, ShaderManager>(command->m_shader)) != nullptr) {
command->m_shaderDna = shader->dna();
// Builds the QUniformPack, sets shader standard uniforms and store attributes name / glname bindings
@@ -846,9 +846,9 @@ void RenderView::setShaderAndUniforms(RenderCommand *command, RenderPass *rPass,
setShaderStorageValue(command->m_parameterPack, shader, shader->storageBlockForBlockNameId(it->nameId), it->value);
} else { // Parameter is a struct
const QVariant &v = it->value;
- ShaderData *shaderData = Q_NULLPTR;
+ ShaderData *shaderData = nullptr;
if (static_cast<QMetaType::Type>(v.userType()) == qNodeIdTypeId &&
- (shaderData = m_manager->shaderDataManager()->lookupResource(variant_value<Qt3DCore::QNodeId>(v))) != Q_NULLPTR) {
+ (shaderData = m_manager->shaderDataManager()->lookupResource(variant_value<Qt3DCore::QNodeId>(v))) != nullptr) {
// Try to check if we have a struct or array matching a QShaderData parameter
setDefaultUniformBlockShaderDataValue(command->m_parameterPack, shader, shaderData, StringToInt::lookupString(it->nameId));
}
diff --git a/src/render/backend/renderview_p.h b/src/render/backend/renderview_p.h
index f47871874..b5169a712 100644
--- a/src/render/backend/renderview_p.h
+++ b/src/render/backend/renderview_p.h
@@ -253,10 +253,10 @@ public:
// But that aren't used later by the Renderer
struct InnerData {
InnerData()
- : m_renderCamera(Q_NULLPTR)
- , m_techniqueFilter(Q_NULLPTR)
- , m_passFilter(Q_NULLPTR)
- , m_viewMatrix(Q_NULLPTR)
+ : m_renderCamera(nullptr)
+ , m_techniqueFilter(nullptr)
+ , m_passFilter(nullptr)
+ , m_viewMatrix(nullptr)
{
}
CameraLens *m_renderCamera;
@@ -272,7 +272,7 @@ public:
};
struct LightSource {
- LightSource() : entity(Q_NULLPTR) { }
+ LightSource() : entity(nullptr) { }
LightSource(Entity *entity, const QList<Light *> &lights)
: entity(entity), lights(lights) { }
Entity *entity;
diff --git a/src/render/backend/triangleboundingvolume.cpp b/src/render/backend/triangleboundingvolume.cpp
index dcb539550..9a2b26310 100644
--- a/src/render/backend/triangleboundingvolume.cpp
+++ b/src/render/backend/triangleboundingvolume.cpp
@@ -118,7 +118,7 @@ bool TriangleBoundingVolume::intersects(const QRay3D &ray, QVector3D *q) const
QVector3D uvw;
const float intersected = intersectsSegmentTriangle(ray, m_c, m_b, m_a, uvw, t);
- if (intersected && q != Q_NULLPTR)
+ if (intersected && q != nullptr)
*q = ray.origin() + t * ray.direction();
return intersected;
diff --git a/src/render/backend/trianglesvisitor.cpp b/src/render/backend/trianglesvisitor.cpp
index c2cff33d3..50a9a4046 100644
--- a/src/render/backend/trianglesvisitor.cpp
+++ b/src/render/backend/trianglesvisitor.cpp
@@ -465,14 +465,14 @@ void TrianglesVisitor::apply(const GeometryRenderer *renderer, const Qt3DCore::Q
{
m_nodeId = id;
if (renderer && renderer->instanceCount() == 1 && isTriangleBased(renderer->primitiveType())) {
- Attribute *positionAttribute = Q_NULLPTR;
- Attribute *indexAttribute = Q_NULLPTR;
- Buffer *positionBuffer = Q_NULLPTR;
- Buffer *indexBuffer = Q_NULLPTR;
+ Attribute *positionAttribute = nullptr;
+ Attribute *indexAttribute = nullptr;
+ Buffer *positionBuffer = nullptr;
+ Buffer *indexBuffer = nullptr;
Geometry *geom = m_manager->lookupResource<Geometry, GeometryManager>(renderer->geometryId());
if (geom) {
- Qt3DRender::Render::Attribute *attribute = Q_NULLPTR;
+ Qt3DRender::Render::Attribute *attribute = nullptr;
const auto attrIds = geom->attributes();
for (const Qt3DCore::QNodeId attrId : attrIds) {
attribute = m_manager->lookupResource<Attribute, AttributeManager>(attrId);
diff --git a/src/render/framegraph/cameraselectornode.cpp b/src/render/framegraph/cameraselectornode.cpp
index 2ed148ee9..aaea9c41a 100644
--- a/src/render/framegraph/cameraselectornode.cpp
+++ b/src/render/framegraph/cameraselectornode.cpp
@@ -61,7 +61,7 @@ void CameraSelector::updateFromPeer(Qt3DCore::QNode *peer)
{
QCameraSelector *selector = static_cast<QCameraSelector *>(peer);
m_cameraUuid = QNodeId();
- if (selector->camera() != Q_NULLPTR)
+ if (selector->camera() != nullptr)
m_cameraUuid = selector->camera()->id();
}
diff --git a/src/render/framegraph/framegraphnode.cpp b/src/render/framegraph/framegraphnode.cpp
index c61037ade..23ea95acf 100644
--- a/src/render/framegraph/framegraphnode.cpp
+++ b/src/render/framegraph/framegraphnode.cpp
@@ -49,13 +49,13 @@ namespace Render {
FrameGraphNode::FrameGraphNode()
: BackendNode()
, m_nodeType(InvalidNodeType)
- , m_manager(Q_NULLPTR)
+ , m_manager(nullptr)
{
}
FrameGraphNode::FrameGraphNode(FrameGraphNodeType nodeType)
: m_nodeType(nodeType)
- , m_manager(Q_NULLPTR)
+ , m_manager(nullptr)
{
}
@@ -85,7 +85,7 @@ void FrameGraphNode::setParentId(Qt3DCore::QNodeId parentId)
if (m_parentId != parentId) {
m_parentId = parentId;
FrameGraphNode *parent = m_manager->lookupNode(m_parentId);
- if (parent != Q_NULLPTR && !parent->m_childrenIds.contains(peerId()))
+ if (parent != nullptr && !parent->m_childrenIds.contains(peerId()))
parent->m_childrenIds.append(peerId());
}
}
@@ -94,7 +94,7 @@ void FrameGraphNode::appendChildId(Qt3DCore::QNodeId childId)
{
if (!m_childrenIds.contains(childId)) {
FrameGraphNode *child = m_manager->lookupNode(childId);
- if (child != Q_NULLPTR) {
+ if (child != nullptr) {
m_childrenIds.append(childId);
child->m_parentId = peerId();
}
@@ -105,7 +105,7 @@ void FrameGraphNode::removeChildId(Qt3DCore::QNodeId childId)
{
if (m_childrenIds.contains(childId)) {
FrameGraphNode *child = m_manager->lookupNode(childId);
- if (child != Q_NULLPTR) {
+ if (child != nullptr) {
child->m_parentId = Qt3DCore::QNodeId();
}
m_childrenIds.removeAll(childId);
@@ -134,7 +134,7 @@ QList<FrameGraphNode *> FrameGraphNode::children() const
for (Qt3DCore::QNodeId id : m_childrenIds) {
FrameGraphNode *child = m_manager->lookupNode(id);
- if (child != Q_NULLPTR)
+ if (child != nullptr)
children << child;
}
return children;
diff --git a/src/render/framegraph/framegraphnode_p.h b/src/render/framegraph/framegraphnode_p.h
index acd5548c0..8c8354250 100644
--- a/src/render/framegraph/framegraphnode_p.h
+++ b/src/render/framegraph/framegraphnode_p.h
@@ -153,7 +153,7 @@ protected:
Backend *createBackendFrameGraphNode(Qt3DCore::QNode *n) const
{
Frontend *f = qobject_cast<Frontend *>(n);
- if (f != Q_NULLPTR) {
+ if (f != nullptr) {
if (!m_manager->containsNode(n->id())) {
Backend *backend = new Backend();
backend->setFrameGraphManager(m_manager);
@@ -167,7 +167,7 @@ protected:
}
return static_cast<Backend *>(m_manager->lookupNode(n->id()));
}
- return Q_NULLPTR;
+ return nullptr;
}
Backend *createBackendFrameGraphNode(const Qt3DCore::QNodeCreatedChangeBasePtr &change) const
diff --git a/src/render/framegraph/framegraphvisitor.cpp b/src/render/framegraph/framegraphvisitor.cpp
index 204f1e0a9..7142d8df8 100644
--- a/src/render/framegraph/framegraphvisitor.cpp
+++ b/src/render/framegraph/framegraphvisitor.cpp
@@ -50,8 +50,8 @@ namespace Qt3DRender {
namespace Render {
FrameGraphVisitor::FrameGraphVisitor()
- : m_renderer(Q_NULLPTR)
- , m_jobs(Q_NULLPTR)
+ : m_renderer(nullptr)
+ , m_jobs(nullptr)
, m_renderviewIndex(0)
{
@@ -71,7 +71,7 @@ void FrameGraphVisitor::traverse(FrameGraphNode *root,
// Kick off the traversal
Render::FrameGraphNode *node = root;
- if (node == Q_NULLPTR)
+ if (node == nullptr)
qCritical() << Q_FUNC_INFO << "FrameGraph is null";
visit(node);
}
diff --git a/src/render/framegraph/qcameraselector.cpp b/src/render/framegraph/qcameraselector.cpp
index 452bd71f2..00ace9694 100644
--- a/src/render/framegraph/qcameraselector.cpp
+++ b/src/render/framegraph/qcameraselector.cpp
@@ -60,7 +60,7 @@ QCameraSelector::QCameraSelector(QCameraSelectorPrivate &dd, QNode *parent)
QCameraSelectorPrivate::QCameraSelectorPrivate()
: QFrameGraphNodePrivate()
- , m_camera(Q_NULLPTR)
+ , m_camera(nullptr)
{
}
diff --git a/src/render/framegraph/qcameraselector.h b/src/render/framegraph/qcameraselector.h
index 9ed2b17a1..0389d4c6c 100644
--- a/src/render/framegraph/qcameraselector.h
+++ b/src/render/framegraph/qcameraselector.h
@@ -55,7 +55,7 @@ class QT3DRENDERSHARED_EXPORT QCameraSelector : public QFrameGraphNode
Q_PROPERTY(Qt3DCore::QEntity *camera READ camera WRITE setCamera NOTIFY cameraChanged)
public:
- explicit QCameraSelector(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QCameraSelector(Qt3DCore::QNode *parent = nullptr);
Qt3DCore::QEntity *camera() const;
@@ -66,7 +66,7 @@ Q_SIGNALS:
void cameraChanged(Qt3DCore::QEntity *camera);
protected:
- QCameraSelector(QCameraSelectorPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QCameraSelector(QCameraSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QCameraSelector)
diff --git a/src/render/framegraph/qdispatchcompute.h b/src/render/framegraph/qdispatchcompute.h
index 24a4fced1..1ec66cfe4 100644
--- a/src/render/framegraph/qdispatchcompute.h
+++ b/src/render/framegraph/qdispatchcompute.h
@@ -56,7 +56,7 @@ class QT3DRENDERSHARED_EXPORT QDispatchCompute : public QFrameGraphNode
Q_PROPERTY(int workGroupY READ workGroupY WRITE setWorkGroupY NOTIFY workGroupYChanged)
Q_PROPERTY(int workGroupZ READ workGroupZ WRITE setWorkGroupZ NOTIFY workGroupZChanged)
public:
- explicit QDispatchCompute(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QDispatchCompute(Qt3DCore::QNode *parent = nullptr);
int workGroupX() const;
int workGroupY() const;
diff --git a/src/render/framegraph/qframegraphnode.cpp b/src/render/framegraph/qframegraphnode.cpp
index 6a707c57c..dd9c3d803 100644
--- a/src/render/framegraph/qframegraphnode.cpp
+++ b/src/render/framegraph/qframegraphnode.cpp
@@ -83,11 +83,11 @@ QFrameGraphNode::QFrameGraphNode(QNode *parent)
*/
QFrameGraphNode *QFrameGraphNode::parentFrameGraphNode() const
{
- QFrameGraphNode *parentFGNode = Q_NULLPTR;
+ QFrameGraphNode *parentFGNode = nullptr;
QNode *parentN = parentNode();
while (parentN) {
- if ((parentFGNode = qobject_cast<QFrameGraphNode *>(parentN)) != Q_NULLPTR)
+ if ((parentFGNode = qobject_cast<QFrameGraphNode *>(parentN)) != nullptr)
break;
parentN = parentN->parentNode();
}
diff --git a/src/render/framegraph/qframegraphnode.h b/src/render/framegraph/qframegraphnode.h
index fe128e1b7..dc9a98bf8 100644
--- a/src/render/framegraph/qframegraphnode.h
+++ b/src/render/framegraph/qframegraphnode.h
@@ -54,12 +54,12 @@ class QT3DRENDERSHARED_EXPORT QFrameGraphNode : public Qt3DCore::QNode
{
Q_OBJECT
public:
- explicit QFrameGraphNode(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QFrameGraphNode(Qt3DCore::QNode *parent = nullptr);
QFrameGraphNode *parentFrameGraphNode() const;
protected:
- QFrameGraphNode(QFrameGraphNodePrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QFrameGraphNode(QFrameGraphNodePrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QFrameGraphNode)
diff --git a/src/render/framegraph/qfrustumculling.h b/src/render/framegraph/qfrustumculling.h
index 5a1bf6e9d..0a09d6310 100644
--- a/src/render/framegraph/qfrustumculling.h
+++ b/src/render/framegraph/qfrustumculling.h
@@ -50,7 +50,7 @@ class QT3DRENDERSHARED_EXPORT QFrustumCulling : public QFrameGraphNode
{
Q_OBJECT
public:
- explicit QFrustumCulling(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QFrustumCulling(Qt3DCore::QNode *parent = nullptr);
};
} // Qt3DRender
diff --git a/src/render/framegraph/qlayerfilter.h b/src/render/framegraph/qlayerfilter.h
index ccbca2219..941392c65 100644
--- a/src/render/framegraph/qlayerfilter.h
+++ b/src/render/framegraph/qlayerfilter.h
@@ -54,7 +54,7 @@ class QT3DRENDERSHARED_EXPORT QLayerFilter : public QFrameGraphNode
Q_OBJECT
Q_PROPERTY(QStringList layers READ layers WRITE setLayers NOTIFY layersChanged)
public:
- explicit QLayerFilter(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QLayerFilter(Qt3DCore::QNode *parent = nullptr);
QStringList layers() const;
@@ -65,7 +65,7 @@ Q_SIGNALS:
void layersChanged(const QStringList &layers);
protected:
- QLayerFilter(QLayerFilterPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QLayerFilter(QLayerFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QLayerFilter)
diff --git a/src/render/framegraph/qnodraw.h b/src/render/framegraph/qnodraw.h
index 247d37da1..17d490db6 100644
--- a/src/render/framegraph/qnodraw.h
+++ b/src/render/framegraph/qnodraw.h
@@ -50,7 +50,7 @@ class QT3DRENDERSHARED_EXPORT QNoDraw : public QFrameGraphNode
{
Q_OBJECT
public:
- explicit QNoDraw(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QNoDraw(Qt3DCore::QNode *parent = nullptr);
};
} // namespace Qt3DRender
diff --git a/src/render/framegraph/qrenderpassfilter.cpp b/src/render/framegraph/qrenderpassfilter.cpp
index b1418915c..64def0b64 100644
--- a/src/render/framegraph/qrenderpassfilter.cpp
+++ b/src/render/framegraph/qrenderpassfilter.cpp
@@ -83,7 +83,7 @@ void QRenderPassFilter::addMatch(QFilterKey *filterKey)
if (!filterKey->parent())
filterKey->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), filterKey);
change->setPropertyName("match");
d->notifyObservers(change);
@@ -95,7 +95,8 @@ void QRenderPassFilter::removeMatch(QFilterKey *filterKey)
{
Q_ASSERT(filterKey);
Q_D(QRenderPassFilter);
- if (d->m_changeArbiter != Q_NULLPTR) {
+
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), filterKey);
change->setPropertyName("match");
d->notifyObservers(change);
@@ -117,7 +118,7 @@ void QRenderPassFilter::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
@@ -130,7 +131,7 @@ void QRenderPassFilter::removeParameter(QParameter *parameter)
Q_ASSERT(parameter);
Q_D(QRenderPassFilter);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
diff --git a/src/render/framegraph/qrenderpassfilter.h b/src/render/framegraph/qrenderpassfilter.h
index 4a707865a..66294e28f 100644
--- a/src/render/framegraph/qrenderpassfilter.h
+++ b/src/render/framegraph/qrenderpassfilter.h
@@ -58,7 +58,7 @@ class QT3DRENDERSHARED_EXPORT QRenderPassFilter : public QFrameGraphNode
Q_OBJECT
public:
- explicit QRenderPassFilter(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QRenderPassFilter(Qt3DCore::QNode *parent = nullptr);
QVector<QFilterKey*> matchAny() const;
void addMatch(QFilterKey *filterKey);
@@ -69,7 +69,7 @@ public:
QVector<QParameter *> parameters() const;
protected:
- QRenderPassFilter(QRenderPassFilterPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QRenderPassFilter(QRenderPassFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QRenderPassFilter)
diff --git a/src/render/framegraph/qrenderstateset.cpp b/src/render/framegraph/qrenderstateset.cpp
index 92922b1aa..e72dd2412 100644
--- a/src/render/framegraph/qrenderstateset.cpp
+++ b/src/render/framegraph/qrenderstateset.cpp
@@ -97,7 +97,7 @@ void QRenderStateSet::addRenderState(QRenderState *state)
if (!state->parent())
state->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), state);
change->setPropertyName("renderState");
d->notifyObservers(change);
@@ -112,7 +112,8 @@ void QRenderStateSet::removeRenderState(QRenderState *state)
{
Q_ASSERT(state);
Q_D(QRenderStateSet);
- if (d->m_changeArbiter != Q_NULLPTR) {
+
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), state);
change->setPropertyName("renderState");
d->notifyObservers(change);
diff --git a/src/render/framegraph/qrendersurfaceselector.cpp b/src/render/framegraph/qrendersurfaceselector.cpp
index b4bfad22f..373f49d4e 100644
--- a/src/render/framegraph/qrendersurfaceselector.cpp
+++ b/src/render/framegraph/qrendersurfaceselector.cpp
@@ -85,7 +85,7 @@ namespace Qt3DRender {
QRenderSurfaceSelectorPrivate::QRenderSurfaceSelectorPrivate()
: Qt3DRender::QFrameGraphNodePrivate()
- , m_surface(Q_NULLPTR)
+ , m_surface(nullptr)
, m_surfaceEventFilter(new Qt3DRender::Render::PlatformSurfaceFilter())
{
}
@@ -166,7 +166,7 @@ void QRenderSurfaceSelector::setSurface(QObject *surfaceObject)
if (window) {
QObject::connect(window, &QWindow::widthChanged, [=] (int width) {
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
Qt3DCore::QNodePropertyChangePtr change(
new Qt3DCore::QNodePropertyChange(
Qt3DCore::NodeUpdated,
@@ -179,7 +179,7 @@ void QRenderSurfaceSelector::setSurface(QObject *surfaceObject)
}
});
QObject::connect(window, &QWindow::heightChanged, [=] (int height) {
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
Qt3DCore::QNodePropertyChangePtr change(
new Qt3DCore::QNodePropertyChange(
Qt3DCore::NodeUpdated,
@@ -205,7 +205,7 @@ void QRenderSurfaceSelector::setSurface(QObject *surfaceObject)
break;
}
} else {
- QWindow *nullWindow = Q_NULLPTR;
+ QWindow *nullWindow = nullptr;
d->m_surfaceEventFilter->setSurface(nullWindow);
}
emit surfaceChanged(surfaceObject);
diff --git a/src/render/framegraph/qrendertargetselector.cpp b/src/render/framegraph/qrendertargetselector.cpp
index 5d5ad6afc..9b26ec5d5 100644
--- a/src/render/framegraph/qrendertargetselector.cpp
+++ b/src/render/framegraph/qrendertargetselector.cpp
@@ -51,7 +51,7 @@ namespace Qt3DRender {
QRenderTargetSelectorPrivate::QRenderTargetSelectorPrivate()
: QFrameGraphNodePrivate()
- , m_target(Q_NULLPTR)
+ , m_target(nullptr)
{
}
@@ -67,7 +67,7 @@ void QRenderTargetSelector::setTarget(QRenderTarget *target)
d->m_target = target;
// For inline declaration cases
- if (target != Q_NULLPTR && !target->parent())
+ if (target != nullptr && !target->parent())
target->setParent(this);
emit targetChanged(target);
}
diff --git a/src/render/framegraph/qrendertargetselector.h b/src/render/framegraph/qrendertargetselector.h
index 5b9ceac49..8db5f07c0 100644
--- a/src/render/framegraph/qrendertargetselector.h
+++ b/src/render/framegraph/qrendertargetselector.h
@@ -57,7 +57,7 @@ class QT3DRENDERSHARED_EXPORT QRenderTargetSelector : public QFrameGraphNode
Q_OBJECT
Q_PROPERTY(Qt3DRender::QRenderTarget *target READ target WRITE setTarget NOTIFY targetChanged)
public:
- explicit QRenderTargetSelector(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QRenderTargetSelector(Qt3DCore::QNode *parent = nullptr);
QRenderTarget *target() const;
@@ -71,7 +71,7 @@ Q_SIGNALS:
void targetChanged(QRenderTarget *target);
protected:
- QRenderTargetSelector(QRenderTargetSelectorPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QRenderTargetSelector(QRenderTargetSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QRenderTargetSelector)
diff --git a/src/render/framegraph/qsortpolicy.cpp b/src/render/framegraph/qsortpolicy.cpp
index e89e0f472..5c75df988 100644
--- a/src/render/framegraph/qsortpolicy.cpp
+++ b/src/render/framegraph/qsortpolicy.cpp
@@ -77,7 +77,7 @@ void QSortPolicy::addSortType(Qt3DRender::QSortPolicy::SortType sortType)
if (!d->m_sortTypes.contains(sortType)) {
d->m_sortTypes.append(sortType);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
QNodePropertyChangePtr propertyChange(new QNodePropertyChange(NodeAdded, QSceneChange::Node, id()));
propertyChange->setPropertyName("sortType");
propertyChange->setValue(QVariant::fromValue(sortType));
@@ -89,7 +89,7 @@ void QSortPolicy::addSortType(Qt3DRender::QSortPolicy::SortType sortType)
void QSortPolicy::removeSortType(SortType sortType)
{
Q_D(QSortPolicy);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
QNodePropertyChangePtr propertyChange(new QNodePropertyChange(NodeRemoved, QSceneChange::Node, id()));
propertyChange->setPropertyName("sortType");
propertyChange->setValue(QVariant::fromValue(sortType));
diff --git a/src/render/framegraph/qtechniquefilter.cpp b/src/render/framegraph/qtechniquefilter.cpp
index ee5ac659c..f73991d33 100644
--- a/src/render/framegraph/qtechniquefilter.cpp
+++ b/src/render/framegraph/qtechniquefilter.cpp
@@ -87,7 +87,7 @@ void QTechniqueFilter::addMatch(QFilterKey *filterKey)
if (!filterKey->parent())
filterKey->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), filterKey);
change->setPropertyName("matchAll");
d->notifyObservers(change);
@@ -99,7 +99,7 @@ void QTechniqueFilter::removeMatch(QFilterKey *filterKey)
{
Q_ASSERT(filterKey);
Q_D(QTechniqueFilter);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), filterKey);
change->setPropertyName("matchAll");
d->notifyObservers(change);
@@ -121,7 +121,7 @@ void QTechniqueFilter::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
@@ -133,7 +133,7 @@ void QTechniqueFilter::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QTechniqueFilter);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
diff --git a/src/render/framegraph/qtechniquefilter.h b/src/render/framegraph/qtechniquefilter.h
index bc441679e..bcee08db4 100644
--- a/src/render/framegraph/qtechniquefilter.h
+++ b/src/render/framegraph/qtechniquefilter.h
@@ -55,7 +55,7 @@ class QT3DRENDERSHARED_EXPORT QTechniqueFilter : public QFrameGraphNode
{
Q_OBJECT
public:
- explicit QTechniqueFilter(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QTechniqueFilter(Qt3DCore::QNode *parent = nullptr);
QVector<QFilterKey*> matchAll() const;
void addMatch(QFilterKey *filterKey);
@@ -66,7 +66,7 @@ public:
QVector<QParameter *> parameters() const;
protected:
- QTechniqueFilter(QTechniqueFilterPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QTechniqueFilter(QTechniqueFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QTechniqueFilter)
diff --git a/src/render/framegraph/qviewport.h b/src/render/framegraph/qviewport.h
index 04658737d..e375ba377 100644
--- a/src/render/framegraph/qviewport.h
+++ b/src/render/framegraph/qviewport.h
@@ -56,7 +56,7 @@ class QT3DRENDERSHARED_EXPORT QViewport : public QFrameGraphNode
Q_PROPERTY(QRectF normalizedRect READ normalizedRect WRITE setNormalizedRect NOTIFY normalizedRectChanged)
public:
- explicit QViewport(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QViewport(Qt3DCore::QNode *parent = nullptr);
QRectF normalizedRect() const;
@@ -67,7 +67,7 @@ Q_SIGNALS:
void normalizedRectChanged(const QRectF& normalizedRect);
protected:
- QViewport(QViewportPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QViewport(QViewportPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QViewport)
diff --git a/src/render/framegraph/rendersurfaceselector.cpp b/src/render/framegraph/rendersurfaceselector.cpp
index 2b818e936..9c77a6024 100644
--- a/src/render/framegraph/rendersurfaceselector.cpp
+++ b/src/render/framegraph/rendersurfaceselector.cpp
@@ -73,7 +73,7 @@ namespace Render {
RenderSurfaceSelector::RenderSurfaceSelector()
: FrameGraphNode(FrameGraphNode::Surface)
- , m_surface(Q_NULLPTR)
+ , m_surface(nullptr)
, m_width(0)
, m_height(0)
, m_devicePixelRatio(0.0f)
diff --git a/src/render/framegraph/rendertargetselectornode.cpp b/src/render/framegraph/rendertargetselectornode.cpp
index 99d6fc965..b1bc6f976 100644
--- a/src/render/framegraph/rendertargetselectornode.cpp
+++ b/src/render/framegraph/rendertargetselectornode.cpp
@@ -63,7 +63,7 @@ void RenderTargetSelector::updateFromPeer(Qt3DCore::QNode *peer)
{
QRenderTargetSelector *selector = static_cast<QRenderTargetSelector *>(peer);
m_renderTargetUuid = QNodeId();
- if (selector->target() != Q_NULLPTR)
+ if (selector->target() != nullptr)
m_renderTargetUuid = selector->target()->id();
m_outputs = selector->outputs();
}
diff --git a/src/render/frontend/qabstractfunctor.h b/src/render/frontend/qabstractfunctor.h
index e99953797..7d0dbc1f1 100644
--- a/src/render/frontend/qabstractfunctor.h
+++ b/src/render/frontend/qabstractfunctor.h
@@ -56,7 +56,7 @@ struct FunctorType
// The MSVC linker can under some cases optimize all the template
// functions into a single function. The code below is there to ensure
// that the linker won't collapse all these distincts functions into one
- static T *t = Q_NULLPTR;
+ static T *t = nullptr;
return reinterpret_cast<qintptr>(t);
}
};
@@ -84,7 +84,7 @@ public:
{
if (other->id() == functorTypeId<T>())
return static_cast<const T *>(other);
- return Q_NULLPTR;
+ return nullptr;
}
};
@@ -93,7 +93,7 @@ const T *functor_cast(const QAbstractFunctor *other)
{
if (other->id() == functorTypeId<T>())
return static_cast<const T *>(other);
- return Q_NULLPTR;
+ return nullptr;
}
} // Qt3D
diff --git a/src/render/frontend/qboundingvolumedebug.cpp b/src/render/frontend/qboundingvolumedebug.cpp
index e8ed47ba7..b3d53a68f 100644
--- a/src/render/frontend/qboundingvolumedebug.cpp
+++ b/src/render/frontend/qboundingvolumedebug.cpp
@@ -59,11 +59,11 @@ public:
QBoundingVolumeDebugPrivate()
: QComponentPrivate()
, m_recursive(false)
- , m_debugSubtree(Q_NULLPTR)
- , m_sphereMesh(Q_NULLPTR)
- , m_transform(Q_NULLPTR)
- , m_material(Q_NULLPTR)
- , m_layer(Q_NULLPTR)
+ , m_debugSubtree(nullptr)
+ , m_sphereMesh(nullptr)
+ , m_transform(nullptr)
+ , m_material(nullptr)
+ , m_layer(nullptr)
, m_bvRadius(0.0f)
{
m_shareable = false;
@@ -128,9 +128,9 @@ void QBoundingVolumeDebug::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &cha
// Executed in the frontend thread
Qt3DCore::QEntity *QBoundingVolumeDebugPrivate::findRootEntity(Qt3DCore::QEntity *e)
{
- Qt3DCore::QEntity *tmp = Q_NULLPTR;
- Qt3DCore::QEntity *parentEntity = Q_NULLPTR;
- while (e && (tmp = e->parentEntity()) != Q_NULLPTR) {
+ Qt3DCore::QEntity *tmp = nullptr;
+ Qt3DCore::QEntity *parentEntity = nullptr;
+ while (e && (tmp = e->parentEntity()) != nullptr) {
parentEntity = tmp;
e = parentEntity;
}
@@ -140,7 +140,7 @@ Qt3DCore::QEntity *QBoundingVolumeDebugPrivate::findRootEntity(Qt3DCore::QEntity
void QBoundingVolumeDebugPrivate::updateSubtree()
{
Q_Q(QBoundingVolumeDebug);
- if (m_debugSubtree == Q_NULLPTR) {
+ if (m_debugSubtree == nullptr) {
m_debugSubtree = new Qt3DCore::QEntity();
m_sphereMesh = new Qt3DRender::QSphereMesh();
m_transform = new Qt3DCore::QTransform();
diff --git a/src/render/frontend/qboundingvolumedebug_p.h b/src/render/frontend/qboundingvolumedebug_p.h
index d6b2d8809..8ffe556b5 100644
--- a/src/render/frontend/qboundingvolumedebug_p.h
+++ b/src/render/frontend/qboundingvolumedebug_p.h
@@ -69,7 +69,7 @@ class QT3DRENDERSHARED_EXPORT QBoundingVolumeDebug : public Qt3DCore::QComponent
Q_PROPERTY(bool recursive READ recursive WRITE setRecursive NOTIFY recursiveChanged)
public:
- explicit QBoundingVolumeDebug(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QBoundingVolumeDebug(Qt3DCore::QNode *parent = nullptr);
~QBoundingVolumeDebug();
bool recursive() const;
diff --git a/src/render/frontend/qcamera.h b/src/render/frontend/qcamera.h
index 812ef5729..bf725dc20 100644
--- a/src/render/frontend/qcamera.h
+++ b/src/render/frontend/qcamera.h
@@ -80,7 +80,7 @@ class QT3DRENDERSHARED_EXPORT QCamera : public Qt3DCore::QEntity
Q_PROPERTY(QMatrix4x4 viewMatrix READ viewMatrix NOTIFY viewMatrixChanged)
public:
- explicit QCamera(QNode *parent = Q_NULLPTR);
+ explicit QCamera(QNode *parent = nullptr);
enum CameraTranslationOption {
TranslateViewCenter,
@@ -165,7 +165,7 @@ Q_SIGNALS:
protected:
Q_DECLARE_PRIVATE(QCamera)
- QCamera(QCameraPrivate &dd, QNode *parent = Q_NULLPTR);
+ QCamera(QCameraPrivate &dd, QNode *parent = nullptr);
};
} // namespace Qt3DRender
diff --git a/src/render/frontend/qcameralens.h b/src/render/frontend/qcameralens.h
index 846c4557c..c32597201 100644
--- a/src/render/frontend/qcameralens.h
+++ b/src/render/frontend/qcameralens.h
@@ -68,7 +68,7 @@ class QT3DRENDERSHARED_EXPORT QCameraLens : public Qt3DCore::QComponent
Q_PROPERTY(QMatrix4x4 projectionMatrix READ projectionMatrix WRITE setProjectionMatrix NOTIFY projectionMatrixChanged)
public:
- explicit QCameraLens(QNode *parent = Q_NULLPTR);
+ explicit QCameraLens(QNode *parent = nullptr);
enum ProjectionType {
OrthographicProjection,
@@ -126,7 +126,7 @@ Q_SIGNALS:
void projectionMatrixChanged(const QMatrix4x4 &projectionMatrix);
protected:
- QCameraLens(QCameraLensPrivate &dd, QNode *parent = Q_NULLPTR);
+ QCameraLens(QCameraLensPrivate &dd, QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QCameraLens)
diff --git a/src/render/frontend/qcomputecommand.h b/src/render/frontend/qcomputecommand.h
index 764e4de33..d901321de 100644
--- a/src/render/frontend/qcomputecommand.h
+++ b/src/render/frontend/qcomputecommand.h
@@ -58,7 +58,7 @@ class QT3DRENDERSHARED_EXPORT QComputeCommand : public Qt3DCore::QComponent
public:
- explicit QComputeCommand(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QComputeCommand(Qt3DCore::QNode *parent = nullptr);
int workGroupX() const;
int workGroupY() const;
diff --git a/src/render/frontend/qitemmodelbuffer.cpp b/src/render/frontend/qitemmodelbuffer.cpp
index 7d9db8337..8b6fccc7c 100644
--- a/src/render/frontend/qitemmodelbuffer.cpp
+++ b/src/render/frontend/qitemmodelbuffer.cpp
@@ -170,7 +170,7 @@ QAttribute::VertexBaseType typeFromGLType(GLint dataType, uint &dataCount)
} // anonymous
QItemModelBuffer::QItemModelBuffer()
- : m_buffer(Q_NULLPTR)
+ : m_buffer(nullptr)
{
}
@@ -181,7 +181,7 @@ void QItemModelBuffer::setModel(QAbstractItemModel *model)
m_model = model;
delete m_buffer;
- m_buffer = Q_NULLPTR;
+ m_buffer = nullptr;
connect(m_model, SIGNAL(modelReset()), this, SLOT(onModelReset()));
connect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
@@ -192,7 +192,7 @@ void QItemModelBuffer::setRoot(const QModelIndex &rootIndex)
{
m_rootIndex = rootIndex;
delete m_buffer;
- m_buffer = Q_NULLPTR;
+ m_buffer = nullptr;
}
void QItemModelBuffer::mapRoleName(QByteArray roleName, int elementType)
@@ -210,7 +210,7 @@ void QItemModelBuffer::mapRoleName(QByteArray roleName, QString attributeName, i
m_mappings.append(RoleMapping(roleName, attributeName, elementType));
delete m_buffer;
- m_buffer = Q_NULLPTR;
+ m_buffer = nullptr;
}
QBuffer *QItemModelBuffer::buffer()
diff --git a/src/render/frontend/qlayer.h b/src/render/frontend/qlayer.h
index 1517148ee..71e8003b1 100644
--- a/src/render/frontend/qlayer.h
+++ b/src/render/frontend/qlayer.h
@@ -55,7 +55,7 @@ class QT3DRENDERSHARED_EXPORT QLayer : public Qt3DCore::QComponent
Q_OBJECT
Q_PROPERTY(QStringList names READ names WRITE setNames NOTIFY namesChanged)
public:
- explicit QLayer(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QLayer(Qt3DCore::QNode *parent = nullptr);
QStringList names() const;
@@ -66,7 +66,7 @@ Q_SIGNALS:
void namesChanged(const QStringList &names);
protected:
- QLayer(QLayerPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QLayer(QLayerPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QLayer)
diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp
index 39209235d..c3b99a283 100644
--- a/src/render/frontend/qrenderaspect.cpp
+++ b/src/render/frontend/qrenderaspect.cpp
@@ -147,7 +147,7 @@ namespace Qt3DRender {
QRenderAspectPrivate::QRenderAspectPrivate(QRenderAspect::RenderType type)
: QAbstractAspectPrivate()
, m_nodeManagers(new Render::NodeManagers())
- , m_renderer(Q_NULLPTR)
+ , m_renderer(nullptr)
, m_initialized(false)
, m_framePreparationJob(new Render::FramePreparationJob(m_nodeManagers))
, m_cleanupJob(new Render::FrameCleanupJob(m_nodeManagers))
@@ -306,7 +306,7 @@ QVector<Qt3DCore::QAspectJobPtr> QRenderAspect::jobsToExecute(qint64 time)
// 7 Cleanup Job (depends on RV)
// Create jobs to load in any meshes that are pending
- if (d->m_renderer != Q_NULLPTR && d->m_renderer->isRunning()) {
+ if (d->m_renderer != nullptr && d->m_renderer->isRunning()) {
// don't spawn any jobs, if the renderer decides to skip this frame
if (!d->m_renderer->shouldRender()) {
d->m_renderer->skipNextFrame();
@@ -411,7 +411,7 @@ void QRenderAspect::onRegistered()
d->m_initialized = true;
}
- // QSurface *surface = Q_NULLPTR;
+ // QSurface *surface = nullptr;
// const QVariant &v = data.value(QStringLiteral("surface"));
// if (v.isValid())
// surface = v.value<QSurface *>();
@@ -429,7 +429,7 @@ void QRenderAspect::onUnregistered()
if (d->m_renderer)
d->m_renderer->destroyAllocators(d->jobManager());
delete d->m_renderer;
- d->m_renderer = Q_NULLPTR;
+ d->m_renderer = nullptr;
}
// Returns a vector of jobs to be performed for dirty buffers
@@ -475,7 +475,7 @@ void QRenderAspectPrivate::loadSceneParsers()
const QStringList keys = QSceneParserFactory::keys();
for (const QString &key : keys) {
QSceneIOHandler *sceneIOHandler = QSceneParserFactory::create(key, QStringList());
- if (sceneIOHandler != Q_NULLPTR)
+ if (sceneIOHandler != nullptr)
m_sceneIOHandler.append(sceneIOHandler);
}
}
diff --git a/src/render/frontend/qrenderaspect.h b/src/render/frontend/qrenderaspect.h
index ae7cee5ba..e1173154a 100644
--- a/src/render/frontend/qrenderaspect.h
+++ b/src/render/frontend/qrenderaspect.h
@@ -64,8 +64,8 @@ public:
Threaded
};
- explicit QRenderAspect(QObject *parent = Q_NULLPTR);
- explicit QRenderAspect(RenderType type, QObject *parent = Q_NULLPTR);
+ explicit QRenderAspect(QObject *parent = nullptr);
+ explicit QRenderAspect(RenderType type, QObject *parent = nullptr);
QVector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) Q_DECL_OVERRIDE;
diff --git a/src/render/frontend/qrendersettings.cpp b/src/render/frontend/qrendersettings.cpp
index d3d3cba04..f41ac1de9 100644
--- a/src/render/frontend/qrendersettings.cpp
+++ b/src/render/frontend/qrendersettings.cpp
@@ -47,7 +47,7 @@ namespace Qt3DRender {
QRenderSettingsPrivate::QRenderSettingsPrivate()
: Qt3DCore::QComponentPrivate()
- , m_activeFrameGraph(Q_NULLPTR)
+ , m_activeFrameGraph(nullptr)
, m_renderPolicy(QRenderSettings::OnDemand)
{
}
@@ -109,7 +109,7 @@ void QRenderSettings::setActiveFrameGraph(QFrameGraphNode *activeFrameGraph)
if (d->m_activeFrameGraph == activeFrameGraph)
return;
- if (activeFrameGraph != Q_NULLPTR && !activeFrameGraph->parent())
+ if (activeFrameGraph != nullptr && !activeFrameGraph->parent())
activeFrameGraph->setParent(this);
d->m_activeFrameGraph = activeFrameGraph;
emit activeFrameGraphChanged(activeFrameGraph);
diff --git a/src/render/frontend/qrendersettings.h b/src/render/frontend/qrendersettings.h
index e9ac4d5dd..ce61db4fd 100644
--- a/src/render/frontend/qrendersettings.h
+++ b/src/render/frontend/qrendersettings.h
@@ -61,7 +61,7 @@ class QT3DRENDERSHARED_EXPORT QRenderSettings : public Qt3DCore::QComponent
Q_CLASSINFO("DefaultProperty", "activeFrameGraph")
public:
- explicit QRenderSettings(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QRenderSettings(Qt3DCore::QNode *parent = nullptr);
enum RenderPolicy {
OnDemand,
@@ -83,7 +83,7 @@ Q_SIGNALS:
protected:
Q_DECLARE_PRIVATE(QRenderSettings)
- QRenderSettings(QRenderSettingsPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QRenderSettings(QRenderSettingsPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_PRIVATE_SLOT(d_func(), void _q_onPickingMethodChanged(QPickingSettings::PickMethod))
diff --git a/src/render/frontend/qrendertarget.cpp b/src/render/frontend/qrendertarget.cpp
index c637ff165..b078a32bb 100644
--- a/src/render/frontend/qrendertarget.cpp
+++ b/src/render/frontend/qrendertarget.cpp
@@ -75,7 +75,7 @@ void QRenderTarget::addOutput(QRenderTargetOutput *output)
if (!output->parent())
output->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), output);
change->setPropertyName("output");
d->notifyObservers(change);
@@ -87,7 +87,7 @@ void QRenderTarget::removeOutput(QRenderTargetOutput *output)
{
Q_D(QRenderTarget);
- if (output && d->m_changeArbiter != Q_NULLPTR) {
+ if (output && d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), output);
change->setPropertyName("output");
d->notifyObservers(change);
diff --git a/src/render/frontend/qrendertarget.h b/src/render/frontend/qrendertarget.h
index e584ac936..27e9c9f48 100644
--- a/src/render/frontend/qrendertarget.h
+++ b/src/render/frontend/qrendertarget.h
@@ -54,14 +54,14 @@ class QT3DRENDERSHARED_EXPORT QRenderTarget : public Qt3DCore::QComponent
{
Q_OBJECT
public:
- explicit QRenderTarget(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QRenderTarget(Qt3DCore::QNode *parent = nullptr);
void addOutput(QRenderTargetOutput *output);
void removeOutput(QRenderTargetOutput *output);
QVector<QRenderTargetOutput *> outputs() const;
protected:
- QRenderTarget(QRenderTargetPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QRenderTarget(QRenderTargetPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QRenderTarget)
diff --git a/src/render/frontend/qrendertargetoutput.cpp b/src/render/frontend/qrendertargetoutput.cpp
index 8d1a2f11e..1f7a7ea5d 100644
--- a/src/render/frontend/qrendertargetoutput.cpp
+++ b/src/render/frontend/qrendertargetoutput.cpp
@@ -47,7 +47,7 @@ namespace Qt3DRender {
QRenderTargetOutputPrivate::QRenderTargetOutputPrivate()
: QNodePrivate()
- , m_texture(Q_NULLPTR)
+ , m_texture(nullptr)
, m_attachmentPoint(QRenderTargetOutput::Color0)
, m_mipLevel(0)
, m_layer(0)
diff --git a/src/render/frontend/sphere.cpp b/src/render/frontend/sphere.cpp
index 3769b7024..4ff17ea8e 100644
--- a/src/render/frontend/sphere.cpp
+++ b/src/render/frontend/sphere.cpp
@@ -53,7 +53,7 @@ namespace {
// Intersects ray r = p + td, |d| = 1, with sphere s and, if intersecting,
// returns true and intersection point q; false otherwise
-bool intersectRaySphere(const Qt3DRender::QRay3D &ray, const Qt3DRender::Render::Sphere &s, QVector3D *q = Q_NULLPTR)
+bool intersectRaySphere(const Qt3DRender::QRay3D &ray, const Qt3DRender::Render::Sphere &s, QVector3D *q = nullptr)
{
const QVector3D p = ray.origin();
const QVector3D d = ray.direction();
@@ -61,7 +61,7 @@ bool intersectRaySphere(const Qt3DRender::QRay3D &ray, const Qt3DRender::Render:
const float c = QVector3D::dotProduct(m, m) - s.radius() * s.radius();
// If there is definitely at least one real root, there must be an intersection
- if (q == Q_NULLPTR && c <= 0.0f)
+ if (q == nullptr && c <= 0.0f)
return true;
const float b = QVector3D::dotProduct(m, d);
@@ -75,7 +75,7 @@ bool intersectRaySphere(const Qt3DRender::QRay3D &ray, const Qt3DRender::Render:
return false;
// If we don't need the intersection point, return early
- if (q == Q_NULLPTR)
+ if (q == nullptr)
return true;
// Ray now found to intersect sphere, compute smallest t value of intersection
diff --git a/src/render/geometry/buffer.cpp b/src/render/geometry/buffer.cpp
index 8a6b6e9ff..81de24083 100644
--- a/src/render/geometry/buffer.cpp
+++ b/src/render/geometry/buffer.cpp
@@ -56,7 +56,7 @@ Buffer::Buffer()
, m_usage(QBuffer::StaticDraw)
, m_bufferDirty(false)
, m_syncData(false)
- , m_manager(Q_NULLPTR)
+ , m_manager(nullptr)
{
// Maybe it could become read write if we want to inform
// the frontend QBuffer node of any backend issue
@@ -99,13 +99,13 @@ void Buffer::executeFunctor()
void Buffer::updateFromPeer(Qt3DCore::QNode *peer)
{
QBuffer *buffer = static_cast<QBuffer *>(peer);
- if (buffer != Q_NULLPTR) {
+ if (buffer != nullptr) {
m_type = buffer->type();
m_usage = buffer->usage();
m_data = buffer->data();
m_functor = buffer->dataGenerator();
// Add to dirty list in the manager
- if (m_functor && m_manager != Q_NULLPTR)
+ if (m_functor && m_manager != nullptr)
m_manager->addDirtyBuffer(peerId());
m_bufferDirty = true;
m_syncData = buffer->isSyncData();
@@ -147,7 +147,7 @@ void Buffer::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
QBufferDataGeneratorPtr newGenerator = propertyChange->value().value<QBufferDataGeneratorPtr>();
m_bufferDirty |= !(newGenerator && m_functor && *newGenerator == *m_functor);
m_functor = newGenerator;
- if (m_functor && m_manager != Q_NULLPTR)
+ if (m_functor && m_manager != nullptr)
m_manager->addDirtyBuffer(peerId());
} else if (propertyName == QByteArrayLiteral("syncData")) {
m_syncData = propertyChange->value().toBool();
diff --git a/src/render/geometry/geometry.cpp b/src/render/geometry/geometry.cpp
index 5f1b73760..4bf9fd21a 100644
--- a/src/render/geometry/geometry.cpp
+++ b/src/render/geometry/geometry.cpp
@@ -73,12 +73,12 @@ void Geometry::cleanup()
void Geometry::updateFromPeer(Qt3DCore::QNode *peer)
{
QGeometry *geometry = static_cast<QGeometry *>(peer);
- if (geometry != Q_NULLPTR) {
+ if (geometry != nullptr) {
m_attributes.reserve(geometry->attributes().size());
Q_FOREACH (QAttribute *attribute, geometry->attributes())
m_attributes.push_back(attribute->id());
m_geometryDirty = true;
- if (geometry->boundingVolumePositionAttribute() != Q_NULLPTR)
+ if (geometry->boundingVolumePositionAttribute() != nullptr)
m_boundingPositionAttribute = geometry->boundingVolumePositionAttribute()->id();
}
}
diff --git a/src/render/geometry/geometryrenderer.cpp b/src/render/geometry/geometryrenderer.cpp
index e396cdf6e..8e3d71567 100644
--- a/src/render/geometry/geometryrenderer.cpp
+++ b/src/render/geometry/geometryrenderer.cpp
@@ -65,7 +65,7 @@ GeometryRenderer::GeometryRenderer()
, m_primitiveRestartEnabled(false)
, m_primitiveType(QGeometryRenderer::Triangles)
, m_dirty(false)
- , m_manager(Q_NULLPTR)
+ , m_manager(nullptr)
{
}
@@ -107,10 +107,10 @@ void GeometryRenderer::updateFromPeer(Qt3DCore::QNode *peer)
m_verticesPerPatch = geometryRenderer->verticesPerPatch();
m_primitiveRestartEnabled = geometryRenderer->primitiveRestartEnabled();
m_primitiveType = geometryRenderer->primitiveType();
- if (geometryRenderer->geometry() != Q_NULLPTR)
+ if (geometryRenderer->geometry() != nullptr)
m_geometryId = geometryRenderer->geometry()->id();
m_geometryFactory = geometryRenderer->geometryFactory();
- if (m_geometryFactory && m_manager != Q_NULLPTR)
+ if (m_geometryFactory && m_manager != nullptr)
m_manager->addDirtyGeometryRenderer(peerId());
m_dirty = true;
}
@@ -173,7 +173,7 @@ void GeometryRenderer::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
QGeometryFactoryPtr newFunctor = propertyChange->value().value<QGeometryFactoryPtr>();
m_dirty |= !(newFunctor && m_geometryFactory && *newFunctor == *m_geometryFactory);
m_geometryFactory = newFunctor;
- if (m_geometryFactory && m_manager != Q_NULLPTR)
+ if (m_geometryFactory && m_manager != nullptr)
m_manager->addDirtyGeometryRenderer(peerId());
}
break;
diff --git a/src/render/geometry/qattribute.cpp b/src/render/geometry/qattribute.cpp
index e20ede4a6..ae7883f36 100644
--- a/src/render/geometry/qattribute.cpp
+++ b/src/render/geometry/qattribute.cpp
@@ -49,7 +49,7 @@ namespace Qt3DRender {
QAttributePrivate::QAttributePrivate()
: QNodePrivate()
- , m_buffer(Q_NULLPTR)
+ , m_buffer(nullptr)
, m_name()
, m_dataType(QAttribute::Float)
, m_dataSize(1)
diff --git a/src/render/geometry/qbuffer.cpp b/src/render/geometry/qbuffer.cpp
index de2589124..cec9ba0eb 100644
--- a/src/render/geometry/qbuffer.cpp
+++ b/src/render/geometry/qbuffer.cpp
@@ -228,7 +228,7 @@ void QBuffer::setDataGenerator(const QBufferDataGeneratorPtr &functor)
if (functor && d->m_functor && *functor == *d->m_functor)
return;
d->m_functor = functor;
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
QNodePropertyChangePtr change(new QNodePropertyChange(NodeUpdated, QSceneChange::Node, id()));
change->setPropertyName("dataGenerator");
change->setValue(QVariant::fromValue(d->m_functor));
diff --git a/src/render/geometry/qbuffer.h b/src/render/geometry/qbuffer.h
index edd6055ed..19d869e9f 100644
--- a/src/render/geometry/qbuffer.h
+++ b/src/render/geometry/qbuffer.h
@@ -85,7 +85,7 @@ public:
};
Q_ENUM(UsageType)
- explicit QBuffer(BufferType ty = QBuffer::VertexBuffer, Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QBuffer(BufferType ty = QBuffer::VertexBuffer, Qt3DCore::QNode *parent = nullptr);
UsageType usage() const;
BufferType type() const;
diff --git a/src/render/geometry/qgeometry.cpp b/src/render/geometry/qgeometry.cpp
index c00c71939..61b98c5a6 100644
--- a/src/render/geometry/qgeometry.cpp
+++ b/src/render/geometry/qgeometry.cpp
@@ -111,7 +111,7 @@ void QGeometry::addAttribute(QAttribute *attribute)
if (!attribute->parent())
attribute->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), attribute);
change->setPropertyName("attribute");
d->notifyObservers(change);
@@ -126,7 +126,7 @@ void QGeometry::removeAttribute(QAttribute *attribute)
{
Q_ASSERT(attribute);
Q_D(QGeometry);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), attribute);
change->setPropertyName("attribute");
d->notifyObservers(change);
diff --git a/src/render/geometry/qgeometry.h b/src/render/geometry/qgeometry.h
index a4057ce12..e9ae710fa 100644
--- a/src/render/geometry/qgeometry.h
+++ b/src/render/geometry/qgeometry.h
@@ -55,7 +55,7 @@ class QT3DRENDERSHARED_EXPORT QGeometry : public Qt3DCore::QNode
Q_OBJECT
Q_PROPERTY(Qt3DRender::QAttribute *boundingVolumePositionAttribute READ boundingVolumePositionAttribute WRITE setBoundingVolumePositionAttribute NOTIFY boundingVolumePositionAttributeChanged)
public:
- explicit QGeometry(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QGeometry(Qt3DCore::QNode *parent = nullptr);
QVector<QAttribute *> attributes() const;
void addAttribute(QAttribute *attribute);
@@ -70,7 +70,7 @@ Q_SIGNALS:
void boundingVolumePositionAttributeChanged(QAttribute *boundingVolumePositionAttribute);
protected:
- QGeometry(QGeometryPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QGeometry(QGeometryPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QGeometry)
diff --git a/src/render/geometry/qgeometry_p.h b/src/render/geometry/qgeometry_p.h
index 603294037..41d58f494 100644
--- a/src/render/geometry/qgeometry_p.h
+++ b/src/render/geometry/qgeometry_p.h
@@ -63,7 +63,7 @@ public:
Q_DECLARE_PUBLIC(QGeometry)
QGeometryPrivate()
: QNodePrivate()
- , m_boundingVolumePositionAttribute(Q_NULLPTR)
+ , m_boundingVolumePositionAttribute(nullptr)
{}
diff --git a/src/render/geometry/qgeometryrenderer.cpp b/src/render/geometry/qgeometryrenderer.cpp
index 423f537c0..dfd610fe6 100644
--- a/src/render/geometry/qgeometryrenderer.cpp
+++ b/src/render/geometry/qgeometryrenderer.cpp
@@ -60,7 +60,7 @@ QGeometryRendererPrivate::QGeometryRendererPrivate()
, m_restartIndexValue(-1)
, m_verticesPerPatch(0)
, m_primitiveRestart(false)
- , m_geometry(Q_NULLPTR)
+ , m_geometry(nullptr)
, m_primitiveType(QGeometryRenderer::Triangles)
{
}
@@ -393,7 +393,7 @@ void QGeometryRenderer::setGeometryFactory(const QGeometryFactoryPtr &factory)
if (factory && d->m_geometryFactory && *factory == *d->m_geometryFactory)
return;
d->m_geometryFactory = factory;
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
QNodePropertyChangePtr change(new QNodePropertyChange(NodeUpdated, QSceneChange::Node, id()));
change->setPropertyName("geometryFactory");
change->setValue(QVariant::fromValue(d->m_geometryFactory));
@@ -413,7 +413,7 @@ void QGeometryRenderer::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
// QNodePtr nodePtr = change->value().value<QNodePtr>();
// QGeometry *backendGeometry = static_cast<QGeometry *>(nodePtr.data());
// QGeometry *frontendGeometry = static_cast<QGeometry *>(QNode::clone(backendGeometry));
-// if (frontendGeometry != Q_NULLPTR)
+// if (frontendGeometry != nullptr)
// d->insertTree(frontendGeometry);
// setGeometry(frontendGeometry);
// }
diff --git a/src/render/geometry/qgeometryrenderer.h b/src/render/geometry/qgeometryrenderer.h
index 55fdcf93c..a6d211c7a 100644
--- a/src/render/geometry/qgeometryrenderer.h
+++ b/src/render/geometry/qgeometryrenderer.h
@@ -67,7 +67,7 @@ class QT3DRENDERSHARED_EXPORT QGeometryRenderer : public Qt3DCore::QComponent
Q_PROPERTY(PrimitiveType primitiveType READ primitiveType WRITE setPrimitiveType NOTIFY primitiveTypeChanged)
public:
- explicit QGeometryRenderer(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QGeometryRenderer(Qt3DCore::QNode *parent = nullptr);
enum PrimitiveType {
Points = 0x0000,
@@ -124,7 +124,7 @@ Q_SIGNALS:
void primitiveTypeChanged(PrimitiveType primitiveType);
protected:
- QGeometryRenderer(QGeometryRendererPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QGeometryRenderer(QGeometryRendererPrivate &dd, Qt3DCore::QNode *parent = nullptr);
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE;
private:
diff --git a/src/render/geometry/qmesh.cpp b/src/render/geometry/qmesh.cpp
index 72a0a13b6..75483a332 100644
--- a/src/render/geometry/qmesh.cpp
+++ b/src/render/geometry/qmesh.cpp
@@ -174,7 +174,7 @@ QGeometry *MeshFunctor::operator()()
{
if (m_sourcePath.isEmpty()) {
qCWarning(Render::Jobs) << Q_FUNC_INFO << "Mesh is empty, nothing to load";
- return Q_NULLPTR;
+ return nullptr;
}
// TO DO : Maybe use Assimp instead of ObjLoader to handle more sources
@@ -191,7 +191,7 @@ QGeometry *MeshFunctor::operator()()
return loader.geometry();
qCWarning(Render::Jobs) << Q_FUNC_INFO << "OBJ load failure for:" << filePath;
- return Q_NULLPTR;
+ return nullptr;
}
/*!
@@ -200,7 +200,7 @@ QGeometry *MeshFunctor::operator()()
bool MeshFunctor::operator ==(const QGeometryFactory &other) const
{
const MeshFunctor *otherFunctor = functor_cast<MeshFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return (otherFunctor->m_sourcePath == m_sourcePath);
return false;
}
diff --git a/src/render/geometry/qmesh.h b/src/render/geometry/qmesh.h
index 8b353a4ab..64e9d3772 100644
--- a/src/render/geometry/qmesh.h
+++ b/src/render/geometry/qmesh.h
@@ -61,7 +61,7 @@ class QT3DRENDERSHARED_EXPORT QMesh : public QGeometryRenderer
Q_PROPERTY(QString meshName READ meshName WRITE setMeshName NOTIFY meshNameChanged)
public:
- explicit QMesh(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QMesh(Qt3DCore::QNode *parent = nullptr);
QUrl source() const;
QString meshName() const;
@@ -75,7 +75,7 @@ Q_SIGNALS:
void meshNameChanged(const QString &meshName);
protected:
- QMesh(QMeshPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QMesh(QMeshPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QMesh)
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index f48372edb..baad5a714 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -126,23 +126,23 @@ unsigned int nextFreeContextId()
GraphicsContext::GraphicsContext()
: m_initialized(false)
, m_id(nextFreeContextId())
- , m_gl(Q_NULLPTR)
- , m_surface(Q_NULLPTR)
- , m_glHelper(Q_NULLPTR)
+ , m_gl(nullptr)
+ , m_surface(nullptr)
+ , m_glHelper(nullptr)
, m_ownCurrent(true)
- , m_activeShader(Q_NULLPTR)
+ , m_activeShader(nullptr)
, m_currClearStencilValue(0)
, m_currClearDepthValue(1.f)
, m_currClearColorValue(0,0,0,0)
- , m_material(Q_NULLPTR)
+ , m_material(nullptr)
, m_activeFBO(0)
, m_defaultFBO(0)
, m_boundArrayBuffer(nullptr)
- , m_stateSet(Q_NULLPTR)
- , m_renderer(Q_NULLPTR)
+ , m_stateSet(nullptr)
+ , m_renderer(nullptr)
, m_uboTempArray(QByteArray(1024, 0))
, m_supportsVAO(true)
- , m_debugLogger(Q_NULLPTR)
+ , m_debugLogger(nullptr)
{
static_contexts[m_id] = this;
}
@@ -255,7 +255,7 @@ void GraphicsContext::endDrawing(bool swapBuffers)
m_gl->swapBuffers(m_surface);
if (m_ownCurrent)
m_gl->doneCurrent();
- m_stateSet = Q_NULLPTR;
+ m_stateSet = nullptr;
decayTextureScores();
}
@@ -326,7 +326,7 @@ void GraphicsContext::releaseOpenGL()
// Stop and destroy the OpenGL logger
if (m_debugLogger) {
m_debugLogger->stopLogging();
- m_debugLogger.reset(Q_NULLPTR);
+ m_debugLogger.reset(nullptr);
}
}
@@ -354,7 +354,7 @@ void GraphicsContext::activateGLHelper()
bool GraphicsContext::hasValidGLHelper() const
{
- return m_glHelper != Q_NULLPTR;
+ return m_glHelper != nullptr;
}
bool GraphicsContext::makeCurrent(QSurface *surface)
@@ -385,9 +385,9 @@ void GraphicsContext::doneCurrent()
// That assumes that the shaderProgram in Shader stays the same
void GraphicsContext::activateShader(Shader *shader)
{
- if (shader == Q_NULLPTR) {
- m_activeShader = Q_NULLPTR;
- m_material = Q_NULLPTR;
+ if (shader == nullptr) {
+ m_activeShader = nullptr;
+ m_material = nullptr;
m_glHelper->useProgram(0);
return;
}
@@ -404,7 +404,7 @@ void GraphicsContext::activateShader(Shader *shader)
shader->initializeUniformBlocks(m_glHelper->programUniformBlocks(prog->programId()));
if (m_glHelper->supportsFeature(GraphicsHelperInterface::ShaderStorageObject))
shader->initializeShaderStorageBlocks(m_glHelper->programShaderStorageBlocks(prog->programId()));
- m_activeShader = Q_NULLPTR;
+ m_activeShader = nullptr;
} else if (!shader->isLoaded()) {
// Shader program is already in the m_shaderHash but we still need to
// ensure that the Shader has full knowledge of attributes, uniforms,
@@ -412,28 +412,28 @@ void GraphicsContext::activateShader(Shader *shader)
shader->initialize(*m_renderShaderHash.value(shader->dna()));
}
- if (m_activeShader != Q_NULLPTR && m_activeShader->dna() == shader->dna()) {
+ if (m_activeShader != nullptr && m_activeShader->dna() == shader->dna()) {
// no op
} else {
m_activeShader = shader;
QOpenGLShaderProgram* prog = m_renderShaderHash[shader->dna()]->getOrCreateProgram(this);
prog->bind();
// ensure material uniforms are re-applied
- m_material = Q_NULLPTR;
+ m_material = nullptr;
}
}
/*!
* \internal
* Returns the QOpenGLShaderProgram matching the ProgramDNA \a dna. If no match
- * is found, Q_NULLPTR is returned.
+ * is found, nullptr is returned.
*/
QOpenGLShaderProgram *GraphicsContext::containsProgram(const ProgramDNA &dna)
{
- Shader *renderShader = m_renderShaderHash.value(dna, Q_NULLPTR);
+ Shader *renderShader = m_renderShaderHash.value(dna, nullptr);
if (renderShader)
return renderShader->getOrCreateProgram(this);
- return Q_NULLPTR;
+ return nullptr;
}
void GraphicsContext::removeProgram(const ProgramDNA &dna, Qt3DCore::QNodeId id)
@@ -446,7 +446,7 @@ void GraphicsContext::removeProgram(const ProgramDNA &dna, Qt3DCore::QNodeId id)
void GraphicsContext::activateRenderTarget(RenderTarget *renderTarget, const AttachmentPack &attachments, GLuint defaultFboId)
{
GLuint fboId = defaultFboId; // Default FBO
- if (renderTarget != Q_NULLPTR) {
+ if (renderTarget != nullptr) {
// New RenderTarget
if (!m_renderTargets.contains(renderTarget->peerId())) {
if (m_defaultFBO && fboId == m_defaultFBO) {
@@ -471,7 +471,7 @@ void GraphicsContext::activateRenderTarget(RenderTarget *renderTarget, const Att
bool needsResize = false;
Q_FOREACH (const Attachment &attachment, attachments.attachments()) {
Texture *rTex = textureManager->lookupResource(attachment.m_textureUuid);
- if (rTex != Q_NULLPTR)
+ if (rTex != nullptr)
needsResize |= rTex->isTextureReset();
}
if (needsResize) {
@@ -494,9 +494,9 @@ void GraphicsContext::bindFrameBufferAttachmentHelper(GLuint fboId, const Attach
TextureManager *textureManager = m_renderer->nodeManagers()->textureManager();
Q_FOREACH (const Attachment &attachment, attachments.attachments()) {
Texture *rTex =textureManager->lookupResource(attachment.m_textureUuid);
- if (rTex != Q_NULLPTR) {
+ if (rTex != nullptr) {
QOpenGLTexture *glTex = rTex->getOrCreateGLTexture();
- if (glTex != Q_NULLPTR) {
+ if (glTex != nullptr) {
if (fboSize.isEmpty())
fboSize = QSize(glTex->width(), glTex->height());
else
@@ -587,26 +587,26 @@ void GraphicsContext::deactivateTexturesWithScope(TextureScope ts)
GraphicsHelperInterface *GraphicsContext::resolveHighestOpenGLFunctions()
{
Q_ASSERT(m_gl);
- GraphicsHelperInterface *glHelper = Q_NULLPTR;
+ GraphicsHelperInterface *glHelper = nullptr;
if (m_gl->isOpenGLES()) {
glHelper = new GraphicsHelperES2();
- glHelper->initializeHelper(m_gl, Q_NULLPTR);
+ glHelper->initializeHelper(m_gl, nullptr);
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 2/ES2 Helper";
}
#ifndef QT_OPENGL_ES_2
else {
- QAbstractOpenGLFunctions *glFunctions = Q_NULLPTR;
- if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_4_3_Core>()) != Q_NULLPTR) {
+ QAbstractOpenGLFunctions *glFunctions = nullptr;
+ if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_4_3_Core>()) != nullptr) {
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 4.3";
glHelper = new GraphicsHelperGL4();
- } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_3_3_Core>()) != Q_NULLPTR) {
+ } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_3_3_Core>()) != nullptr) {
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 3.3";
glHelper = new GraphicsHelperGL3_3();
- } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_3_2_Core>()) != Q_NULLPTR) {
+ } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_3_2_Core>()) != nullptr) {
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 3.2";
glHelper = new GraphicsHelperGL3();
- } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_2_0>()) != Q_NULLPTR) {
+ } else if ((glFunctions = m_gl->versionFunctions<QOpenGLFunctions_2_0>()) != nullptr) {
qCDebug(Backend) << Q_FUNC_INFO << " Building OpenGL 2 Helper";
glHelper = new GraphicsHelperGL2();
}
@@ -1009,7 +1009,7 @@ void GraphicsContext::setParameters(ShaderParameterPack &parameterPack)
const ShaderParameterPack::NamedTexture &namedTex = parameterPack.textures().at(i);
Texture *t = manager->lookupResource<Texture, TextureManager>(namedTex.texId);
// TO DO : Rework the way textures are loaded
- if (t != Q_NULLPTR) {
+ if (t != nullptr) {
int texUnit = activateTexture(TextureScopeMaterial, t);
if (uniformValues.contains(namedTex.glslNameId)) {
QUniformValue &texUniform = uniformValues[namedTex.glslNameId];
@@ -1068,7 +1068,7 @@ void GraphicsContext::setParameters(ShaderParameterPack &parameterPack)
void GraphicsContext::specifyAttribute(const Attribute *attribute, Buffer *buffer, const QString &shaderName)
{
- if (attribute == Q_NULLPTR || buffer == Q_NULLPTR)
+ if (attribute == nullptr || buffer == nullptr)
return;
GLBuffer *buf = glBufferForRenderBuffer(buffer);
diff --git a/src/render/graphicshelpers/graphicshelpergl2.cpp b/src/render/graphicshelpers/graphicshelpergl2.cpp
index 1f27831bd..58529fc54 100644
--- a/src/render/graphicshelpers/graphicshelpergl2.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl2.cpp
@@ -51,8 +51,8 @@ namespace Qt3DRender {
namespace Render {
GraphicsHelperGL2::GraphicsHelperGL2()
- : m_funcs(Q_NULLPTR)
- , m_fboFuncs(Q_NULLPTR)
+ : m_funcs(nullptr)
+ , m_fboFuncs(nullptr)
{
}
@@ -268,7 +268,7 @@ void GraphicsHelperGL2::setAlphaCoverageEnabled(bool enabled)
GLuint GraphicsHelperGL2::createFrameBufferObject()
{
- if (m_fboFuncs != Q_NULLPTR) {
+ if (m_fboFuncs != nullptr) {
GLuint id;
m_fboFuncs->glGenFramebuffers(1, &id);
return id;
@@ -279,7 +279,7 @@ GLuint GraphicsHelperGL2::createFrameBufferObject()
void GraphicsHelperGL2::releaseFrameBufferObject(GLuint frameBufferId)
{
- if (m_fboFuncs != Q_NULLPTR)
+ if (m_fboFuncs != nullptr)
m_fboFuncs->glDeleteFramebuffers(1, &frameBufferId);
else
qWarning() << "FBO not supported by your OpenGL hardware";
@@ -287,14 +287,14 @@ void GraphicsHelperGL2::releaseFrameBufferObject(GLuint frameBufferId)
bool GraphicsHelperGL2::checkFrameBufferComplete()
{
- if (m_fboFuncs != Q_NULLPTR)
+ if (m_fboFuncs != nullptr)
return (m_fboFuncs->glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE);
return false;
}
void GraphicsHelperGL2::bindFrameBufferAttachment(QOpenGLTexture *texture, const Attachment &attachment)
{
- if (m_fboFuncs != Q_NULLPTR) {
+ if (m_fboFuncs != nullptr) {
GLenum attr = GL_DEPTH_STENCIL_ATTACHMENT;
if (attachment.m_point <= QRenderTargetOutput::Color15)
@@ -326,7 +326,7 @@ bool GraphicsHelperGL2::supportsFeature(GraphicsHelperInterface::Feature feature
{
switch (feature) {
case MRT:
- return (m_fboFuncs != Q_NULLPTR);
+ return (m_fboFuncs != nullptr);
case TextureDimensionRetrieval:
return true;
default:
@@ -442,7 +442,7 @@ void GraphicsHelperGL2::bindUniform(const QVariant &v, const ShaderUniform &desc
void GraphicsHelperGL2::bindFrameBufferObject(GLuint frameBufferId)
{
- if (m_fboFuncs != Q_NULLPTR)
+ if (m_fboFuncs != nullptr)
m_fboFuncs->glBindFramebuffer(GL_READ_FRAMEBUFFER, frameBufferId);
else
qWarning() << "FBO not supported by your OpenGL hardware";
diff --git a/src/render/graphicshelpers/graphicshelpergl3.cpp b/src/render/graphicshelpers/graphicshelpergl3.cpp
index c92027c70..1d4282b29 100644
--- a/src/render/graphicshelpers/graphicshelpergl3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3.cpp
@@ -72,7 +72,7 @@ namespace Qt3DRender {
namespace Render {
GraphicsHelperGL3::GraphicsHelperGL3()
- : m_funcs(Q_NULLPTR)
+ : m_funcs(nullptr)
, m_tessFuncs()
{
}
diff --git a/src/render/graphicshelpers/graphicshelpergl3_3.cpp b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
index a176e4f1f..ecdf564bb 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
@@ -71,7 +71,7 @@ namespace Qt3DRender {
namespace Render {
GraphicsHelperGL3_3::GraphicsHelperGL3_3()
- : m_funcs(Q_NULLPTR)
+ : m_funcs(nullptr)
, m_tessFuncs()
{
}
diff --git a/src/render/graphicshelpers/graphicshelpergl4.cpp b/src/render/graphicshelpers/graphicshelpergl4.cpp
index d7f4ff524..72865270b 100644
--- a/src/render/graphicshelpers/graphicshelpergl4.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl4.cpp
@@ -70,7 +70,7 @@ namespace Qt3DRender {
namespace Render {
GraphicsHelperGL4::GraphicsHelperGL4()
- : m_funcs(Q_NULLPTR)
+ : m_funcs(nullptr)
{
}
diff --git a/src/render/io/qsceneloader.h b/src/render/io/qsceneloader.h
index 1cdc03da3..59bf63e03 100644
--- a/src/render/io/qsceneloader.h
+++ b/src/render/io/qsceneloader.h
@@ -57,7 +57,7 @@ class QT3DRENDERSHARED_EXPORT QSceneLoader : public Qt3DCore::QComponent
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
public:
- explicit QSceneLoader(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QSceneLoader(Qt3DCore::QNode *parent = nullptr);
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE;
enum Status {
diff --git a/src/render/io/qsceneparserfactory.cpp b/src/render/io/qsceneparserfactory.cpp
index de1c80a91..b3f8730e5 100644
--- a/src/render/io/qsceneparserfactory.cpp
+++ b/src/render/io/qsceneparserfactory.cpp
@@ -88,7 +88,7 @@ QSceneIOHandler *QSceneParserFactory::create(const QString &name, const QStringL
if (QSceneIOHandler *ret = qLoadPlugin<QSceneIOHandler, QSceneParserPlugin>(loader(), name, args))
return ret;
#endif
- return Q_NULLPTR;
+ return nullptr;
}
} // namespace Qt3DRender
diff --git a/src/render/io/qsceneparserplugin.cpp b/src/render/io/qsceneparserplugin.cpp
index 7701ad8a1..2943a30c8 100644
--- a/src/render/io/qsceneparserplugin.cpp
+++ b/src/render/io/qsceneparserplugin.cpp
@@ -57,7 +57,7 @@ QSceneIOHandler *QSceneParserPlugin::create(const QString &key, const QStringLis
{
Q_UNUSED(key)
Q_UNUSED(paramList)
- return Q_NULLPTR;
+ return nullptr;
}
} // namespace Qt3DRender
diff --git a/src/render/io/qsceneparserplugin.h b/src/render/io/qsceneparserplugin.h
index 276b7607f..c18a26610 100644
--- a/src/render/io/qsceneparserplugin.h
+++ b/src/render/io/qsceneparserplugin.h
@@ -58,7 +58,7 @@ class QT3DRENDERSHARED_EXPORT QSceneParserPlugin : public QObject
{
Q_OBJECT
public:
- explicit QSceneParserPlugin(QObject *parent = Q_NULLPTR);
+ explicit QSceneParserPlugin(QObject *parent = nullptr);
~QSceneParserPlugin();
virtual QSceneIOHandler *create(const QString &key, const QStringList &paramList);
diff --git a/src/render/io/scene.cpp b/src/render/io/scene.cpp
index c7cc15d59..f21d2e7ab 100644
--- a/src/render/io/scene.cpp
+++ b/src/render/io/scene.cpp
@@ -57,7 +57,7 @@ namespace Render {
Scene::Scene()
: BackendNode(QBackendNode::ReadWrite)
- , m_sceneManager(Q_NULLPTR)
+ , m_sceneManager(nullptr)
{
}
diff --git a/src/render/jobs/calcboundingvolumejob.cpp b/src/render/jobs/calcboundingvolumejob.cpp
index 8b494622d..5c57eb432 100644
--- a/src/render/jobs/calcboundingvolumejob.cpp
+++ b/src/render/jobs/calcboundingvolumejob.cpp
@@ -162,7 +162,7 @@ void calculateLocalBoundingVolume(NodeManagers *manager, Entity *node)
CalculateBoundingVolumeJob::CalculateBoundingVolumeJob(NodeManagers *manager)
: m_manager(manager),
- m_node(Q_NULLPTR)
+ m_node(nullptr)
{
SET_JOB_RUN_STAT_TYPE(this, JobTypes::CalcBoundingVolume, 0);
}
diff --git a/src/render/jobs/calcgeometrytrianglevolumes.cpp b/src/render/jobs/calcgeometrytrianglevolumes.cpp
index 6eac8df27..d2b12e09c 100644
--- a/src/render/jobs/calcgeometrytrianglevolumes.cpp
+++ b/src/render/jobs/calcgeometrytrianglevolumes.cpp
@@ -59,7 +59,7 @@ CalcGeometryTriangleVolumes::CalcGeometryTriangleVolumes(const Qt3DCore::QNodeId
void CalcGeometryTriangleVolumes::run()
{
GeometryRenderer *renderer = m_manager->geometryRendererManager()->lookupResource(m_geometryRendererId);
- if (renderer != Q_NULLPTR) {
+ if (renderer != nullptr) {
TrianglesExtractor extractor(renderer, m_manager);
renderer->setTriangleVolumes(extractor.extract(m_geometryRendererId));
}
diff --git a/src/render/jobs/framecleanupjob.cpp b/src/render/jobs/framecleanupjob.cpp
index d31b406a9..7022660c4 100644
--- a/src/render/jobs/framecleanupjob.cpp
+++ b/src/render/jobs/framecleanupjob.cpp
@@ -54,7 +54,7 @@ namespace Render {
FrameCleanupJob::FrameCleanupJob(NodeManagers *managers)
: m_managers(managers)
- , m_root(Q_NULLPTR)
+ , m_root(nullptr)
{
SET_JOB_RUN_STAT_TYPE(this, JobTypes::FrameCleanup, 0);
}
diff --git a/src/render/jobs/framepreparationjob.cpp b/src/render/jobs/framepreparationjob.cpp
index 35a6077a9..90fa7eb13 100644
--- a/src/render/jobs/framepreparationjob.cpp
+++ b/src/render/jobs/framepreparationjob.cpp
@@ -59,7 +59,7 @@ namespace Qt3DRender {
namespace Render {
FramePreparationJob::FramePreparationJob(NodeManagers *manager)
- : m_root(Q_NULLPTR)
+ : m_root(nullptr)
, m_manager(manager)
{
SET_JOB_RUN_STAT_TYPE(this, JobTypes::FramePreparation, 0);
@@ -90,20 +90,20 @@ void FramePreparationJob::parseNodeTree(Entity *node)
// in which case we need to recompute the triangle list
GeometryRenderer *geomRenderer = node->renderComponent<GeometryRenderer>();
const Qt3DCore::QNodeId geomRendererId = node->componentUuid<GeometryRenderer>();
- Geometry *geom = Q_NULLPTR;
+ Geometry *geom = nullptr;
if (geomRenderer &&
- (geom = m_manager->lookupResource<Geometry, GeometryManager>(geomRenderer->geometryId())) != Q_NULLPTR) {
+ (geom = m_manager->lookupResource<Geometry, GeometryManager>(geomRenderer->geometryId())) != nullptr) {
if (!m_manager->geometryRendererManager()->isGeometryRendererScheduledForTriangleDataRefresh(geomRendererId)) {
// Check if the attributes or buffers are dirty
bool dirty = geomRenderer->isDirty();
- Attribute *attr = Q_NULLPTR;
+ Attribute *attr = nullptr;
const auto attrIds = geom->attributes();
for (const Qt3DCore::QNodeId attrId : attrIds) {
- if ((attr = m_manager->attributeManager()->lookupResource(attrId)) != Q_NULLPTR) {
+ if ((attr = m_manager->attributeManager()->lookupResource(attrId)) != nullptr) {
dirty |= attr->isDirty();
if (!dirty) {
- Buffer *buffer = Q_NULLPTR;
- if ((buffer = m_manager->bufferManager()->lookupResource(attr->bufferId())) != Q_NULLPTR)
+ Buffer *buffer = nullptr;
+ if ((buffer = m_manager->bufferManager()->lookupResource(attr->bufferId())) != nullptr)
dirty = buffer->isDirty();
}
if (dirty)
diff --git a/src/render/jobs/loadbufferjob.cpp b/src/render/jobs/loadbufferjob.cpp
index 724261946..49f271df5 100644
--- a/src/render/jobs/loadbufferjob.cpp
+++ b/src/render/jobs/loadbufferjob.cpp
@@ -53,7 +53,7 @@ namespace Render {
LoadBufferJob::LoadBufferJob(const HBuffer &handle)
: QAspectJob()
, m_handle(handle)
- , m_nodeManagers(Q_NULLPTR)
+ , m_nodeManagers(nullptr)
{
SET_JOB_RUN_STAT_TYPE(this, JobTypes::LoadBuffer, 0);
}
diff --git a/src/render/jobs/loadgeometryjob.cpp b/src/render/jobs/loadgeometryjob.cpp
index 7300539d7..106ccbd86 100644
--- a/src/render/jobs/loadgeometryjob.cpp
+++ b/src/render/jobs/loadgeometryjob.cpp
@@ -62,7 +62,7 @@ LoadGeometryJob::~LoadGeometryJob()
void LoadGeometryJob::run()
{
GeometryRenderer *geometryRenderer = m_nodeManagers->geometryRendererManager()->data(m_handle);
- if (geometryRenderer != Q_NULLPTR)
+ if (geometryRenderer != nullptr)
geometryRenderer->executeFunctor();
}
diff --git a/src/render/jobs/loadscenejob.cpp b/src/render/jobs/loadscenejob.cpp
index 003d0f2dd..ac697f1db 100644
--- a/src/render/jobs/loadscenejob.cpp
+++ b/src/render/jobs/loadscenejob.cpp
@@ -54,7 +54,7 @@ LoadSceneJob::LoadSceneJob(const QUrl &source, Qt3DCore::QNodeId m_sceneComponen
: QAspectJob()
, m_source(source)
, m_sceneComponent(m_sceneComponent)
- , m_managers(Q_NULLPTR)
+ , m_managers(nullptr)
{
SET_JOB_RUN_STAT_TYPE(this, JobTypes::LoadScene, 0);
}
diff --git a/src/render/jobs/loadtexturedatajob.cpp b/src/render/jobs/loadtexturedatajob.cpp
index 7d90dfef9..174007c80 100644
--- a/src/render/jobs/loadtexturedatajob.cpp
+++ b/src/render/jobs/loadtexturedatajob.cpp
@@ -65,7 +65,7 @@ static QPair<HTextureData, QTexImageData *> textureDataFromGenerator(TextureData
QTextureImageDataGeneratorPtr generator)
{
HTextureData textureDataHandle;
- QTexImageData *data = Q_NULLPTR;
+ QTexImageData *data = nullptr;
QMutexLocker locker(textureDataManager->mutex());
// We don't want to take the chance of having two jobs uploading the same functor
@@ -99,7 +99,7 @@ void LoadTextureDataJob::run()
Texture *txt = m_manager->textureManager()->lookupResource(m_textureId);
TextureDataManager *textureDataManager = m_manager->manager<QTexImageData, TextureDataManager>();
- if (txt != Q_NULLPTR) {
+ if (txt != nullptr) {
if (txt->dataGenerator()) {
QTextureImageDataGeneratorPtr generator = txt->dataGenerator();
@@ -126,7 +126,7 @@ void LoadTextureDataJob::run()
const auto texImgHandles = txt->textureImages();
for (HTextureImage texImgHandle : texImgHandles) {
TextureImage *texImg = m_manager->textureImageManager()->data(texImgHandle);
- if (texImg != Q_NULLPTR && texImg->isDirty() && !texImg->dataGenerator().isNull()) {
+ if (texImg != nullptr && texImg->isDirty() && !texImg->dataGenerator().isNull()) {
QTextureImageDataGeneratorPtr generator = texImg->dataGenerator();
QPair<HTextureData, QTexImageData *> handleData = textureDataFromGenerator(textureDataManager, generator);
@@ -150,7 +150,7 @@ void LoadTextureDataJob::run()
if (texImg->layer() == 0 && texImg->mipLevel() == 0 &&
texImg->face() == QAbstractTexture::CubeMapPositiveX) {
- if (data == Q_NULLPTR) {
+ if (data == nullptr) {
qWarning() << "Texture data is null, texture data failed to load";
} else {
// Set the size of the texture based on the layer 0 / level 0
diff --git a/src/render/jobs/pickboundingvolumejob.cpp b/src/render/jobs/pickboundingvolumejob.cpp
index c8dadcea4..07b665c37 100644
--- a/src/render/jobs/pickboundingvolumejob.cpp
+++ b/src/render/jobs/pickboundingvolumejob.cpp
@@ -139,7 +139,7 @@ public:
static QVector<Entity *> gatherEntities(Entity *entity, QVector<Entity *> entities)
{
- if (entity != Q_NULLPTR) {
+ if (entity != nullptr) {
entities.push_back(entity);
// Traverse children
const auto children = entity->children();
@@ -225,14 +225,14 @@ struct AbstractCollisionGathererFunctor
// If the Entity which actually received the hit doesn't have
// an object picker component, we need to check the parent if it has one ...
- while (objectPickerHandle.isNull() && entity != Q_NULLPTR) {
+ while (objectPickerHandle.isNull() && entity != nullptr) {
entity = entity->parent();
- if (entity != Q_NULLPTR)
+ if (entity != nullptr)
objectPickerHandle = entity->componentHandle<ObjectPicker, 16>();
}
ObjectPicker *objectPicker = m_renderer->nodeManagers()->objectPickerManager()->data(objectPickerHandle);
- if (objectPicker == Q_NULLPTR)
+ if (objectPicker == nullptr)
return result_type(); // don't bother picking entities that don't have an object picker
Qt3DRender::QRayCastingService rayCasting;
@@ -324,7 +324,7 @@ CollisionVisitor::HitList reduceToAllHits(CollisionVisitor::HitList &results, co
PickBoundingVolumeJob::PickBoundingVolumeJob(Renderer *renderer)
: m_renderer(renderer)
, m_manager(renderer->nodeManagers())
- , m_node(Q_NULLPTR)
+ , m_node(nullptr)
{
SET_JOB_RUN_STAT_TYPE(this, JobTypes::PickBoundingVolume, 0);
}
@@ -395,15 +395,15 @@ void PickBoundingVolumeJob::run()
// If the Entity which actually received the hit doesn't have
// an object picker component, we need to check the parent if it has one ...
- while (objectPickerHandle.isNull() && entity != Q_NULLPTR) {
+ while (objectPickerHandle.isNull() && entity != nullptr) {
entity = entity->parent();
- if (entity != Q_NULLPTR)
+ if (entity != nullptr)
objectPickerHandle = entity->componentHandle<ObjectPicker, 16>();
}
ObjectPicker *objectPicker = m_manager->objectPickerManager()->data(objectPickerHandle);
- if (objectPicker != Q_NULLPTR) {
+ if (objectPicker != nullptr) {
// Send the corresponding event
QVector3D localIntersection = hit.m_intersection;
if (entity && entity->worldTransform())
@@ -427,7 +427,7 @@ void PickBoundingVolumeJob::run()
case QEvent::MouseButtonRelease: {
// Send release event to m_currentPicker
- if (lastCurrentPicker != Q_NULLPTR) {
+ if (lastCurrentPicker != nullptr) {
m_currentPicker = HObjectPicker();
lastCurrentPicker->onClicked(pickEvent);
lastCurrentPicker->onReleased(pickEvent);
@@ -474,7 +474,7 @@ void PickBoundingVolumeJob::run()
switch (event.type()) {
case QEvent::MouseButtonRelease: {
// Send release event to m_currentPicker
- if (lastCurrentPicker != Q_NULLPTR) {
+ if (lastCurrentPicker != nullptr) {
m_currentPicker = HObjectPicker();
QPickEventPtr pickEvent(new QPickEvent);
lastCurrentPicker->onReleased(pickEvent);
@@ -503,10 +503,10 @@ void PickBoundingVolumeJob::viewMatrixForCamera(Qt3DCore::QNodeId cameraId,
QMatrix4x4 &viewMatrix,
QMatrix4x4 &projectionMatrix) const
{
- Render::CameraLens *lens = Q_NULLPTR;
+ Render::CameraLens *lens = nullptr;
Entity *camNode = m_manager->renderNodesManager()->lookupResource(cameraId);
- if (camNode != Q_NULLPTR &&
- (lens = camNode->renderComponent<CameraLens>()) != Q_NULLPTR &&
+ if (camNode != nullptr &&
+ (lens = camNode->renderComponent<CameraLens>()) != nullptr &&
lens->isEnabled()) {
viewMatrix = *camNode->worldTransform();
projectionMatrix = lens->projection();
diff --git a/src/render/jobs/renderviewjobutils.cpp b/src/render/jobs/renderviewjobutils.cpp
index 3dad829c8..caad0bdcb 100644
--- a/src/render/jobs/renderviewjobutils.cpp
+++ b/src/render/jobs/renderviewjobutils.cpp
@@ -183,7 +183,7 @@ void setRenderViewConfigFromFrameGraphLeafNode(RenderView *rv, const FrameGraphN
const Render::StateSetNode *rStateSet = static_cast<const Render::StateSetNode *>(node);
// Create global RenderStateSet for renderView if no stateSet was set before
RenderStateSet *stateSet = rv->stateSet();
- if (stateSet == Q_NULLPTR) {
+ if (stateSet == nullptr) {
stateSet = rv->allocator()->allocate<RenderStateSet>();
rv->setStateSet(stateSet);
}
@@ -218,7 +218,7 @@ void setRenderViewConfigFromFrameGraphLeafNode(RenderView *rv, const FrameGraphN
case FrameGraphNode::Surface: {
// Use the surface closest to leaf node
- if (rv->surface() == Q_NULLPTR) {
+ if (rv->surface() == nullptr) {
const Render::RenderSurfaceSelector *surfaceSelector
= static_cast<const Render::RenderSurfaceSelector *>(node);
rv->setSurface(surfaceSelector->surface());
@@ -246,7 +246,7 @@ Technique *findTechniqueForEffect(Renderer *renderer,
Effect *effect)
{
if (!effect)
- return Q_NULLPTR;
+ return nullptr;
NodeManagers *manager = renderer->nodeManagers();
@@ -263,7 +263,7 @@ Technique *findTechniqueForEffect(Renderer *renderer,
// If no techniqueFilter is present, we return the technique as it satisfies OpenGL version
const TechniqueFilter *techniqueFilter = renderView->techniqueFilter();
- bool foundMatch = (techniqueFilter == Q_NULLPTR || techniqueFilter->filters().isEmpty());
+ bool foundMatch = (techniqueFilter == nullptr || techniqueFilter->filters().isEmpty());
if (foundMatch)
return technique;
@@ -300,7 +300,7 @@ Technique *findTechniqueForEffect(Renderer *renderer,
}
// We failed to find a suitable technique to use :(
- return Q_NULLPTR;
+ return nullptr;
}
@@ -412,7 +412,7 @@ const int qNodeIdTypeId = qMetaTypeId<QNodeId>();
}
UniformBlockValueBuilder::UniformBlockValueBuilder()
- : shaderDataManager(Q_NULLPTR)
+ : shaderDataManager(nullptr)
{
}
diff --git a/src/render/jobs/updateboundingvolumejob.cpp b/src/render/jobs/updateboundingvolumejob.cpp
index cd6632211..9a4a9f27e 100644
--- a/src/render/jobs/updateboundingvolumejob.cpp
+++ b/src/render/jobs/updateboundingvolumejob.cpp
@@ -73,7 +73,7 @@ void expandWorldBoundingVolume(Qt3DRender::Render::Entity *node)
}
UpdateBoundingVolumeJob::UpdateBoundingVolumeJob()
- : m_node(Q_NULLPTR)
+ : m_node(nullptr)
{
SET_JOB_RUN_STAT_TYPE(this, JobTypes::UpdateBoundingVolume, 0);
}
diff --git a/src/render/jobs/updateworldtransformjob.cpp b/src/render/jobs/updateworldtransformjob.cpp
index 83a888e6d..3c621dbd0 100644
--- a/src/render/jobs/updateworldtransformjob.cpp
+++ b/src/render/jobs/updateworldtransformjob.cpp
@@ -59,7 +59,7 @@ void updateWorldTransformAndBounds(Qt3DRender::Render::Entity *node, const QMatr
{
QMatrix4x4 worldTransform(parentTransform);
Transform *nodeTransform = node->renderComponent<Transform>();
- if (nodeTransform != Q_NULLPTR && nodeTransform->isEnabled())
+ if (nodeTransform != nullptr && nodeTransform->isEnabled())
worldTransform = worldTransform * nodeTransform->transformMatrix();
*(node->worldTransform()) = worldTransform;
@@ -75,7 +75,7 @@ void updateWorldTransformAndBounds(Qt3DRender::Render::Entity *node, const QMatr
UpdateWorldTransformJob::UpdateWorldTransformJob()
: Qt3DCore::QAspectJob()
- , m_node(Q_NULLPTR)
+ , m_node(nullptr)
{
SET_JOB_RUN_STAT_TYPE(this, JobTypes::UpdateTransform, 0);
}
@@ -98,7 +98,7 @@ void UpdateWorldTransformJob::run()
QMatrix4x4 parentTransform;
Entity *parent = m_node->parent();
- if (parent != Q_NULLPTR)
+ if (parent != nullptr)
parentTransform = *(parent->worldTransform());
updateWorldTransformAndBounds(m_node, parentTransform);
diff --git a/src/render/lights/light.cpp b/src/render/lights/light.cpp
index 87a0553bb..1bf5e2f85 100644
--- a/src/render/lights/light.cpp
+++ b/src/render/lights/light.cpp
@@ -57,7 +57,7 @@ void Light::updateFromPeer(QNode *node)
{
QAbstractLight *light = static_cast<QAbstractLight *>(node);
QShaderData *shaderData = light->findChild<QShaderData *>();
- if (shaderData != Q_NULLPTR)
+ if (shaderData != nullptr)
m_shaderDataId = shaderData->id();
}
diff --git a/src/render/lights/qabstractlight.h b/src/render/lights/qabstractlight.h
index 29c4eece1..3881257c4 100644
--- a/src/render/lights/qabstractlight.h
+++ b/src/render/lights/qabstractlight.h
@@ -76,7 +76,7 @@ public Q_SLOTS:
void setIntensity(float intensity);
protected :
- QAbstractLight(QAbstractLightPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QAbstractLight(QAbstractLightPrivate &dd, Qt3DCore::QNode *parent = nullptr);
Q_SIGNALS:
diff --git a/src/render/lights/qdirectionallight.h b/src/render/lights/qdirectionallight.h
index 79ad7c663..a0c756330 100644
--- a/src/render/lights/qdirectionallight.h
+++ b/src/render/lights/qdirectionallight.h
@@ -54,7 +54,7 @@ class QT3DRENDERSHARED_EXPORT QDirectionalLight : public QAbstractLight
Q_PROPERTY(QVector3D worldDirection READ worldDirection WRITE setWorldDirection NOTIFY worldDirectionChanged)
public:
- explicit QDirectionalLight(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QDirectionalLight(Qt3DCore::QNode *parent = nullptr);
QVector3D worldDirection() const;
@@ -65,7 +65,7 @@ Q_SIGNALS:
void worldDirectionChanged(const QVector3D &worldDirection);
protected:
- QDirectionalLight(QDirectionalLightPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QDirectionalLight(QDirectionalLightPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QDirectionalLight)
diff --git a/src/render/lights/qpointlight.h b/src/render/lights/qpointlight.h
index 6f975f07b..c5b9b2d51 100644
--- a/src/render/lights/qpointlight.h
+++ b/src/render/lights/qpointlight.h
@@ -56,7 +56,7 @@ class QT3DRENDERSHARED_EXPORT QPointLight : public QAbstractLight
Q_PROPERTY(float quadraticAttenuation READ quadraticAttenuation WRITE setQuadraticAttenuation NOTIFY quadraticAttenuationChanged)
public:
- explicit QPointLight(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QPointLight(Qt3DCore::QNode *parent = nullptr);
float constantAttenuation() const;
float linearAttenuation() const;
diff --git a/src/render/lights/qspotlight.h b/src/render/lights/qspotlight.h
index d66aa2719..fff75e50e 100644
--- a/src/render/lights/qspotlight.h
+++ b/src/render/lights/qspotlight.h
@@ -58,7 +58,7 @@ class QT3DRENDERSHARED_EXPORT QSpotLight : public QAbstractLight
Q_PROPERTY(float cutOffAngle READ cutOffAngle WRITE setCutOffAngle NOTIFY cutOffAngleChanged)
public:
- explicit QSpotLight(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QSpotLight(Qt3DCore::QNode *parent = nullptr);
QVector3D attenuation() const;
QVector3D localDirection() const;
@@ -83,7 +83,7 @@ Q_SIGNALS:
void cutOffAngleChanged(float cutOffAngle);
protected:
- QSpotLight(QSpotLightPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QSpotLight(QSpotLightPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QSpotLight)
diff --git a/src/render/materialsystem/material.cpp b/src/render/materialsystem/material.cpp
index 5b4a3b44f..34e23a3fb 100644
--- a/src/render/materialsystem/material.cpp
+++ b/src/render/materialsystem/material.cpp
@@ -78,7 +78,7 @@ void Material::updateFromPeer(Qt3DCore::QNode *node)
{
QMaterial *mat = static_cast<QMaterial *>(node);
m_parameterPack.clear();
- if (mat->effect() != Q_NULLPTR)
+ if (mat->effect() != nullptr)
m_effectUuid = mat->effect()->id();
Q_FOREACH (QParameter *p, mat->parameters())
m_parameterPack.appendParameter(p->id());
diff --git a/src/render/materialsystem/qeffect.cpp b/src/render/materialsystem/qeffect.cpp
index 50fdf5a5c..53fe4f4e6 100644
--- a/src/render/materialsystem/qeffect.cpp
+++ b/src/render/materialsystem/qeffect.cpp
@@ -81,7 +81,7 @@ void QEffect::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
@@ -93,7 +93,7 @@ void QEffect::removeParameter(QParameter *parameter)
{
Q_D(QEffect);
- if (parameter && d->m_changeArbiter != Q_NULLPTR) {
+ if (parameter && d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
@@ -126,7 +126,7 @@ void QEffect::addTechnique(QTechnique *t)
if (!t->parent())
t->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), t);
change->setPropertyName("technique");
d->notifyObservers(change);
@@ -142,7 +142,7 @@ void QEffect::addTechnique(QTechnique *t)
void QEffect::removeTechnique(QTechnique *t)
{
Q_D(QEffect);
- if (t && d->m_changeArbiter != Q_NULLPTR) {
+ if (t && d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), t);
change->setPropertyName("technique");
d->notifyObservers(change);
diff --git a/src/render/materialsystem/qeffect.h b/src/render/materialsystem/qeffect.h
index b5a12f575..c207c441f 100644
--- a/src/render/materialsystem/qeffect.h
+++ b/src/render/materialsystem/qeffect.h
@@ -55,7 +55,7 @@ class QT3DRENDERSHARED_EXPORT QEffect : public Qt3DCore::QNode
{
Q_OBJECT
public:
- explicit QEffect(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QEffect(Qt3DCore::QNode *parent = nullptr);
void addParameter(QParameter *parameter);
void removeParameter(QParameter *parameter);
@@ -66,7 +66,7 @@ public:
QVector<QTechnique *> techniques() const;
protected:
- QEffect(QEffectPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QEffect(QEffectPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QEffect)
diff --git a/src/render/materialsystem/qgraphicsapifilter.h b/src/render/materialsystem/qgraphicsapifilter.h
index 83d586d74..445f31504 100644
--- a/src/render/materialsystem/qgraphicsapifilter.h
+++ b/src/render/materialsystem/qgraphicsapifilter.h
@@ -76,7 +76,7 @@ public:
};
Q_ENUM(OpenGLProfile)
- explicit QGraphicsApiFilter(QObject *parent = Q_NULLPTR);
+ explicit QGraphicsApiFilter(QObject *parent = nullptr);
Api api() const;
OpenGLProfile profile() const;
diff --git a/src/render/materialsystem/qmaterial.cpp b/src/render/materialsystem/qmaterial.cpp
index 5f9bb04d6..cb8cd2bbe 100644
--- a/src/render/materialsystem/qmaterial.cpp
+++ b/src/render/materialsystem/qmaterial.cpp
@@ -80,7 +80,7 @@ namespace Qt3DRender {
QMaterialPrivate::QMaterialPrivate()
: QComponentPrivate()
- , m_effect(Q_NULLPTR)
+ , m_effect(nullptr)
{
}
@@ -137,7 +137,7 @@ void QMaterial::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
@@ -149,7 +149,7 @@ void QMaterial::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QMaterial);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
diff --git a/src/render/materialsystem/qmaterial.h b/src/render/materialsystem/qmaterial.h
index 06df54a4d..48413c4a4 100644
--- a/src/render/materialsystem/qmaterial.h
+++ b/src/render/materialsystem/qmaterial.h
@@ -60,7 +60,7 @@ class QT3DRENDERSHARED_EXPORT QMaterial : public Qt3DCore::QComponent
Q_PROPERTY(Qt3DRender::QEffect *effect READ effect WRITE setEffect NOTIFY effectChanged)
public:
- explicit QMaterial(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QMaterial(Qt3DCore::QNode *parent = nullptr);
QEffect *effect() const;
@@ -75,7 +75,7 @@ Q_SIGNALS:
void effectChanged(QEffect *effect);
protected:
- QMaterial(QMaterialPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QMaterial(QMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QMaterial)
diff --git a/src/render/materialsystem/qparameter.cpp b/src/render/materialsystem/qparameter.cpp
index 8d05290aa..fda8e922e 100644
--- a/src/render/materialsystem/qparameter.cpp
+++ b/src/render/materialsystem/qparameter.cpp
@@ -57,7 +57,7 @@ QParameterPrivate::QParameterPrivate()
void QParameterPrivate::setValue(const QVariant &v)
{
Qt3DCore::QNode *nodeValue = v.value<Qt3DCore::QNode *>();
- if (nodeValue != Q_NULLPTR)
+ if (nodeValue != nullptr)
m_backendValue = QVariant::fromValue(nodeValue->id());
else
m_backendValue = v;
@@ -114,7 +114,7 @@ void QParameter::setValue(const QVariant &dv)
// In case node values are declared inline
QNode *nodeValue = dv.value<QNode *>();
- if (nodeValue != Q_NULLPTR && !nodeValue->parent())
+ if (nodeValue != nullptr && !nodeValue->parent())
nodeValue->setParent(this);
d->setValue(dv);
diff --git a/src/render/materialsystem/qrenderpass.cpp b/src/render/materialsystem/qrenderpass.cpp
index f55102324..a312c5469 100644
--- a/src/render/materialsystem/qrenderpass.cpp
+++ b/src/render/materialsystem/qrenderpass.cpp
@@ -56,7 +56,7 @@ namespace Qt3DRender {
QRenderPassPrivate::QRenderPassPrivate()
: QNodePrivate()
- , m_shader(Q_NULLPTR)
+ , m_shader(nullptr)
{
}
@@ -81,7 +81,7 @@ void QRenderPass::setShaderProgram(QShaderProgram *shaderProgram)
Q_D(QRenderPass);
if (d->m_shader != shaderProgram) {
- if (d->m_shader != Q_NULLPTR && d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_shader != nullptr && d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), d->m_shader);
change->setPropertyName("shaderProgram");
d->notifyObservers(change);
@@ -97,7 +97,7 @@ void QRenderPass::setShaderProgram(QShaderProgram *shaderProgram)
if (!shaderProgram->parent())
shaderProgram->setParent(this);
- if (d->m_shader && d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_shader && d->m_changeArbiter != nullptr) {
QNodePropertyChangePtr e(new QNodePropertyChange(NodeAdded, QSceneChange::Node, id()));
const auto change = QNodeAddedPropertyChangePtr::create(id(), d->m_shader);
change->setPropertyName("shaderProgram");
@@ -126,7 +126,7 @@ void QRenderPass::addFilterKey(QFilterKey *filterKey)
if (!filterKey->parent())
filterKey->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), filterKey);
change->setPropertyName("filterKeys");
d->notifyObservers(change);
@@ -138,7 +138,7 @@ void QRenderPass::removeFilterKey(QFilterKey *filterKey)
{
Q_ASSERT(filterKey);
Q_D(QRenderPass);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), filterKey);
change->setPropertyName("filterKeys");
d->notifyObservers(change);
@@ -170,7 +170,7 @@ void QRenderPass::addRenderState(QRenderState *state)
if (!state->parent())
state->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), state);
change->setPropertyName("renderState");
d->notifyObservers(change);
@@ -185,7 +185,7 @@ void QRenderPass::removeRenderState(QRenderState *state)
{
Q_ASSERT(state);
Q_D(QRenderPass);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), state);
change->setPropertyName("renderState");
d->notifyObservers(change);
@@ -217,7 +217,7 @@ void QRenderPass::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
@@ -229,7 +229,7 @@ void QRenderPass::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QRenderPass);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
diff --git a/src/render/materialsystem/qrenderpass.h b/src/render/materialsystem/qrenderpass.h
index def35fef7..40baa0d33 100644
--- a/src/render/materialsystem/qrenderpass.h
+++ b/src/render/materialsystem/qrenderpass.h
@@ -65,7 +65,7 @@ class QT3DRENDERSHARED_EXPORT QRenderPass : public Qt3DCore::QNode
Q_PROPERTY(Qt3DRender::QShaderProgram *shaderProgram READ shaderProgram WRITE setShaderProgram NOTIFY shaderProgramChanged)
public:
- explicit QRenderPass(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QRenderPass(Qt3DCore::QNode *parent = nullptr);
QShaderProgram *shaderProgram() const;
@@ -88,7 +88,7 @@ Q_SIGNALS:
void shaderProgramChanged(QShaderProgram *shaderProgram);
protected:
- QRenderPass(QRenderPassPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QRenderPass(QRenderPassPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QRenderPass)
diff --git a/src/render/materialsystem/qshaderdata.h b/src/render/materialsystem/qshaderdata.h
index 7c74c58d7..522aa1185 100644
--- a/src/render/materialsystem/qshaderdata.h
+++ b/src/render/materialsystem/qshaderdata.h
@@ -63,7 +63,7 @@ class QT3DRENDERSHARED_EXPORT QShaderData : public Qt3DCore::QComponent
{
Q_OBJECT
public:
- explicit QShaderData(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QShaderData(Qt3DCore::QNode *parent = nullptr);
enum TransformType {
ModelToEye = 0,
@@ -74,7 +74,7 @@ public:
PropertyReaderInterfacePtr propertyReader() const;
protected:
- QShaderData(QShaderDataPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QShaderData(QShaderDataPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QShaderData)
diff --git a/src/render/materialsystem/qshaderdata_p.h b/src/render/materialsystem/qshaderdata_p.h
index ae98f0ed8..bbaa3b765 100644
--- a/src/render/materialsystem/qshaderdata_p.h
+++ b/src/render/materialsystem/qshaderdata_p.h
@@ -70,9 +70,9 @@ class QShaderDataPropertyReader: public PropertyReaderInterface
{
QVariant readProperty(const QVariant &v) Q_DECL_OVERRIDE
{
- QShaderData *shaderData = Q_NULLPTR;
+ QShaderData *shaderData = nullptr;
- if (v.userType() == qShaderDataTypeId && (shaderData = v.value<QShaderData *>()) != Q_NULLPTR) {
+ if (v.userType() == qShaderDataTypeId && (shaderData = v.value<QShaderData *>()) != nullptr) {
return QVariant::fromValue(shaderData->id());
} else if (v.userType() == qVectorShaderDataTypeId) {
QVariantList vlist;
diff --git a/src/render/materialsystem/qshaderprogram.h b/src/render/materialsystem/qshaderprogram.h
index 82b0a686e..69d9bd8b6 100644
--- a/src/render/materialsystem/qshaderprogram.h
+++ b/src/render/materialsystem/qshaderprogram.h
@@ -60,7 +60,7 @@ class QT3DRENDERSHARED_EXPORT QShaderProgram : public Qt3DCore::QNode
Q_PROPERTY(QByteArray computeShaderCode READ computeShaderCode WRITE setComputeShaderCode NOTIFY computeShaderCodeChanged)
public:
- explicit QShaderProgram(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QShaderProgram(Qt3DCore::QNode *parent = nullptr);
enum ShaderType {
Vertex = 0,
@@ -102,7 +102,7 @@ Q_SIGNALS:
void computeShaderCodeChanged(const QByteArray &computeShaderCode);
protected:
- QShaderProgram(QShaderProgramPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QShaderProgram(QShaderProgramPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QShaderProgram)
diff --git a/src/render/materialsystem/qtechnique.cpp b/src/render/materialsystem/qtechnique.cpp
index 185a78746..3b6e70299 100644
--- a/src/render/materialsystem/qtechnique.cpp
+++ b/src/render/materialsystem/qtechnique.cpp
@@ -77,7 +77,7 @@ QTechnique::QTechnique(QTechniquePrivate &dd, QNode *parent)
void QTechniquePrivate::_q_graphicsApiFilterChanged()
{
- if (m_changeArbiter != Q_NULLPTR) {
+ if (m_changeArbiter != nullptr) {
QNodePropertyChangePtr change(new QNodePropertyChange(NodeUpdated, QSceneChange::Node, m_id));
change->setPropertyName("graphicsApiFilterData");
change->setValue(QVariant::fromValue(QGraphicsApiFilterPrivate::get(const_cast<QGraphicsApiFilter *>(&m_graphicsApiFilter))->m_data));
@@ -99,7 +99,7 @@ void QTechnique::addFilterKey(QFilterKey *filterKey)
if (!filterKey->parent())
filterKey->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), filterKey);
change->setPropertyName("filterKeys");
d->notifyObservers(change);
@@ -111,7 +111,7 @@ void QTechnique::removeFilterKey(QFilterKey *filterKey)
{
Q_ASSERT(filterKey);
Q_D(QTechnique);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), filterKey);
change->setPropertyName("filterKeys");
d->notifyObservers(change);
@@ -139,7 +139,7 @@ void QTechnique::addParameter(QParameter *parameter)
if (!parameter->parent())
parameter->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
@@ -151,7 +151,7 @@ void QTechnique::removeParameter(QParameter *parameter)
{
Q_ASSERT(parameter);
Q_D(QTechnique);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), parameter);
change->setPropertyName("parameter");
d->notifyObservers(change);
@@ -178,7 +178,7 @@ void QTechnique::addRenderPass(QRenderPass *pass)
if (!pass->parent())
pass->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), pass);
change->setPropertyName("pass");
d->notifyObservers(change);
diff --git a/src/render/materialsystem/qtechnique.h b/src/render/materialsystem/qtechnique.h
index d9f7a1fb1..1f3f37fdb 100644
--- a/src/render/materialsystem/qtechnique.h
+++ b/src/render/materialsystem/qtechnique.h
@@ -61,7 +61,7 @@ class QT3DRENDERSHARED_EXPORT QTechnique : public Qt3DCore::QNode
Q_PROPERTY(Qt3DRender::QGraphicsApiFilter *graphicsApiFilter READ graphicsApiFilter CONSTANT)
public:
- explicit QTechnique(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QTechnique(Qt3DCore::QNode *parent = nullptr);
void addFilterKey(QFilterKey *filterKey);
void removeFilterKey(QFilterKey *filterKey);
@@ -78,7 +78,7 @@ public:
QGraphicsApiFilter *graphicsApiFilter();
protected:
- QTechnique(QTechniquePrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QTechnique(QTechniquePrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QTechnique)
diff --git a/src/render/materialsystem/renderpass.cpp b/src/render/materialsystem/renderpass.cpp
index 22f3bb252..6bca1ce21 100644
--- a/src/render/materialsystem/renderpass.cpp
+++ b/src/render/materialsystem/renderpass.cpp
@@ -78,7 +78,7 @@ void RenderPass::updateFromPeer(Qt3DCore::QNode *peer)
m_parameterPack.clear();
- if (pass->shaderProgram() != Q_NULLPTR)
+ if (pass->shaderProgram() != nullptr)
m_shaderUuid = pass->shaderProgram()->id();
// The RenderPass clones frontend bindings in case the frontend ever removes them
// TO DO: We probably need a QParameterMapper manager
diff --git a/src/render/materialsystem/shader.cpp b/src/render/materialsystem/shader.cpp
index 01629beec..87dce2111 100644
--- a/src/render/materialsystem/shader.cpp
+++ b/src/render/materialsystem/shader.cpp
@@ -86,7 +86,7 @@ void Shader::cleanup()
m_dna = 0;
// TO DO: ShaderProgram is leaked as of now
// Fix that taking care that they may be shared given a same dna
- m_program = Q_NULLPTR;
+ m_program = nullptr;
m_uniformsNames.clear();
m_attributesNames.clear();
m_uniformBlockNames.clear();
@@ -327,7 +327,7 @@ QOpenGLShaderProgram *Shader::createProgram(GraphicsContext *context)
context->bindFragOutputs(p->programId(), m_fragOutputs);
if (!p->link()) {
qWarning().noquote() << "Failed to link shader program:" << p->log();
- return Q_NULLPTR;
+ return nullptr;
}
// take from scoped-pointer so it doesn't get deleted
diff --git a/src/render/materialsystem/shaderdata.cpp b/src/render/materialsystem/shaderdata.cpp
index b754ca693..c0cc7992b 100644
--- a/src/render/materialsystem/shaderdata.cpp
+++ b/src/render/materialsystem/shaderdata.cpp
@@ -66,7 +66,7 @@ const int qNodeIdTypeId = qMetaTypeId<Qt3DCore::QNodeId>();
QVector<Qt3DCore::QNodeId> ShaderData::m_updatedShaderData;
ShaderData::ShaderData()
- : m_managers(Q_NULLPTR)
+ : m_managers(nullptr)
{
}
@@ -138,12 +138,12 @@ void ShaderData::clearUpdatedProperties()
if (it.value().userType() == QMetaType::QVariantList) {
Q_FOREACH (const QVariant &v, it.value().value<QVariantList>()) {
ShaderData *nested = lookupResource(v.value<QNodeId>());
- if (nested != Q_NULLPTR)
+ if (nested != nullptr)
nested->clearUpdatedProperties();
}
} else {
ShaderData *nested = lookupResource(it.value().value<QNodeId>());
- if (nested != Q_NULLPTR)
+ if (nested != nullptr)
nested->clearUpdatedProperties();
}
++it;
@@ -207,7 +207,7 @@ bool ShaderData::updateViewTransform(const QMatrix4x4 &viewMatrix)
const Qt3DCore::QNodeId nestedId = variant_value<Qt3DCore::QNodeId>(v);
ShaderData *nested = lookupResource(nestedId);
- if (nested != Q_NULLPTR) {
+ if (nested != nullptr) {
// We need to add the nested nodes to the updated property list
// as we need to maintain order
// if node[0] doesn't need update but node[1] does,
@@ -222,7 +222,7 @@ bool ShaderData::updateViewTransform(const QMatrix4x4 &viewMatrix)
} else if (userType == qNodeIdTypeId) {
const Qt3DCore::QNodeId nestedId = variant_value<Qt3DCore::QNodeId>(it.value());
ShaderData *nested = lookupResource(nestedId);
- if (nested != Q_NULLPTR && nested->updateViewTransform(viewMatrix))
+ if (nested != nullptr && nested->updateViewTransform(viewMatrix))
m_updatedProperties.insert(it.key(), it.value());
}
++it;
diff --git a/src/render/materialsystem/technique.cpp b/src/render/materialsystem/technique.cpp
index 80362d1d1..65a36e438 100644
--- a/src/render/materialsystem/technique.cpp
+++ b/src/render/materialsystem/technique.cpp
@@ -87,7 +87,7 @@ void Technique::updateFromPeer(Qt3DCore::QNode *peer)
QTechnique *technique = static_cast<QTechnique *>(peer);
- if (technique != Q_NULLPTR) {
+ if (technique != nullptr) {
Q_FOREACH (QParameter *p, technique->parameters())
m_parameterPack.appendParameter(p->id());
Q_FOREACH (QRenderPass *rPass, technique->renderPasses())
diff --git a/src/render/picking/pickeventfilter_p.h b/src/render/picking/pickeventfilter_p.h
index 99d505ec9..df94a3085 100644
--- a/src/render/picking/pickeventfilter_p.h
+++ b/src/render/picking/pickeventfilter_p.h
@@ -65,7 +65,7 @@ class PickEventFilter : public QObject
{
Q_OBJECT
public:
- explicit PickEventFilter(QObject *parent = Q_NULLPTR);
+ explicit PickEventFilter(QObject *parent = nullptr);
~PickEventFilter();
QList<QMouseEvent> pendingEvents();
diff --git a/src/render/picking/qobjectpicker.cpp b/src/render/picking/qobjectpicker.cpp
index 3f2af9694..5473a321a 100644
--- a/src/render/picking/qobjectpicker.cpp
+++ b/src/render/picking/qobjectpicker.cpp
@@ -248,12 +248,12 @@ void QObjectPickerPrivate::propagateEvent(QPickEvent *event, EventType type)
{
if (!m_entities.isEmpty()) {
Qt3DCore::QEntity *entity = m_entities.first();
- Qt3DCore::QEntity *parentEntity = Q_NULLPTR;
- Qt3DRender::QObjectPicker *objectPicker = Q_NULLPTR;
- while (entity != Q_NULLPTR && entity->parent() != Q_NULLPTR && !event->isAccepted()) {
+ Qt3DCore::QEntity *parentEntity = nullptr;
+ Qt3DRender::QObjectPicker *objectPicker = nullptr;
+ while (entity != nullptr && entity->parent() != nullptr && !event->isAccepted()) {
parentEntity = entity->parentEntity();
Q_FOREACH (Qt3DCore::QComponent *c, parentEntity->components()) {
- if ((objectPicker = qobject_cast<Qt3DRender::QObjectPicker *>(c)) != Q_NULLPTR) {
+ if ((objectPicker = qobject_cast<Qt3DRender::QObjectPicker *>(c)) != nullptr) {
QObjectPickerPrivate *objectPickerPrivate = static_cast<QObjectPickerPrivate *>(QObjectPickerPrivate::get(objectPicker));
switch (type) {
case Pressed:
diff --git a/src/render/picking/qobjectpicker.h b/src/render/picking/qobjectpicker.h
index 607d332ba..07763aa4a 100644
--- a/src/render/picking/qobjectpicker.h
+++ b/src/render/picking/qobjectpicker.h
@@ -60,7 +60,7 @@ class QT3DRENDERSHARED_EXPORT QObjectPicker : public Qt3DCore::QComponent
Q_PROPERTY(bool containsMouse READ containsMouse NOTIFY containsMouseChanged)
public:
- explicit QObjectPicker(QNode *parent = Q_NULLPTR);
+ explicit QObjectPicker(QNode *parent = nullptr);
bool isHoverEnabled() const;
bool isDragEnabled() const;
diff --git a/src/render/picking/qpickevent.h b/src/render/picking/qpickevent.h
index ae415ce1e..f80b6d84b 100644
--- a/src/render/picking/qpickevent.h
+++ b/src/render/picking/qpickevent.h
@@ -82,7 +82,7 @@ Q_SIGNALS:
void acceptedChanged(bool accepted);
protected:
- QPickEvent(QObjectPrivate &dd, QObject *parent = Q_NULLPTR);
+ QPickEvent(QObjectPrivate &dd, QObject *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QPickEvent)
diff --git a/src/render/raycasting/qboundingvolume_p.h b/src/render/raycasting/qboundingvolume_p.h
index a8f37addb..87f7e45f5 100644
--- a/src/render/raycasting/qboundingvolume_p.h
+++ b/src/render/raycasting/qboundingvolume_p.h
@@ -70,7 +70,7 @@ public:
};
virtual Qt3DCore::QNodeId id() const = 0;
- virtual bool intersects(const QRay3D &ray, QVector3D *q = Q_NULLPTR) const = 0;
+ virtual bool intersects(const QRay3D &ray, QVector3D *q = nullptr) const = 0;
virtual Type type() const = 0;
};
diff --git a/src/render/renderstates/qalphacoverage.h b/src/render/renderstates/qalphacoverage.h
index f488fe520..e74a6b823 100644
--- a/src/render/renderstates/qalphacoverage.h
+++ b/src/render/renderstates/qalphacoverage.h
@@ -53,7 +53,7 @@ class QT3DRENDERSHARED_EXPORT QAlphaCoverage : public QRenderState
{
Q_OBJECT
public:
- explicit QAlphaCoverage(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QAlphaCoverage(Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QAlphaCoverage)
diff --git a/src/render/renderstates/qalphatest.h b/src/render/renderstates/qalphatest.h
index 2807cef79..02c0db54b 100644
--- a/src/render/renderstates/qalphatest.h
+++ b/src/render/renderstates/qalphatest.h
@@ -68,7 +68,7 @@ public:
};
Q_ENUM(AlphaFunction)
- explicit QAlphaTest(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QAlphaTest(Qt3DCore::QNode *parent = nullptr);
AlphaFunction alphaFunction() const;
float referenceValue() const;
diff --git a/src/render/renderstates/qblendequation.h b/src/render/renderstates/qblendequation.h
index 5165ce90a..b433bfbb0 100644
--- a/src/render/renderstates/qblendequation.h
+++ b/src/render/renderstates/qblendequation.h
@@ -65,7 +65,7 @@ public:
};
Q_ENUM(BlendFunction)
- explicit QBlendEquation(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QBlendEquation(Qt3DCore::QNode *parent = nullptr);
BlendFunction blendFunction() const;
diff --git a/src/render/renderstates/qblendequationarguments.h b/src/render/renderstates/qblendequationarguments.h
index 47b14bde1..80ec3a911 100644
--- a/src/render/renderstates/qblendequationarguments.h
+++ b/src/render/renderstates/qblendequationarguments.h
@@ -112,7 +112,7 @@ Q_SIGNALS:
void bufferIndexChanged(int index);
protected:
- QBlendEquationArguments(QBlendEquationArgumentsPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QBlendEquationArguments(QBlendEquationArgumentsPrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QBlendEquationArguments)
diff --git a/src/render/renderstates/qclipplane.h b/src/render/renderstates/qclipplane.h
index c0a951427..001fa7333 100644
--- a/src/render/renderstates/qclipplane.h
+++ b/src/render/renderstates/qclipplane.h
@@ -56,7 +56,7 @@ class QT3DRENDERSHARED_EXPORT QClipPlane : public QRenderState
Q_PROPERTY(QVector3D normal READ normal WRITE setNormal NOTIFY normalChanged)
Q_PROPERTY(float distance READ distance WRITE setDistance NOTIFY distanceChanged)
public:
- explicit QClipPlane(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QClipPlane(Qt3DCore::QNode *parent = nullptr);
int planeIndex() const;
QVector3D normal() const;
diff --git a/src/render/renderstates/qcolormask.h b/src/render/renderstates/qcolormask.h
index bd59cc85d..eb6e56d1f 100644
--- a/src/render/renderstates/qcolormask.h
+++ b/src/render/renderstates/qcolormask.h
@@ -57,7 +57,7 @@ class QT3DRENDERSHARED_EXPORT QColorMask : public QRenderState
Q_PROPERTY(bool alphaMasked READ isAlphaMasked WRITE setAlphaMasked NOTIFY alphaMaskedChanged)
public:
- explicit QColorMask(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QColorMask(Qt3DCore::QNode *parent = nullptr);
bool isRedMasked() const;
bool isGreenMasked() const;
diff --git a/src/render/renderstates/qcullface.h b/src/render/renderstates/qcullface.h
index acdb0336a..9b175685f 100644
--- a/src/render/renderstates/qcullface.h
+++ b/src/render/renderstates/qcullface.h
@@ -66,7 +66,7 @@ public:
};
Q_ENUM(CullingMode)
- explicit QCullFace(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QCullFace(Qt3DCore::QNode *parent = nullptr);
CullingMode mode() const;
diff --git a/src/render/renderstates/qdepthtest.h b/src/render/renderstates/qdepthtest.h
index 322170f9e..51929629f 100644
--- a/src/render/renderstates/qdepthtest.h
+++ b/src/render/renderstates/qdepthtest.h
@@ -67,7 +67,7 @@ public:
};
Q_ENUM(DepthFunction)
- explicit QDepthTest(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QDepthTest(Qt3DCore::QNode *parent = nullptr);
DepthFunction depthFunction() const;
diff --git a/src/render/renderstates/qdithering.h b/src/render/renderstates/qdithering.h
index f151790a8..538c98e4d 100644
--- a/src/render/renderstates/qdithering.h
+++ b/src/render/renderstates/qdithering.h
@@ -53,7 +53,7 @@ class QT3DRENDERSHARED_EXPORT QDithering : public QRenderState
{
Q_OBJECT
public:
- explicit QDithering(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QDithering(Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QDithering)
diff --git a/src/render/renderstates/qfrontface.h b/src/render/renderstates/qfrontface.h
index c2441c270..8a7258504 100644
--- a/src/render/renderstates/qfrontface.h
+++ b/src/render/renderstates/qfrontface.h
@@ -62,7 +62,7 @@ public:
};
Q_ENUM(WindingDirection)
- explicit QFrontFace(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QFrontFace(Qt3DCore::QNode *parent = nullptr);
WindingDirection direction() const;
diff --git a/src/render/renderstates/qnodepthmask.h b/src/render/renderstates/qnodepthmask.h
index 6e7c4b8fa..8e3cc8d76 100644
--- a/src/render/renderstates/qnodepthmask.h
+++ b/src/render/renderstates/qnodepthmask.h
@@ -53,7 +53,7 @@ class QT3DRENDERSHARED_EXPORT QNoDepthMask : public QRenderState
{
Q_OBJECT
public:
- explicit QNoDepthMask(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QNoDepthMask(Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QNoDepthMask)
diff --git a/src/render/renderstates/qpointsize.h b/src/render/renderstates/qpointsize.h
index 3ba3c7f3a..51a4e9674 100644
--- a/src/render/renderstates/qpointsize.h
+++ b/src/render/renderstates/qpointsize.h
@@ -60,7 +60,7 @@ public:
};
Q_ENUM(SizeMode)
- explicit QPointSize(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QPointSize(Qt3DCore::QNode *parent = nullptr);
SizeMode sizeMode() const;
float value() const;
diff --git a/src/render/renderstates/qpolygonoffset.h b/src/render/renderstates/qpolygonoffset.h
index 6192f70fd..eb78c39e8 100644
--- a/src/render/renderstates/qpolygonoffset.h
+++ b/src/render/renderstates/qpolygonoffset.h
@@ -55,7 +55,7 @@ class QT3DRENDERSHARED_EXPORT QPolygonOffset : public QRenderState
Q_PROPERTY(float scaleFactor READ scaleFactor WRITE setScaleFactor NOTIFY scaleFactorChanged)
Q_PROPERTY(float depthSteps READ depthSteps WRITE setDepthSteps NOTIFY depthStepsChanged)
public:
- explicit QPolygonOffset(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QPolygonOffset(Qt3DCore::QNode *parent = nullptr);
float scaleFactor() const;
float depthSteps() const;
diff --git a/src/render/renderstates/qrenderstate.h b/src/render/renderstates/qrenderstate.h
index 126dfaf0f..da3689ec1 100644
--- a/src/render/renderstates/qrenderstate.h
+++ b/src/render/renderstates/qrenderstate.h
@@ -55,7 +55,7 @@ class QT3DRENDERSHARED_EXPORT QRenderState : public Qt3DCore::QNode
Q_OBJECT
protected:
- QRenderState(QRenderStatePrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
+ QRenderState(QRenderStatePrivate &dd, Qt3DCore::QNode *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QRenderState)
diff --git a/src/render/renderstates/qscissortest.h b/src/render/renderstates/qscissortest.h
index 15b5630bf..b71aa6825 100644
--- a/src/render/renderstates/qscissortest.h
+++ b/src/render/renderstates/qscissortest.h
@@ -58,7 +58,7 @@ class QT3DRENDERSHARED_EXPORT QScissorTest : public QRenderState
Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
public:
- explicit QScissorTest(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QScissorTest(Qt3DCore::QNode *parent = nullptr);
int left() const;
int bottom() const;
diff --git a/src/render/renderstates/qstencilmask.h b/src/render/renderstates/qstencilmask.h
index 9308ab3b9..f6214f508 100644
--- a/src/render/renderstates/qstencilmask.h
+++ b/src/render/renderstates/qstencilmask.h
@@ -54,7 +54,7 @@ class QT3DRENDERSHARED_EXPORT QStencilMask : public QRenderState
Q_PROPERTY(uint frontOutputMask READ frontOutputMask WRITE setFrontOutputMask NOTIFY frontOutputMaskChanged)
Q_PROPERTY(uint backOutputMask READ backOutputMask WRITE setBackOutputMask NOTIFY backOutputMaskChanged)
public:
- explicit QStencilMask(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QStencilMask(Qt3DCore::QNode *parent = nullptr);
uint frontOutputMask() const;
uint backOutputMask() const;
diff --git a/src/render/renderstates/qstenciltest.h b/src/render/renderstates/qstenciltest.h
index 295e913ca..c3c7af303 100644
--- a/src/render/renderstates/qstenciltest.h
+++ b/src/render/renderstates/qstenciltest.h
@@ -56,7 +56,7 @@ class QT3DRENDERSHARED_EXPORT QStencilTest : public QRenderState
Q_PROPERTY(Qt3DRender::QStencilTestArguments *front READ front CONSTANT)
Q_PROPERTY(Qt3DRender::QStencilTestArguments *back READ back CONSTANT)
public:
- explicit QStencilTest(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QStencilTest(Qt3DCore::QNode *parent = nullptr);
QStencilTestArguments *front() const;
QStencilTestArguments *back() const;
diff --git a/src/render/renderstates/renderstatenode.cpp b/src/render/renderstates/renderstatenode.cpp
index 126130b8a..ae1cc90e7 100644
--- a/src/render/renderstates/renderstatenode.cpp
+++ b/src/render/renderstates/renderstatenode.cpp
@@ -57,10 +57,10 @@ RenderStateNode::~RenderStateNode()
void RenderStateNode::cleanup()
{
- if (m_impl != Q_NULLPTR) {
+ if (m_impl != nullptr) {
if (!m_impl->isPooledImpl())
delete m_impl;
- m_impl = Q_NULLPTR;
+ m_impl = nullptr;
}
}
diff --git a/src/render/renderstates/renderstateset.cpp b/src/render/renderstates/renderstateset.cpp
index fc752d743..5b1837a73 100644
--- a/src/render/renderstates/renderstateset.cpp
+++ b/src/render/renderstates/renderstateset.cpp
@@ -372,7 +372,7 @@ RenderStateImpl* RenderStateImpl::getOrCreateState(QRenderState *renderState)
default:
Q_UNREACHABLE();
qFatal("Should not happen");
- return Q_NULLPTR;
+ return nullptr;
}
}
@@ -504,7 +504,7 @@ RenderStateImpl* RenderStateImpl::getOrCreateState(const Qt3DRender::QRenderStat
default:
Q_UNREACHABLE();
qFatal("Should not happen");
- return Q_NULLPTR;
+ return nullptr;
}
}
diff --git a/src/render/texture/qabstracttexture.cpp b/src/render/texture/qabstracttexture.cpp
index dedca8715..e0c10e940 100644
--- a/src/render/texture/qabstracttexture.cpp
+++ b/src/render/texture/qabstracttexture.cpp
@@ -278,7 +278,7 @@ void QAbstractTexture::addTextureImage(QAbstractTextureImage *textureImage)
if (!textureImage->parent())
textureImage->setParent(this);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeAddedPropertyChangePtr::create(id(), textureImage);
change->setPropertyName("textureImage");
d->notifyObservers(change);
@@ -293,7 +293,7 @@ void QAbstractTexture::removeTextureImage(QAbstractTextureImage *textureImage)
{
Q_ASSERT(textureImage);
Q_D(QAbstractTexture);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
const auto change = QNodeRemovedPropertyChangePtr::create(id(), textureImage);
change->setPropertyName("textureImage");
d->notifyObservers(change);
diff --git a/src/render/texture/qabstracttextureimage.cpp b/src/render/texture/qabstracttextureimage.cpp
index 7debb2567..2984e76d2 100644
--- a/src/render/texture/qabstracttextureimage.cpp
+++ b/src/render/texture/qabstracttextureimage.cpp
@@ -192,7 +192,7 @@ void QAbstractTextureImage::setFace(QAbstractTexture::CubeMapFace face)
void QAbstractTextureImage::notifyDataGeneratorChanged()
{
Q_D(QAbstractTextureImage);
- if (d->m_changeArbiter != Q_NULLPTR) {
+ if (d->m_changeArbiter != nullptr) {
QNodePropertyChangePtr change(new QNodePropertyChange(NodeUpdated, QSceneChange::Node, id()));
change->setPropertyName("dataGenerator");
change->setValue(QVariant::fromValue(dataGenerator()));
diff --git a/src/render/texture/qabstracttextureimage.h b/src/render/texture/qabstracttextureimage.h
index 90e9e7194..d80fa95d9 100644
--- a/src/render/texture/qabstracttextureimage.h
+++ b/src/render/texture/qabstracttextureimage.h
@@ -74,7 +74,7 @@ class QT3DRENDERSHARED_EXPORT QAbstractTextureImage : public Qt3DCore::QNode
Q_PROPERTY(int layer READ layer WRITE setLayer NOTIFY layerChanged)
Q_PROPERTY(Qt3DRender::QAbstractTexture::CubeMapFace face READ face WRITE setFace NOTIFY faceChanged)
public:
- explicit QAbstractTextureImage(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QAbstractTextureImage(Qt3DCore::QNode *parent = nullptr);
virtual ~QAbstractTextureImage();
int mipLevel() const;
diff --git a/src/render/texture/qtexturedata.cpp b/src/render/texture/qtexturedata.cpp
index a45789297..7cf97b433 100644
--- a/src/render/texture/qtexturedata.cpp
+++ b/src/render/texture/qtexturedata.cpp
@@ -534,7 +534,7 @@ bool QTexImageDataPrivate::setDdsFile(const QString &source)
const quint32 pixelFlags = qFromLittleEndian(header.pixelFormat.flags);
const quint32 fourCC = qFromLittleEndian(header.pixelFormat.fourCC);
- const FormatInfo *formatInfo = Q_NULLPTR;
+ const FormatInfo *formatInfo = nullptr;
if ((pixelFlags & FourCCFlag) == FourCCFlag) {
if (fourCC == DdsFourCC<'D', 'X', '1', '0'>::value) {
@@ -587,7 +587,7 @@ bool QTexImageDataPrivate::setDdsFile(const QString &source)
}
}
- if (formatInfo == Q_NULLPTR) {
+ if (formatInfo == nullptr) {
qWarning() << "Unrecognized pixel format in" << source;
return false;
}
diff --git a/src/render/texture/qtextureimage.h b/src/render/texture/qtextureimage.h
index 878c27406..c7a47fff2 100644
--- a/src/render/texture/qtextureimage.h
+++ b/src/render/texture/qtextureimage.h
@@ -56,7 +56,7 @@ class QT3DRENDERSHARED_EXPORT QTextureImage : public QAbstractTextureImage
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
public:
- explicit QTextureImage(Qt3DCore::QNode *parent = Q_NULLPTR);
+ explicit QTextureImage(Qt3DCore::QNode *parent = nullptr);
enum Status {
None = 0,
diff --git a/src/render/texture/qtexturewrapmode.h b/src/render/texture/qtexturewrapmode.h
index ee04a5690..869e4e949 100644
--- a/src/render/texture/qtexturewrapmode.h
+++ b/src/render/texture/qtexturewrapmode.h
@@ -65,8 +65,8 @@ public:
};
Q_ENUM(WrapMode)
- explicit QTextureWrapMode(WrapMode wrapMode = ClampToEdge, QObject *parent = Q_NULLPTR);
- explicit QTextureWrapMode(WrapMode x, WrapMode y, WrapMode z, QObject *parent = Q_NULLPTR);
+ explicit QTextureWrapMode(WrapMode wrapMode = ClampToEdge, QObject *parent = nullptr);
+ explicit QTextureWrapMode(WrapMode x, WrapMode y, WrapMode z, QObject *parent = nullptr);
WrapMode x() const;
WrapMode y() const;
diff --git a/src/render/texture/texture.cpp b/src/render/texture/texture.cpp
index b9a0159e6..7e1c9d47b 100644
--- a/src/render/texture/texture.cpp
+++ b/src/render/texture/texture.cpp
@@ -62,7 +62,7 @@ namespace Render {
Texture::Texture()
: BackendNode()
- , m_gl(Q_NULLPTR)
+ , m_gl(nullptr)
, m_width(1)
, m_height(1)
, m_depth(1)
@@ -83,9 +83,9 @@ Texture::Texture()
, m_filtersAndWrapUpdated(false)
, m_dataUploadRequired(false)
, m_textureDNA(0)
- , m_textureManager(Q_NULLPTR)
- , m_textureImageManager(Q_NULLPTR)
- , m_textureDataManager(Q_NULLPTR)
+ , m_textureManager(nullptr)
+ , m_textureImageManager(nullptr)
+ , m_textureDataManager(nullptr)
{
// We need backend -> frontend notifications to update the status of the texture
}
@@ -97,7 +97,7 @@ Texture::~Texture()
void Texture::cleanup()
{
QBackendNode::setEnabled(false);
- m_gl = Q_NULLPTR;
+ m_gl = nullptr;
m_width = 1;
m_height = 1;
m_depth = 1;
@@ -119,9 +119,9 @@ void Texture::cleanup()
m_dataUploadRequired = false;
m_textureDNA = 0;
m_textureImages.clear();
- m_textureManager = Q_NULLPTR;
- m_textureImageManager = Q_NULLPTR;
- m_textureDataManager = Q_NULLPTR;
+ m_textureManager = nullptr;
+ m_textureImageManager = nullptr;
+ m_textureDataManager = nullptr;
m_dataFunctor.clear();
m_textureDataHandle = HTextureData();
}
@@ -132,7 +132,7 @@ void Texture::updateFromPeer(Qt3DCore::QNode *peer)
QAbstractTexture *texture = static_cast<QAbstractTexture *>(peer);
QMutexLocker lock(&m_lock);
- if (texture != Q_NULLPTR) {
+ if (texture != nullptr) {
m_isDirty = true;
m_width = texture->width();
m_height = texture->height();
@@ -209,12 +209,12 @@ QOpenGLTexture *Texture::getOrCreateGLTexture()
QMutexLocker lock(&m_lock);
if (m_isDirty) {
delete m_gl;
- m_gl = Q_NULLPTR;
+ m_gl = nullptr;
m_isDirty = false;
}
// If the texture exists, we just update it and return
- if (m_gl != Q_NULLPTR) {
+ if (m_gl != nullptr) {
bool refreshDNA = m_filtersAndWrapUpdated || m_dataUploadRequired;
@@ -238,7 +238,7 @@ QOpenGLTexture *Texture::getOrCreateGLTexture()
m_gl->allocateStorage();
if (!m_gl->isStorageAllocated()) {
qWarning() << Q_FUNC_INFO << "texture storage allocation failed";
- return Q_NULLPTR;
+ return nullptr;
}
// Filters and WrapMode are set
@@ -270,12 +270,12 @@ QOpenGLTexture *Texture::buildGLTexture()
QOpenGLContext *ctx = QOpenGLContext::currentContext();
if (!ctx) {
qWarning() << Q_FUNC_INFO << "requires an OpenGL context";
- return Q_NULLPTR;
+ return nullptr;
}
if (m_target == QAbstractTexture::TargetAutomatic) {
qWarning() << Q_FUNC_INFO << "something went wrong, target shouldn't be automatic at this point";
- return Q_NULLPTR;
+ return nullptr;
}
QOpenGLTexture* glTex = new QOpenGLTexture(static_cast<QOpenGLTexture::Target>(m_target));
@@ -338,7 +338,7 @@ QOpenGLTexture *Texture::buildGLTexture()
if (!glTex->create()) {
qWarning() << Q_FUNC_INFO << "creating QOpenGLTexture failed";
- return Q_NULLPTR;
+ return nullptr;
}
// FIXME : make this conditional on Qt version
@@ -665,20 +665,20 @@ void Texture::updateAndLoadTextureImage()
{
if (!m_textureDataHandle.isNull()) {
QTexImageData *data = m_textureDataManager->data(m_textureDataHandle);
- if (data != Q_NULLPTR)
+ if (data != nullptr)
setToGLTexture(data);
}
QVector<TextureImageDNA> dnas;
Q_FOREACH (HTextureImage t, m_textureImages) {
TextureImage *img = m_textureImageManager->data(t);
- if (img != Q_NULLPTR && img->isDirty()) {
+ if (img != nullptr && img->isDirty()) {
if (dnas.contains(img->dna())) {
img->unsetDirty();
continue;
}
QTexImageData *data = m_textureDataManager->data(img->textureDataHandle());
- if (data != Q_NULLPTR) {
+ if (data != nullptr) {
setToGLTexture(img, data);
dnas.append(img->dna());
img->unsetDirty();
diff --git a/src/render/texture/textureimage.cpp b/src/render/texture/textureimage.cpp
index 320f6f8a2..94e4b3811 100644
--- a/src/render/texture/textureimage.cpp
+++ b/src/render/texture/textureimage.cpp
@@ -57,9 +57,9 @@ TextureImage::TextureImage()
, m_mipLevel(0)
, m_face(QAbstractTexture::CubeMapPositiveX)
, m_dirty(true)
- , m_textureManager(Q_NULLPTR)
- , m_textureImageManager(Q_NULLPTR)
- , m_textureDataManager(Q_NULLPTR)
+ , m_textureManager(nullptr)
+ , m_textureImageManager(nullptr)
+ , m_textureDataManager(nullptr)
, m_dna(0)
{
}
@@ -72,9 +72,9 @@ void TextureImage::cleanup()
m_dirty = true;
m_face = QAbstractTexture::CubeMapPositiveX;
m_generator.reset();
- m_textureManager = Q_NULLPTR;
- m_textureImageManager = Q_NULLPTR;
- m_textureDataManager = Q_NULLPTR;
+ m_textureManager = nullptr;
+ m_textureImageManager = nullptr;
+ m_textureDataManager = nullptr;
m_referencedTextures.clear();
m_dna = 0;
}
@@ -95,7 +95,7 @@ void TextureImage::updateFromPeer(Qt3DCore::QNode *peer)
Texture *txt = m_textureManager->data(m_textureProvider);
// Notify the Texture that it has a new TextureImage and needs an update
txt->addTextureImageData(m_textureImageManager->lookupHandle(peerId()));
- if (txt != Q_NULLPTR)
+ if (txt != nullptr)
txt->addToPendingTextureJobs();
}
}
@@ -143,7 +143,7 @@ void TextureImage::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
}
if (m_dirty) {// Notify the Texture that we were updated and request it to schedule an update job
Texture *txt = m_textureManager->data(m_textureProvider);
- if (txt != Q_NULLPTR)
+ if (txt != nullptr)
txt->addToPendingTextureJobs();
}
markDirty(AbstractRenderer::AllDirty);
diff --git a/tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp b/tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp
index 1d9bbf0ea..f5b17ebd3 100644
--- a/tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp
+++ b/tests/auto/core/arrayresourcesmanager/dynamicarraypolicy/tst_dynamicarraypolicy.cpp
@@ -120,7 +120,7 @@ void tst_DynamicArrayPolicy::getResources()
QVERIFY(handles.at(i).index() == i);
QVERIFY(handles.at(i).counter() == 1);
resources << manager.data(handles.at(i));
- QVERIFY(resources.at(i) != Q_NULLPTR);
+ QVERIFY(resources.at(i) != nullptr);
resources.at(i)->m_value = i;
}
@@ -129,7 +129,7 @@ void tst_DynamicArrayPolicy::getResources()
// Check that an invalid resource returns NULL
tHandle8 iHandle;
- QVERIFY(manager.data(iHandle) == Q_NULLPTR);
+ QVERIFY(manager.data(iHandle) == nullptr);
}
@@ -178,12 +178,12 @@ void tst_DynamicArrayPolicy::removeResource()
}
manager.release(handles.at(2));
- QVERIFY(manager.data(handles.at(2)) == Q_NULLPTR);
+ QVERIFY(manager.data(handles.at(2)) == nullptr);
// Triggers QASSERT so commented
// manager.release(handles.at(2));
tHandle nHandle = manager.acquire();
- QVERIFY(manager.data(nHandle) != Q_NULLPTR);
+ QVERIFY(manager.data(nHandle) != nullptr);
}
/*!
@@ -203,7 +203,7 @@ void tst_DynamicArrayPolicy::resetResource()
}
manager.reset();
for (uint i = 0; i < 5; i++) {
- QVERIFY(manager.data(handles.at(i)) == Q_NULLPTR);
+ QVERIFY(manager.data(handles.at(i)) == nullptr);
}
handles.clear();
for (uint i = 0; i < 5; i++)
@@ -231,9 +231,9 @@ void tst_DynamicArrayPolicy::lookupResource()
tHandle16 t = manager.lookupHandle(2);
QVERIFY(t.handle() == 0);
- QVERIFY(manager.data(t) == Q_NULLPTR);
+ QVERIFY(manager.data(t) == nullptr);
tst_ArrayResource *resource = manager.getOrCreateResource(2);
- QVERIFY(resource != Q_NULLPTR);
+ QVERIFY(resource != nullptr);
t = manager.lookupHandle(2);
QVERIFY(manager.data(t) == manager.lookupResource(2));
QVERIFY(t == manager.getOrAcquireHandle(2));
@@ -256,7 +256,7 @@ void tst_DynamicArrayPolicy::releaseResource()
for (int i = 0; i < 5; i++) {
manager.releaseResource(i);
- QVERIFY(manager.lookupResource(i) == Q_NULLPTR);
+ QVERIFY(manager.lookupResource(i) == nullptr);
}
}
@@ -290,7 +290,7 @@ protected:
while (i < max) {
tst_ArrayResource *r = m_manager->getOrCreateResource(i);
i++;
- QVERIFY(r != Q_NULLPTR);
+ QVERIFY(r != nullptr);
r->m_value.fetchAndAddOrdered(+1);
}
qDebug() << QThread::currentThread() << "Done";
@@ -323,7 +323,7 @@ void tst_DynamicArrayPolicy::heavyDutyMultiThreadedAccess()
}
for (int i = 0; i < max; i++) {
- QVERIFY(manager->lookupResource(i) != Q_NULLPTR);
+ QVERIFY(manager->lookupResource(i) != nullptr);
QVERIFY(manager->lookupResource(i)->m_value = iterations);
}
@@ -361,7 +361,7 @@ protected:
int max = tHandle::maxIndex();
while (i < max) {
tst_ArrayResource *r = m_manager->getOrCreateResource(i);
- QVERIFY(r != Q_NULLPTR);
+ QVERIFY(r != nullptr);
int oldValue = r->m_value.fetchAndAddOrdered(+1);
if (oldValue == m_releaseAbove)
m_manager->releaseResource(i);
@@ -400,7 +400,7 @@ void tst_DynamicArrayPolicy::heavyDutyMultiThreadedAccessRelease()
}
for (int i = 0; i < max; i++) {
- QVERIFY(manager->lookupResource(i) == Q_NULLPTR);
+ QVERIFY(manager->lookupResource(i) == nullptr);
}
qDeleteAll(threads);
diff --git a/tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp b/tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp
index 0bac18ee1..dbed2abfb 100644
--- a/tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp
+++ b/tests/auto/core/arrayresourcesmanager/preallocatedarraypolicy/tst_preallocatedarraypolicy.cpp
@@ -114,7 +114,7 @@ void tst_PreallocatedArrayPolicy::getResources()
QVERIFY(handles.at(i).index() == i);
QVERIFY(handles.at(i).counter() == 1);
resources << manager.data(handles.at(i));
- QVERIFY(resources.at(i) != Q_NULLPTR);
+ QVERIFY(resources.at(i) != nullptr);
resources.at(i)->m_value = i;
}
@@ -123,7 +123,7 @@ void tst_PreallocatedArrayPolicy::getResources()
// Check that an invalid resource returns NULL
tHandle8 iHandle;
- QVERIFY(manager.data(iHandle) == Q_NULLPTR);
+ QVERIFY(manager.data(iHandle) == nullptr);
}
@@ -172,12 +172,12 @@ void tst_PreallocatedArrayPolicy::removeResource()
}
manager.release(handles.at(2));
- QVERIFY(manager.data(handles.at(2)) == Q_NULLPTR);
+ QVERIFY(manager.data(handles.at(2)) == nullptr);
// Triggers QASSERT so commented
// manager.release(handles.at(2));
tHandle nHandle = manager.acquire();
- QVERIFY(manager.data(nHandle) != Q_NULLPTR);
+ QVERIFY(manager.data(nHandle) != nullptr);
}
/*!
@@ -197,7 +197,7 @@ void tst_PreallocatedArrayPolicy::resetResource()
}
manager.reset();
for (uint i = 0; i < 5; i++) {
- QVERIFY(manager.data(handles.at(i)) == Q_NULLPTR);
+ QVERIFY(manager.data(handles.at(i)) == nullptr);
}
handles.clear();
for (uint i = 0; i < 5; i++)
@@ -225,9 +225,9 @@ void tst_PreallocatedArrayPolicy::lookupResource()
tHandle16 t = manager.lookupHandle(2);
QVERIFY(t.handle() == 0);
- QVERIFY(manager.data(t) == Q_NULLPTR);
+ QVERIFY(manager.data(t) == nullptr);
tst_ArrayResource *resource = manager.getOrCreateResource(2);
- QVERIFY(resource != Q_NULLPTR);
+ QVERIFY(resource != nullptr);
t = manager.lookupHandle(2);
QVERIFY(manager.data(t) == manager.lookupResource(2));
QVERIFY(t == manager.getOrAcquireHandle(2));
@@ -250,7 +250,7 @@ void tst_PreallocatedArrayPolicy::releaseResource()
for (int i = 0; i < 5; i++) {
manager.releaseResource(i);
- QVERIFY(manager.lookupResource(i) == Q_NULLPTR);
+ QVERIFY(manager.lookupResource(i) == nullptr);
}
}
@@ -284,7 +284,7 @@ protected:
while (i < max) {
tst_ArrayResource *r = m_manager->getOrCreateResource(i);
i++;
- QVERIFY(r != Q_NULLPTR);
+ QVERIFY(r != nullptr);
Manager::Locker lock(m_manager);
r->m_value++;
}
@@ -318,7 +318,7 @@ void tst_PreallocatedArrayPolicy::heavyDutyMultiThreadedAccess()
}
for (int i = 0; i < max; i++) {
- QVERIFY(manager->lookupResource(i) != Q_NULLPTR);
+ QVERIFY(manager->lookupResource(i) != nullptr);
QVERIFY(manager->lookupResource(i)->m_value = iterations);
}
@@ -356,7 +356,7 @@ protected:
int max = tHandle::maxIndex();
while (i < max) {
tst_ArrayResource *r = m_manager->getOrCreateResource(i);
- QVERIFY(r != Q_NULLPTR);
+ QVERIFY(r != nullptr);
int oldValue = r->m_value.fetchAndAddOrdered(+1);
if (oldValue == m_releaseAbove)
m_manager->releaseResource(i);
@@ -395,7 +395,7 @@ void tst_PreallocatedArrayPolicy::heavyDutyMultiThreadedAccessRelease()
}
for (int i = 0; i < max; i++) {
- QVERIFY(manager->lookupResource(i) == Q_NULLPTR);
+ QVERIFY(manager->lookupResource(i) == nullptr);
}
qDeleteAll(threads);
diff --git a/tests/auto/core/handlemanager/tst_handlemanager.cpp b/tests/auto/core/handlemanager/tst_handlemanager.cpp
index f4a5855e3..a60d3cc57 100644
--- a/tests/auto/core/handlemanager/tst_handlemanager.cpp
+++ b/tests/auto/core/handlemanager/tst_handlemanager.cpp
@@ -121,7 +121,7 @@ void tst_HandleManager::nullForRemovedEntry()
bool ok = false;
SimpleResource *p2 = manager.data(h, &ok);
QVERIFY(ok == false);
- QVERIFY(p2 == Q_NULLPTR);
+ QVERIFY(p2 == nullptr);
}
void tst_HandleManager::validHandleForReplacementEntry()
diff --git a/tests/auto/core/nodes/tst_nodes.cpp b/tests/auto/core/nodes/tst_nodes.cpp
index 15875ec18..653005239 100644
--- a/tests/auto/core/nodes/tst_nodes.cpp
+++ b/tests/auto/core/nodes/tst_nodes.cpp
@@ -123,7 +123,7 @@ public:
~ObserverSpy()
{
- Qt3DCore::QNodePrivate::get(m_node)->setArbiter(Q_NULLPTR);
+ Qt3DCore::QNodePrivate::get(m_node)->setArbiter(nullptr);
}
void sceneChangeEventWithLock(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE
@@ -165,7 +165,7 @@ class MyQNode : public Qt3DCore::QNode
public:
explicit MyQNode(Qt3DCore::QNode *parent = 0)
: QNode(parent)
- , m_scene(Q_NULLPTR)
+ , m_scene(nullptr)
{}
~MyQNode()
@@ -220,7 +220,7 @@ void tst_Nodes::defaultNodeConstruction()
QScopedPointer<MyQNode> node(new MyQNode());
// THEN
- QVERIFY(node != Q_NULLPTR);
+ QVERIFY(node != nullptr);
QVERIFY(node->children().isEmpty());
// GIVEN
@@ -241,7 +241,7 @@ void tst_Nodes::defaultComponentConstruction()
QCoreApplication::processEvents();
// THEN
- QVERIFY(comp != Q_NULLPTR);
+ QVERIFY(comp != nullptr);
QCOMPARE(comp2->parent(), comp.data());
}
@@ -266,12 +266,12 @@ void tst_Nodes::appendSingleChildNodeToNodeNoSceneExplicitParenting()
ObserverSpy spy(node.data());
// THEN
- QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == nullptr);
// WHEN
QScopedPointer<MyQNode> child(new MyQNode());
// THEN
- QVERIFY(child->parent() == Q_NULLPTR);
+ QVERIFY(child->parent() == nullptr);
// WHEN
child->setParent(node.data());
@@ -293,7 +293,7 @@ void tst_Nodes::appendSingleChildNodeToNodeNoSceneImplicitParenting()
ObserverSpy spy(node.data());
// THEN
- QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == nullptr);
// WHEN
QScopedPointer<MyQNode> child(new MyQNode(node.data()));
QCoreApplication::processEvents();
@@ -315,11 +315,11 @@ void tst_Nodes::appendMultipleChildNodesToNodeNoScene()
ObserverSpy spy(node.data());
// THEN
- QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() == nullptr);
// WHEN
for (int i = 0; i < 10; i++) {
// WHEN
- Qt3DCore::QNode *child = Q_NULLPTR;
+ Qt3DCore::QNode *child = nullptr;
if (i % 2 == 0) {
child = new MyQNode(node.data());
QCoreApplication::processEvents();
@@ -347,14 +347,14 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneExplicitParenting()
// WHEN
node->assignScene(&spy);
// THEN
- QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != nullptr);
// WHEN
QScopedPointer<MyQNode> child(new MyQNode());
// THEN
- QVERIFY(child->parent() == Q_NULLPTR);
- QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() == Q_NULLPTR);
+ QVERIFY(child->parent() == nullptr);
+ QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() == nullptr);
// WHEN
child->setParent(node.data());
@@ -364,7 +364,7 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneExplicitParenting()
QVERIFY(child->parentNode() == node.data());
QCOMPARE(spy.events.size(), 2);
QCOMPARE(node->children().count(), 1);
- QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != nullptr);
// Creation event
QVERIFY(spy.events.first().wasLocked());
@@ -394,7 +394,7 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneImplicitParenting()
// WHEN
node->assignScene(&spy);
// THEN
- QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != nullptr);
// WHEN
QScopedPointer<MyQNode> child(new MyQNode(node.data()));
@@ -403,7 +403,7 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneImplicitParenting()
// THEN
QVERIFY(child->parent() == node.data());
QVERIFY(child->parentNode() == node.data());
- QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != nullptr);
QCOMPARE(spy.events.size(), 2);
QVERIFY(spy.events.first().wasLocked());
@@ -437,12 +437,12 @@ void tst_Nodes::appendMultipleChildNodesToNodeScene()
ObserverSpy spy(node.data());
node->assignScene(&spy);
// THEN
- QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(node.data())->scene() != nullptr);
// WHEN
for (int i = 0; i < 10; i++) {
// WHEN
- Qt3DCore::QNode *child = Q_NULLPTR;
+ Qt3DCore::QNode *child = nullptr;
if (i % 2 == 0) {
child = new MyQNode(node.data());
QCoreApplication::processEvents();
@@ -453,7 +453,7 @@ void tst_Nodes::appendMultipleChildNodesToNodeScene()
}
// THEN
QVERIFY(child->parent() == node.data());
- QVERIFY(Qt3DCore::QNodePrivate::get(child)->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(child)->scene() != nullptr);
}
// THEN
QCOMPARE(node->children().count(), 10);
@@ -500,7 +500,7 @@ void tst_Nodes::checkParentChangeToNull()
child->setParent(Q_NODE_NULLPTR);
// THEN
- QVERIFY(child->parent() == Q_NULLPTR);
+ QVERIFY(child->parent() == nullptr);
QCOMPARE(root->children().size(), 0);
QCOMPARE(spy.events.size(), 2);
@@ -547,7 +547,7 @@ void tst_Nodes::checkParentChangeToOtherParent()
QVERIFY(child->parent() == parent1.data());
QCOMPARE(parent1->children().size(), 1);
QCOMPARE(parent2->children().size(), 0);
- QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != nullptr);
QCOMPARE(spyParent1.events.size(), 2);
// WHEN
@@ -600,7 +600,7 @@ void tst_Nodes::removingSingleChildNodeFromNode()
child->setParent(Q_NODE_NULLPTR);
// THEN
- QVERIFY(child->parent() == Q_NULLPTR);
+ QVERIFY(child->parent() == nullptr);
QVERIFY(root->children().count() == 0);
QCOMPARE(spy.events.size(), 2);
@@ -630,7 +630,7 @@ void tst_Nodes::removingMultipleChildNodesFromNode()
root->assignScene(&spy);
// THEN
- QVERIFY(Qt3DCore::QNodePrivate::get(root.data())->scene() != Q_NULLPTR);
+ QVERIFY(Qt3DCore::QNodePrivate::get(root.data())->scene() != nullptr);
// WHEN
Qt3DCore::QNodeIdVector childIds(10);
@@ -685,7 +685,7 @@ void tst_Nodes::appendingChildEntitiesToNode()
// THEN
QVERIFY(root->children().first() == childEntity);
- QVERIFY(childEntity->parentEntity() == Q_NULLPTR);
+ QVERIFY(childEntity->parentEntity() == nullptr);
QVERIFY(childEntity->parentNode() == root.data());
}
@@ -700,7 +700,7 @@ void tst_Nodes::removingChildEntitiesFromNode()
// THEN
QVERIFY(root->children().first() == childEntity);
- QVERIFY(childEntity->parentEntity() == Q_NULLPTR);
+ QVERIFY(childEntity->parentEntity() == nullptr);
QVERIFY(childEntity->parentNode() == root.data());
// WHEN
@@ -708,8 +708,8 @@ void tst_Nodes::removingChildEntitiesFromNode()
// THEN
QVERIFY(root->children().isEmpty());
- QVERIFY(childEntity->parentNode() == Q_NULLPTR);
- QVERIFY(childEntity->parent() == Q_NULLPTR);
+ QVERIFY(childEntity->parentNode() == nullptr);
+ QVERIFY(childEntity->parent() == nullptr);
}
void tst_Nodes::appendingParentlessComponentToEntity()
@@ -719,10 +719,10 @@ void tst_Nodes::appendingParentlessComponentToEntity()
MyQComponent *comp = new MyQComponent();
// THEN
- QVERIFY(entity->parentNode() == Q_NULLPTR);
+ QVERIFY(entity->parentNode() == nullptr);
QVERIFY(entity->children().count() == 0);
QVERIFY(entity->components().empty());
- QVERIFY(comp->parentNode() == Q_NULLPTR);
+ QVERIFY(comp->parentNode() == nullptr);
// WHEN
ObserverSpy spy(entity.data());
@@ -758,7 +758,7 @@ void tst_Nodes::appendingComponentToEntity()
QCoreApplication::processEvents();
// THEN
- QVERIFY(entity->parentNode() == Q_NULLPTR);
+ QVERIFY(entity->parentNode() == nullptr);
QVERIFY(entity->children().count() == 1);
QVERIFY(entity->components().empty());
QVERIFY(comp->parentNode() == entity.data());
diff --git a/tests/auto/core/qaspectengine/tst_qaspectengine.cpp b/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
index d425dc6aa..ba76d2100 100644
--- a/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
+++ b/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
@@ -123,7 +123,7 @@ private Q_SLOTS:
void constructionDestruction()
{
QAspectEngine *engine = new QAspectEngine;
- QVERIFY(engine->rootEntity() == Q_NULLPTR);
+ QVERIFY(engine->rootEntity() == nullptr);
delete engine;
}
diff --git a/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp b/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
index 730045ed0..d79123ef2 100644
--- a/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
+++ b/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
@@ -73,8 +73,8 @@ private Q_SLOTS:
QAbstractAspect *aspect = factory.createAspect(QStringLiteral("default"));
// THEN
- QVERIFY(qobject_cast<DefaultFakeAspect*>(aspect) != Q_NULLPTR);
- QVERIFY(aspect->parent() == Q_NULLPTR);
+ QVERIFY(qobject_cast<DefaultFakeAspect*>(aspect) != nullptr);
+ QVERIFY(aspect->parent() == nullptr);
}
void shouldKnowAspectNames()
@@ -100,7 +100,7 @@ private Q_SLOTS:
QAbstractAspect *aspect = factory.createAspect(QStringLiteral("missing"), this);
// THEN
- QVERIFY(qobject_cast<AnotherFakeAspect*>(aspect) == Q_NULLPTR);
+ QVERIFY(qobject_cast<AnotherFakeAspect*>(aspect) == nullptr);
}
};
diff --git a/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp b/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
index b527b6a81..4881bb63c 100644
--- a/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
+++ b/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
@@ -235,7 +235,7 @@ class tst_PostManObserver : public Qt3DCore::QAbstractPostman
{
public:
- tst_PostManObserver() : m_sceneInterface(Q_NULLPTR)
+ tst_PostManObserver() : m_sceneInterface(nullptr)
{}
void setScene(Qt3DCore::QScene *scene) Q_DECL_FINAL
@@ -250,7 +250,7 @@ public:
Qt3DCore::QBackendNodePropertyChangePtr change = qSharedPointerDynamicCast<Qt3DCore::QBackendNodePropertyChange>(e);
QVERIFY(!change.isNull());
Qt3DCore::QNode *targetNode = m_sceneInterface->lookupNode(change->targetNode());
- QVERIFY(targetNode != Q_NULLPTR);
+ QVERIFY(targetNode != nullptr);
m_lastChanges << e;
}
diff --git a/tests/auto/core/qentity/tst_qentity.cpp b/tests/auto/core/qentity/tst_qentity.cpp
index d21ecd482..ae8323858 100644
--- a/tests/auto/core/qentity/tst_qentity.cpp
+++ b/tests/auto/core/qentity/tst_qentity.cpp
@@ -86,18 +86,18 @@ public:
void tst_Entity::constructionDestruction()
{
// GIVEN
- QEntity *entity = Q_NULLPTR;
+ QEntity *entity = nullptr;
// WHEN
entity = new QEntity;
// THEN
- QVERIFY(entity != Q_NULLPTR);
+ QVERIFY(entity != nullptr);
delete entity;
// GIVEN
QScopedPointer<QEntity> entity2(new QEntity);
// WHEN
- entity2.reset(Q_NULLPTR);
+ entity2.reset(nullptr);
// THEN
// this should not crash
}
diff --git a/tests/auto/core/qframeallocator/tst_qframeallocator.cpp b/tests/auto/core/qframeallocator/tst_qframeallocator.cpp
index d17f97c8c..76d4d15ce 100644
--- a/tests/auto/core/qframeallocator/tst_qframeallocator.cpp
+++ b/tests/auto/core/qframeallocator/tst_qframeallocator.cpp
@@ -109,7 +109,7 @@ void tst_QFrameAllocator::initQFrameChunk()
QVERIFY(c.m_blocksAvailable == c.m_maxBlocksAvailable);
QCOMPARE(c.m_blocksAvailable, (uchar)12);
QCOMPARE(c.m_firstAvailableBlock, (uchar)0);
- QVERIFY(c.m_data != Q_NULLPTR);
+ QVERIFY(c.m_data != nullptr);
QVERIFY(c.isEmpty());
for (int i = 0; i < 12; i++) {
@@ -128,7 +128,7 @@ void tst_QFrameAllocator::singleAllocationQFrameChunk()
QVERIFY(c.contains(ptr, 16));
QVERIFY(!c.isEmpty());
QCOMPARE(c.m_blocksAvailable, (uchar)(c.m_maxBlocksAvailable - 1));
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
QCOMPARE(c.m_firstAvailableBlock, (uchar)1);
QCOMPARE(*((uchar*)ptr), (uchar)1);
}
@@ -139,11 +139,11 @@ void tst_QFrameAllocator::qvectorAllocationQFrameChunk()
c.init(16, 12);
- QVector<int> *v = Q_NULLPTR;
+ QVector<int> *v = nullptr;
QVERIFY(sizeof(v) < 16);
v = static_cast<QVector<int> *>(c.allocate(16));
- QVERIFY(v != Q_NULLPTR);
+ QVERIFY(v != nullptr);
new (v) QVector<int>();
for (int i = 0; i < 1024; i++)
v->append(i);
@@ -165,7 +165,7 @@ void tst_QFrameAllocator::multipleAllocationQFrameChunk()
QCOMPARE(c.m_firstAvailableBlock, (uchar)6);
QVERIFY(!c.isEmpty());
for (int i = 0; i < 6; i++) {
- QVERIFY(ptrs.at(i) != Q_NULLPTR);
+ QVERIFY(ptrs.at(i) != nullptr);
QCOMPARE(*((uchar*)ptrs.at(i)), (uchar)(i + 1));
}
}
@@ -187,11 +187,11 @@ void tst_QFrameAllocator::overflowAllocationQFrameChunk()
QVERIFY(!c.isEmpty());
for (int i = 0; i < 15; i++) {
if (i < 12) {
- QVERIFY(ptrs.at(i) != Q_NULLPTR);
+ QVERIFY(ptrs.at(i) != nullptr);
QCOMPARE(*((uchar*)ptrs.at(i)), (uchar)(i + 1));
}
else {
- QVERIFY(ptrs.at(i) == Q_NULLPTR);
+ QVERIFY(ptrs.at(i) == nullptr);
}
}
}
@@ -209,7 +209,7 @@ void tst_QFrameAllocator::singleDeallocationQFrameChunk()
QVERIFY(c.m_blocksAvailable == c.m_maxBlocksAvailable);
QCOMPARE(c.m_blocksAvailable, (uchar)12);
QCOMPARE(c.m_firstAvailableBlock, (uchar)0);
- QVERIFY(c.m_data != Q_NULLPTR);
+ QVERIFY(c.m_data != nullptr);
QVERIFY(c.isEmpty());
for (int i = 0; i < 12; i++) {
@@ -237,7 +237,7 @@ void tst_QFrameAllocator::multipleDeallocationQFrameChunk()
QVERIFY(c.m_blocksAvailable == c.m_maxBlocksAvailable);
QCOMPARE(c.m_blocksAvailable, (uchar)12);
- QVERIFY(c.m_data != Q_NULLPTR);
+ QVERIFY(c.m_data != nullptr);
QVERIFY(c.isEmpty());
// Refill all
@@ -245,7 +245,7 @@ void tst_QFrameAllocator::multipleDeallocationQFrameChunk()
for (int i = 0; i < 12; i++) {
void *ptr = c.allocate(16);
ptrs << ptr;
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
}
QVERIFY(!c.isEmpty());
@@ -261,7 +261,7 @@ void tst_QFrameAllocator::multipleDeallocationQFrameChunk()
for (int i = 0; i < 12; i++) {
void *ptr = c.allocate(16);
ptrs << ptr;
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
}
// Free all in non linear behavior
@@ -276,7 +276,7 @@ void tst_QFrameAllocator::multipleDeallocationQFrameChunk()
for (int i = 0; i < 12; i++) {
void *ptr = c.allocate(16);
ptrs << ptr;
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
}
QVERIFY(!c.isEmpty());
}
@@ -353,14 +353,14 @@ void tst_QFrameAllocator::allocateQFixedFrameAllocator()
// Fill 1 chunck
for (int i = 0; i < 128; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
QCOMPARE(f.chunkCount(), 1);
// Fill half of chunk 2
for (int i = 0; i < 64; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
// Free chunk 2
@@ -374,7 +374,7 @@ void tst_QFrameAllocator::allocateQFixedFrameAllocator()
for (int i = 0; i < 256; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
QCOMPARE(f.chunkCount(), 3);
@@ -390,13 +390,13 @@ void tst_QFrameAllocator::deallocateQFixedFrameAllocator()
for (int i = 0; i < 128; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
QCOMPARE(f.chunkCount(), 1);
for (int i = 0; i < 64; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
QCOMPARE(f.chunkCount(), 2);
@@ -413,7 +413,7 @@ void tst_QFrameAllocator::deallocateQFixedFrameAllocator()
QCOMPARE(f.chunkCount(), 1);
for (int i = 0; i < 36; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
QCOMPARE(f.chunkCount(), 1);
@@ -429,7 +429,7 @@ void tst_QFrameAllocator::checkFragmentationQFixedFrameAllocator()
for (int i = 0; i < 256; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
@@ -443,7 +443,7 @@ void tst_QFrameAllocator::checkFragmentationQFixedFrameAllocator()
for (int i = 0; i < 64; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
QCOMPARE(f.chunkCount(), 2);
@@ -459,7 +459,7 @@ void tst_QFrameAllocator::clearQFixedFrameAllocator()
for (int i = 0; i < 256; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
QCOMPARE(f.chunkCount(), 2);
@@ -469,7 +469,7 @@ void tst_QFrameAllocator::clearQFixedFrameAllocator()
for (int i = 0; i < 256; i++) {
void *ptr = f.allocate();
- QVERIFY(ptr != Q_NULLPTR);
+ QVERIFY(ptr != nullptr);
ptrs << ptr;
}
QCOMPARE(f.chunkCount(), 2);
diff --git a/tests/auto/core/qscene/tst_qscene.cpp b/tests/auto/core/qscene/tst_qscene.cpp
index 1c4003467..eabcc96fb 100644
--- a/tests/auto/core/qscene/tst_qscene.cpp
+++ b/tests/auto/core/qscene/tst_qscene.cpp
@@ -123,11 +123,11 @@ void tst_QScene::addObservable()
Q_FOREACH (Qt3DCore::QObservableInterface *o, obs1) {
QVERIFY(scene->nodeIdFromObservable(o) == node1->id());
- QVERIFY(scene->lookupNode(node1->id()) == Q_NULLPTR);
+ QVERIFY(scene->lookupNode(node1->id()) == nullptr);
}
Q_FOREACH (Qt3DCore::QObservableInterface *o, obs2) {
QVERIFY(scene->nodeIdFromObservable(o) == node2->id());
- QVERIFY(scene->lookupNode(node2->id()) == Q_NULLPTR);
+ QVERIFY(scene->lookupNode(node2->id()) == nullptr);
}
}
@@ -239,7 +239,7 @@ void tst_QScene::removeNodeObservable()
scene->removeObservable(node1);
// THEN
- QVERIFY(scene->lookupNode(node1->id()) == Q_NULLPTR);
+ QVERIFY(scene->lookupNode(node1->id()) == nullptr);
QVERIFY(scene->lookupObservables(node1->id()).empty());
QVERIFY(scene->nodeIdFromObservable(observables.at(0)) == Qt3DCore::QNodeId());
@@ -305,10 +305,10 @@ void tst_QScene::removeChildNode()
while (!nodes.isEmpty()) {
Qt3DCore::QNode *lst = nodes.takeLast();
QVERIFY(scene->lookupNode(lst->id()) == lst);
- if (lst->parentNode() != Q_NULLPTR) {
+ if (lst->parentNode() != nullptr) {
lst->setParent(Q_NODE_NULLPTR);
QCoreApplication::processEvents();
- QVERIFY(scene->lookupNode(lst->id()) == Q_NULLPTR);
+ QVERIFY(scene->lookupNode(lst->id()) == nullptr);
}
}
}
diff --git a/tests/auto/core/qservicelocator/tst_qservicelocator.cpp b/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
index 598c4a970..24d9cce68 100644
--- a/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
+++ b/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
@@ -85,11 +85,11 @@ void tst_QServiceLocator::defaultServices()
{
QServiceLocator locator;
QOpenGLInformationService *glInfo = locator.openGLInformation();
- QVERIFY(glInfo != Q_NULLPTR);
+ QVERIFY(glInfo != nullptr);
QVERIFY(glInfo->description() == QStringLiteral("Null OpenGL Information Service"));
QSystemInformationService *sysInfo = locator.systemInformation();
- QVERIFY(sysInfo != Q_NULLPTR);
+ QVERIFY(sysInfo != nullptr);
QVERIFY(sysInfo->description() == QStringLiteral("Null System Information Service"));
QVERIFY(sysInfo->threadPoolThreadCount() == 0);
}
@@ -109,7 +109,7 @@ void tst_QServiceLocator::addRemoveDefaultService()
// Ensure the other default services work
QOpenGLInformationService *glInfo = locator.openGLInformation();
- QVERIFY(glInfo != Q_NULLPTR);
+ QVERIFY(glInfo != nullptr);
QVERIFY(glInfo->description() == QStringLiteral("Null OpenGL Information Service"));
QVERIFY(glInfo->format() == QSurfaceFormat());
@@ -137,7 +137,7 @@ void tst_QServiceLocator::addRemoveUserService()
// Ensure the default services work
QSystemInformationService *sysInfo = locator.systemInformation();
- QVERIFY(sysInfo != Q_NULLPTR);
+ QVERIFY(sysInfo != nullptr);
QVERIFY(sysInfo->description() == QStringLiteral("Null System Information Service"));
QVERIFY(sysInfo->threadPoolThreadCount() == 0);
diff --git a/tests/auto/input/commons/testdevice.h b/tests/auto/input/commons/testdevice.h
index af956a3b9..c58835a38 100644
--- a/tests/auto/input/commons/testdevice.h
+++ b/tests/auto/input/commons/testdevice.h
@@ -33,7 +33,7 @@ class TestDevice : public Qt3DInput::QAbstractPhysicalDevice
{
Q_OBJECT
public:
- explicit TestDevice(Qt3DCore::QNode *parent = Q_NULLPTR)
+ explicit TestDevice(Qt3DCore::QNode *parent = nullptr)
: Qt3DInput::QAbstractPhysicalDevice(parent)
{}
diff --git a/tests/auto/render/buffer/tst_buffer.cpp b/tests/auto/render/buffer/tst_buffer.cpp
index f91d56587..7a3910f5d 100644
--- a/tests/auto/render/buffer/tst_buffer.cpp
+++ b/tests/auto/render/buffer/tst_buffer.cpp
@@ -48,7 +48,7 @@ public:
bool operator ==(const Qt3DRender::QBufferDataGenerator &other) const
{
const TestFunctor *otherFunctor = functor_cast<TestFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return otherFunctor->m_size == m_size;
return false;
}
diff --git a/tests/auto/render/commons/testpostmanarbiter.cpp b/tests/auto/render/commons/testpostmanarbiter.cpp
index 3ec31e6e2..6371471c9 100644
--- a/tests/auto/render/commons/testpostmanarbiter.cpp
+++ b/tests/auto/render/commons/testpostmanarbiter.cpp
@@ -57,7 +57,7 @@ TestArbiter::TestArbiter(Qt3DCore::QNode *node)
TestArbiter::~TestArbiter()
{
if (m_node)
- Qt3DCore::QNodePrivate::get(m_node)->setArbiter(Q_NULLPTR);
+ Qt3DCore::QNodePrivate::get(m_node)->setArbiter(nullptr);
}
void TestArbiter::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
diff --git a/tests/auto/render/commons/testpostmanarbiter.h b/tests/auto/render/commons/testpostmanarbiter.h
index 61931b122..96b330167 100644
--- a/tests/auto/render/commons/testpostmanarbiter.h
+++ b/tests/auto/render/commons/testpostmanarbiter.h
@@ -53,7 +53,7 @@ private:
class TestArbiter : public Qt3DCore::QAbstractArbiter
{
public:
- TestArbiter(Qt3DCore::QNode *node = Q_NULLPTR);
+ TestArbiter(Qt3DCore::QNode *node = nullptr);
~TestArbiter();
diff --git a/tests/auto/render/commons/testrenderer.h b/tests/auto/render/commons/testrenderer.h
index 07ff19281..dc2e03ef7 100644
--- a/tests/auto/render/commons/testrenderer.h
+++ b/tests/auto/render/commons/testrenderer.h
@@ -46,8 +46,8 @@ public:
void setNodeManagers(Qt3DRender::Render::NodeManagers *managers) Q_DECL_OVERRIDE { Q_UNUSED(managers); }
void setServices(Qt3DCore::QServiceLocator *services) Q_DECL_OVERRIDE { Q_UNUSED(services); }
void setSurfaceExposed(bool exposed) Q_DECL_OVERRIDE { Q_UNUSED(exposed); }
- Qt3DRender::Render::NodeManagers *nodeManagers() const Q_DECL_OVERRIDE { return Q_NULLPTR; }
- Qt3DCore::QServiceLocator *services() const Q_DECL_OVERRIDE { return Q_NULLPTR; }
+ Qt3DRender::Render::NodeManagers *nodeManagers() const Q_DECL_OVERRIDE { return nullptr; }
+ Qt3DCore::QServiceLocator *services() const Q_DECL_OVERRIDE { return nullptr; }
void initialize() Q_DECL_OVERRIDE {}
void shutdown() Q_DECL_OVERRIDE {}
void createAllocators(Qt3DCore::QAbstractAspectJobManager *jobManager) Q_DECL_OVERRIDE { Q_UNUSED(jobManager); }
@@ -60,12 +60,12 @@ public:
QVector<Qt3DCore::QAspectJobPtr> renderBinJobs() Q_DECL_OVERRIDE { return QVector<Qt3DCore::QAspectJobPtr>(); }
Qt3DCore::QAspectJobPtr pickBoundingVolumeJob() Q_DECL_OVERRIDE { return Qt3DCore::QAspectJobPtr(); }
void setSceneRoot(Qt3DCore::QBackendNodeFactory *factory, Qt3DRender::Render::Entity *root) Q_DECL_OVERRIDE { Q_UNUSED(factory); Q_UNUSED(root); }
- Qt3DRender::Render::Entity *sceneRoot() const Q_DECL_OVERRIDE { return Q_NULLPTR; }
- Qt3DRender::Render::FrameGraphNode *frameGraphRoot() const Q_DECL_OVERRIDE { return Q_NULLPTR; }
- Qt3DCore::QAbstractFrameAdvanceService *frameAdvanceService() const Q_DECL_OVERRIDE { return Q_NULLPTR; }
+ Qt3DRender::Render::Entity *sceneRoot() const Q_DECL_OVERRIDE { return nullptr; }
+ Qt3DRender::Render::FrameGraphNode *frameGraphRoot() const Q_DECL_OVERRIDE { return nullptr; }
+ Qt3DCore::QAbstractFrameAdvanceService *frameAdvanceService() const Q_DECL_OVERRIDE { return nullptr; }
void registerEventFilter(Qt3DCore::QEventFilterService *service) Q_DECL_OVERRIDE { Q_UNUSED(service); }
void setSettings(Qt3DRender::Render::RenderSettings *settings) Q_DECL_OVERRIDE { Q_UNUSED(settings); }
- Qt3DRender::Render::RenderSettings *settings() const Q_DECL_OVERRIDE { return Q_NULLPTR; }
+ Qt3DRender::Render::RenderSettings *settings() const Q_DECL_OVERRIDE { return nullptr; }
void markDirty(Qt3DRender::Render::AbstractRenderer::BackendNodeDirtySet changes, Qt3DRender::Render::BackendNode *node) Q_DECL_OVERRIDE;
Qt3DRender::Render::AbstractRenderer::BackendNodeDirtySet dirtyBits() Q_DECL_OVERRIDE;
diff --git a/tests/auto/render/framegraphnode/tst_framegraphnode.cpp b/tests/auto/render/framegraphnode/tst_framegraphnode.cpp
index 7a42d052b..62f768b96 100644
--- a/tests/auto/render/framegraphnode/tst_framegraphnode.cpp
+++ b/tests/auto/render/framegraphnode/tst_framegraphnode.cpp
@@ -47,7 +47,7 @@ class tst_FrameGraphNode : public QObject
{
Q_OBJECT
public:
- tst_FrameGraphNode(QObject *parent = Q_NULLPTR)
+ tst_FrameGraphNode(QObject *parent = nullptr)
: QObject(parent)
{}
@@ -70,7 +70,7 @@ private Q_SLOTS:
QCOMPARE(n.nodeType(), Qt3DRender::Render::FrameGraphNode::InvalidNodeType);
QVERIFY(!n.isEnabled());
QVERIFY(n.peerId().isNull());
- QVERIFY(n.manager() == Q_NULLPTR);
+ QVERIFY(n.manager() == nullptr);
QVERIFY(n.parentId().isNull());
QVERIFY(n.childrenIds().empty());
}
@@ -162,7 +162,7 @@ private Q_SLOTS:
parent1->removeChildId(childId);
// THEN
QVERIFY(child->parentId().isNull());
- QVERIFY(child->parent() == Q_NULLPTR);
+ QVERIFY(child->parent() == nullptr);
QCOMPARE(parent1->childrenIds().count(), 0);
QCOMPARE(parent1->children().count(), parent1->childrenIds().count());
}
diff --git a/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp b/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
index 74f0bfb27..ba49946f8 100644
--- a/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
+++ b/tests/auto/render/geometryrenderer/tst_geometryrenderer.cpp
@@ -44,13 +44,13 @@ public:
Qt3DRender::QGeometry *operator ()() Q_DECL_FINAL
{
- return Q_NULLPTR;
+ return nullptr;
}
bool operator ==(const Qt3DRender::QGeometryFactory &other) const Q_DECL_FINAL
{
const TestFactory *otherFactory = functor_cast<TestFactory>(&other);
- if (otherFactory != Q_NULLPTR)
+ if (otherFactory != nullptr)
return otherFactory->m_size == m_size;
return false;
}
diff --git a/tests/auto/render/meshfunctors/tst_meshfunctors.cpp b/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
index 0f50d929f..6aef510ea 100644
--- a/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
+++ b/tests/auto/render/meshfunctors/tst_meshfunctors.cpp
@@ -41,7 +41,7 @@ public:
Qt3DRender::QGeometry *operator ()() Q_DECL_OVERRIDE
{
- return Q_NULLPTR;
+ return nullptr;
}
bool operator ==(const Qt3DRender::QGeometryFactory &other) const Q_DECL_OVERRIDE
@@ -63,7 +63,7 @@ public:
Qt3DRender::QGeometry *operator ()() Q_DECL_OVERRIDE
{
- return Q_NULLPTR;
+ return nullptr;
}
bool operator ==(const Qt3DRender::QGeometryFactory &other) const Q_DECL_OVERRIDE
diff --git a/tests/auto/render/picking/tst_picking.cpp b/tests/auto/render/picking/tst_picking.cpp
index 115393ba8..b4c7fedcd 100644
--- a/tests/auto/render/picking/tst_picking.cpp
+++ b/tests/auto/render/picking/tst_picking.cpp
@@ -51,7 +51,7 @@ class MyObjectPicker : public Qt3DRender::QObjectPicker
{
Q_OBJECT
public:
- MyObjectPicker(Qt3DCore::QNode *parent = Q_NULLPTR)
+ MyObjectPicker(Qt3DCore::QNode *parent = nullptr)
: Qt3DRender::QObjectPicker(parent)
{}
@@ -65,7 +65,7 @@ class PickableEntity : public QEntity
{
Q_OBJECT
public:
- explicit PickableEntity(const QVector3D &position, float radius, QEntity *parent = Q_NULLPTR)
+ explicit PickableEntity(const QVector3D &position, float radius, QEntity *parent = nullptr)
: QEntity(parent)
, picker(new MyObjectPicker(this))
, mesh(new QSphereMesh(this))
diff --git a/tests/auto/render/qabstractlight/tst_qabstractlight.cpp b/tests/auto/render/qabstractlight/tst_qabstractlight.cpp
index 8496c6f43..13975c9c2 100644
--- a/tests/auto/render/qabstractlight/tst_qabstractlight.cpp
+++ b/tests/auto/render/qabstractlight/tst_qabstractlight.cpp
@@ -47,7 +47,7 @@ class DummyLight : public Qt3DRender::QAbstractLight
Q_OBJECT
public:
- explicit DummyLight(Qt3DCore::QNode *parent = Q_NULLPTR)
+ explicit DummyLight(Qt3DCore::QNode *parent = nullptr)
: QAbstractLight(*new Qt3DRender::QAbstractLightPrivate(QAbstractLight::PointLight), parent)
{}
};
diff --git a/tests/auto/render/qbuffer/tst_qbuffer.cpp b/tests/auto/render/qbuffer/tst_qbuffer.cpp
index bfdf82f7f..7dbdd0c74 100644
--- a/tests/auto/render/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/render/qbuffer/tst_qbuffer.cpp
@@ -52,7 +52,7 @@ public:
bool operator ==(const Qt3DRender::QBufferDataGenerator &other) const
{
const TestFunctor *otherFunctor = functor_cast<TestFunctor>(&other);
- if (otherFunctor != Q_NULLPTR)
+ if (otherFunctor != nullptr)
return otherFunctor->m_size == m_size;
return false;
}
diff --git a/tests/auto/render/qcameraselector/tst_qcameraselector.cpp b/tests/auto/render/qcameraselector/tst_qcameraselector.cpp
index fc69f5adf..c1e567c6d 100644
--- a/tests/auto/render/qcameraselector/tst_qcameraselector.cpp
+++ b/tests/auto/render/qcameraselector/tst_qcameraselector.cpp
@@ -49,7 +49,7 @@ private Q_SLOTS:
QTest::addColumn<Qt3DCore::QEntity *>("camera");
Qt3DRender::QCameraSelector *defaultConstructed = new Qt3DRender::QCameraSelector();
- QTest::newRow("defaultConstructed") << defaultConstructed << static_cast<Qt3DCore::QEntity *>(Q_NULLPTR);
+ QTest::newRow("defaultConstructed") << defaultConstructed << static_cast<Qt3DCore::QEntity *>(nullptr);
Qt3DRender::QCameraSelector *selector1 = new Qt3DRender::QCameraSelector();
Qt3DCore::QEntity *camera1 = new Qt3DCore::QEntity();
@@ -123,7 +123,7 @@ private Q_SLOTS:
arbiter.events.clear();
// WHEN
- cameraSelector->setCamera(Q_NULLPTR);
+ cameraSelector->setCamera(nullptr);
QCoreApplication::processEvents();
// THEN
diff --git a/tests/auto/render/qframegraphnode/tst_qframegraphnode.cpp b/tests/auto/render/qframegraphnode/tst_qframegraphnode.cpp
index 5b15d73c2..8573c47a8 100644
--- a/tests/auto/render/qframegraphnode/tst_qframegraphnode.cpp
+++ b/tests/auto/render/qframegraphnode/tst_qframegraphnode.cpp
@@ -41,7 +41,7 @@ class MyFrameGraphNode : public Qt3DRender::QFrameGraphNode
{
Q_OBJECT
public:
- explicit MyFrameGraphNode(Qt3DCore::QNode *parent = Q_NULLPTR)
+ explicit MyFrameGraphNode(Qt3DCore::QNode *parent = nullptr)
: QFrameGraphNode(parent)
{
}
@@ -58,7 +58,7 @@ private Q_SLOTS:
QScopedPointer<Qt3DRender::QFrameGraphNode> defaultFrameGraphNode(new MyFrameGraphNode);
QVERIFY(defaultFrameGraphNode->isEnabled());
- QVERIFY(defaultFrameGraphNode->parentFrameGraphNode() == Q_NULLPTR);
+ QVERIFY(defaultFrameGraphNode->parentFrameGraphNode() == nullptr);
}
void checkCloning_data()
diff --git a/tests/auto/render/qgeometry/tst_qgeometry.cpp b/tests/auto/render/qgeometry/tst_qgeometry.cpp
index c284e85c4..deb9c63cd 100644
--- a/tests/auto/render/qgeometry/tst_qgeometry.cpp
+++ b/tests/auto/render/qgeometry/tst_qgeometry.cpp
@@ -57,18 +57,18 @@ private Q_SLOTS:
QTest::newRow("defaultConstructed") << defaultConstructed << 0;
Qt3DRender::QGeometry *geometry1 = new Qt3DRender::QGeometry();
- Qt3DRender::QAttribute *attribute = new Qt3DRender::QAttribute(Q_NULLPTR, QStringLiteral("Attr1"), Qt3DRender::QAttribute::Float, 4, 454);
+ Qt3DRender::QAttribute *attribute = new Qt3DRender::QAttribute(nullptr, QStringLiteral("Attr1"), Qt3DRender::QAttribute::Float, 4, 454);
geometry1->addAttribute(attribute);
- geometry1->addAttribute(new Qt3DRender::QAttribute(Q_NULLPTR, QStringLiteral("Attr2"), Qt3DRender::QAttribute::Float, 4, 555));
+ geometry1->addAttribute(new Qt3DRender::QAttribute(nullptr, QStringLiteral("Attr2"), Qt3DRender::QAttribute::Float, 4, 555));
geometry1->setBoundingVolumePositionAttribute(attribute);
QTest::newRow("2 attributes") << geometry1 << 2;
Qt3DRender::QGeometry *geometry2 = new Qt3DRender::QGeometry();
- attribute = new Qt3DRender::QAttribute(Q_NULLPTR, QStringLiteral("Attr2"), Qt3DRender::QAttribute::Float, 4, 383);
- geometry2->addAttribute(new Qt3DRender::QAttribute(Q_NULLPTR, QStringLiteral("Attr1"), Qt3DRender::QAttribute::Float, 3, 427));
+ attribute = new Qt3DRender::QAttribute(nullptr, QStringLiteral("Attr2"), Qt3DRender::QAttribute::Float, 4, 383);
+ geometry2->addAttribute(new Qt3DRender::QAttribute(nullptr, QStringLiteral("Attr1"), Qt3DRender::QAttribute::Float, 3, 427));
geometry2->addAttribute(attribute);
- geometry2->addAttribute(new Qt3DRender::QAttribute(Q_NULLPTR, QStringLiteral("Attr3"), Qt3DRender::QAttribute::Float, 2, 327));
+ geometry2->addAttribute(new Qt3DRender::QAttribute(nullptr, QStringLiteral("Attr3"), Qt3DRender::QAttribute::Float, 2, 327));
geometry2->removeAttribute(attribute);
QTest::newRow("3 - 1 attributes") << geometry2 << 2;
}
diff --git a/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp b/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
index 626066a0d..cd61e8510 100644
--- a/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
+++ b/tests/auto/render/qgeometryrenderer/tst_qgeometryrenderer.cpp
@@ -53,13 +53,13 @@ public:
Qt3DRender::QGeometry *operator ()() Q_DECL_FINAL
{
- return Q_NULLPTR;
+ return nullptr;
}
bool operator ==(const Qt3DRender::QGeometryFactory &other) const Q_DECL_FINAL
{
const TestFactory *otherFactory = functor_cast<TestFactory>(&other);
- if (otherFactory != Q_NULLPTR)
+ if (otherFactory != nullptr)
return otherFactory->m_size == m_size;
return false;
}
@@ -139,7 +139,7 @@ private Q_SLOTS:
QCOMPARE(cloneData.primitiveType, geometryRenderer->primitiveType());
QCOMPARE(cloneData.verticesPerPatch, geometryRenderer->verticesPerPatch());
- if (geometryRenderer->geometry() != Q_NULLPTR)
+ if (geometryRenderer->geometry() != nullptr)
QCOMPARE(cloneData.geometryId, geometryRenderer->geometry()->id());
QCOMPARE(cloneData.geometryFactory, geometryRenderer->geometryFactory());
diff --git a/tests/auto/render/qmaterial/tst_qmaterial.cpp b/tests/auto/render/qmaterial/tst_qmaterial.cpp
index 71775308c..af02f3180 100644
--- a/tests/auto/render/qmaterial/tst_qmaterial.cpp
+++ b/tests/auto/render/qmaterial/tst_qmaterial.cpp
@@ -89,7 +89,7 @@ private:
void compareEffects(const Qt3DRender::QEffect *original, const Qt3DRender::QEffect *clone)
{
- bool isEffectNull = (original == Q_NULLPTR);
+ bool isEffectNull = (original == nullptr);
if (isEffectNull) {
QVERIFY(!clone);
} else {
@@ -171,7 +171,7 @@ private:
void compareShaderPrograms(const Qt3DRender::QShaderProgram *original, const Qt3DRender::QShaderProgram *clone)
{
- bool isOriginalNull = (original == Q_NULLPTR);
+ bool isOriginalNull = (original == nullptr);
if (isOriginalNull) {
QVERIFY(!clone);
} else {
diff --git a/tests/auto/render/qobjectpicker/tst_qobjectpicker.cpp b/tests/auto/render/qobjectpicker/tst_qobjectpicker.cpp
index c2100268f..6711efcbc 100644
--- a/tests/auto/render/qobjectpicker/tst_qobjectpicker.cpp
+++ b/tests/auto/render/qobjectpicker/tst_qobjectpicker.cpp
@@ -40,7 +40,7 @@ class MyObjectPicker : public Qt3DRender::QObjectPicker
{
Q_OBJECT
public:
- MyObjectPicker(Qt3DCore::QNode *parent = Q_NULLPTR)
+ MyObjectPicker(Qt3DCore::QNode *parent = nullptr)
: Qt3DRender::QObjectPicker(parent)
{}
@@ -94,7 +94,7 @@ private Q_SLOTS:
// QCoreApplication::processEvents();
// // THEN
-// QVERIFY(clone != Q_NULLPTR);
+// QVERIFY(clone != nullptr);
// QCOMPARE(objectPicker->id(), clone->id());
// QCOMPARE(objectPicker->isHoverEnabled(), clone->isHoverEnabled());
// QCOMPARE(objectPicker->isPressed(), clone->isPressed());
diff --git a/tests/auto/render/qrenderstateset/tst_qrenderstateset.cpp b/tests/auto/render/qrenderstateset/tst_qrenderstateset.cpp
index 2c03df736..d734c45f5 100644
--- a/tests/auto/render/qrenderstateset/tst_qrenderstateset.cpp
+++ b/tests/auto/render/qrenderstateset/tst_qrenderstateset.cpp
@@ -57,7 +57,7 @@ class MyStateSet : public Qt3DRender::QRenderState
{
Q_OBJECT
public:
- explicit MyStateSet(Qt3DCore::QNode *parent = Q_NULLPTR)
+ explicit MyStateSet(Qt3DCore::QNode *parent = nullptr)
: Qt3DRender::QRenderState(*new MyStateSetPrivate(), parent)
{}
diff --git a/tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp b/tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp
index 4f1494c78..ed4bcc207 100644
--- a/tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp
+++ b/tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp
@@ -47,7 +47,7 @@ private Q_SLOTS:
{
QScopedPointer<Qt3DRender::QRenderTargetSelector> defaultTargetSelector(new Qt3DRender::QRenderTargetSelector);
- QVERIFY(defaultTargetSelector->target() == Q_NULLPTR);
+ QVERIFY(defaultTargetSelector->target() == nullptr);
QCOMPARE(defaultTargetSelector->outputs().count(), 0);
}
@@ -58,7 +58,7 @@ private Q_SLOTS:
QTest::addColumn<Qt3DRender::QRenderTarget * >("target");
Qt3DRender::QRenderTargetSelector *defaultConstructed = new Qt3DRender::QRenderTargetSelector();
- QTest::newRow("defaultConstructed") << defaultConstructed << QVector<Qt3DRender::QRenderTargetOutput::AttachmentPoint>() << static_cast<Qt3DRender::QRenderTarget *>(Q_NULLPTR);
+ QTest::newRow("defaultConstructed") << defaultConstructed << QVector<Qt3DRender::QRenderTargetOutput::AttachmentPoint>() << static_cast<Qt3DRender::QRenderTarget *>(nullptr);
Qt3DRender::QRenderTargetSelector *renderTargetSelectorWithTarget = new Qt3DRender::QRenderTargetSelector();
Qt3DRender::QRenderTarget *target1 = new Qt3DRender::QRenderTarget();
@@ -133,7 +133,7 @@ private Q_SLOTS:
QCOMPARE(arbiter.events.size(), 0);
// WHEN
- renderTargetSelector->setTarget(Q_NULLPTR);
+ renderTargetSelector->setTarget(nullptr);
QCoreApplication::processEvents();
// THEN
diff --git a/tests/auto/render/raycasting/tst_raycasting.cpp b/tests/auto/render/raycasting/tst_raycasting.cpp
index 7216f7036..04274f67a 100644
--- a/tests/auto/render/raycasting/tst_raycasting.cpp
+++ b/tests/auto/render/raycasting/tst_raycasting.cpp
@@ -330,7 +330,7 @@ void tst_RayCasting::mousePicking()
Qt3DRender::Render::Sphere s(QVector3D(0.0f, 0.5f, 0.0f), 1.0f);
// WHEN
- bool intersects = s.intersects(ray, Q_NULLPTR);
+ bool intersects = s.intersects(ray, nullptr);
// THEN
QVERIFY(intersects);
@@ -340,7 +340,7 @@ void tst_RayCasting::mousePicking()
camera.viewMatrix(),
camera.projectionMatrix(),
viewport.toRect());
- intersects = s.intersects(ray, Q_NULLPTR);
+ intersects = s.intersects(ray, nullptr);
// THEN
QVERIFY(!intersects);
@@ -350,7 +350,7 @@ void tst_RayCasting::mousePicking()
camera.viewMatrix(),
camera.projectionMatrix(),
viewport.toRect());
- intersects = s.intersects(ray, Q_NULLPTR);
+ intersects = s.intersects(ray, nullptr);
// THEN
QVERIFY(!intersects);
@@ -360,7 +360,7 @@ void tst_RayCasting::mousePicking()
camera.viewMatrix(),
camera.projectionMatrix(),
viewport.toRect());
- intersects = s.intersects(ray, Q_NULLPTR);
+ intersects = s.intersects(ray, nullptr);
// THEN
QVERIFY(!intersects);
@@ -370,7 +370,7 @@ void tst_RayCasting::mousePicking()
camera.viewMatrix(),
camera.projectionMatrix(),
viewport.toRect());
- intersects = s.intersects(ray, Q_NULLPTR);
+ intersects = s.intersects(ray, nullptr);
// THEN
QVERIFY(!intersects);
diff --git a/tests/auto/render/renderviewutils/tst_renderviewutils.cpp b/tests/auto/render/renderviewutils/tst_renderviewutils.cpp
index 00fc731a2..adb7b6c97 100644
--- a/tests/auto/render/renderviewutils/tst_renderviewutils.cpp
+++ b/tests/auto/render/renderviewutils/tst_renderviewutils.cpp
@@ -205,7 +205,7 @@ class MultiLevelStructShaderData : public StructShaderData
public:
MultiLevelStructShaderData()
: StructShaderData()
- , m_inner(Q_NULLPTR)
+ , m_inner(nullptr)
{
}
@@ -226,8 +226,8 @@ public:
{
QHash<QString, Qt3DRender::Render::ShaderUniform> innerUniforms;
- StructShaderData *innerData = Q_NULLPTR;
- if ((innerData = qobject_cast<StructShaderData *>(m_inner)) != Q_NULLPTR)
+ StructShaderData *innerData = nullptr;
+ if ((innerData = qobject_cast<StructShaderData *>(m_inner)) != nullptr)
innerUniforms = innerData->buildUniformMap(QStringLiteral(".inner"));
QHash<QString, Qt3DRender::Render::ShaderUniform> uniforms = StructShaderData::buildUniformMap(blockName);
@@ -245,8 +245,8 @@ public:
{
QHash<QString, QVariant> innerUniformsValues;
- StructShaderData *innerData = Q_NULLPTR;
- if ((innerData = qobject_cast<StructShaderData *>(m_inner)) != Q_NULLPTR)
+ StructShaderData *innerData = nullptr;
+ if ((innerData = qobject_cast<StructShaderData *>(m_inner)) != nullptr)
innerUniformsValues = innerData->buildUniformMapValues(QStringLiteral(".inner"));
QHash<QString, QVariant> uniformsValues = StructShaderData::buildUniformMapValues(blockName);
@@ -298,7 +298,7 @@ void tst_RenderViewUtils::topLevelScalarValueNoUniforms()
initBackendShaderData(shaderData.data(), manager.data());
Qt3DRender::Render::ShaderData *backendShaderData = manager->lookupResource(shaderData->id());
- QVERIFY(backendShaderData != Q_NULLPTR);
+ QVERIFY(backendShaderData != nullptr);
Qt3DRender::Render::UniformBlockValueBuilder blockBuilder;
blockBuilder.shaderDataManager = manager.data();
@@ -318,7 +318,7 @@ void tst_RenderViewUtils::topLevelScalarValue()
initBackendShaderData(shaderData.data(), manager.data());
Qt3DRender::Render::ShaderData *backendShaderData = manager->lookupResource(shaderData->id());
- QVERIFY(backendShaderData != Q_NULLPTR);
+ QVERIFY(backendShaderData != nullptr);
Qt3DRender::Render::UniformBlockValueBuilder blockBuilder;
blockBuilder.shaderDataManager = manager.data();
@@ -350,7 +350,7 @@ void tst_RenderViewUtils::topLevelArrayValue()
initBackendShaderData(shaderData.data(), manager.data());
Qt3DRender::Render::ShaderData *backendShaderData = manager->lookupResource(shaderData->id());
- QVERIFY(backendShaderData != Q_NULLPTR);
+ QVERIFY(backendShaderData != nullptr);
Qt3DRender::Render::UniformBlockValueBuilder blockBuilder;
blockBuilder.shaderDataManager = manager.data();
@@ -413,7 +413,7 @@ void tst_RenderViewUtils::topLevelStructValue()
initBackendShaderData(shaderData, manager.data());
Qt3DRender::Render::ShaderData *backendShaderData = manager->lookupResource(shaderData->id());
- QVERIFY(backendShaderData != Q_NULLPTR);
+ QVERIFY(backendShaderData != nullptr);
Qt3DRender::Render::UniformBlockValueBuilder blockBuilder;
blockBuilder.shaderDataManager = manager.data();
@@ -446,7 +446,7 @@ void tst_RenderViewUtils::topLevelDynamicProperties()
initBackendShaderData(shaderData.data(), manager.data());
Qt3DRender::Render::ShaderData *backendShaderData = manager->lookupResource(shaderData->id());
- QVERIFY(backendShaderData != Q_NULLPTR);
+ QVERIFY(backendShaderData != nullptr);
Qt3DRender::Render::UniformBlockValueBuilder blockBuilder;
blockBuilder.shaderDataManager = manager.data();
diff --git a/tools/qgltf/qgltf.cpp b/tools/qgltf/qgltf.cpp
index 56ef71d7d..3d4c1a420 100644
--- a/tools/qgltf/qgltf.cpp
+++ b/tools/qgltf/qgltf.cpp
@@ -186,7 +186,7 @@ Assimp::IOStream *AssimpIOSystem::Open(const char *pFile, const char *pMode)
if (file->open(openMode))
return new AssimpIOStream(file.take());
- return Q_NULLPTR;
+ return nullptr;
}
void AssimpIOSystem::Close(Assimp::IOStream *pFile)
@@ -354,7 +354,7 @@ protected:
};
Importer::Importer()
- : m_rootNode(Q_NULLPTR)
+ : m_rootNode(nullptr)
{
}
@@ -472,7 +472,7 @@ const Importer::Node *Importer::findNode(const Node *root, const QString &origin
if (cn)
return cn;
}
- return Q_NULLPTR;
+ return nullptr;
}
class AssimpImporter : public Importer
@@ -1096,19 +1096,19 @@ void AssimpImporter::parseAnimations()
float t = float(a->mPositionKeys[kf].mTime);
aiVector3D v = a->mPositionKeys[kf].mValue;
animInfo.hasTranslation = true;
- addKeyFrame(keyFrames, t, &v, Q_NULLPTR, Q_NULLPTR);
+ addKeyFrame(keyFrames, t, &v, nullptr, nullptr);
}
for (uint kf = 0; kf < a->mNumRotationKeys; ++kf) {
float t = float(a->mRotationKeys[kf].mTime);
aiQuaternion v = a->mRotationKeys[kf].mValue;
animInfo.hasRotation = true;
- addKeyFrame(keyFrames, t, Q_NULLPTR, &v, Q_NULLPTR);
+ addKeyFrame(keyFrames, t, nullptr, &v, nullptr);
}
for (uint kf = 0; kf < a->mNumScalingKeys; ++kf) {
float t = float(a->mScalingKeys[kf].mTime);
aiVector3D v = a->mScalingKeys[kf].mValue;
animInfo.hasScale = true;
- addKeyFrame(keyFrames, t, Q_NULLPTR, Q_NULLPTR, &v);
+ addKeyFrame(keyFrames, t, nullptr, nullptr, &v);
}
// Here we should ideally get rid of non-animated properties (that
@@ -1282,7 +1282,7 @@ private:
QVector<ProgramInfo> m_progs;
struct TechniqueInfo {
- TechniqueInfo() : opaque(true), prog(Q_NULLPTR) { }
+ TechniqueInfo() : opaque(true), prog(nullptr) { }
TechniqueInfo(const QString &name, bool opaque, ProgramInfo *prog)
: name(name)
, opaque(opaque)