[vlc-devel] commit: Fix a race condition : the user progress dialog wasn' t created sometime with the Qt interface. ( Rémi Duraffort )

git version control git at videolan.org
Mon Mar 10 20:10:20 CET 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Mar 10 20:08:25 2008 +0100| [31a9a4a4500bd18db2968344111326f319d65366]

Fix a race condition : the user progress dialog wasn't created sometime with the Qt interface.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31a9a4a4500bd18db2968344111326f319d65366
---

 modules/gui/qt4/dialogs_provider.cpp |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 068abb7..ceb0b62 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -501,6 +501,17 @@ void DialogsProvider::doInteraction( intf_dialog_args_t *p_arg )
         qdialog = (InteractionDialog*)(p_dialog->p_private);
         if( qdialog )
             qdialog->update();
+        else
+        {
+            /* The INTERACT_NEW message was forgotten
+               so we must create the dialog and update it*/
+            qdialog = new InteractionDialog( p_intf, p_dialog );
+            p_dialog->p_private = (void*)qdialog;
+            if( !(p_dialog->i_status == ANSWERED_DIALOG) )
+                qdialog->show();
+            if( qdialog )
+                qdialog->update();
+        }
         break;
     case INTERACT_HIDE:
         qdialog = (InteractionDialog*)(p_dialog->p_private);




More information about the vlc-devel mailing list