Commit ef7c7e95 authored by Yoann Peronneau's avatar Yoann Peronneau

* open file widget: do nothing if the user clicked on cancel

parent 5dfbca91
...@@ -243,7 +243,7 @@ FileConfigControl::FileConfigControl( vlc_object_t *_p_this, ...@@ -243,7 +243,7 @@ FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
FileConfigControl::FileConfigControl( vlc_object_t *_p_this, FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QLabel *_label, QLineEdit *_text, QLabel *_label, QLineEdit *_text,
QPushButton *_button, bool pwd ): QPushButton *_button, bool pwd ):
VStringConfigControl( _p_this, _p_item ) VStringConfigControl( _p_this, _p_item )
{ {
...@@ -258,8 +258,10 @@ FileConfigControl::FileConfigControl( vlc_object_t *_p_this, ...@@ -258,8 +258,10 @@ FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
void FileConfigControl::updateField() void FileConfigControl::updateField()
{ {
text->setText( QFileDialog::getOpenFileName( NULL, QString file = QFileDialog::getOpenFileName( NULL,
qtr( "Select File" ), qfu( p_this->p_libvlc->psz_homedir ) ) ); qtr( "Select File" ), qfu( p_this->p_libvlc->psz_homedir ) );
if( file.isNull() ) return;
text->setText( file );
} }
void FileConfigControl::finish() void FileConfigControl::finish()
......
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