[vlc-commits] qt: expose has VLM property

Pierre Lamot git at videolan.org
Thu Oct 8 09:42:06 CEST 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Oct  5 10:08:52 2020 +0200| [37accf528bac18ba115921f8e381ed1d12f82f00] | committer: Pierre Lamot

qt: expose has VLM property

  some menus or shortcuts are only available when VLM is enabled

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

 modules/gui/qt/maininterface/main_interface.cpp | 8 ++++++++
 modules/gui/qt/maininterface/main_interface.hpp | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/modules/gui/qt/maininterface/main_interface.cpp b/modules/gui/qt/maininterface/main_interface.cpp
index b6f394fc2f..f7aeface7d 100644
--- a/modules/gui/qt/maininterface/main_interface.cpp
+++ b/modules/gui/qt/maininterface/main_interface.cpp
@@ -263,6 +263,14 @@ MainInterface::~MainInterface()
     p_intf->p_sys->p_mi = NULL;
 }
 
+bool MainInterface::hasVLM() const {
+#ifdef ENABLE_VLM
+    return true;
+#else
+    return false;
+#endif
+}
+
 bool MainInterface::useClientSideDecoration() const
 {
     //don't show CSD when interface is fullscreen
diff --git a/modules/gui/qt/maininterface/main_interface.hpp b/modules/gui/qt/maininterface/main_interface.hpp
index 8ac0e435e7..07d6d0e849 100644
--- a/modules/gui/qt/maininterface/main_interface.hpp
+++ b/modules/gui/qt/maininterface/main_interface.hpp
@@ -152,6 +152,7 @@ class MainInterface : public QVLCMW
     Q_PROPERTY(bool mediaLibraryAvailable READ hasMediaLibrary CONSTANT)
     Q_PROPERTY(bool gridView READ hasGridView WRITE setGridView NOTIFY gridViewChanged)
     Q_PROPERTY(ColorSchemeModel* colorScheme READ getColorScheme CONSTANT)
+    Q_PROPERTY(bool hasVLM READ hasVLM CONSTANT)
     Q_PROPERTY(bool clientSideDecoration READ useClientSideDecoration NOTIFY useClientSideDecorationChanged)
 
 public:
@@ -189,6 +190,7 @@ public:
     inline bool hasMediaLibrary() const { return b_hasMedialibrary; }
     inline bool hasGridView() const { return m_gridView; }
     inline ColorSchemeModel* getColorScheme() const { return m_colorScheme; }
+    bool hasVLM() const;
     bool useClientSideDecoration() const;
 
     bool hasEmbededVideo() const;



More information about the vlc-commits mailing list