mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 20:00:13 +02:00
Undo code sharing. Since the source tree stores pointers to raw shared pointers, we can't cast them since that creates a new copy of the sharedpointer. BAH!
also fix some signal/slot connections
This commit is contained in:
@@ -28,7 +28,7 @@ signals:
|
|||||||
// used if loading an ondemand playlist
|
// used if loading an ondemand playlist
|
||||||
void done( QString,
|
void done( QString,
|
||||||
bool,
|
bool,
|
||||||
const QString,
|
QString,
|
||||||
QList< Tomahawk::dyncontrol_ptr>,
|
QList< Tomahawk::dyncontrol_ptr>,
|
||||||
bool );
|
bool );
|
||||||
// used when loading a static playlist
|
// used when loading a static playlist
|
||||||
@@ -38,7 +38,7 @@ signals:
|
|||||||
QString,
|
QString,
|
||||||
QList< Tomahawk::dyncontrol_ptr>,
|
QList< Tomahawk::dyncontrol_ptr>,
|
||||||
bool,
|
bool,
|
||||||
const QMap< QString, Tomahawk::plentry_ptr >,
|
QMap< QString, Tomahawk::plentry_ptr >,
|
||||||
bool );
|
bool );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -188,30 +188,30 @@ DynamicPlaylist::loadRevision( const QString& rev )
|
|||||||
if( m_generator->mode() == OnDemand ) {
|
if( m_generator->mode() == OnDemand ) {
|
||||||
connect( cmd, SIGNAL( done( QString,
|
connect( cmd, SIGNAL( done( QString,
|
||||||
bool,
|
bool,
|
||||||
const QString,
|
QString,
|
||||||
QList< dyncontrol_ptr>,
|
QList< Tomahawk::dyncontrol_ptr>,
|
||||||
bool ) ),
|
bool ) ),
|
||||||
SLOT( setRevision( QString,
|
SLOT( setRevision( QString,
|
||||||
bool,
|
bool,
|
||||||
const QString,
|
QString,
|
||||||
QList< dyncontrol_ptr>,
|
QList< Tomahawk::dyncontrol_ptr>,
|
||||||
bool) ) );
|
bool) ) );
|
||||||
} else if( m_generator->mode() == Static ) {
|
} else if( m_generator->mode() == Static ) {
|
||||||
connect( cmd, SIGNAL( done( QString,
|
connect( cmd, SIGNAL( done( QString,
|
||||||
QList< QString >,
|
QList< QString >,
|
||||||
QList< QString >,
|
QList< QString >,
|
||||||
QString,
|
QString,
|
||||||
QList< dyncontrol_ptr>,
|
QList< Tomahawk::dyncontrol_ptr>,
|
||||||
bool,
|
bool,
|
||||||
const QMap< QString, Tomahawk::plentry_ptr >,
|
QMap< QString, Tomahawk::plentry_ptr >,
|
||||||
bool ) ),
|
bool ) ),
|
||||||
SLOT( setRevision( QString,
|
SLOT( setRevision( QString,
|
||||||
QList< QString >,
|
QList< QString >,
|
||||||
QList< QString >,
|
QList< QString >,
|
||||||
QString,
|
QString,
|
||||||
QList< dyncontrol_ptr>,
|
QList< Tomahawk::dyncontrol_ptr>,
|
||||||
bool,
|
bool,
|
||||||
const QMap< QString, Tomahawk::plentry_ptr >,
|
QMap< QString, Tomahawk::plentry_ptr >,
|
||||||
bool ) ) );
|
bool ) ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ public slots:
|
|||||||
const QList<QString>& neworderedguids,
|
const QList<QString>& neworderedguids,
|
||||||
const QList<QString>& oldorderedguids,
|
const QList<QString>& oldorderedguids,
|
||||||
const QString& type,
|
const QString& type,
|
||||||
const QList< dyncontrol_ptr>& controls,
|
const QList< Tomahawk::dyncontrol_ptr>& controls,
|
||||||
bool is_newest_rev,
|
bool is_newest_rev,
|
||||||
const QMap< QString, Tomahawk::plentry_ptr >& addedmap,
|
const QMap< QString, Tomahawk::plentry_ptr >& addedmap,
|
||||||
bool applied );
|
bool applied );
|
||||||
@@ -125,7 +125,7 @@ public slots:
|
|||||||
void setRevision( const QString& rev,
|
void setRevision( const QString& rev,
|
||||||
bool is_newest_rev,
|
bool is_newest_rev,
|
||||||
const QString& type,
|
const QString& type,
|
||||||
const QList< dyncontrol_ptr>& controls,
|
const QList< Tomahawk::dyncontrol_ptr>& controls,
|
||||||
bool applied );
|
bool applied );
|
||||||
private:
|
private:
|
||||||
// called from loadAllPlaylists DB cmd:
|
// called from loadAllPlaylists DB cmd:
|
||||||
|
@@ -266,11 +266,10 @@ Playlist::setNewRevision( const QString& rev,
|
|||||||
bool is_newest_rev,
|
bool is_newest_rev,
|
||||||
const QMap< QString, Tomahawk::plentry_ptr >& addedmap )
|
const QMap< QString, Tomahawk::plentry_ptr >& addedmap )
|
||||||
{
|
{
|
||||||
//qDebug() << Q_FUNC_INFO << (qlonglong)this
|
qDebug() << Q_FUNC_INFO << (qlonglong)this
|
||||||
// << rev << neworderedguids << oldorderedguids
|
<< rev << neworderedguids << oldorderedguids
|
||||||
// << "isnewest:" << is_newest_rev << addedmap << applied << m_entries
|
<< "isnewest:" << is_newest_rev << addedmap << m_entries;
|
||||||
// ;
|
|
||||||
|
|
||||||
// build up correctly ordered new list of plentry_ptrs from
|
// build up correctly ordered new list of plentry_ptrs from
|
||||||
// existing ones, and the ones that have been added
|
// existing ones, and the ones that have been added
|
||||||
QMap<QString, plentry_ptr> entriesmap;
|
QMap<QString, plentry_ptr> entriesmap;
|
||||||
@@ -285,11 +284,11 @@ Playlist::setNewRevision( const QString& rev,
|
|||||||
//qDebug() << "counters:" << neworderedguids.count() << entriesmap.count() << addedmap.count();
|
//qDebug() << "counters:" << neworderedguids.count() << entriesmap.count() << addedmap.count();
|
||||||
foreach( const QString& id, neworderedguids )
|
foreach( const QString& id, neworderedguids )
|
||||||
{
|
{
|
||||||
qDebug() << "id:" << id;
|
// qDebug() << "id:" << id;
|
||||||
qDebug() << "newordered:" << neworderedguids.count() << neworderedguids;
|
// qDebug() << "newordered:" << neworderedguids.count() << neworderedguids;
|
||||||
qDebug() << "entriesmap:" << entriesmap.count() << entriesmap;
|
// qDebug() << "entriesmap:" << entriesmap.count() << entriesmap;
|
||||||
qDebug() << "addedmap:" << addedmap.count() << addedmap;
|
// qDebug() << "addedmap:" << addedmap.count() << addedmap;
|
||||||
qDebug() << "m_entries" << m_entries;
|
// qDebug() << "m_entries" << m_entries;
|
||||||
|
|
||||||
if( entriesmap.contains( id ) )
|
if( entriesmap.contains( id ) )
|
||||||
{
|
{
|
||||||
|
@@ -81,114 +81,31 @@ SourceTreeItem::onOffline()
|
|||||||
void
|
void
|
||||||
SourceTreeItem::onPlaylistsAdded( const QList<playlist_ptr>& playlists )
|
SourceTreeItem::onPlaylistsAdded( const QList<playlist_ptr>& playlists )
|
||||||
{
|
{
|
||||||
playlistsAdded( playlists, false );
|
// const-ness is important for getting the right pointer!
|
||||||
|
foreach( const playlist_ptr& p, playlists )
|
||||||
|
{
|
||||||
|
m_playlists.append( p );
|
||||||
|
qlonglong ptr = reinterpret_cast<qlonglong>( &m_playlists.last() );
|
||||||
|
qDebug() << "Setting playlist ptr to:" << ptr;
|
||||||
|
|
||||||
|
connect( p.data(), SIGNAL( revisionLoaded( Tomahawk::PlaylistRevision ) ),
|
||||||
|
SLOT( onPlaylistLoaded( Tomahawk::PlaylistRevision ) ),
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
|
qDebug() << "Playlist added:" << p->title() << p->creator() << p->info() << ptr;
|
||||||
|
|
||||||
|
playlistAddedInternal( ptr, p, false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SourceTreeItem::onPlaylistsDeleted( const QList<playlist_ptr>& playlists )
|
SourceTreeItem::onPlaylistsDeleted( const QList<playlist_ptr>& playlists )
|
||||||
{
|
|
||||||
playlistsDeleted( playlists, false );
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SourceTreeItem::onPlaylistLoaded( Tomahawk::PlaylistRevision revision )
|
|
||||||
{
|
|
||||||
playlistLoaded( revision, false );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SourceTreeItem::onDynamicPlaylistsAdded( const QList< dynplaylist_ptr >& playlists )
|
|
||||||
{
|
|
||||||
playlistsAdded( dynListToPlaylists( playlists ), true );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SourceTreeItem::onDynamicPlaylistsDeleted( const QList< dynplaylist_ptr >& playlists )
|
|
||||||
{
|
|
||||||
playlistsDeleted( dynListToPlaylists( playlists ), true );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SourceTreeItem::onDynamicPlaylistsLoaded( DynamicPlaylistRevision revision )
|
|
||||||
{
|
|
||||||
playlistLoaded( revision, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SourceTreeItem::playlistLoaded( PlaylistRevision revision, bool dynamic )
|
|
||||||
{
|
|
||||||
qlonglong ptr = reinterpret_cast<qlonglong>( sender() );
|
|
||||||
//qDebug() << "sender ptr:" << ptr;
|
|
||||||
|
|
||||||
QStandardItem* item = m_columns.at( 0 );
|
|
||||||
int rows = item->rowCount();
|
|
||||||
for ( int i = 0; i < rows; i++ )
|
|
||||||
{
|
|
||||||
QStandardItem* pi = item->child( i );
|
|
||||||
qlonglong piptr = pi->data( PlaylistPointer ).toLongLong();
|
|
||||||
playlist_ptr* pl = reinterpret_cast<playlist_ptr*>(piptr);
|
|
||||||
SourcesModel::SourceType type = static_cast<SourcesModel::SourceType>( pi->data( Type ).toInt() );
|
|
||||||
|
|
||||||
if ( ( type == SourcesModel::PlaylistSource || type == SourcesModel::DynamicPlaylistSource ) && ptr == qlonglong( pl->data() ) )
|
|
||||||
{
|
|
||||||
//qDebug() << "Found playlist!";
|
|
||||||
pi->setEnabled( true );
|
|
||||||
if( dynamic )
|
|
||||||
m_current_dynamic_revisions.insert( pl->data()->guid(), revision.revisionguid );
|
|
||||||
else
|
|
||||||
m_current_revisions.insert( pl->data()->guid(), revision.revisionguid );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SourceTreeItem::playlistsAdded( const QList< playlist_ptr >& playlists, bool dynamic )
|
|
||||||
{
|
|
||||||
// const-ness is important for getting the right pointer!
|
|
||||||
foreach( const playlist_ptr& p, playlists )
|
|
||||||
{
|
|
||||||
qlonglong ptr;
|
|
||||||
if( dynamic )
|
|
||||||
{
|
|
||||||
m_dynplaylists.append( p.staticCast<Tomahawk::DynamicPlaylist>() );
|
|
||||||
ptr = reinterpret_cast<qlonglong>( &m_dynplaylists.last() );
|
|
||||||
|
|
||||||
connect( p.staticCast<Tomahawk::DynamicPlaylist>().data(), SIGNAL( revisionLoaded( Tomahawk::DynamicPlaylistRevision ) ),
|
|
||||||
SLOT( onDynamicPlaylistLoaded( Tomahawk::DynamicPlaylistRevision ) ),
|
|
||||||
Qt::QueuedConnection);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
m_playlists.append( p );
|
|
||||||
ptr = reinterpret_cast<qlonglong>( &m_playlists.last() );
|
|
||||||
|
|
||||||
connect( p.data(), SIGNAL( revisionLoaded( Tomahawk::PlaylistRevision ) ),
|
|
||||||
SLOT( onPlaylistLoaded( Tomahawk::PlaylistRevision ) ),
|
|
||||||
Qt::QueuedConnection);
|
|
||||||
}
|
|
||||||
qDebug() << "Playlist added:" << p->title() << p->creator() << p->info() << ptr << dynamic;
|
|
||||||
|
|
||||||
|
|
||||||
QStandardItem* subitem = new QStandardItem( p->title() );
|
|
||||||
subitem->setIcon( QIcon( RESPATH "images/playlist-icon.png" ) );
|
|
||||||
subitem->setEditable( false );
|
|
||||||
subitem->setEnabled( false );
|
|
||||||
subitem->setData( ptr, PlaylistPointer );
|
|
||||||
subitem->setData( dynamic ? SourcesModel::DynamicPlaylistSource : SourcesModel::PlaylistSource, Type );
|
|
||||||
subitem->setData( (qlonglong)this, SourceItemPointer );
|
|
||||||
|
|
||||||
m_columns.at( 0 )->appendRow( subitem );
|
|
||||||
Q_ASSERT( qobject_cast<QTreeView*>((parent()->parent()) ) );
|
|
||||||
qobject_cast<QTreeView*>((parent()->parent()))->expandAll();
|
|
||||||
|
|
||||||
p->loadRevision();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SourceTreeItem::playlistsDeleted( const QList< playlist_ptr >& playlists, bool dynamic )
|
|
||||||
{
|
{
|
||||||
// const-ness is important for getting the right pointer!
|
// const-ness is important for getting the right pointer!
|
||||||
foreach( const playlist_ptr& p, playlists )
|
foreach( const playlist_ptr& p, playlists )
|
||||||
{
|
{
|
||||||
qlonglong ptr = qlonglong( p.data() );
|
qlonglong ptr = qlonglong( p.data() );
|
||||||
qDebug() << "Playlist removed:" << p->title() << p->creator() << p->info() << ptr << dynamic;
|
qDebug() << "Playlist removed:" << p->title() << p->creator() << p->info() << ptr;
|
||||||
|
|
||||||
QStandardItem* item = m_columns.at( 0 );
|
QStandardItem* item = m_columns.at( 0 );
|
||||||
int rows = item->rowCount();
|
int rows = item->rowCount();
|
||||||
@@ -199,14 +116,118 @@ SourceTreeItem::playlistsDeleted( const QList< playlist_ptr >& playlists, bool d
|
|||||||
playlist_ptr* pl = reinterpret_cast<playlist_ptr*>(piptr);
|
playlist_ptr* pl = reinterpret_cast<playlist_ptr*>(piptr);
|
||||||
SourcesModel::SourceType type = static_cast<SourcesModel::SourceType>( pi->data( Type ).toInt() );
|
SourcesModel::SourceType type = static_cast<SourcesModel::SourceType>( pi->data( Type ).toInt() );
|
||||||
|
|
||||||
if ( ( type == SourcesModel::PlaylistSource || type == SourcesModel::DynamicPlaylistSource ) && ptr == qlonglong( pl->data() ) )
|
if ( type == SourcesModel::PlaylistSource && ptr == qlonglong( pl->data() ) )
|
||||||
{
|
{
|
||||||
if( dynamic )
|
m_playlists.removeAll( p );
|
||||||
m_dynplaylists.removeAll( p.staticCast<Tomahawk::DynamicPlaylist>() );
|
|
||||||
else
|
|
||||||
m_playlists.removeAll( p );
|
|
||||||
item->removeRow( i );
|
item->removeRow( i );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SourceTreeItem::onPlaylistLoaded( Tomahawk::PlaylistRevision revision )
|
||||||
|
{
|
||||||
|
qlonglong ptr = reinterpret_cast<qlonglong>( sender() );
|
||||||
|
qDebug() << "sender ptr:" << ptr;
|
||||||
|
|
||||||
|
QStandardItem* item = m_columns.at( 0 );
|
||||||
|
int rows = item->rowCount();
|
||||||
|
for ( int i = 0; i < rows; i++ )
|
||||||
|
{
|
||||||
|
QStandardItem* pi = item->child( i );
|
||||||
|
qlonglong piptr = pi->data( PlaylistPointer ).toLongLong();
|
||||||
|
playlist_ptr* pl = reinterpret_cast<playlist_ptr*>(piptr);
|
||||||
|
SourcesModel::SourceType type = static_cast<SourcesModel::SourceType>( pi->data( Type ).toInt() );
|
||||||
|
|
||||||
|
if ( type == SourcesModel::PlaylistSource&& ptr == qlonglong( pl->data() ) )
|
||||||
|
{
|
||||||
|
//qDebug() << "Found playlist!";
|
||||||
|
pi->setEnabled( true );
|
||||||
|
m_current_revisions.insert( pl->data()->guid(), revision.revisionguid );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SourceTreeItem::onDynamicPlaylistsAdded( const QList< dynplaylist_ptr >& playlists )
|
||||||
|
{
|
||||||
|
// const-ness is important for getting the right pointer!
|
||||||
|
foreach( const dynplaylist_ptr& p, playlists )
|
||||||
|
{
|
||||||
|
m_dynplaylists.append( p );
|
||||||
|
qlonglong ptr = reinterpret_cast<qlonglong>( &m_dynplaylists.last() );
|
||||||
|
qDebug() << "Setting dynamic ptr to:" << ptr;
|
||||||
|
connect( p.data(), SIGNAL( revisionLoaded( Tomahawk::DynamicPlaylistRevision ) ),
|
||||||
|
SLOT( onDynamicPlaylistLoaded( Tomahawk::DynamicPlaylistRevision ) ),
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
|
qDebug() << "Dynamic Playlist added:" << p->title() << p->creator() << p->info() << ptr;
|
||||||
|
|
||||||
|
playlistAddedInternal( ptr, p, true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SourceTreeItem::onDynamicPlaylistsDeleted( const QList< dynplaylist_ptr >& playlists )
|
||||||
|
{
|
||||||
|
// const-ness is important for getting the right pointer!
|
||||||
|
foreach( const dynplaylist_ptr& p, playlists )
|
||||||
|
{
|
||||||
|
qlonglong ptr = qlonglong( p.data() );
|
||||||
|
qDebug() << "dynamic playlist removed:" << p->title() << p->creator() << p->info() << ptr;
|
||||||
|
|
||||||
|
QStandardItem* item = m_columns.at( 0 );
|
||||||
|
int rows = item->rowCount();
|
||||||
|
for ( int i = rows - 1; i >= 0; i-- )
|
||||||
|
{
|
||||||
|
QStandardItem* pi = item->child( i );
|
||||||
|
qlonglong piptr = pi->data( PlaylistPointer ).toLongLong();
|
||||||
|
playlist_ptr* pl = reinterpret_cast<playlist_ptr*>(piptr);
|
||||||
|
SourcesModel::SourceType type = static_cast<SourcesModel::SourceType>( pi->data( Type ).toInt() );
|
||||||
|
|
||||||
|
if ( type == SourcesModel::DynamicPlaylistSource && ptr == qlonglong( pl->data() ) )
|
||||||
|
{
|
||||||
|
m_dynplaylists.removeAll( p );
|
||||||
|
item->removeRow( i );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SourceTreeItem::onDynamicPlaylistLoaded( DynamicPlaylistRevision revision )
|
||||||
|
{
|
||||||
|
qlonglong ptr = reinterpret_cast<qlonglong>( sender() );
|
||||||
|
qDebug() << "sender ptr:" << ptr;
|
||||||
|
|
||||||
|
QStandardItem* item = m_columns.at( 0 );
|
||||||
|
int rows = item->rowCount();
|
||||||
|
for ( int i = 0; i < rows; i++ )
|
||||||
|
{
|
||||||
|
QStandardItem* pi = item->child( i );
|
||||||
|
qlonglong piptr = pi->data( DynamicPlaylistPointer ).toLongLong();
|
||||||
|
playlist_ptr* pl = reinterpret_cast<playlist_ptr*>(piptr);
|
||||||
|
SourcesModel::SourceType type = static_cast<SourcesModel::SourceType>( pi->data( Type ).toInt() );
|
||||||
|
|
||||||
|
if ( type == SourcesModel::DynamicPlaylistSource && ptr == qlonglong( pl->data() ) )
|
||||||
|
{
|
||||||
|
//qDebug() << "Found playlist!";
|
||||||
|
pi->setEnabled( true );
|
||||||
|
m_current_dynamic_revisions.insert( pl->data()->guid(), revision.revisionguid );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SourceTreeItem::playlistAddedInternal( qlonglong ptr, const Tomahawk::playlist_ptr& p, bool dynamic )
|
||||||
|
{
|
||||||
|
QStandardItem* subitem = new QStandardItem( p->title() );
|
||||||
|
subitem->setIcon( QIcon( RESPATH "images/playlist-icon.png" ) );
|
||||||
|
subitem->setEditable( false );
|
||||||
|
subitem->setEnabled( false );
|
||||||
|
subitem->setData( ptr, dynamic ? DynamicPlaylistPointer : PlaylistPointer );
|
||||||
|
subitem->setData( dynamic ? SourcesModel::DynamicPlaylistSource : SourcesModel::PlaylistSource, Type );
|
||||||
|
subitem->setData( (qlonglong)this, SourceItemPointer );
|
||||||
|
|
||||||
|
m_columns.at( 0 )->appendRow( subitem );
|
||||||
|
Q_ASSERT( qobject_cast<QTreeView*>((parent()->parent()) ) );
|
||||||
|
qobject_cast<QTreeView*>((parent()->parent()))->expandAll();
|
||||||
|
}
|
||||||
|
@@ -17,7 +17,7 @@ public:
|
|||||||
Type = Qt::UserRole + 1, /// Value is SourcesModel::SourceType
|
Type = Qt::UserRole + 1, /// Value is SourcesModel::SourceType
|
||||||
SourceItemPointer = Qt::UserRole + 2, /// value is the sourcetreeritem of the collection itself.
|
SourceItemPointer = Qt::UserRole + 2, /// value is the sourcetreeritem of the collection itself.
|
||||||
PlaylistPointer = Qt::UserRole + 3, /// Value is the playlist_ptr.data()
|
PlaylistPointer = Qt::UserRole + 3, /// Value is the playlist_ptr.data()
|
||||||
DynamicPlaylistPointer = Qt::UserRole + 4 /// Value is the playlist_ptr.data()
|
DynamicPlaylistPointer = Qt::UserRole + 4 /// Value is the dynplaylist_ptr.data()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -51,11 +51,9 @@ private slots:
|
|||||||
|
|
||||||
void onDynamicPlaylistsAdded( const QList<Tomahawk::dynplaylist_ptr>& playlists );
|
void onDynamicPlaylistsAdded( const QList<Tomahawk::dynplaylist_ptr>& playlists );
|
||||||
void onDynamicPlaylistsDeleted( const QList<Tomahawk::dynplaylist_ptr>& playlists );
|
void onDynamicPlaylistsDeleted( const QList<Tomahawk::dynplaylist_ptr>& playlists );
|
||||||
void onDynamicPlaylistsLoaded( Tomahawk::DynamicPlaylistRevision revision );
|
void onDynamicPlaylistLoaded( Tomahawk::DynamicPlaylistRevision revision );
|
||||||
private:
|
private:
|
||||||
void playlistsAdded( const QList<Tomahawk::playlist_ptr>& playlists, bool dynamic );
|
void playlistAddedInternal( qlonglong ptr, const Tomahawk::playlist_ptr& pl, bool dynamic );
|
||||||
void playlistsDeleted( const QList<Tomahawk::playlist_ptr>& playlists, bool dynamic );
|
|
||||||
void playlistLoaded( Tomahawk::PlaylistRevision revision, bool dynamic );
|
|
||||||
|
|
||||||
QList<QStandardItem*> m_columns;
|
QList<QStandardItem*> m_columns;
|
||||||
Tomahawk::source_ptr m_source;
|
Tomahawk::source_ptr m_source;
|
||||||
|
@@ -289,6 +289,8 @@ TomahawkApp::registerMetaTypes()
|
|||||||
qRegisterMetaType< Tomahawk::source_ptr >("Tomahawk::source_ptr");
|
qRegisterMetaType< Tomahawk::source_ptr >("Tomahawk::source_ptr");
|
||||||
qRegisterMetaType< QList<Tomahawk::playlist_ptr> >("QList<Tomahawk::playlist_ptr>");
|
qRegisterMetaType< QList<Tomahawk::playlist_ptr> >("QList<Tomahawk::playlist_ptr>");
|
||||||
qRegisterMetaType< QList<Tomahawk::dynplaylist_ptr> >("QList<Tomahawk::dynplaylist_ptr>");
|
qRegisterMetaType< QList<Tomahawk::dynplaylist_ptr> >("QList<Tomahawk::dynplaylist_ptr>");
|
||||||
|
qRegisterMetaType< QList<Tomahawk::dyncontrol_ptr> >("QList<Tomahawk::dyncontrol_ptr>");
|
||||||
|
qRegisterMetaType< QList<Tomahawk::geninterface_ptr> >("QList<Tomahawk::geninterface_ptr>");
|
||||||
qRegisterMetaType< QList<Tomahawk::plentry_ptr> >("QList<Tomahawk::plentry_ptr>");
|
qRegisterMetaType< QList<Tomahawk::plentry_ptr> >("QList<Tomahawk::plentry_ptr>");
|
||||||
qRegisterMetaType< QList<Tomahawk::query_ptr> >("QList<Tomahawk::query_ptr>");
|
qRegisterMetaType< QList<Tomahawk::query_ptr> >("QList<Tomahawk::query_ptr>");
|
||||||
qRegisterMetaType< QList<Tomahawk::result_ptr> >("QList<Tomahawk::result_ptr>");
|
qRegisterMetaType< QList<Tomahawk::result_ptr> >("QList<Tomahawk::result_ptr>");
|
||||||
|
Reference in New Issue
Block a user