[vlc-devel] [PATCH] qt: Fix support for MLItemId in history

Benjamin Arnaud benjamin.arnaud at videolabs.io
Thu Feb 18 10:05:08 UTC 2021


Previously they were considered invalid by the 'isNodeValid' function.
---
 modules/gui/qt/util/navigation_history.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/util/navigation_history.cpp b/modules/gui/qt/util/navigation_history.cpp
index a03ebb3566..c8a92a7821 100644
--- a/modules/gui/qt/util/navigation_history.cpp
+++ b/modules/gui/qt/util/navigation_history.cpp
@@ -1,6 +1,7 @@
 #include "navigation_history.hpp"
 #include <cassert>
 #include "network/networkmediamodel.hpp"
+#include "medialibrary/mlqmltypes.hpp"
 
 NavigationHistory::NavigationHistory(QObject *parent)
     : QObject(parent)
@@ -54,7 +55,7 @@ static bool isNodeValid(QVariant& value)
         || value.canConvert(QVariant::UInt)
         || value.canConvert(QVariant::Int)
         || value.canConvert(QVariant::Bool)
-        )
+        || value.canConvert<MLItemId>())
     {
         return true;
     }
-- 
2.25.1



More information about the vlc-devel mailing list