[vlc-commits] qt: main_interface: Don't cache embedded-video setting

Hugo Beauzée-Luyssen git at videolan.org
Wed Jan 24 11:07:11 CET 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Jan 22 14:23:30 2018 +0100| [d3e6d9da7fae2451ed782fc06931fc5da37d3799] | committer: Hugo Beauzée-Luyssen

qt: main_interface: Don't cache embedded-video setting

It is used uncached from other locations, which could cause inconsistant
state in the future (the setting is currently only read from the
constructor)

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

 modules/gui/qt/main_interface.cpp | 5 +----
 modules/gui/qt/main_interface.hpp | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 9c9c9c3b97..35e46ece20 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -128,9 +128,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     setWindowIcon( QApplication::windowIcon() );
     setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
 
-    /* Is video in embedded in the UI or not */
-    b_videoEmbedded = var_InheritBool( p_intf, "embedded-video" );
-
     /* Does the interface resize to video size or the opposite */
     b_autoresize = var_InheritBool( p_intf, "qt-video-autoresize" );
 
@@ -485,7 +482,7 @@ void MainInterface::createMainWidget( QSettings *creationSettings )
             bgWidget->setExpandstoHeight( true );
 
     /* And video Outputs */
-    if( b_videoEmbedded )
+    if( var_InheritBool( p_intf, "embedded-video" ) )
     {
         videoWidget = new VideoWidget( p_intf, stackCentralW );
         stackCentralW->addWidget( videoWidget );
diff --git a/modules/gui/qt/main_interface.hpp b/modules/gui/qt/main_interface.hpp
index d6ba7463e7..7cad9d71cd 100644
--- a/modules/gui/qt/main_interface.hpp
+++ b/modules/gui/qt/main_interface.hpp
@@ -175,7 +175,6 @@ protected:
     /* Flags */
     unsigned             i_notificationSetting; /// Systray Notifications
     bool                 b_autoresize;          ///< persistent resizable window
-    bool                 b_videoEmbedded;       ///< Want an external Video Window
     bool                 b_videoFullScreen;     ///< --fullscreen
     bool                 b_hideAfterCreation;
     bool                 b_minimalView;         ///< Minimal video



More information about the vlc-commits mailing list