diff options
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index a72bdb4d59..e35ee0987f 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -932,6 +932,8 @@ QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantic # endif #endif +#ifndef QT_NO_FOREACH + template <typename T> class QForeachContainer { QForeachContainer &operator=(const QForeachContainer &) Q_DECL_EQ_DELETE; @@ -957,11 +959,15 @@ for (QForeachContainer<typename QtPrivate::remove_reference<decltype(container)> ++_container_.i, _container_.control ^= 1) \ for (variable = *_container_.i; _container_.control; _container_.control = 0) +#endif // QT_NO_FOREACH + #define Q_FOREVER for(;;) #ifndef QT_NO_KEYWORDS +# ifndef QT_NO_FOREACH # ifndef foreach # define foreach Q_FOREACH # endif +# endif // QT_NO_FOREACH # ifndef forever # define forever Q_FOREVER # endif |