Qt: actions_manager: Change constructor and inline some functions.
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 19 Jan 2009 11:16:22 +0000 (12:16 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 19 Jan 2009 11:16:22 +0000 (12:16 +0100)
modules/gui/qt4/actions_manager.cpp
modules/gui/qt4/actions_manager.hpp

index b8b9e82..475049f 100644 (file)
 ActionsManager * ActionsManager::instance = NULL;
 
 ActionsManager::ActionsManager( intf_thread_t * _p_i, QObject *_parent )
-                   : QObject( _parent )
+               : QObject( _parent )
 {
     p_intf = _p_i;
 }
 
-ActionsManager::~ActionsManager()
-{
-}
-//* Actions */
+ActionsManager::~ActionsManager(){}
+
 void ActionsManager::doAction( int id_action )
 {
     switch( id_action )
@@ -92,7 +90,7 @@ void ActionsManager::doAction( int id_action )
     }
 }
 
-void ActionsManager::stop()
+inline void ActionsManager::stop()
 {
     THEMIM->stop();
 }
@@ -108,12 +106,12 @@ void ActionsManager::play()
     THEMIM->togglePlayPause();
 }
 
-void ActionsManager::prev()
+inline void ActionsManager::prev()
 {
     THEMIM->prev();
 }
 
-void ActionsManager::next()
+inline void ActionsManager::next()
 {
     THEMIM->next();
 }
@@ -146,27 +144,27 @@ void ActionsManager::snapshot()
     }
 }
 
-void ActionsManager::extSettings()
+inline void ActionsManager::extSettings()
 {
     THEDP->extendedDialog();
 }
 
-void ActionsManager::reverse()
+inline void ActionsManager::reverse()
 {
     THEMIM->getIM()->reverse();
 }
 
-void ActionsManager::slower()
+inline void ActionsManager::slower()
 {
     THEMIM->getIM()->slower();
 }
 
-void ActionsManager::faster()
+inline void ActionsManager::faster()
 {
     THEMIM->getIM()->faster();
 }
 
-void ActionsManager::playlist()
+inline void ActionsManager::playlist()
 {
     if( p_intf->p_sys->p_mi ) p_intf->p_sys->p_mi->togglePlaylist();
 }
index 46b398c..45ef03a 100644 (file)
@@ -57,10 +57,10 @@ class ActionsManager : public QObject
 
     Q_OBJECT
 public:
-    static ActionsManager *getInstance( intf_thread_t *_p_intf )
+    static ActionsManager *getInstance( intf_thread_t *_p_intf, QObject *_parent = 0 )
     {
         if( !instance )
-            instance = new ActionsManager( _p_intf );
+            instance = new ActionsManager( _p_intf, _parent );
         return instance;
     }
     static void killInstance()
@@ -71,7 +71,7 @@ public:
 
 private:
     static ActionsManager *instance;
-    ActionsManager( intf_thread_t  *_p_i, QObject *_parent = 0 );
+    ActionsManager( intf_thread_t  *_p_i, QObject *_parent );
     intf_thread_t       *p_intf;
 
 protected slots: