diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 2d97cf5a6a..bdbd0dd8ef 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -442,7 +442,8 @@ protected: #ifndef QT_NO_DEBUG_STREAM friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant &); #endif -#ifndef Q_NO_TEMPLATE_FRIENDS +// ### Qt6: FIXME: Remove the special Q_CC_MSVC handling, it was introduced to maintain BC for QTBUG-41810 . +#if !defined(Q_NO_TEMPLATE_FRIENDS) && !defined(Q_CC_MSVC) template friend inline T qvariant_cast(const QVariant &); template friend struct QtPrivate::QVariantValueHelper;