[vlc-commits] qt: Don't display progress dialog as modal
Hugo Beauzée-Luyssen
git at videolan.org
Fri Feb 9 16:44:42 CET 2018
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Feb 9 15:47:05 2018 +0100| [be1087aaa10630c3ff2aa31ece3e211832ff1972] | 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
(cherry picked from commit 55e6be0e4816d65c0611e0b54bfdba059a52c9b5)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=be1087aaa10630c3ff2aa31ece3e211832ff1972
---
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