From 1a3c9df90ac3aa40d21d067911e34e81abba0234 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Mon, 6 Apr 2020 11:11:34 +0200 Subject: [PATCH] tst_qobject: fix build when exceptions are disabled Change-Id: Id98d39b4cc14608661a53df7e5c5bba5fb875022 Reviewed-by: Alexandru Croitor --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 68d218d87b..917c4e639f 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -6777,8 +6777,10 @@ public: explicit CountedExceptionThrower(bool throwException, QObject *parent = nullptr) : QObject(parent) { +#ifndef QT_NO_EXCEPTIONS if (throwException) throw ObjectException(); +#endif ++counter; }