[vlc-commits] gui/qt: qt.hpp: remove macro TOGGLEV

Filip Roséen git at videolan.org
Mon Mar 20 13:53:06 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Mar 20 13:41:53 2017 +0100| [f981476316908e722d96fc5968b825c646c6cf6b] | committer: Hugo Beauzée-Luyssen

gui/qt: qt.hpp: remove macro TOGGLEV

The macro is only used at one location, and as such there is no need
for the define to exist in qt.hpp.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 modules/gui/qt/components/interface_widgets.hpp | 2 +-
 modules/gui/qt/qt.hpp                           | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/modules/gui/qt/components/interface_widgets.hpp b/modules/gui/qt/components/interface_widgets.hpp
index 4036300..ca2926c 100644
--- a/modules/gui/qt/components/interface_widgets.hpp
+++ b/modules/gui/qt/components/interface_widgets.hpp
@@ -114,7 +114,7 @@ protected:
     static const int MARGIN = 5;
     QString defaultArt;
 public slots:
-    void toggle(){ TOGGLEV( this ); }
+    void toggle(){ isVisible() ? hide() : show(); }
     void updateArt( const QString& );
 };
 
diff --git a/modules/gui/qt/qt.hpp b/modules/gui/qt/qt.hpp
index f4c1d15..e077a5b 100644
--- a/modules/gui/qt/qt.hpp
+++ b/modules/gui/qt/qt.hpp
@@ -153,9 +153,6 @@ struct vlc_playlist_locker {
 
 #define VISIBLE(i) (i && i->isVisible())
 
-#define TOGGLEV( x ) { if( x->isVisible() ) x->hide();          \
-            else  x->show(); }
-
 /* for widgets which must not follow the RTL auto layout changes */
 #define RTL_UNAFFECTED_WIDGET setLayoutDirection( Qt::LeftToRight );
 



More information about the vlc-commits mailing list