Updating the dialog will call processEvents, which could end up
processing another dialog progress update, calling the event loop again,
and so on until we stack overflow.
Basically, having a modal progress dialog means that any user of that
API could potentially cause stack overflows if update calls were to be
Part #2 of fixing #18640 and #17060
(cherry picked from commit 55e6be0e)
Signed-off-by: Hugo Beauzée-Luyssen <firstname.lastname@example.org>