[vlc-devel] [PATCH 2/8] qt: medialib: remove unused b_is_reloading
Romain Vimont
rom1v at videolabs.io
Mon Nov 9 10:58:09 CET 2020
---
modules/gui/qt/medialibrary/mlbasemodel.cpp | 13 +++----------
modules/gui/qt/medialibrary/mlbasemodel.hpp | 1 -
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/modules/gui/qt/medialibrary/mlbasemodel.cpp b/modules/gui/qt/medialibrary/mlbasemodel.cpp
index c953d9f421..f5b88da271 100644
--- a/modules/gui/qt/medialibrary/mlbasemodel.cpp
+++ b/modules/gui/qt/medialibrary/mlbasemodel.cpp
@@ -30,7 +30,6 @@ MLBaseModel::MLBaseModel(QObject *parent)
vlc_ml_event_unregister_callback( m_ml, cb );
})
, m_need_reset( false )
- , m_is_reloading( false )
{
vlc_mutex_init( &m_item_lock );
memset(&m_query_param, 0, sizeof(vlc_ml_query_params_t));
@@ -76,16 +75,10 @@ void MLBaseModel::onVlcMlEvent(const vlc_ml_event_t* event)
switch(event->i_type)
{
case VLC_ML_EVENT_BACKGROUND_IDLE_CHANGED:
- if ( event->background_idle_changed.b_idle == false )
- m_is_reloading = true;
- else
+ if ( event->background_idle_changed.b_idle && m_need_reset )
{
- m_is_reloading = false;
- if ( m_need_reset )
- {
- emit resetRequested();
- m_need_reset = false;
- }
+ emit resetRequested();
+ m_need_reset = false;
}
break;
}
diff --git a/modules/gui/qt/medialibrary/mlbasemodel.hpp b/modules/gui/qt/medialibrary/mlbasemodel.hpp
index 33bce4b4fc..e7bf9e1327 100644
--- a/modules/gui/qt/medialibrary/mlbasemodel.hpp
+++ b/modules/gui/qt/medialibrary/mlbasemodel.hpp
@@ -118,7 +118,6 @@ protected:
std::unique_ptr<vlc_ml_event_callback_t,
std::function<void(vlc_ml_event_callback_t*)>> m_ml_event_handle;
std::atomic_bool m_need_reset;
- std::atomic_bool m_is_reloading;
};
/**
--
2.29.2
More information about the vlc-devel
mailing list