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

Francois Cartegnie git at videolan.org
Fri Oct 25 03:09:42 CEST 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Oct 25 10:08:59 2013 +0900| [9e49fb76bdfa5ea58cf6689c9a31e1f6a41af188] | committer: Francois Cartegnie

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

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

 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