[vlc-commits] Revert "Qt: external progressBar, simplification for win32 style"

Rémi Denis-Courmont git at videolan.org
Mon Aug 20 14:58:45 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 20 15:43:28 2012 +0300| [29de0421e5c6b377cf6267da1b638c80507419b1] | committer: Rémi Denis-Courmont

Revert "Qt: external progressBar, simplification for win32 style"

This mostly reverts commit 7240444db88efabeea7e85310864f6b48c19537e.
This broke threading rules for Qt4 GUI.

Conflicts:
	modules/gui/qt4/dialogs/external.cpp

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

 modules/gui/qt4/dialogs/external.cpp |   16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/modules/gui/qt4/dialogs/external.cpp b/modules/gui/qt4/dialogs/external.cpp
index 8edd842..c0876d0 100644
--- a/modules/gui/qt4/dialogs/external.cpp
+++ b/modules/gui/qt4/dialogs/external.cpp
@@ -180,17 +180,13 @@ void DialogHandler::requestAnswer (void *value)
 
 QVLCProgressDialog::QVLCProgressDialog (DialogHandler *parent,
                                         struct dialog_progress_bar_t *data)
-    : QProgressDialog ( ),
+    : QProgressDialog (qfu(data->message),
+                       data->cancel ? ("&" + qfu(data->cancel)) : 0, 0, 1000),
       handler (parent),
       cancelled (false)
 {
-    setLabelText( qfu(data->message) );
-    setRange( 0, 0 );
-    if ( data->cancel )
-        setWindowModality ( Qt::ApplicationModal );
-
-    if( data->cancel )
-        setCancelButton( new QPushButton( "&" + qfu(data->cancel) ) );
+    if (data->cancel)
+        setWindowModality (Qt::ApplicationModal);
     if (data->title != NULL)
         setWindowTitle (qfu(data->title));
 
@@ -208,12 +204,10 @@ QVLCProgressDialog::QVLCProgressDialog (DialogHandler *parent,
     data->p_sys = this;
 }
 
-
 void QVLCProgressDialog::update (void *priv, const char *text, float value)
 {
     QVLCProgressDialog *self = static_cast<QVLCProgressDialog *>(priv);
-    if( value > 0 )
-        self->setRange( 0, 1000 );
+
     if (text != NULL)
         emit self->described (qfu(text));
     emit self->progressed ((int)(value * 1000.));



More information about the vlc-commits mailing list