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

Rémi Denis-Courmont git at videolan.org
Mon Aug 20 15:02:08 CEST 2012


vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 20 15:43:28 2012 +0300| [0fca9c10f63dabc82b7d357a3b5835b5e0efdd4e] | 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
(cherry picked from commit 29de0421e5c6b377cf6267da1b638c80507419b1)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=0fca9c10f63dabc82b7d357a3b5835b5e0efdd4e
---

 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 59e3493..eb2fe12 100644
--- a/modules/gui/qt4/dialogs/external.cpp
+++ b/modules/gui/qt4/dialogs/external.cpp
@@ -184,17 +184,13 @@ void DialogHandler::requestAnswer (vlc_object_t *, 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));
 
@@ -212,12 +208,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