mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
* Fixed Source DTOR not being called.
* Less recent tracks to be displayed (50 instead of 100). * Fixed Jabber & Zeroconf plugins not reliably going offline.
This commit is contained in:
@@ -34,7 +34,7 @@ public:
|
||||
Tomahawk::playlist_ptr playlist() const { return m_playlist; }
|
||||
|
||||
void loadPlaylist( const Tomahawk::playlist_ptr& playlist, bool loadEntries = true );
|
||||
void loadHistory( const Tomahawk::source_ptr& source, unsigned int amount = 100 );
|
||||
void loadHistory( const Tomahawk::source_ptr& source, unsigned int amount = 50 );
|
||||
|
||||
void clear();
|
||||
|
||||
|
@@ -41,8 +41,6 @@ Source::~Source()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << friendlyName();
|
||||
|
||||
return;
|
||||
// TODO mark source as offline in database
|
||||
DatabaseCommand_SourceOffline* cmd = new DatabaseCommand_SourceOffline( id() );
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||
}
|
||||
@@ -85,8 +83,8 @@ Source::remove()
|
||||
|
||||
m_cc = 0;
|
||||
emit offline();
|
||||
SourceList::instance()->remove( this );
|
||||
m_collections.clear();
|
||||
SourceList::instance()->remove( this );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -87,6 +87,7 @@ SourceList::remove( Tomahawk::Source* s )
|
||||
}
|
||||
|
||||
emit sourceRemoved( src );
|
||||
src.clear();
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -27,7 +27,7 @@ WelcomeWidget::WelcomeWidget( QWidget* parent )
|
||||
|
||||
m_tracksModel = new PlaylistModel( ui->tracksView );
|
||||
ui->tracksView->setModel( m_tracksModel );
|
||||
m_tracksModel->loadHistory( Tomahawk::source_ptr(), 50 );
|
||||
m_tracksModel->loadHistory( Tomahawk::source_ptr() );
|
||||
|
||||
connect( SourceList::instance(), SIGNAL( sourceAdded( Tomahawk::source_ptr ) ), SLOT( onSourceAdded( Tomahawk::source_ptr ) ) );
|
||||
|
||||
|
@@ -33,6 +33,9 @@ public slots:
|
||||
{
|
||||
if ( p )
|
||||
p->disconnect();
|
||||
|
||||
delete p;
|
||||
p = 0;
|
||||
}
|
||||
|
||||
void sendMsg( const QString& to, const QString& msg )
|
||||
|
@@ -36,6 +36,8 @@ void
|
||||
ZeroconfPlugin::disconnectPlugin()
|
||||
{
|
||||
m_isOnline = false;
|
||||
delete m_zeroconf;
|
||||
m_zeroconf = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user