From: Ivailo Monev Date: Sun, 21 Aug 2016 00:25:56 +0000 (+0000) Subject: partitial backport of Q_UNREACHABLE() X-Git-Tag: 4.12.0~6818 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=245f759bb483f307d12a6bcbf15a564c2fa6d802;p=kde%2FKatie.git partitial backport of Q_UNREACHABLE() Signed-off-by: Ivailo Monev --- diff --git a/src/core/global/qglobal.h.cmake b/src/core/global/qglobal.h.cmake index ef7469ff6..0d598f976 100644 --- a/src/core/global/qglobal.h.cmake +++ b/src/core/global/qglobal.h.cmake @@ -2486,6 +2486,11 @@ inline const QForeachContainer *qForeachContainer(const QForeachContainerBase # endif #endif +#define Q_UNREACHABLE() \ + do {\ + Q_ASSERT_X(false, "Q_UNREACHABLE()", "Q_UNREACHABLE was reached");\ + } while (0) + #if 0 /* tell gcc to use its built-in methods for some common functions */ #if defined(QT_NO_DEBUG) && defined(Q_CC_GNU)