Commit 96eeaffd authored by Jean-Baptiste Kempf's avatar 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.
parent 89b6530d
......@@ -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();
}
......
......@@ -207,8 +207,8 @@ public slots:
}
private slots:
void doUpdate();
void doUpdate( const QString& );
void askForUpdate();
void showArtUpdate( const QString& );
signals:
void updateRequested();
......
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