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

less debug

Also reset the station if there is an error in th e generator
This commit is contained in:
Leo Franchi
2011-02-06 22:37:02 -05:00
parent a42fcde7ff
commit 48deb06741
3 changed files with 13 additions and 3 deletions

View File

@@ -176,7 +176,7 @@ EchonestSteerer::changed()
void
EchonestSteerer::resizeFrame( int width )
{
qDebug() << "RESIZING TO:" << width;
// qDebug() << "RESIZING TO:" << width;
resize( width, sizeHint().height() );
update();

View File

@@ -139,7 +139,7 @@ DynamicWidget::loadDynamicPlaylist( const Tomahawk::dynplaylist_ptr& playlist )
if( !m_playlist.isNull() ) {
disconnect( m_playlist->generator().data(), SIGNAL( generated( QList<Tomahawk::query_ptr> ) ), this, SLOT( tracksGenerated( QList<Tomahawk::query_ptr> ) ) );
disconnect( m_playlist.data(), SIGNAL( dynamicRevisionLoaded( Tomahawk::DynamicPlaylistRevision) ), this, SLOT(onRevisionLoaded( Tomahawk::DynamicPlaylistRevision) ) );
disconnect( m_playlist->generator().data(), SIGNAL( error( QString, QString ) ), m_view, SLOT( showMessageTimeout( QString, QString ) ) );
disconnect( m_playlist->generator().data(), SIGNAL( error( QString, QString ) ), this, SLOT( generatorError( QString, QString ) ) );
}
m_playlist = playlist;
@@ -155,7 +155,7 @@ DynamicWidget::loadDynamicPlaylist( const Tomahawk::dynplaylist_ptr& playlist )
applyModeChange( m_playlist->mode() );
connect( m_playlist->generator().data(), SIGNAL( generated( QList<Tomahawk::query_ptr> ) ), this, SLOT( tracksGenerated( QList<Tomahawk::query_ptr> ) ) );
connect( m_playlist.data(), SIGNAL( dynamicRevisionLoaded( Tomahawk::DynamicPlaylistRevision ) ), this, SLOT( onRevisionLoaded( Tomahawk::DynamicPlaylistRevision ) ) );
connect( m_playlist->generator().data(), SIGNAL( error( QString, QString ) ), m_view, SLOT( showMessageTimeout( QString, QString ) ) );
connect( m_playlist->generator().data(), SIGNAL( error( QString, QString ) ), this, SLOT( generatorError( QString, QString ) ) );
}
@@ -296,3 +296,12 @@ DynamicWidget::controlChanged( const Tomahawk::dyncontrol_ptr& control )
m_seqRevLaunched++;
}
void
DynamicWidget::generatorError( const QString& title, const QString& content )
{
m_view->showMessageTimeout( title, content );
if( m_runningOnDemand )
generateOrStart();
}

View File

@@ -70,6 +70,7 @@ public slots:
private slots:
void generateOrStart();
void tracksGenerated( const QList< Tomahawk::query_ptr>& queries );
void generatorError( const QString& title, const QString& content );
void controlsChanged();
void controlChanged( const Tomahawk::dyncontrol_ptr& control );