From 545465b52a50cac659a3f4f06b4cdeaaaeb3aff5 Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 18 Oct 2018 23:25:24 +0200 Subject: [PATCH] testutils: Check first for failure --- testhelper/helper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testhelper/helper.h b/testhelper/helper.h index 4e393ae..2616dd5 100644 --- a/testhelper/helper.h +++ b/testhelper/helper.h @@ -336,12 +336,12 @@ bool waitForSignalsOrFail(Action action, int timeout, const SignalInfo &failure, action(); // no reason to enter event loop when all signals have been emitted directly - if (checkWhetherAllSignalsEmitted(signalInfos...)) { - return true; - } if (checkWhetherAllSignalsEmitted(failure)) { return false; } + if (checkWhetherAllSignalsEmitted(signalInfos...)) { + return true; + } // also connect and start a timer if a timeout has been specified QTimer timer;