]> git.sesse.net Git - vlc/commitdiff
Qt: use a better name for artWork function to avoid the issue we had by the past...
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 16 May 2009 09:31:55 +0000 (11:31 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 16 May 2009 09:36:00 +0000 (11:36 +0200)
doSomehting() is not a good function name.

modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp

index d547ab99666872668b7bf1e7aa3d586979d0a38a..8df5220857d1f9422a44b35fa5e432486eb087be 100644 (file)
@@ -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();
 }
index bec4d4badb20700e7a73091c3976be5de3d34922..a34158a0ff0bfee03aa16219363192be812668fc 100644 (file)
@@ -207,8 +207,8 @@ public slots:
     }
 
 private slots:
-    void doUpdate();
-    void doUpdate( const QString& );
+    void askForUpdate();
+    void showArtUpdate( const QString& );
 
 signals:
     void updateRequested();