diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-29 10:55:03 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-29 11:26:59 +0100 |
commit | cbb4d500199253f1187ee437a3991b5434c3a0bb (patch) | |
tree | 74e6079b970d4578f991703f38978849a45ff3bb | |
parent | f881d00a4f37fcf244be8f93235b9c970aa1a9aa (diff) |
Silence MSVC build of Qt for Python
Enclose QAssociativeIterableImpl::advanceImpl within
QT_WARNING_DISABLE_DEPRECATED, fixing numerous warnings:
MSVC\14.23.28105\include\xutility(727): warning C4996: 'QHash<QString,QVariant>::const_iterator::operator --': was declared deprecated
include\QtCore\../../src/corelib/tools/qhash.h(432): note: see declaration of 'QHash<QString,QVariant>::const_iterator::operator --'
include\QtCore\../../src/corelib/kernel/qmetatype.h(1217): note: see reference to function template instantiation 'void std::advance<QHash<QString,QVariant>::const_iterator,int>(_InIt &,_Diff)' being compiled
with [ _InIt=QHash<QString,QVariant>::const_iterator, _Diff=int ]
include\QtCore\../../src/corelib/kernel/qmetatype.h(1253): note: see reference to function template instantiation 'void QtMetaTypePrivate::QAssociativeIterableImpl::advanceImpl<T>(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<QVariantHash>(const T *)' being compiled
with[T=QVariantHash]
Amends dbb54805f63f9ed68d84fe090d608872f16170d2.
Change-Id: Ieb875eaa943100ce1941cb1473b35892330c3889
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<typename T::const_iterator>::assign(iterator, static_cast<const T*>(container)->find(*static_cast<const typename T::key_type*>(p))); } + QT_WARNING_PUSH + QT_WARNING_DISABLE_DEPRECATED // Hits on the deprecated QHash::iterator::operator--() template<class T> static void advanceImpl(void **p, int step) { std::advance(*static_cast<typename T::const_iterator*>(*p), step); } + QT_WARNING_POP template<class T> static void beginImpl(const void *container, void **iterator) |