QSharedPointer: Fix build error for cross-built tools

Guard friend declaration within QT_NO_QOBJECT.
Amends 28ce318fcb.

Fixes: QTBUG-76056
Change-Id: I14fbe5457c16e8a366fecdc0a356b68b8609848b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Friedemann Kleint 2019-05-28 15:30:48 +02:00
parent a4084f6bf5
commit 1f6ac40ff6

View File

@ -678,9 +678,11 @@ public:
#else
template <class X> friend class QSharedPointer;
template <class X> friend class QPointer;
# ifndef QT_NO_QOBJECT
template<typename X>
friend QWeakPointer<typename std::enable_if<QtPrivate::IsPointerToTypeDerivedFromQObject<X*>::Value, X>::type>
qWeakPointerFromVariant(const QVariant &variant);
# endif
template<typename X>
friend QPointer<X>
qPointerFromVariant(const QVariant &variant);