From 20a69a0c84f2da2081a761c4ae75382f9c9f4e7f Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Tue, 17 Jan 2023 13:44:29 +0100 Subject: [PATCH] qproperty.h: Make ctors explicit Addresses comments from API review. Change-Id: I859079cc918aa67dffe0c780f6d0b9712652bb4a Reviewed-by: Marc Mutz (cherry picked from commit aaa198cb5cd8bfcf366a09982a19c0c1c8d1f7a3) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/kernel/qproperty.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h index cce9e9791f2..297a3fe9740 100644 --- a/src/corelib/kernel/qproperty.h +++ b/src/corelib/kernel/qproperty.h @@ -663,8 +663,8 @@ protected: : data(d), iface(i) {} - Q_CORE_EXPORT QUntypedBindable(QObject* obj, const QMetaProperty &property, const QtPrivate::QBindableInterface *i); - Q_CORE_EXPORT QUntypedBindable(QObject* obj, const char* property, const QtPrivate::QBindableInterface *i); + Q_CORE_EXPORT explicit QUntypedBindable(QObject* obj, const QMetaProperty &property, const QtPrivate::QBindableInterface *i); + Q_CORE_EXPORT explicit QUntypedBindable(QObject* obj, const char* property, const QtPrivate::QBindableInterface *i); public: constexpr QUntypedBindable() = default; @@ -802,10 +802,10 @@ public: } } - QBindable(QObject *obj, const QMetaProperty &property) + explicit QBindable(QObject *obj, const QMetaProperty &property) : QUntypedBindable(obj, property, &QtPrivate::PropertyAdaptorSlotObjectHelpers::iface) {} - QBindable(QObject *obj, const char *property) + explicit QBindable(QObject *obj, const char *property) : QUntypedBindable(obj, property, &QtPrivate::PropertyAdaptorSlotObjectHelpers::iface) {} QPropertyBinding makeBinding(const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION) const