]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/playlist_model.cpp
Stop allocating QSettings all the time everywhere.
[vlc] / modules / gui / qt4 / components / playlist / playlist_model.cpp
index 74c1b50c8f6f9a4cd6e49a3b238bf55986ff7c1c..e802ecff44cad17626f123fe0addcfcf3bef990d 100644 (file)
@@ -98,8 +98,7 @@ PLModel::PLModel( playlist_t *_p_playlist,  /* THEPL */
 
 PLModel::~PLModel()
 {
-    QSettings settings( "vlc", "vlc-qt-interface" );
-    settings.setValue( "qt-pl-showflags", rootItem->i_showflags );
+    getSettings()->setValue( "qt-pl-showflags", rootItem->i_showflags );
     delCallbacks();
     delete rootItem;
 }
@@ -591,7 +590,7 @@ void PLModel::rebuild( playlist_item_t *p_root )
     if( p_root )
     {
         delete rootItem;
-        rootItem = new PLItem( p_root, NULL, this );
+        rootItem = new PLItem( p_root, getSettings(), this );
     }
     assert( rootItem );
     /* Recreate from root */