]> git.sesse.net Git - vlc/commitdiff
Qt4 - Not reimplementing existing functions might not be a bad idea... hmmm...
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Sep 2007 17:33:16 +0000 (17:33 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Sep 2007 17:33:16 +0000 (17:33 +0000)
modules/gui/qt4/dialogs/sout.cpp

index e62a656dc332a9d642fc2ba009262af458b4daec..f67f8ad04239eb2caf19b81b8fd4ff3592d9fc57 100644 (file)
@@ -183,15 +183,6 @@ void SoutDialog::setRawOptions( bool b_raw )
     }
 }
 
-int indexFromItemData( QComboBox *aCombo, QString aString )
-{
-    for( int i=0; i < aCombo->count(); i++ )
-    {
-        if( aCombo->itemData( i ).toString() == aString ) return i;
-    }
-    return -1;
-}
-
 void SoutDialog::setOptions()
 {
     QString profileString = ui.profileBox->itemData( ui.profileBox->currentIndex() ).toString();
@@ -203,11 +194,11 @@ void SoutDialog::setOptions()
         ui.muxName ##Mux->setChecked( true ); \
         \
         ui.transcodeAudio->setChecked( hasAudio ); \
-        index = indexFromItemData( ui.aCodecBox, vCodecName );  \
+        index = ui.aCodecBox->findText( vCodecName );  \
         if( index >= 0 ) ui.aCodecBox->setCurrentIndex( index ); \
         \
         ui.transcodeVideo->setChecked( hasVideo ); \
-        index = indexFromItemData( ui.aCodecBox, vCodecName );  \
+        index = ui.aCodecBox->findText( vCodecName );  \
         if( index >=0 ) ui.vCodecBox->setCurrentIndex( index ); \
     }