summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-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
146 files changed, 442 insertions, 440 deletions
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);