Commit 5ddf30fd authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Not reimplementing existing functions might not be a bad idea... hmmm...

parent cf05c96c
...@@ -183,15 +183,6 @@ void SoutDialog::setRawOptions( bool b_raw ) ...@@ -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() void SoutDialog::setOptions()
{ {
QString profileString = ui.profileBox->itemData( ui.profileBox->currentIndex() ).toString(); QString profileString = ui.profileBox->itemData( ui.profileBox->currentIndex() ).toString();
...@@ -203,11 +194,11 @@ void SoutDialog::setOptions() ...@@ -203,11 +194,11 @@ void SoutDialog::setOptions()
ui.muxName ##Mux->setChecked( true ); \ ui.muxName ##Mux->setChecked( true ); \
\ \
ui.transcodeAudio->setChecked( hasAudio ); \ ui.transcodeAudio->setChecked( hasAudio ); \
index = indexFromItemData( ui.aCodecBox, vCodecName ); \ index = ui.aCodecBox->findText( vCodecName ); \
if( index >= 0 ) ui.aCodecBox->setCurrentIndex( index ); \ if( index >= 0 ) ui.aCodecBox->setCurrentIndex( index ); \
\ \
ui.transcodeVideo->setChecked( hasVideo ); \ ui.transcodeVideo->setChecked( hasVideo ); \
index = indexFromItemData( ui.aCodecBox, vCodecName ); \ index = ui.aCodecBox->findText( vCodecName ); \
if( index >=0 ) ui.vCodecBox->setCurrentIndex( index ); \ if( index >=0 ) ui.vCodecBox->setCurrentIndex( index ); \
} }
......
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