Commit d73c5f7c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

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

(cherry picked from commit c0d32728)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2514bca2
...@@ -53,6 +53,15 @@ ActionsManager::ActionsManager( intf_thread_t * _p_i ) ...@@ -53,6 +53,15 @@ ActionsManager::ActionsManager( intf_thread_t * _p_i )
ActionsManager::~ActionsManager() ActionsManager::~ActionsManager()
{ {
StopRendererScan(); 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 ) void ActionsManager::doAction( int id_action )
...@@ -344,15 +353,6 @@ void ActionsManager::RendererMenuCountdown() ...@@ -344,15 +353,6 @@ void ActionsManager::RendererMenuCountdown()
void ActionsManager::StopRendererScan() 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 ) foreach ( vlc_renderer_discovery_t* p_rd, m_rds )
vlc_rd_release( p_rd ); vlc_rd_release( p_rd );
m_rds.clear(); m_rds.clear();
......
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