diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index ffc091ebf9..3481a5e347 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -228,6 +228,14 @@ class Q_CORE_EXPORT QVariant QVariant(const QModelIndex &modelIndex); QVariant(const QPersistentModelIndex &modelIndex); #endif +#if !defined(Q_CC_GHS) + // GHS has an ICE with this code; use the simplified version below + template , std::is_member_pointer>, bool> = false> + QVariant(T) = delete; +#else + QVariant(const volatile void *) = delete; +#endif QVariant& operator=(const QVariant &other); inline QVariant(QVariant &&other) noexcept : d(other.d)