[vlc-devel] commit: [Qt] Remove QTimer wher we can. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Thu Oct 16 14:57:57 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Oct 16 14:57:41 2008 +0200| [94757879656bdf7932265e8cae772cb6e18bca11] | committer: Jean-Baptiste Kempf
[Qt] Remove QTimer wher we can.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=94757879656bdf7932265e8cae772cb6e18bca11
---
modules/gui/qt4/components/controller.cpp | 1 +
modules/gui/qt4/components/controller.hpp | 2 ++
modules/gui/qt4/components/info_panels.cpp | 1 +
modules/gui/qt4/dialogs/mediainfo.cpp | 9 ---------
modules/gui/qt4/dialogs/mediainfo.hpp | 1 -
modules/gui/qt4/dialogs/messages.cpp | 2 +-
modules/gui/qt4/dialogs_provider.cpp | 3 ---
modules/gui/qt4/dialogs_provider.hpp | 2 --
modules/gui/qt4/qt4.hpp | 1 -
9 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 2d00903..4f78b21 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -49,6 +49,7 @@
#include <QResizeEvent>
#include <QDate>
#include <QSignalMapper>
+#include <QTimer>
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index bfd5362..e5cec3c 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -53,6 +53,8 @@ class QAbstractButton;
class VolumeClickHandler;
class QSignalMapper;
+class QTimer;
+
typedef enum buttonType_e
{
PLAY_BUTTON,
diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp
index 35e784c..b46e368 100644
--- a/modules/gui/qt4/components/info_panels.cpp
+++ b/modules/gui/qt4/components/info_panels.cpp
@@ -546,6 +546,7 @@ InputStatsPanel::InputStatsPanel( QWidget *parent,
StatsTree->setColumnWidth( 1 , 200 );
layout->addWidget(StatsTree, 1, 0 );
+
CONNECT( THEMIM->getIM() , statisticsUpdated( input_item_t* ),
this, update( input_item_t* ) );
}
diff --git a/modules/gui/qt4/dialogs/mediainfo.cpp b/modules/gui/qt4/dialogs/mediainfo.cpp
index a5c12a0..606603d 100644
--- a/modules/gui/qt4/dialogs/mediainfo.cpp
+++ b/modules/gui/qt4/dialogs/mediainfo.cpp
@@ -111,10 +111,6 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
if( p_item )
update( p_item, true, true );
- if( stats )
- CONNECT( THEMIM->getIM(), statisticsUpdated( input_item_t*),
- this, updateStats( input_item_t*));
-
readSettings( "Mediainfo", QSize( 600 , 480 ) );
}
@@ -161,11 +157,6 @@ void MediaInfoDialog::update( input_thread_t *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,
bool update_info,
bool update_meta )
diff --git a/modules/gui/qt4/dialogs/mediainfo.hpp b/modules/gui/qt4/dialogs/mediainfo.hpp
index b161042..b6a4a0b 100644
--- a/modules/gui/qt4/dialogs/mediainfo.hpp
+++ b/modules/gui/qt4/dialogs/mediainfo.hpp
@@ -86,7 +86,6 @@ public slots:
void update( input_item_t *, bool, bool );
private slots:
- void updateStats( input_item_t *);
void close();
void clear();
void saveMeta();
diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index 57f6b1c..6de4b86 100644
--- a/modules/gui/qt4/dialogs/messages.cpp
+++ b/modules/gui/qt4/dialogs/messages.cpp
@@ -64,7 +64,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
msgLayout->addWidget( messages, 0, 0, 1, 0 );
mainTab->addTab( msgWidget, qtr( "Messages" ) );
- ON_TIMEOUT( updateLog() );
+ // ON_TIMEOUT( updateLog() );
/* Modules tree */
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 761f3bc..5a6fef4 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -58,8 +58,6 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
QObject( NULL ), p_intf( _p_intf )
{
b_isDying = false;
- fixed_timer = new QTimer( this );
- fixed_timer->start( 150 /* milliseconds */ );
menusMapper = new QSignalMapper();
CONNECT( menusMapper, mapped(QObject *), this, menuAction( QObject *) );
@@ -85,7 +83,6 @@ DialogsProvider::~DialogsProvider()
UpdateDialog::killInstance();
#endif
- fixed_timer->stop();
delete menusMapper;
delete menusUpdateMapper;
delete SDMapper;
diff --git a/modules/gui/qt4/dialogs_provider.hpp b/modules/gui/qt4/dialogs_provider.hpp
index fe7d02b..5a1b6c0 100644
--- a/modules/gui/qt4/dialogs_provider.hpp
+++ b/modules/gui/qt4/dialogs_provider.hpp
@@ -38,7 +38,6 @@
#include "dialogs/open.hpp"
#include <QObject>
-#include <QTimer>
#include <QApplication>
#define ADD_FILTER_MEDIA( string ) \
@@ -109,7 +108,6 @@ public:
return ( instance != NULL );
}
virtual ~DialogsProvider();
- QTimer *fixed_timer;
QStringList showSimpleOpen( QString help = QString(),
int filters = EXT_FILTER_MEDIA |
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
index 7a75028..fb58ba6 100755
--- a/modules/gui/qt4/qt4.hpp
+++ b/modules/gui/qt4/qt4.hpp
@@ -94,7 +94,6 @@ struct intf_sys_t
#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 ON_TIMEOUT( act ) CONNECT( THEDP->fixed_timer, timeout(), this, act )
#define BUTTON_SET( button, text, tooltip ) \
button->setText( text ); \
More information about the vlc-devel
mailing list