From cbb4d500199253f1187ee437a3991b5434c3a0bb Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 29 Nov 2019 10:55:03 +0100 Subject: Silence MSVC build of Qt for Python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enclose QAssociativeIterableImpl::advanceImpl within QT_WARNING_DISABLE_DEPRECATED, fixing numerous warnings: MSVC\14.23.28105\include\xutility(727): warning C4996: 'QHash::const_iterator::operator --': was declared deprecated include\QtCore\../../src/corelib/tools/qhash.h(432): note: see declaration of 'QHash::const_iterator::operator --' include\QtCore\../../src/corelib/kernel/qmetatype.h(1217): note: see reference to function template instantiation 'void std::advance::const_iterator,int>(_InIt &,_Diff)' being compiled with [ _InIt=QHash::const_iterator, _Diff=int ] include\QtCore\../../src/corelib/kernel/qmetatype.h(1253): note: see reference to function template instantiation 'void QtMetaTypePrivate::QAssociativeIterableImpl::advanceImpl(void **,int)' being compiled with [T=QVariantHash] include\QtCore\../../src/corelib/kernel/qvariant.h(793): note: see reference to function template instantiation 'QtMetaTypePrivate::QAssociativeIterableImpl::QAssociativeIterableImpl(const T *)' being compiled with[T=QVariantHash] Amends dbb54805f63f9ed68d84fe090d608872f16170d2. Change-Id: Ieb875eaa943100ce1941cb1473b35892330c3889 Reviewed-by: MÃ¥rten Nordheim --- src/corelib/kernel/qmetatype.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index d41f7ee80e..240828bc9a 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -1212,9 +1212,12 @@ public: { IteratorOwner::assign(iterator, static_cast(container)->find(*static_cast(p))); } + QT_WARNING_PUSH + QT_WARNING_DISABLE_DEPRECATED // Hits on the deprecated QHash::iterator::operator--() template static void advanceImpl(void **p, int step) { std::advance(*static_cast(*p), step); } + QT_WARNING_POP template static void beginImpl(const void *container, void **iterator) -- cgit v1.2.3