summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-07-13 16:34:32 -0700
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-07-13 16:36:10 -0700
commitd38fe875c7850ca2c6ca28f91e94ae276735fac8 (patch)
treee5c92cef74e0853490d77cf0139b23f00d548a6e /src/corelib/global/qglobal.h
parentac4e848c9802377b7c4ff673180f28b9ca76b746 (diff)
parent627f0a7f7d775ecd263b95dd07fca44bfcb0c5cf (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 429cd63ab6..d58e568447 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -341,10 +341,10 @@ typedef double qreal;
#define Q_INIT_RESOURCE(name) \
do { extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); \
- QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (0)
+ QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (false)
#define Q_CLEANUP_RESOURCE(name) \
do { extern int QT_MANGLE_NAMESPACE(qCleanupResources_ ## name) (); \
- QT_MANGLE_NAMESPACE(qCleanupResources_ ## name) (); } while (0)
+ QT_MANGLE_NAMESPACE(qCleanupResources_ ## name) (); } while (false)
/*
* If we're compiling C++ code:
@@ -664,7 +664,7 @@ inline void qt_noop(void) {}
# define QT_CATCH(A) else
# define QT_THROW(A) qt_noop()
# define QT_RETHROW qt_noop()
-# define QT_TERMINATE_ON_EXCEPTION(expr) do { expr; } while (0)
+# define QT_TERMINATE_ON_EXCEPTION(expr) do { expr; } while (false)
#else
# define QT_TRY try
# define QT_CATCH(A) catch (A)
@@ -672,9 +672,9 @@ inline void qt_noop(void) {}
# define QT_RETHROW throw
Q_NORETURN Q_CORE_EXPORT void qTerminate() Q_DECL_NOTHROW;
# ifdef Q_COMPILER_NOEXCEPT
-# define QT_TERMINATE_ON_EXCEPTION(expr) do { expr; } while (0)
+# define QT_TERMINATE_ON_EXCEPTION(expr) do { expr; } while (false)
# else
-# define QT_TERMINATE_ON_EXCEPTION(expr) do { try { expr; } catch (...) { qTerminate(); } } while (0)
+# define QT_TERMINATE_ON_EXCEPTION(expr) do { try { expr; } catch (...) { qTerminate(); } } while (false)
# endif
#endif
@@ -778,10 +778,10 @@ Q_CORE_EXPORT void qBadAlloc();
# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
# define Q_CHECK_PTR(p) qt_noop()
# else
-# define Q_CHECK_PTR(p) do {if(!(p))qt_check_pointer(__FILE__,__LINE__);} while (0)
+# define Q_CHECK_PTR(p) do {if (!(p)) qt_check_pointer(__FILE__,__LINE__);} while (false)
# endif
#else
-# define Q_CHECK_PTR(p) do { if (!(p)) qBadAlloc(); } while (0)
+# define Q_CHECK_PTR(p) do { if (!(p)) qBadAlloc(); } while (false)
#endif
template <typename T>