testutils: Check first for failure

This commit is contained in:
Martchus 2018-10-18 23:25:24 +02:00
parent 8dde95fc82
commit 545465b52a
1 changed files with 3 additions and 3 deletions

View File

@ -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;