[vlc-commits] Qt: profiles: handle editable qcombobox values (fix #9723)

Francois Cartegnie git at videolan.org
Fri Oct 25 11:49:18 CEST 2013


vlc/vlc-2.1 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Oct 25 10:08:59 2013 +0900| [e67978e51e6f80bdde6346d34871846416fcc0ca] | committer: Jean-Baptiste Kempf

Qt: profiles: handle editable qcombobox values (fix #9723)

(cherry picked from commit 9e49fb76bdfa5ea58cf6689c9a31e1f6a41af188)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt4/components/sout/profile_selector.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/qt4/components/sout/profile_selector.cpp b/modules/gui/qt4/components/sout/profile_selector.cpp
index 0a5ec7d..5b5a724 100644
--- a/modules/gui/qt4/components/sout/profile_selector.cpp
+++ b/modules/gui/qt4/components/sout/profile_selector.cpp
@@ -675,6 +675,8 @@ void VLCProfileEditor::fillProfile( const QString& qs )
             {
                 QComboBox *box = qobject_cast<QComboBox *>( object );
                 box->setCurrentIndex( box->findData( value ) );
+                if ( box->lineEdit() && box->currentIndex() == -1 )
+                    box->lineEdit()->setText( value );
             }
             else if( object->inherits( "QLineEdit" ) )
             {
@@ -809,6 +811,7 @@ QString VLCProfileEditor::transcodeValue()
         {
             const QComboBox *box = qobject_cast<const QComboBox *>( object );
             value = currentData( box ).toString();
+            if ( value.isEmpty() && box->lineEdit() ) value = box->lineEdit()->text();
         }
         else if( object->inherits( "QLineEdit" ) )
         {



More information about the vlc-commits mailing list