Commit 55e6be0e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

qt: Don't display progress dialog as modal

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
unpaced.
Part #2 of fixing #18640 and #17060
parent eadc1bda
......@@ -287,9 +287,7 @@ void DialogHandler::displayProgress(vlc_dialog_id *p_id, const QString &title,
new QProgressDialog(text, cancel.isEmpty() ? QString() : "&" + cancel,
0, b_indeterminate ? 0 : 1000);
progress->setWindowTitle(title);
if (!cancel.isEmpty())
progress->setModal(true);
else
if (cancel.isEmpty())
{
/* not cancellable: remove close button */
progress->setWindowFlags(Qt::Window | Qt::WindowTitleHint |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment