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

Benjamin Arnaud git at videolan.org
Fri Feb 19 13:36:41 UTC 2021


vlc | branch: master | Benjamin Arnaud <benjamin.arnaud at videolabs.io> | Thu Feb 18 11:05:08 2021 +0100| [fac2d91c88561d2cf63169cbb2f9c3b83d643e12] | committer: Pierre Lamot

qt: Fix support for MLItemId in history

Previously they were considered invalid by the 'isNodeValid' function.

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

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

 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;
     }



More information about the vlc-commits mailing list