summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-04-29 19:35:20 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-05-01 15:43:11 +0000
commita01b14670e5b35a951ec57297613418dc829d65c (patch)
treed9bdcc4ca7b325ff5a1c2e68b801efe9e4d667b8 /src/render/frontend
parentf9dc7c72090b9a11a3daf9e2c912213fbeec5739 (diff)
Q_NULLPTR -> nullptr
Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/frontend')
-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
16 files changed, 43 insertions, 43 deletions
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