[vlc-devel] commit: Qt: use a better name for artWork function to avoid the issue we had by the past ... (Jean-Baptiste Kempf )

git version control git at videolan.org
Sat May 16 11:36:11 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 16 11:31:55 2009 +0200| [96eeaffda003ebb107c61b2a76707e9216af922d] | committer: Jean-Baptiste Kempf 

Qt: use a better name for artWork function to avoid the issue we had by the past...

doSomehting() is not a good function name.

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

 modules/gui/qt4/components/interface_widgets.cpp |   15 ++++++++-------
 modules/gui/qt4/components/interface_widgets.hpp |    4 ++--
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index d547ab9..8df5220 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -404,24 +404,25 @@ void SpeedControlWidget::resetRate()
 }
 
 CoverArtLabel::CoverArtLabel( QWidget *parent, intf_thread_t *_p_i )
-        : QLabel( parent ), p_intf( _p_i )
+              : QLabel( parent ), p_intf( _p_i )
 {
     setContextMenuPolicy( Qt::ActionsContextMenu );
-    CONNECT( this, updateRequested(), this, doUpdate() );
+    CONNECT( this, updateRequested(), this, askForUpdate() );
     CONNECT( THEMIM->getIM(), artChanged( QString ),
-             this, doUpdate( const QString& ) );
+             this, showArtUpdate( const QString& ) );
 
     setMinimumHeight( 128 );
     setMinimumWidth( 128 );
     setMaximumHeight( 128 );
     setMaximumWidth( 128 );
     setScaledContents( true );
+
     QList< QAction* > artActions = actions();
     QAction *action = new QAction( qtr( "Download cover art" ), this );
+    CONNECT( action, triggered(), this, askForUpdate() );
     addAction( action );
-    CONNECT( action, triggered(), this, doUpdate() );
 
-    doUpdate( "" );
+    showArtUpdate( "" );
 }
 
 CoverArtLabel::~CoverArtLabel()
@@ -431,7 +432,7 @@ CoverArtLabel::~CoverArtLabel()
         removeAction( act );
 }
 
-void CoverArtLabel::doUpdate( const QString& url )
+void CoverArtLabel::showArtUpdate( const QString& url )
 {
     QPixmap pix;
     if( !url.isEmpty()  && pix.load( url ) )
@@ -444,7 +445,7 @@ void CoverArtLabel::doUpdate( const QString& url )
     }
 }
 
-void CoverArtLabel::doUpdate()
+void CoverArtLabel::askForUpdate()
 {
     THEMIM->getIM()->requestArtUpdate();
 }
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index bec4d4b..a34158a 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -207,8 +207,8 @@ public slots:
     }
 
 private slots:
-    void doUpdate();
-    void doUpdate( const QString& );
+    void askForUpdate();
+    void showArtUpdate( const QString& );
 
 signals:
     void updateRequested();




More information about the vlc-devel mailing list