[vlc-commits] qt: Don't display progress dialog as modal
Hugo Beauzée-Luyssen
git at videolan.org
Fri Feb 9 15:56:56 CET 2018
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Feb 9 15:47:05 2018 +0100| [55e6be0e4816d65c0611e0b54bfdba059a52c9b5] | committer: 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
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55e6be0e4816d65c0611e0b54bfdba059a52c9b5
---
modules/gui/qt/dialogs/external.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/modules/gui/qt/dialogs/external.cpp b/modules/gui/qt/dialogs/external.cpp
index 58444e1cce..4c78c6193b 100644
--- a/modules/gui/qt/dialogs/external.cpp
+++ b/modules/gui/qt/dialogs/external.cpp
@@ -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 |
More information about the vlc-commits
mailing list