[vlc-commits] qt: forward the callback node to the SourceListener in remove operations

Pierre Lamot git at videolan.org
Fri Jan 24 11:37:55 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Jan 20 14:23:24 2020 +0100| [9cce568734f212668628d1ef55a874c137186e37] | committer: Thomas Guillem

qt: forward the callback node to the SourceListener in remove operations

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/gui/qt/network/networkdevicemodel.cpp    | 2 +-
 modules/gui/qt/network/networkdevicemodel.hpp    | 2 +-
 modules/gui/qt/network/networkmediamodel.cpp     | 2 +-
 modules/gui/qt/network/networkmediamodel.hpp     | 2 +-
 modules/gui/qt/network/networksourcelistener.cpp | 4 ++--
 modules/gui/qt/network/networksourcelistener.hpp | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt/network/networkdevicemodel.cpp b/modules/gui/qt/network/networkdevicemodel.cpp
index d32a66102c..03fe3d62dc 100644
--- a/modules/gui/qt/network/networkdevicemodel.cpp
+++ b/modules/gui/qt/network/networkdevicemodel.cpp
@@ -219,7 +219,7 @@ void NetworkDeviceModel::onItemAdded( MediaSourcePtr mediaSource, input_item_nod
     refreshDeviceList( std::move( mediaSource ), children, count, false );
 }
 
-void NetworkDeviceModel::onItemRemoved( MediaSourcePtr,
+void NetworkDeviceModel::onItemRemoved(MediaSourcePtr, input_item_node_t*,
                                     input_item_node_t *const children[],
                                     size_t count )
 {
diff --git a/modules/gui/qt/network/networkdevicemodel.hpp b/modules/gui/qt/network/networkdevicemodel.hpp
index 2387a3cbc8..0eb115ead3 100644
--- a/modules/gui/qt/network/networkdevicemodel.hpp
+++ b/modules/gui/qt/network/networkdevicemodel.hpp
@@ -111,7 +111,7 @@ private:
     bool initializeMediaSources();
     void onItemCleared( MediaSourcePtr mediaSource, input_item_node_t* node ) override;
     void onItemAdded( MediaSourcePtr mediaSource, input_item_node_t* parent, input_item_node_t *const children[], size_t count ) override;
-    void onItemRemoved( MediaSourcePtr mediaSource, input_item_node_t *const children[], size_t count ) override;
+    void onItemRemoved( MediaSourcePtr mediaSource, input_item_node_t * node, input_item_node_t *const children[], size_t count ) override;
     inline void onItemPreparseEnded( MediaSourcePtr, input_item_node_t *, enum input_item_preparse_status ) override {}
 
     void refreshDeviceList(MediaSourcePtr mediaSource, input_item_node_t* const children[], size_t count , bool clear);
diff --git a/modules/gui/qt/network/networkmediamodel.cpp b/modules/gui/qt/network/networkmediamodel.cpp
index 7f6876cf11..2a229ff652 100644
--- a/modules/gui/qt/network/networkmediamodel.cpp
+++ b/modules/gui/qt/network/networkmediamodel.cpp
@@ -292,7 +292,7 @@ void NetworkMediaModel::onItemAdded( MediaSourcePtr mediaSource, input_item_node
     }, Qt::QueuedConnection);
 }
 
-void NetworkMediaModel::onItemRemoved( MediaSourcePtr,
+void NetworkMediaModel::onItemRemoved(MediaSourcePtr, input_item_node_t *,
                                     input_item_node_t *const children[],
                                     size_t count )
 {
diff --git a/modules/gui/qt/network/networkmediamodel.hpp b/modules/gui/qt/network/networkmediamodel.hpp
index 5000207c2c..bc6c2ea8b5 100644
--- a/modules/gui/qt/network/networkmediamodel.hpp
+++ b/modules/gui/qt/network/networkmediamodel.hpp
@@ -156,7 +156,7 @@ private:
     bool initializeMediaSources();
     void onItemCleared( MediaSourcePtr mediaSource, input_item_node_t* node ) override;
     void onItemAdded( MediaSourcePtr mediaSource, input_item_node_t* parent, input_item_node_t *const children[], size_t count ) override;
-    void onItemRemoved( MediaSourcePtr mediaSource, input_item_node_t *const children[], size_t count ) override;
+    void onItemRemoved( MediaSourcePtr mediaSource, input_item_node_t * node, input_item_node_t *const children[], size_t count ) override;
     void onItemPreparseEnded( MediaSourcePtr mediaSource, input_item_node_t* node, enum input_item_preparse_status status ) override;
 
     void refreshMediaList(MediaSourcePtr s, input_item_node_t* const children[], size_t count , bool clear);
diff --git a/modules/gui/qt/network/networksourcelistener.cpp b/modules/gui/qt/network/networksourcelistener.cpp
index e77a6e204e..bbbf3fa79e 100644
--- a/modules/gui/qt/network/networksourcelistener.cpp
+++ b/modules/gui/qt/network/networksourcelistener.cpp
@@ -43,12 +43,12 @@ void NetworkSourceListener::onItemAdded( vlc_media_tree_t *, input_item_node_t *
     self->cb->onItemAdded( self->source, parent, children, count );
 }
 
-void NetworkSourceListener::onItemRemoved( vlc_media_tree_t *, input_item_node_t *,
+void NetworkSourceListener::onItemRemoved( vlc_media_tree_t *, input_item_node_t * node,
                                     input_item_node_t *const children[], size_t count,
                                     void *userdata )
 {
     auto* self = static_cast<NetworkSourceListener*>( userdata );
-    self->cb->onItemRemoved( self->source, children, count );
+    self->cb->onItemRemoved( self->source, node, children, count );
 }
 
 void NetworkSourceListener::onItemPreparseEnded(vlc_media_tree_t *, input_item_node_t * node, enum input_item_preparse_status status, void *userdata)
diff --git a/modules/gui/qt/network/networksourcelistener.hpp b/modules/gui/qt/network/networksourcelistener.hpp
index 9392f28883..a2fbfe6f60 100644
--- a/modules/gui/qt/network/networksourcelistener.hpp
+++ b/modules/gui/qt/network/networksourcelistener.hpp
@@ -49,7 +49,7 @@ public:
 
         virtual void onItemCleared( MediaSourcePtr mediaSource, input_item_node_t* node ) = 0;
         virtual void onItemAdded( MediaSourcePtr mediaSource, input_item_node_t* parent, input_item_node_t *const children[], size_t count ) = 0;
-        virtual void onItemRemoved( MediaSourcePtr mediaSource, input_item_node_t *const children[], size_t count ) = 0;
+        virtual void onItemRemoved( MediaSourcePtr mediaSource, input_item_node_t* node, input_item_node_t *const children[], size_t count ) = 0;
         virtual void onItemPreparseEnded( MediaSourcePtr mediaSource, input_item_node_t* node, enum input_item_preparse_status status ) = 0;
     };
 



More information about the vlc-commits mailing list