1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 17:14:00 +02:00

* LoadingSpinner requires a parent and should install an event-filter on its parent.

This commit is contained in:
Christian Muehlhaeuser
2014-09-20 06:58:29 +02:00
parent 862ad871d1
commit 5962776076
2 changed files with 6 additions and 3 deletions

View File

@@ -39,6 +39,7 @@ AnimatedSpinner::AnimatedSpinner( QWidget* parent )
init();
}
AnimatedSpinner::AnimatedSpinner( const QSize& size, QWidget *parent )
: QWidget( parent )
, m_showHide( new QTimeLine )
@@ -275,6 +276,8 @@ LoadingSpinner::LoadingSpinner( QAbstractItemView* parent )
: AnimatedSpinner( parent )
, m_parent( parent )
{
installEventFilter( m_parent );
if ( m_parent->model() )
{
connect( m_parent->model(), SIGNAL( loadingStarted() ), SLOT( fadeIn() ), Qt::UniqueConnection );

View File

@@ -52,7 +52,7 @@ public:
QSize sizeHint() const;
QPixmap pixmap() const { return m_pixmap; }
void setAutoCenter( bool enabled ) { m_autoCenter = enabled; }
public slots:
@@ -98,8 +98,8 @@ class DLLEXPORT LoadingSpinner : public AnimatedSpinner
Q_OBJECT
public:
explicit LoadingSpinner( QAbstractItemView* parent = 0 ); // widget mode
explicit LoadingSpinner( QAbstractItemView* parent ); // widget mode
private slots:
void onViewModelChanged();