QtPrivate::QSmartPointerConvertFunctor: Fix deprecation warning
Fix warning: src/corelib/kernel/qmetatype.h:1723:27: warning: ‘T* QWeakPointer<T>::data() const [with T = QFile]’ is deprecated: Use toStrongRef() instead, and data() on the returned QSharedPointer [-Wdeprecated-declarations] shown when compiling tst_QVariant by using QWeakPointer::internalData(). Change-Id: I5ea543019b4f8e5dfc829939cd2011ae65f12876 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
77e708d167
commit
28b06fc1a7
@ -1720,7 +1720,7 @@ namespace QtPrivate {
|
||||
{
|
||||
QObject* operator()(const QWeakPointer<T> &p) const
|
||||
{
|
||||
return p.data();
|
||||
return p.internalData();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -684,6 +684,7 @@ public:
|
||||
template<typename X>
|
||||
friend QPointer<X>
|
||||
qPointerFromVariant(const QVariant &variant);
|
||||
friend QtPrivate::QSmartPointerConvertFunctor<QWeakPointer>;
|
||||
#endif
|
||||
|
||||
template <class X>
|
||||
|
Loading…
Reference in New Issue
Block a user