diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-05-14 00:55:43 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-05-14 16:02:51 +0000 |
commit | 9efaa9407629310e4bf669757f5e1b88b0191e2c (patch) | |
tree | ce4918c174a244cd05ef4c620009c39deb53d76e | |
parent | 6da09812519d1656d03c1a8c97b6ba53f38be705 (diff) |
Add more explicit
Change-Id: Iaa91d6248cbc3822ed3380e360d2880d4894446d
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
50 files changed, 56 insertions, 57 deletions
diff --git a/src/core/aspects/qabstractaspect.h b/src/core/aspects/qabstractaspect.h index 48076c1f1..bfe2ccc21 100644 --- a/src/core/aspects/qabstractaspect.h +++ b/src/core/aspects/qabstractaspect.h @@ -69,7 +69,7 @@ public: ~QAbstractAspect(); protected: - QAbstractAspect(QAbstractAspectPrivate &dd, QObject *parent = nullptr); + explicit QAbstractAspect(QAbstractAspectPrivate &dd, QObject *parent = nullptr); QNodeId rootEntityId() const Q_DECL_NOEXCEPT; diff --git a/src/core/changes/qpropertynoderemovedchange.h b/src/core/changes/qpropertynoderemovedchange.h index 6df0a185c..a1786d954 100644 --- a/src/core/changes/qpropertynoderemovedchange.h +++ b/src/core/changes/qpropertynoderemovedchange.h @@ -53,8 +53,8 @@ class QPropertyNodeRemovedChangePrivate; class QT3DCORESHARED_EXPORT QPropertyNodeRemovedChange : public QStaticPropertyValueRemovedChangeBase { public: - QPropertyNodeRemovedChange(QNodeId subjectId, QNode *node); - QPropertyNodeRemovedChange(QNodeId subjectId); + explicit QPropertyNodeRemovedChange(QNodeId subjectId, QNode *node); + explicit QPropertyNodeRemovedChange(QNodeId subjectId); QNodeId removedNodeId() const; const QMetaObject *metaObject() const; diff --git a/src/core/changes/qpropertyvalueaddedchange.h b/src/core/changes/qpropertyvalueaddedchange.h index 85e561421..80b41c9f8 100644 --- a/src/core/changes/qpropertyvalueaddedchange.h +++ b/src/core/changes/qpropertyvalueaddedchange.h @@ -53,7 +53,7 @@ class QPropertyValueAddedChangePrivate; class QT3DCORESHARED_EXPORT QPropertyValueAddedChange : public QStaticPropertyValueAddedChangeBase { public: - QPropertyValueAddedChange(QNodeId subjectId); + explicit QPropertyValueAddedChange(QNodeId subjectId); ~QPropertyValueAddedChange(); void setAddedValue(const QVariant &value); diff --git a/src/core/changes/qpropertyvalueaddedchangebase.h b/src/core/changes/qpropertyvalueaddedchangebase.h index 69ce67315..2ac449667 100644 --- a/src/core/changes/qpropertyvalueaddedchangebase.h +++ b/src/core/changes/qpropertyvalueaddedchangebase.h @@ -57,7 +57,7 @@ public: protected: explicit QPropertyValueAddedChangeBase(QNodeId subjectId); - QPropertyValueAddedChangeBase(QPropertyValueAddedChangeBasePrivate &dd, QNodeId subjectId); + explicit QPropertyValueAddedChangeBase(QPropertyValueAddedChangeBasePrivate &dd, QNodeId subjectId); Q_DECLARE_PRIVATE(QPropertyValueAddedChangeBase) }; diff --git a/src/core/changes/qpropertyvalueremovedchange.h b/src/core/changes/qpropertyvalueremovedchange.h index fbaa8e042..06bb1dd39 100644 --- a/src/core/changes/qpropertyvalueremovedchange.h +++ b/src/core/changes/qpropertyvalueremovedchange.h @@ -53,7 +53,7 @@ class QPropertyValueRemovedChangePrivate; class QT3DCORESHARED_EXPORT QPropertyValueRemovedChange : public QStaticPropertyValueRemovedChangeBase { public: - QPropertyValueRemovedChange(QNodeId subjectId); + explicit QPropertyValueRemovedChange(QNodeId subjectId); ~QPropertyValueRemovedChange(); void setRemovedValue(const QVariant &value); diff --git a/src/core/changes/qpropertyvalueremovedchangebase.h b/src/core/changes/qpropertyvalueremovedchangebase.h index 591cd8b77..44bc57726 100644 --- a/src/core/changes/qpropertyvalueremovedchangebase.h +++ b/src/core/changes/qpropertyvalueremovedchangebase.h @@ -58,7 +58,7 @@ public: protected: Q_DECLARE_PRIVATE(QPropertyValueRemovedChangeBase) explicit QPropertyValueRemovedChangeBase(QNodeId subjectId); - QPropertyValueRemovedChangeBase(QPropertyValueRemovedChangeBasePrivate &dd, QNodeId subjectId); + explicit QPropertyValueRemovedChangeBase(QPropertyValueRemovedChangeBasePrivate &dd, QNodeId subjectId); }; typedef QSharedPointer<QPropertyValueRemovedChangeBase> QPropertyValueRemovedChangeBasePtr; diff --git a/src/core/changes/qscenechange.h b/src/core/changes/qscenechange.h index a8039d3e4..bd7686a53 100644 --- a/src/core/changes/qscenechange.h +++ b/src/core/changes/qscenechange.h @@ -84,8 +84,8 @@ public: protected: Q_DECLARE_PRIVATE(QSceneChange) - QSceneChange(ChangeFlag type, QNodeId subjectId); - QSceneChange(QSceneChangePrivate &dd, + explicit QSceneChange(ChangeFlag type, QNodeId subjectId); + explicit QSceneChange(QSceneChangePrivate &dd, ChangeFlag type, QNodeId subjectId); QSceneChangePrivate *d_ptr; diff --git a/src/core/changes/qstaticpropertyupdatedchangebase.h b/src/core/changes/qstaticpropertyupdatedchangebase.h index 25794131d..ca145e975 100644 --- a/src/core/changes/qstaticpropertyupdatedchangebase.h +++ b/src/core/changes/qstaticpropertyupdatedchangebase.h @@ -57,8 +57,8 @@ public: void setPropertyName(const char *name); protected: - QStaticPropertyUpdatedChangeBase(QNodeId subjectId); - QStaticPropertyUpdatedChangeBase(QStaticPropertyUpdatedChangeBasePrivate &dd, QNodeId subjectId); + explicit QStaticPropertyUpdatedChangeBase(QNodeId subjectId); + explicit QStaticPropertyUpdatedChangeBase(QStaticPropertyUpdatedChangeBasePrivate &dd, QNodeId subjectId); Q_DECLARE_PRIVATE(QStaticPropertyUpdatedChangeBase) }; diff --git a/src/core/jobs/qaspectjob.h b/src/core/jobs/qaspectjob.h index 17d434be5..b2e5e587c 100644 --- a/src/core/jobs/qaspectjob.h +++ b/src/core/jobs/qaspectjob.h @@ -64,7 +64,7 @@ public: virtual void run() = 0; protected: - QAspectJob(QAspectJobPrivate &dd); + explicit QAspectJob(QAspectJobPrivate &dd); private: Q_DISABLE_COPY(QAspectJob) diff --git a/src/core/nodes/qbackendnode.h b/src/core/nodes/qbackendnode.h index c3e2bd233..fb32a9bce 100644 --- a/src/core/nodes/qbackendnode.h +++ b/src/core/nodes/qbackendnode.h @@ -88,7 +88,7 @@ public: protected: Q_DECLARE_PRIVATE(QBackendNode) - QBackendNode(QBackendNodePrivate &dd); + explicit QBackendNode(QBackendNodePrivate &dd); void notifyObservers(const QSceneChangePtr &e); virtual void sceneChangeEvent(const QSceneChangePtr &e); diff --git a/src/core/nodes/qcomponent.h b/src/core/nodes/qcomponent.h index c25ec304a..8c1adcfc3 100644 --- a/src/core/nodes/qcomponent.h +++ b/src/core/nodes/qcomponent.h @@ -69,7 +69,7 @@ Q_SIGNALS: void shareableChanged(bool isShareable); protected: - QComponent(QComponentPrivate &dd, QNode *parent = nullptr); + explicit QComponent(QComponentPrivate &dd, QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QComponent) diff --git a/src/core/nodes/qentity.h b/src/core/nodes/qentity.h index 2d4c02555..a7f492a96 100644 --- a/src/core/nodes/qentity.h +++ b/src/core/nodes/qentity.h @@ -69,7 +69,7 @@ public: QEntity *parentEntity() const; protected: - QEntity(QEntityPrivate &dd, QNode *parent = nullptr); + explicit QEntity(QEntityPrivate &dd, QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QEntity) diff --git a/src/core/nodes/qnode.h b/src/core/nodes/qnode.h index 19f06df68..3522800ef 100644 --- a/src/core/nodes/qnode.h +++ b/src/core/nodes/qnode.h @@ -92,7 +92,7 @@ Q_SIGNALS: void enabledChanged(bool enabled); protected: - QNode(QNodePrivate &dd, QNode *parent = nullptr); + explicit QNode(QNodePrivate &dd, QNode *parent = nullptr); void notifyObservers(const QSceneChangePtr &change); virtual void sceneChangeEvent(const QSceneChangePtr &change); diff --git a/src/core/transforms/qtransform.h b/src/core/transforms/qtransform.h index aafbb6da3..a71c218b4 100644 --- a/src/core/transforms/qtransform.h +++ b/src/core/transforms/qtransform.h @@ -113,7 +113,7 @@ Q_SIGNALS: void rotationZChanged(float rotationZ); protected: - QTransform(QTransformPrivate &dd, QNode *parent = nullptr); + explicit QTransform(QTransformPrivate &dd, QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QTransform) diff --git a/src/extras/defaults/qgoochmaterial.h b/src/extras/defaults/qgoochmaterial.h index dc8bcf2e0..e3a863433 100644 --- a/src/extras/defaults/qgoochmaterial.h +++ b/src/extras/defaults/qgoochmaterial.h @@ -90,7 +90,7 @@ Q_SIGNALS: void shininessChanged(float shininess); protected: - QGoochMaterial(QGoochMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QGoochMaterial(QGoochMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QGoochMaterial) diff --git a/src/input/frontend/qkeyevent.h b/src/input/frontend/qkeyevent.h index c0a6e1332..a75c0042b 100644 --- a/src/input/frontend/qkeyevent.h +++ b/src/input/frontend/qkeyevent.h @@ -65,8 +65,8 @@ class QT3DINPUTSHARED_EXPORT QKeyEvent : public QObject Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted) public: - QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text=QString(), bool autorep=false, ushort count=1); - QKeyEvent(const QT_PREPEND_NAMESPACE(QKeyEvent) &ke); + explicit QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text=QString(), bool autorep=false, ushort count=1); + explicit QKeyEvent(const QT_PREPEND_NAMESPACE(QKeyEvent) &ke); inline int key() const { return m_event.key(); } inline QString text() const { return m_event.text(); } diff --git a/src/logic/qlogicaspect.h b/src/logic/qlogicaspect.h index 3dcd97773..3d7e8b957 100644 --- a/src/logic/qlogicaspect.h +++ b/src/logic/qlogicaspect.h @@ -63,7 +63,7 @@ private: void onEngineStartup() Q_DECL_OVERRIDE; Q_DECLARE_PRIVATE(QLogicAspect) - QLogicAspect(QLogicAspectPrivate &dd, QObject *parent); + explicit QLogicAspect(QLogicAspectPrivate &dd, QObject *parent); }; } // namespace Qt3DLogic diff --git a/src/quick3d/quick3dextras/qt3dquickwindow.h b/src/quick3d/quick3dextras/qt3dquickwindow.h index 321e0c453..48d2c7cb6 100644 --- a/src/quick3d/quick3dextras/qt3dquickwindow.h +++ b/src/quick3d/quick3dextras/qt3dquickwindow.h @@ -88,7 +88,7 @@ class QT3DQUICKEXTRASSHARED_EXPORT Qt3DQuickWindow : public QQuickWindow Q_PROPERTY(CameraAspectRatioMode cameraAspectRatioMode READ cameraAspectRatioMode WRITE setCameraAspectRatioMode NOTIFY cameraAspectRatioModeChanged) public: - Qt3DQuickWindow(QWindow *parent = nullptr); + explicit Qt3DQuickWindow(QWindow *parent = nullptr); ~Qt3DQuickWindow(); void registerAspect(Qt3DCore::QAbstractAspect *aspect); diff --git a/src/render/framegraph/qcameraselector.h b/src/render/framegraph/qcameraselector.h index 0389d4c6c..3dfdb736b 100644 --- a/src/render/framegraph/qcameraselector.h +++ b/src/render/framegraph/qcameraselector.h @@ -66,7 +66,7 @@ Q_SIGNALS: void cameraChanged(Qt3DCore::QEntity *camera); protected: - QCameraSelector(QCameraSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QCameraSelector(QCameraSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QCameraSelector) diff --git a/src/render/framegraph/qframegraphnode.h b/src/render/framegraph/qframegraphnode.h index dc9a98bf8..67c719420 100644 --- a/src/render/framegraph/qframegraphnode.h +++ b/src/render/framegraph/qframegraphnode.h @@ -59,7 +59,7 @@ public: QFrameGraphNode *parentFrameGraphNode() const; protected: - QFrameGraphNode(QFrameGraphNodePrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QFrameGraphNode(QFrameGraphNodePrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QFrameGraphNode) diff --git a/src/render/framegraph/qlayerfilter.h b/src/render/framegraph/qlayerfilter.h index b4cf13c10..f49b8802f 100644 --- a/src/render/framegraph/qlayerfilter.h +++ b/src/render/framegraph/qlayerfilter.h @@ -61,7 +61,7 @@ public: QVector<QLayer *> layers() const; protected: - QLayerFilter(QLayerFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QLayerFilter(QLayerFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QLayerFilter) diff --git a/src/render/framegraph/qrenderpassfilter.h b/src/render/framegraph/qrenderpassfilter.h index 66294e28f..ba38a003e 100644 --- a/src/render/framegraph/qrenderpassfilter.h +++ b/src/render/framegraph/qrenderpassfilter.h @@ -69,7 +69,7 @@ public: QVector<QParameter *> parameters() const; protected: - QRenderPassFilter(QRenderPassFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QRenderPassFilter(QRenderPassFilterPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QRenderPassFilter) diff --git a/src/render/framegraph/qrendersurfaceselector.h b/src/render/framegraph/qrendersurfaceselector.h index 4f75e82f5..54d325fb0 100644 --- a/src/render/framegraph/qrendersurfaceselector.h +++ b/src/render/framegraph/qrendersurfaceselector.h @@ -75,7 +75,7 @@ Q_SIGNALS: protected: Q_DECLARE_PRIVATE(QRenderSurfaceSelector) - QRenderSurfaceSelector(QRenderSurfaceSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QRenderSurfaceSelector(QRenderSurfaceSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Qt3DCore::QNodeCreatedChangeBasePtr createNodeCreationChange() const Q_DECL_OVERRIDE; diff --git a/src/render/framegraph/qrendertargetselector.h b/src/render/framegraph/qrendertargetselector.h index 8db5f07c0..af8c8c1c4 100644 --- a/src/render/framegraph/qrendertargetselector.h +++ b/src/render/framegraph/qrendertargetselector.h @@ -71,7 +71,7 @@ Q_SIGNALS: void targetChanged(QRenderTarget *target); protected: - QRenderTargetSelector(QRenderTargetSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QRenderTargetSelector(QRenderTargetSelectorPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QRenderTargetSelector) diff --git a/src/render/framegraph/qviewport.h b/src/render/framegraph/qviewport.h index e375ba377..531586d66 100644 --- a/src/render/framegraph/qviewport.h +++ b/src/render/framegraph/qviewport.h @@ -67,7 +67,7 @@ Q_SIGNALS: void normalizedRectChanged(const QRectF& normalizedRect); protected: - QViewport(QViewportPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QViewport(QViewportPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QViewport) diff --git a/src/render/frontend/qcamera.h b/src/render/frontend/qcamera.h index bf725dc20..3b7bf95b9 100644 --- a/src/render/frontend/qcamera.h +++ b/src/render/frontend/qcamera.h @@ -165,7 +165,7 @@ Q_SIGNALS: protected: Q_DECLARE_PRIVATE(QCamera) - QCamera(QCameraPrivate &dd, QNode *parent = nullptr); + explicit QCamera(QCameraPrivate &dd, QNode *parent = nullptr); }; } // namespace Qt3DRender diff --git a/src/render/frontend/qcameralens.h b/src/render/frontend/qcameralens.h index c32597201..f719aff3d 100644 --- a/src/render/frontend/qcameralens.h +++ b/src/render/frontend/qcameralens.h @@ -126,7 +126,7 @@ Q_SIGNALS: void projectionMatrixChanged(const QMatrix4x4 &projectionMatrix); protected: - QCameraLens(QCameraLensPrivate &dd, QNode *parent = nullptr); + explicit QCameraLens(QCameraLensPrivate &dd, QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QCameraLens) diff --git a/src/render/frontend/qlayer.h b/src/render/frontend/qlayer.h index 0a3ecf933..b45e5f8cf 100644 --- a/src/render/frontend/qlayer.h +++ b/src/render/frontend/qlayer.h @@ -57,7 +57,7 @@ public: explicit QLayer(Qt3DCore::QNode *parent = nullptr); protected: - QLayer(QLayerPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QLayer(QLayerPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QLayer) diff --git a/src/render/frontend/qpickingsettings.h b/src/render/frontend/qpickingsettings.h index 985f851a3..8b765a4ad 100644 --- a/src/render/frontend/qpickingsettings.h +++ b/src/render/frontend/qpickingsettings.h @@ -83,7 +83,7 @@ Q_SIGNALS: protected: Q_DECLARE_PRIVATE(QPickingSettings) - QPickingSettings(QPickingSettingsPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QPickingSettings(QPickingSettingsPrivate &dd, Qt3DCore::QNode *parent = nullptr); }; } // namespace Qt3Drender diff --git a/src/render/frontend/qrendersettings.h b/src/render/frontend/qrendersettings.h index ce61db4fd..576a8af82 100644 --- a/src/render/frontend/qrendersettings.h +++ b/src/render/frontend/qrendersettings.h @@ -83,7 +83,7 @@ Q_SIGNALS: protected: Q_DECLARE_PRIVATE(QRenderSettings) - QRenderSettings(QRenderSettingsPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit 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.h b/src/render/frontend/qrendertarget.h index 27e9c9f48..a7bba422b 100644 --- a/src/render/frontend/qrendertarget.h +++ b/src/render/frontend/qrendertarget.h @@ -61,7 +61,7 @@ public: QVector<QRenderTargetOutput *> outputs() const; protected: - QRenderTarget(QRenderTargetPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QRenderTarget(QRenderTargetPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QRenderTarget) diff --git a/src/render/geometry/qgeometry.h b/src/render/geometry/qgeometry.h index e9ae710fa..dee254236 100644 --- a/src/render/geometry/qgeometry.h +++ b/src/render/geometry/qgeometry.h @@ -70,7 +70,7 @@ Q_SIGNALS: void boundingVolumePositionAttributeChanged(QAttribute *boundingVolumePositionAttribute); protected: - QGeometry(QGeometryPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QGeometry(QGeometryPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QGeometry) diff --git a/src/render/geometry/qgeometryrenderer.h b/src/render/geometry/qgeometryrenderer.h index cc4560921..60b769a0b 100644 --- a/src/render/geometry/qgeometryrenderer.h +++ b/src/render/geometry/qgeometryrenderer.h @@ -128,7 +128,7 @@ Q_SIGNALS: void primitiveTypeChanged(PrimitiveType primitiveType); protected: - QGeometryRenderer(QGeometryRendererPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QGeometryRenderer(QGeometryRendererPrivate &dd, Qt3DCore::QNode *parent = nullptr); void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE; private: diff --git a/src/render/geometry/qmesh.h b/src/render/geometry/qmesh.h index 64e9d3772..75c4a14f6 100644 --- a/src/render/geometry/qmesh.h +++ b/src/render/geometry/qmesh.h @@ -75,7 +75,7 @@ Q_SIGNALS: void meshNameChanged(const QString &meshName); protected: - QMesh(QMeshPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QMesh(QMeshPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QMesh) diff --git a/src/render/lights/qabstractlight.h b/src/render/lights/qabstractlight.h index 3881257c4..8ac9bc05f 100644 --- a/src/render/lights/qabstractlight.h +++ b/src/render/lights/qabstractlight.h @@ -75,9 +75,8 @@ public Q_SLOTS: void setColor(const QColor &color); void setIntensity(float intensity); -protected : - QAbstractLight(QAbstractLightPrivate &dd, Qt3DCore::QNode *parent = nullptr); - +protected: + explicit QAbstractLight(QAbstractLightPrivate &dd, Qt3DCore::QNode *parent = nullptr); Q_SIGNALS: void colorChanged(const QColor &color); diff --git a/src/render/lights/qabstractlight_p.h b/src/render/lights/qabstractlight_p.h index a903f43f6..1e5ce588f 100644 --- a/src/render/lights/qabstractlight_p.h +++ b/src/render/lights/qabstractlight_p.h @@ -63,7 +63,7 @@ class QAbstractLight; class Q_AUTOTEST_EXPORT QAbstractLightPrivate : public Qt3DCore::QComponentPrivate { public: - QAbstractLightPrivate(QAbstractLight::Type type); + explicit QAbstractLightPrivate(QAbstractLight::Type type); Q_DECLARE_PUBLIC(QAbstractLight) QAbstractLight::Type m_type; diff --git a/src/render/lights/qdirectionallight.h b/src/render/lights/qdirectionallight.h index a0c756330..46d5db927 100644 --- a/src/render/lights/qdirectionallight.h +++ b/src/render/lights/qdirectionallight.h @@ -65,7 +65,7 @@ Q_SIGNALS: void worldDirectionChanged(const QVector3D &worldDirection); protected: - QDirectionalLight(QDirectionalLightPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QDirectionalLight(QDirectionalLightPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QDirectionalLight) diff --git a/src/render/lights/qspotlight.h b/src/render/lights/qspotlight.h index fff75e50e..846f8907e 100644 --- a/src/render/lights/qspotlight.h +++ b/src/render/lights/qspotlight.h @@ -83,7 +83,7 @@ Q_SIGNALS: void cutOffAngleChanged(float cutOffAngle); protected: - QSpotLight(QSpotLightPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QSpotLight(QSpotLightPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QSpotLight) diff --git a/src/render/materialsystem/qeffect.h b/src/render/materialsystem/qeffect.h index c207c441f..c1a6b8552 100644 --- a/src/render/materialsystem/qeffect.h +++ b/src/render/materialsystem/qeffect.h @@ -66,7 +66,7 @@ public: QVector<QTechnique *> techniques() const; protected: - QEffect(QEffectPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QEffect(QEffectPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QEffect) diff --git a/src/render/materialsystem/qmaterial.h b/src/render/materialsystem/qmaterial.h index 48413c4a4..674e62906 100644 --- a/src/render/materialsystem/qmaterial.h +++ b/src/render/materialsystem/qmaterial.h @@ -75,7 +75,7 @@ Q_SIGNALS: void effectChanged(QEffect *effect); protected: - QMaterial(QMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QMaterial(QMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QMaterial) diff --git a/src/render/materialsystem/qparameter.h b/src/render/materialsystem/qparameter.h index 590bfc166..d17d23a04 100644 --- a/src/render/materialsystem/qparameter.h +++ b/src/render/materialsystem/qparameter.h @@ -59,8 +59,8 @@ class QT3DRENDERSHARED_EXPORT QParameter : public Qt3DCore::QNode public: explicit QParameter(Qt3DCore::QNode *parent = nullptr); - QParameter(const QString &name, const QVariant& value, Qt3DCore::QNode *parent = nullptr); - QParameter(const QString &name, QAbstractTexture *texture, Qt3DCore::QNode *parent = nullptr); + explicit QParameter(const QString &name, const QVariant& value, Qt3DCore::QNode *parent = nullptr); + explicit QParameter(const QString &name, QAbstractTexture *texture, Qt3DCore::QNode *parent = nullptr); QString name() const; QVariant value() const; diff --git a/src/render/materialsystem/qrenderpass.h b/src/render/materialsystem/qrenderpass.h index 40baa0d33..e1e4aa561 100644 --- a/src/render/materialsystem/qrenderpass.h +++ b/src/render/materialsystem/qrenderpass.h @@ -88,7 +88,7 @@ Q_SIGNALS: void shaderProgramChanged(QShaderProgram *shaderProgram); protected: - QRenderPass(QRenderPassPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit 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 aac5d6d3a..347790dde 100644 --- a/src/render/materialsystem/qshaderdata.h +++ b/src/render/materialsystem/qshaderdata.h @@ -70,7 +70,7 @@ public: bool event(QEvent *event) Q_DECL_OVERRIDE; protected: - QShaderData(QShaderDataPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QShaderData(QShaderDataPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QShaderData) diff --git a/src/render/materialsystem/qshaderprogram.h b/src/render/materialsystem/qshaderprogram.h index 69d9bd8b6..9cabaa3cc 100644 --- a/src/render/materialsystem/qshaderprogram.h +++ b/src/render/materialsystem/qshaderprogram.h @@ -102,7 +102,7 @@ Q_SIGNALS: void computeShaderCodeChanged(const QByteArray &computeShaderCode); protected: - QShaderProgram(QShaderProgramPrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QShaderProgram(QShaderProgramPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QShaderProgram) diff --git a/src/render/materialsystem/qtechnique.h b/src/render/materialsystem/qtechnique.h index 1f3f37fdb..72ad941c0 100644 --- a/src/render/materialsystem/qtechnique.h +++ b/src/render/materialsystem/qtechnique.h @@ -78,7 +78,7 @@ public: QGraphicsApiFilter *graphicsApiFilter(); protected: - QTechnique(QTechniquePrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QTechnique(QTechniquePrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QTechnique) diff --git a/src/render/picking/qpickevent.h b/src/render/picking/qpickevent.h index f80b6d84b..431fe1927 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 = nullptr); + explicit QPickEvent(QObjectPrivate &dd, QObject *parent = nullptr); private: Q_DECLARE_PRIVATE(QPickEvent) diff --git a/src/render/renderstates/qblendequationarguments.h b/src/render/renderstates/qblendequationarguments.h index 80ec3a911..e8107fa47 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 = nullptr); + explicit QBlendEquationArguments(QBlendEquationArgumentsPrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QBlendEquationArguments) diff --git a/src/render/renderstates/qrenderstate.h b/src/render/renderstates/qrenderstate.h index f06f7ce82..6f40658b2 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 = nullptr); + explicit QRenderState(QRenderStatePrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QRenderState) diff --git a/src/render/texture/qabstracttexture.h b/src/render/texture/qabstracttexture.h index 1bc3559c6..d8435ba81 100644 --- a/src/render/texture/qabstracttexture.h +++ b/src/render/texture/qabstracttexture.h @@ -324,7 +324,7 @@ Q_SIGNALS: protected: explicit QAbstractTexture(Qt3DCore::QNode *parent = nullptr); explicit QAbstractTexture(Target target, Qt3DCore::QNode *parent = nullptr); - QAbstractTexture(QAbstractTexturePrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QAbstractTexture(QAbstractTexturePrivate &dd, Qt3DCore::QNode *parent = nullptr); void setStatus(Status status); diff --git a/src/render/texture/qabstracttextureimage.h b/src/render/texture/qabstracttextureimage.h index 6b003661f..a63ba0bba 100644 --- a/src/render/texture/qabstracttextureimage.h +++ b/src/render/texture/qabstracttextureimage.h @@ -94,7 +94,7 @@ Q_SIGNALS: protected: void notifyDataGeneratorChanged(); virtual QTextureImageDataGeneratorPtr dataGenerator() const = 0; - QAbstractTextureImage(QAbstractTextureImagePrivate &dd, Qt3DCore::QNode *parent = nullptr); + explicit QAbstractTextureImage(QAbstractTextureImagePrivate &dd, Qt3DCore::QNode *parent = nullptr); private: Q_DECLARE_PRIVATE(QAbstractTextureImage) |