diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-28 15:07:35 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-10-02 11:24:44 +0000 |
commit | fcb81d7200b8ff63d925de61d4abc9b21daaaa0a (patch) | |
tree | 535f56291e8889bafaf89484414c5e470e03227f /sources/pyside2/libpyside/globalreceiverv2.cpp | |
parent | f2d53ba81c6ce1ac3d8cc58307283b7b68c377f4 (diff) |
libpyside: Replace foreach by range-based for
Change-Id: I577ca66e0bd92cfedd060b46f4946963eb91f991
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/libpyside/globalreceiverv2.cpp')
-rw-r--r-- | sources/pyside2/libpyside/globalreceiverv2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside2/libpyside/globalreceiverv2.cpp b/sources/pyside2/libpyside/globalreceiverv2.cpp index 91ce59bfb..a1a695759 100644 --- a/sources/pyside2/libpyside/globalreceiverv2.cpp +++ b/sources/pyside2/libpyside/globalreceiverv2.cpp @@ -285,9 +285,9 @@ int GlobalReceiverV2::refCount(const QObject* link) const void GlobalReceiverV2::notify() { - QSet<const QObject*> objs = QSet<const QObject*>::fromList(m_refs); + const auto objSet = QSet<const QObject*>::fromList(m_refs); Py_BEGIN_ALLOW_THREADS - foreach(const QObject* o, objs) { + for (const QObject *o : objSet) { QMetaObject::disconnect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID); QMetaObject::connect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID); } |