Commit 0fca9c10 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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

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

Conflicts:
	modules/gui/qt4/dialogs/external.cpp
(cherry picked from commit 29de0421)
parent af84e815
...@@ -184,17 +184,13 @@ void DialogHandler::requestAnswer (vlc_object_t *, void *value) ...@@ -184,17 +184,13 @@ void DialogHandler::requestAnswer (vlc_object_t *, void *value)
QVLCProgressDialog::QVLCProgressDialog (DialogHandler *parent, QVLCProgressDialog::QVLCProgressDialog (DialogHandler *parent,
struct dialog_progress_bar_t *data) struct dialog_progress_bar_t *data)
: QProgressDialog ( ), : QProgressDialog (qfu(data->message),
data->cancel ? ("&" + qfu(data->cancel)) : 0, 0, 1000),
handler (parent), handler (parent),
cancelled (false) cancelled (false)
{ {
setLabelText( qfu(data->message) ); if (data->cancel)
setRange( 0, 0 ); setWindowModality (Qt::ApplicationModal);
if ( data->cancel )
setWindowModality ( Qt::ApplicationModal );
if( data->cancel )
setCancelButton( new QPushButton( "&" + qfu(data->cancel) ) );
if (data->title != NULL) if (data->title != NULL)
setWindowTitle (qfu(data->title)); setWindowTitle (qfu(data->title));
...@@ -212,12 +208,10 @@ QVLCProgressDialog::QVLCProgressDialog (DialogHandler *parent, ...@@ -212,12 +208,10 @@ QVLCProgressDialog::QVLCProgressDialog (DialogHandler *parent,
data->p_sys = this; data->p_sys = this;
} }
void QVLCProgressDialog::update (void *priv, const char *text, float value) void QVLCProgressDialog::update (void *priv, const char *text, float value)
{ {
QVLCProgressDialog *self = static_cast<QVLCProgressDialog *>(priv); QVLCProgressDialog *self = static_cast<QVLCProgressDialog *>(priv);
if( value > 0 )
self->setRange( 0, 1000 );
if (text != NULL) if (text != NULL)
emit self->described (qfu(text)); emit self->described (qfu(text));
emit self->progressed ((int)(value * 1000.)); emit self->progressed ((int)(value * 1000.));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment