[vlc-commits] qt: actions_manager: Don't clear the list of renderers when stopping scan

Hugo Beauzée-Luyssen git at videolan.org
Tue Feb 6 19:30:17 CET 2018


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Feb  6 11:12:18 2018 +0100| [d73c5f7c7d4687781b8c74b2884cab2b81bcd14b] | committer: Jean-Baptiste Kempf

qt: actions_manager: Don't clear the list of renderers when stopping scan

(cherry picked from commit c0d32728ebe033eb5c0487cb2e8a61fdf770f4bc)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt/actions_manager.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/gui/qt/actions_manager.cpp b/modules/gui/qt/actions_manager.cpp
index 89ce44c5fa..efa3044df5 100644
--- a/modules/gui/qt/actions_manager.cpp
+++ b/modules/gui/qt/actions_manager.cpp
@@ -53,6 +53,15 @@ ActionsManager::ActionsManager( intf_thread_t * _p_i )
 ActionsManager::~ActionsManager()
 {
     StopRendererScan();
+    /* reset the list of renderers */
+    foreach (QAction* action, VLCMenuBar::rendererMenu->actions())
+    {
+        QVariant data = action->data();
+        if (!data.canConvert<QVariantHash>())
+            continue;
+        VLCMenuBar::rendererMenu->removeAction(action);
+        VLCMenuBar::rendererGroup->removeAction(action);
+    }
 }
 
 void ActionsManager::doAction( int id_action )
@@ -344,15 +353,6 @@ void ActionsManager::RendererMenuCountdown()
 
 void ActionsManager::StopRendererScan()
 {
-    /* reset the list of renderers */
-    foreach (QAction* action, VLCMenuBar::rendererMenu->actions())
-    {
-        QVariant data = action->data();
-        if (!data.canConvert<QVariantHash>())
-            continue;
-        VLCMenuBar::rendererMenu->removeAction(action);
-        VLCMenuBar::rendererGroup->removeAction(action);
-    }
     foreach ( vlc_renderer_discovery_t* p_rd, m_rds )
         vlc_rd_release( p_rd );
     m_rds.clear();



More information about the vlc-commits mailing list