[vlc-commits] Qt: remove find_name("podcast")

Rémi Denis-Courmont git at videolan.org
Tue Apr 23 21:28:03 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 23 22:27:46 2013 +0300| [a0d595120bffd17e82246834c8283dc498f0696e] | committer: Rémi Denis-Courmont

Qt: remove find_name("podcast")

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

 modules/gui/qt4/components/playlist/selector.cpp  |   13 ++-----------
 modules/gui/qt4/dialogs/podcast_configuration.cpp |    8 +-------
 2 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp
index b65d6da..17ffd08 100644
--- a/modules/gui/qt4/components/playlist/selector.cpp
+++ b/modules/gui/qt4/components/playlist/selector.cpp
@@ -595,13 +595,9 @@ void PLSelector::podcastAdd( PLSelItem * )
 
     setSource( podcastsParent ); //to load the SD in case it's not loaded
 
-    vlc_object_t *p_obj = (vlc_object_t*) vlc_object_find_name( p_intf->p_libvlc, "podcast" );
-    if( !p_obj ) return;
-
     QString request("ADD:");
     request += url.trimmed();
-    var_SetString( p_obj, "podcast-request", qtu( request ) );
-    vlc_object_release( p_obj );
+    var_SetString( THEPL, "podcast-request", qtu( request ) );
 }
 
 void PLSelector::podcastRemove( PLSelItem* item )
@@ -617,15 +613,10 @@ void PLSelector::podcastRemove( PLSelItem* item )
     input_item_t *input = item->treeItem()->data( 0, IN_ITEM_ROLE ).value<input_item_t*>();
     if( !input ) return;
 
-    vlc_object_t *p_obj = (vlc_object_t*) vlc_object_find_name(
-        p_intf->p_libvlc, "podcast" );
-    if( !p_obj ) return;
-
     QString request("RM:");
     char *psz_uri = input_item_GetURI( input );
     request += qfu( psz_uri );
-    var_SetString( p_obj, "podcast-request", qtu( request ) );
-    vlc_object_release( p_obj );
+    var_SetString( THEPL, "podcast-request", qtu( request ) );
     free( psz_uri );
 }
 
diff --git a/modules/gui/qt4/dialogs/podcast_configuration.cpp b/modules/gui/qt4/dialogs/podcast_configuration.cpp
index 7562319..e6a1521 100644
--- a/modules/gui/qt4/dialogs/podcast_configuration.cpp
+++ b/modules/gui/qt4/dialogs/podcast_configuration.cpp
@@ -71,16 +71,10 @@ void PodcastConfigDialog::accept()
         if( i != ui.podcastList->count()-1 ) urls += "|";
     }
     config_PutPsz( p_intf, "podcast-urls", qtu( urls ) );
-    vlc_object_t *p_obj = (vlc_object_t*)
-                          vlc_object_find_name( p_intf->p_libvlc, "podcast" );
-    if( p_obj )
-    {
-        var_SetString( p_obj, "podcast-urls", qtu( urls ) );
-        vlc_object_release( p_obj );
-    }
 
     if( playlist_IsServicesDiscoveryLoaded( THEPL, "podcast" ) )
     {
+        var_SetString( THEPL, "podcast-urls", qtu( urls ) );
         msg_Dbg( p_intf, "You will need to reload the podcast module to take into account deleted podcast urls" );
     }
 }



More information about the vlc-commits mailing list