Commit 94757879 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

[Qt] Remove QTimer wher we can.

parent 631f3415
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <QResizeEvent> #include <QResizeEvent>
#include <QDate> #include <QDate>
#include <QSignalMapper> #include <QSignalMapper>
#include <QTimer>
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media") #define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
......
...@@ -53,6 +53,8 @@ class QAbstractButton; ...@@ -53,6 +53,8 @@ class QAbstractButton;
class VolumeClickHandler; class VolumeClickHandler;
class QSignalMapper; class QSignalMapper;
class QTimer;
typedef enum buttonType_e typedef enum buttonType_e
{ {
PLAY_BUTTON, PLAY_BUTTON,
......
...@@ -546,6 +546,7 @@ InputStatsPanel::InputStatsPanel( QWidget *parent, ...@@ -546,6 +546,7 @@ InputStatsPanel::InputStatsPanel( QWidget *parent,
StatsTree->setColumnWidth( 1 , 200 ); StatsTree->setColumnWidth( 1 , 200 );
layout->addWidget(StatsTree, 1, 0 ); layout->addWidget(StatsTree, 1, 0 );
CONNECT( THEMIM->getIM() , statisticsUpdated( input_item_t* ), CONNECT( THEMIM->getIM() , statisticsUpdated( input_item_t* ),
this, update( input_item_t* ) ); this, update( input_item_t* ) );
} }
......
...@@ -111,10 +111,6 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, ...@@ -111,10 +111,6 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
if( p_item ) if( p_item )
update( p_item, true, true ); update( p_item, true, true );
if( stats )
CONNECT( THEMIM->getIM(), statisticsUpdated( input_item_t*),
this, updateStats( input_item_t*));
readSettings( "Mediainfo", QSize( 600 , 480 ) ); readSettings( "Mediainfo", QSize( 600 , 480 ) );
} }
...@@ -161,11 +157,6 @@ void MediaInfoDialog::update( input_thread_t *p_input ) ...@@ -161,11 +157,6 @@ void MediaInfoDialog::update( input_thread_t *p_input )
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
void MediaInfoDialog::updateStats( input_item_t *p_input)
{
update( p_input, false, false);
}
void MediaInfoDialog::update( input_item_t *p_item, void MediaInfoDialog::update( input_item_t *p_item,
bool update_info, bool update_info,
bool update_meta ) bool update_meta )
......
...@@ -86,7 +86,6 @@ public slots: ...@@ -86,7 +86,6 @@ public slots:
void update( input_item_t *, bool, bool ); void update( input_item_t *, bool, bool );
private slots: private slots:
void updateStats( input_item_t *);
void close(); void close();
void clear(); void clear();
void saveMeta(); void saveMeta();
......
...@@ -64,7 +64,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) ...@@ -64,7 +64,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
msgLayout->addWidget( messages, 0, 0, 1, 0 ); msgLayout->addWidget( messages, 0, 0, 1, 0 );
mainTab->addTab( msgWidget, qtr( "Messages" ) ); mainTab->addTab( msgWidget, qtr( "Messages" ) );
ON_TIMEOUT( updateLog() ); // ON_TIMEOUT( updateLog() );
/* Modules tree */ /* Modules tree */
......
...@@ -58,8 +58,6 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) : ...@@ -58,8 +58,6 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
QObject( NULL ), p_intf( _p_intf ) QObject( NULL ), p_intf( _p_intf )
{ {
b_isDying = false; b_isDying = false;
fixed_timer = new QTimer( this );
fixed_timer->start( 150 /* milliseconds */ );
menusMapper = new QSignalMapper(); menusMapper = new QSignalMapper();
CONNECT( menusMapper, mapped(QObject *), this, menuAction( QObject *) ); CONNECT( menusMapper, mapped(QObject *), this, menuAction( QObject *) );
...@@ -85,7 +83,6 @@ DialogsProvider::~DialogsProvider() ...@@ -85,7 +83,6 @@ DialogsProvider::~DialogsProvider()
UpdateDialog::killInstance(); UpdateDialog::killInstance();
#endif #endif
fixed_timer->stop();
delete menusMapper; delete menusMapper;
delete menusUpdateMapper; delete menusUpdateMapper;
delete SDMapper; delete SDMapper;
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include "dialogs/open.hpp" #include "dialogs/open.hpp"
#include <QObject> #include <QObject>
#include <QTimer>
#include <QApplication> #include <QApplication>
#define ADD_FILTER_MEDIA( string ) \ #define ADD_FILTER_MEDIA( string ) \
...@@ -109,7 +108,6 @@ public: ...@@ -109,7 +108,6 @@ public:
return ( instance != NULL ); return ( instance != NULL );
} }
virtual ~DialogsProvider(); virtual ~DialogsProvider();
QTimer *fixed_timer;
QStringList showSimpleOpen( QString help = QString(), QStringList showSimpleOpen( QString help = QString(),
int filters = EXT_FILTER_MEDIA | int filters = EXT_FILTER_MEDIA |
......
...@@ -94,7 +94,6 @@ struct intf_sys_t ...@@ -94,7 +94,6 @@ struct intf_sys_t
#define CONNECT( a, b, c, d ) connect( a, SIGNAL( b ), c, SLOT(d) ) #define CONNECT( a, b, c, d ) connect( a, SIGNAL( b ), c, SLOT(d) )
#define BUTTONACT( b, a ) connect( b, SIGNAL( clicked() ), this, SLOT(a) ) #define BUTTONACT( b, a ) connect( b, SIGNAL( clicked() ), this, SLOT(a) )
#define ON_TIMEOUT( act ) CONNECT( THEDP->fixed_timer, timeout(), this, act )
#define BUTTON_SET( button, text, tooltip ) \ #define BUTTON_SET( button, text, tooltip ) \
button->setText( text ); \ button->setText( text ); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment