Fix bug in 9345df where it wasn't correctly checking termination criteria.
Merge topic 'findqt4-withqt5' into next

b8347ae Fix bug in 9345df where it wasn't correctly checking termination criteria.