From aeadc5c4741a63304579904b11dd60b349ba8e0c Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 21 Sep 2020 11:52:30 +0200 Subject: Replace QmlVoidT with std::void_t Now that we can use C++17 we don't need to invent our own. Change-Id: I6c6e02ac9b48f2fbe88160e7f9ebf9655092c9fc Reviewed-by: Fabian Kosmale --- src/qml/qml/qqmlprivate.h | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h index 39bea42df6..e0de749fb3 100644 --- a/src/qml/qml/qqmlprivate.h +++ b/src/qml/qml/qqmlprivate.h @@ -228,9 +228,6 @@ namespace QQmlPrivate } }; - template - using QmlVoidT = void; - // You can prevent subclasses from using the same attached type by specialzing this. // This is reserved for internal types, though. template @@ -239,7 +236,7 @@ namespace QQmlPrivate using Type = A; }; - template, bool OldStyle = QQmlTypeInfo::hasAttachedProperties> + template, bool OldStyle = QQmlTypeInfo::hasAttachedProperties> struct QmlAttached { using Type = void; @@ -250,7 +247,7 @@ namespace QQmlPrivate // Defined inline via QML_ATTACHED template - struct QmlAttached::Type>, false> + struct QmlAttached::Type>, false> { // Normal attached properties template @@ -286,7 +283,7 @@ namespace QQmlPrivate // Separately defined via QQmlTypeInfo template - struct QmlAttached, true> + struct QmlAttached, true> { using Type = typename std::remove_pointer::type; using Func = QQmlAttachedPropertiesFunc; @@ -545,50 +542,50 @@ namespace QQmlPrivate return elementName; } - template> + template> struct QmlExtended { using Type = void; }; template - struct QmlExtended> + struct QmlExtended> { using Type = typename T::QmlExtendedType; }; - template> + template> struct QmlResolved { using Type = T; }; template - struct QmlResolved> + struct QmlResolved> { using Type = typename T::QmlForeignType; }; - template> + template> struct QmlSingleton { static constexpr bool Value = false; }; template - struct QmlSingleton> + struct QmlSingleton> { static constexpr bool Value = bool(T::QmlIsSingleton::yes); }; - template> + template> struct QmlInterface { static constexpr bool Value = false; }; template - struct QmlInterface> + struct QmlInterface> { static constexpr bool Value = bool(T::QmlIsInterface::yes); }; -- cgit v1.2.3