From b18c5c79b84674b754bab5dc1fccf9243c178115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr> Date: Fri, 9 Feb 2018 13:42:46 +0100 Subject: [PATCH] qt: dialogs: Use the correct type for progress context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This seems to fix #18640 and #17060 (cherry picked from commit 90dde5edfbaee89e16386a42bc5626845383e89f) Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr> --- modules/gui/qt/dialogs/external.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/gui/qt/dialogs/external.cpp b/modules/gui/qt/dialogs/external.cpp index 665a92f7687b..58444e1ccefe 100644 --- a/modules/gui/qt/dialogs/external.cpp +++ b/modules/gui/qt/dialogs/external.cpp @@ -167,14 +167,11 @@ void DialogHandler::cancel(vlc_dialog_id *p_id) void DialogHandler::updateProgress(vlc_dialog_id *p_id, float f_value, const QString &text) { - DialogWrapper *p_wrapper = - static_cast<DialogWrapper *>(vlc_dialog_id_get_context(p_id)); + ProgressDialogWrapper *p_wrapper = + static_cast<ProgressDialogWrapper *>(vlc_dialog_id_get_context(p_id)); - ProgressDialogWrapper *p_progress_wrapper - = dynamic_cast<ProgressDialogWrapper *>(p_wrapper); - - if (p_progress_wrapper != NULL) - p_progress_wrapper->updateProgress(f_value, text); + if (p_wrapper != NULL) + p_wrapper->updateProgress(f_value, text); } void DialogHandler::displayError(const QString &title, const QString &text) -- GitLab