[vlc-commits] Qt: IMEvent: use getter instead of friend class.

Francois Cartegnie git at videolan.org
Thu Aug 16 22:32:06 CEST 2012


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Aug 16 19:23:36 2012 +0200| [1abc5673f6b790ab9babc02bf0008dafeab20ae6] | committer: Francois Cartegnie

Qt: IMEvent: use getter instead of friend class.

Plus one friendship was unused.

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

 modules/gui/qt4/input_manager.cpp |    4 ++--
 modules/gui/qt4/input_manager.hpp |    3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index f010cca..016e374 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -181,7 +181,7 @@ void InputManager::customEvent( QEvent *event )
     IMEvent *ple = static_cast<IMEvent *>(event);
 
     if( i_type == ItemChanged_Type )
-        UpdateMeta( ple->p_item );
+        UpdateMeta( ple->item() );
 
     if( !hasInput() )
         return;
@@ -197,7 +197,7 @@ void InputManager::customEvent( QEvent *event )
         break;
     case ItemChanged_Type:
         /* Ignore ItemChanged_Type event that does not apply to our input */
-        if( p_item == ple->p_item )
+        if( p_item == ple->item() )
         {
             UpdateStatus();
             // UpdateName();
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 1a6207c..f388c01 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -76,8 +76,6 @@ enum { NORMAL,    /* loop: 0, repeat: 0 */
 
 class IMEvent : public UniqueEvent
 {
-friend class InputManager;
-friend class MainInputManager;
     public:
     IMEvent( int type, input_item_t *p_input = NULL )
         : UniqueEvent( (QEvent::Type)(type) )
@@ -90,6 +88,7 @@ friend class MainInputManager;
         if( p_item )
             vlc_gc_decref( p_item );
     }
+    input_item_t *item() const { return p_item; };
     bool itemEquals( input_item_t *p_item_ ) const
     {
         return p_item_ == p_item;



More information about the vlc-commits mailing list