diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2016-04-29 19:35:20 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-05-01 15:43:11 +0000 |
commit | a01b14670e5b35a951ec57297613418dc829d65c (patch) | |
tree | d9bdcc4ca7b325ff5a1c2e68b801efe9e4d667b8 /src/quick3d/quick3d | |
parent | f9dc7c72090b9a11a3daf9e2c912213fbeec5739 (diff) |
Q_NULLPTR -> nullptr
Task-number: QTBUG-52736
Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/quick3d/quick3d')
-rw-r--r-- | src/quick3d/quick3d/items/quick3dentity.cpp | 2 | ||||
-rw-r--r-- | src/quick3d/quick3d/items/quick3dentityloader.cpp | 34 | ||||
-rw-r--r-- | src/quick3d/quick3d/items/quick3dnode.cpp | 2 | ||||
-rw-r--r-- | src/quick3d/quick3d/qqmlaspectengine.cpp | 4 | ||||
-rw-r--r-- | src/quick3d/quick3d/qqmlaspectengine.h | 2 | ||||
-rw-r--r-- | src/quick3d/quick3d/qt3dquick_global.cpp | 2 | ||||
-rw-r--r-- | src/quick3d/quick3d/qt3dquicknodefactory.cpp | 4 | ||||
-rw-r--r-- | src/quick3d/quick3d/qt3dquicknodefactory_p.h | 4 |
8 files changed, 27 insertions, 27 deletions
diff --git a/src/quick3d/quick3d/items/quick3dentity.cpp b/src/quick3d/quick3d/items/quick3dentity.cpp index 8f027e213..2ea80b017 100644 --- a/src/quick3d/quick3d/items/quick3dentity.cpp +++ b/src/quick3d/quick3d/items/quick3dentity.cpp @@ -72,7 +72,7 @@ QQmlListProperty<QComponent> Quick3DEntity::componentList() void Quick3DEntity::qmlAppendComponent(QQmlListProperty<QComponent> *list, QComponent *comp) { - if (comp == Q_NULLPTR) + if (comp == nullptr) return; Quick3DEntity *self = static_cast<Quick3DEntity *>(list->object); self->parentEntity()->addComponent(comp); diff --git a/src/quick3d/quick3d/items/quick3dentityloader.cpp b/src/quick3d/quick3d/items/quick3dentityloader.cpp index 119b2e66d..63f4cceac 100644 --- a/src/quick3d/quick3d/items/quick3dentityloader.cpp +++ b/src/quick3d/quick3d/items/quick3dentityloader.cpp @@ -66,9 +66,9 @@ protected: switch (status) { case Ready: { - Q_ASSERT(priv->m_entity == Q_NULLPTR); + Q_ASSERT(priv->m_entity == nullptr); priv->m_entity = qobject_cast<QEntity *>(object()); - Q_ASSERT(priv->m_entity != Q_NULLPTR); + Q_ASSERT(priv->m_entity != nullptr); priv->m_entity->setParent(m_loader); emit m_loader->entityChanged(); break; @@ -134,10 +134,10 @@ void Quick3DEntityLoader::setSource(const QUrl &url) Quick3DEntityLoaderPrivate::Quick3DEntityLoaderPrivate() : QEntityPrivate(), - m_incubator(Q_NULLPTR), - m_context(Q_NULLPTR), - m_component(Q_NULLPTR), - m_entity(Q_NULLPTR) + m_incubator(nullptr), + m_context(nullptr), + m_component(nullptr), + m_entity(nullptr) { } @@ -146,23 +146,23 @@ void Quick3DEntityLoaderPrivate::clear() if (m_incubator) { m_incubator->clear(); delete m_incubator; - m_incubator = Q_NULLPTR; + m_incubator = nullptr; } if (m_entity) { m_entity->setParent(Q_NODE_NULLPTR); delete m_entity; - m_entity = Q_NULLPTR; + m_entity = nullptr; } if (m_component) { delete m_component; - m_component = Q_NULLPTR; + m_component = nullptr; } if (m_context) { delete m_context; - m_context = Q_NULLPTR; + m_context = nullptr; } } @@ -182,9 +182,9 @@ void Quick3DEntityLoaderPrivate::loadComponent(const QUrl &source) { Q_Q(Quick3DEntityLoader); - Q_ASSERT(m_entity == Q_NULLPTR); - Q_ASSERT(m_component == Q_NULLPTR); - Q_ASSERT(m_context == Q_NULLPTR); + Q_ASSERT(m_entity == nullptr); + Q_ASSERT(m_component == nullptr); + Q_ASSERT(m_context == nullptr); m_component = new QQmlComponent(qmlEngine(q), q); QObject::connect(m_component, SIGNAL(statusChanged(QQmlComponent::Status)), @@ -196,10 +196,10 @@ void Quick3DEntityLoaderPrivate::_q_componentStatusChanged(QQmlComponent::Status { Q_Q(Quick3DEntityLoader); - Q_ASSERT(m_entity == Q_NULLPTR); - Q_ASSERT(m_component != Q_NULLPTR); - Q_ASSERT(m_context == Q_NULLPTR); - Q_ASSERT(m_incubator == Q_NULLPTR); + Q_ASSERT(m_entity == nullptr); + Q_ASSERT(m_component != nullptr); + Q_ASSERT(m_context == nullptr); + Q_ASSERT(m_incubator == nullptr); if (!m_component->errors().isEmpty()) { QQmlEnginePrivate::warning(qmlEngine(q), m_component->errors()); diff --git a/src/quick3d/quick3d/items/quick3dnode.cpp b/src/quick3d/quick3d/items/quick3dnode.cpp index eb6e75bae..df23b18a1 100644 --- a/src/quick3d/quick3d/items/quick3dnode.cpp +++ b/src/quick3d/quick3d/items/quick3dnode.cpp @@ -162,7 +162,7 @@ void Quick3DNode::childRemoved(int, QObject *obj) if (QNode *n = qobject_cast<QNode *>(obj)) n->setParent(Q_NODE_NULLPTR); else - obj->setParent(Q_NULLPTR); + obj->setParent(nullptr); } } // namespace Quick diff --git a/src/quick3d/quick3d/qqmlaspectengine.cpp b/src/quick3d/quick3d/qqmlaspectengine.cpp index d944425c3..786548390 100644 --- a/src/quick3d/quick3d/qqmlaspectengine.cpp +++ b/src/quick3d/quick3d/qqmlaspectengine.cpp @@ -59,7 +59,7 @@ QQmlAspectEnginePrivate::QQmlAspectEnginePrivate() : QObjectPrivate() , m_qmlEngine(new QQmlEngine()) , m_aspectEngine(new QAspectEngine()) - , m_component(Q_NULLPTR) + , m_component(nullptr) { } @@ -127,7 +127,7 @@ void QQmlAspectEngine::setSource(const QUrl &source) if (d->m_component) { d->m_aspectEngine->setRootEntity(QEntityPtr()); - d->m_component = Q_NULLPTR; + d->m_component = nullptr; } if (!source.isEmpty()) { diff --git a/src/quick3d/quick3d/qqmlaspectengine.h b/src/quick3d/quick3d/qqmlaspectengine.h index 5d93649d9..af1dd1142 100644 --- a/src/quick3d/quick3d/qqmlaspectengine.h +++ b/src/quick3d/quick3d/qqmlaspectengine.h @@ -57,7 +57,7 @@ class QT3DQUICKSHARED_EXPORT QQmlAspectEngine: public QObject public: enum Status { Null, Ready, Loading, Error }; - explicit QQmlAspectEngine(QObject *parent = Q_NULLPTR); + explicit QQmlAspectEngine(QObject *parent = nullptr); Status status() const; void setSource(const QUrl &source); diff --git a/src/quick3d/quick3d/qt3dquick_global.cpp b/src/quick3d/quick3d/qt3dquick_global.cpp index 4bbeedd97..78523aa4a 100644 --- a/src/quick3d/quick3d/qt3dquick_global.cpp +++ b/src/quick3d/quick3d/qt3dquick_global.cpp @@ -304,7 +304,7 @@ public: break; } - return Q_NULLPTR; + return nullptr; } bool init(int type, QVariant& dst) Q_DECL_OVERRIDE diff --git a/src/quick3d/quick3d/qt3dquicknodefactory.cpp b/src/quick3d/quick3d/qt3dquicknodefactory.cpp index dc23afbb8..923793506 100644 --- a/src/quick3d/quick3d/qt3dquicknodefactory.cpp +++ b/src/quick3d/quick3d/qt3dquicknodefactory.cpp @@ -59,7 +59,7 @@ void QuickNodeFactory::registerType(const char *className, const char *quickName QNode *QuickNodeFactory::createNode(const char *type) { if (!m_types.contains(type)) - return Q_NULLPTR; + return nullptr; Type &typeInfo(m_types[type]); @@ -68,7 +68,7 @@ QNode *QuickNodeFactory::createNode(const char *type) typeInfo.t = QQmlMetaType::qmlType(QString::fromLatin1(typeInfo.quickName), typeInfo.version.first, typeInfo.version.second); } - return typeInfo.t ? qobject_cast<QNode *>(typeInfo.t->create()) : Q_NULLPTR; + return typeInfo.t ? qobject_cast<QNode *>(typeInfo.t->create()) : nullptr; } } // namespace Qt3DCore diff --git a/src/quick3d/quick3d/qt3dquicknodefactory_p.h b/src/quick3d/quick3d/qt3dquicknodefactory_p.h index dc6c1ea17..ff677da3b 100644 --- a/src/quick3d/quick3d/qt3dquicknodefactory_p.h +++ b/src/quick3d/quick3d/qt3dquicknodefactory_p.h @@ -71,9 +71,9 @@ public: private: struct Type { - Type() : t(Q_NULLPTR), resolved(false) { } + Type() : t(nullptr), resolved(false) { } Type(const char *quickName, int major, int minor) - : quickName(quickName), version(major, minor), t(Q_NULLPTR), resolved(false) { } + : quickName(quickName), version(major, minor), t(nullptr), resolved(false) { } QByteArray quickName; QPair<int, int> version; QQmlType *t; |