Commit dfacbce0 authored by Edward Wang's avatar Edward Wang Committed by Jean-Baptiste Kempf

Qt4: Actually save when a convert profile is deleted

Close #5769
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit b02e4929)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e00a15d3
...@@ -143,6 +143,7 @@ void VLCProfileSelector::editProfile( const QString& qs, const QString& value ) ...@@ -143,6 +143,7 @@ void VLCProfileSelector::editProfile( const QString& qs, const QString& value )
void VLCProfileSelector::deleteProfile() void VLCProfileSelector::deleteProfile()
{ {
profileBox->removeItem( profileBox->currentIndex() ); profileBox->removeItem( profileBox->currentIndex() );
saveProfiles();
} }
void VLCProfileSelector::saveProfiles() void VLCProfileSelector::saveProfiles()
...@@ -155,6 +156,7 @@ void VLCProfileSelector::saveProfiles() ...@@ -155,6 +156,7 @@ void VLCProfileSelector::saveProfiles()
#endif #endif
QSettings::UserScope, "vlc", "vlc-qt-interface" ); QSettings::UserScope, "vlc", "vlc-qt-interface" );
settings.remove( "codecs-profiles" ); /* Erase old profiles to be rewritten */
settings.beginWriteArray( "codecs-profiles" ); settings.beginWriteArray( "codecs-profiles" );
for( int i = 0; i < profileBox->count(); i++ ) for( int i = 0; i < profileBox->count(); i++ )
{ {
......
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