1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 21:57:41 +02:00

* Fixed moving tracks within a playlist.

This commit is contained in:
Christian Muehlhaeuser
2011-09-28 00:04:48 +02:00
parent 381e89d3df
commit cea780b85b
2 changed files with 9 additions and 2 deletions

View File

@@ -39,6 +39,10 @@ DropJob::DropJob( QObject *parent )
: QObject( parent ) : QObject( parent )
, m_queryCount( 0 ) , m_queryCount( 0 )
, m_dropAction( Default ) , m_dropAction( Default )
, m_onlyLocal( false )
, m_getWholeArtists( false )
, m_getWholeAlbums( false )
, m_top10( false )
{ {
} }
@@ -61,6 +65,7 @@ DropJob::mimeTypes()
<< "application/tomahawk.metadata.album" << "application/tomahawk.metadata.album"
<< "application/tomahawk.mixed" << "application/tomahawk.mixed"
<< "text/plain"; << "text/plain";
return mimeTypes; return mimeTypes;
} }

View File

@@ -365,7 +365,9 @@ PlaylistModel::dropMimeData( const QMimeData* data, Qt::DropAction action, int r
m_dropStorage.row = row; m_dropStorage.row = row;
m_dropStorage.parent = QPersistentModelIndex( parent ); m_dropStorage.parent = QPersistentModelIndex( parent );
m_dropStorage.action = action; m_dropStorage.action = action;
DropJob* dj = new DropJob(); DropJob* dj = new DropJob();
if ( action & Qt::CopyAction )
dj->setDropAction( DropJob::Append ); dj->setDropAction( DropJob::Append );
connect( dj, SIGNAL( tracks( QList< Tomahawk::query_ptr > ) ), this, SLOT( parsedDroppedTracks( QList< Tomahawk::query_ptr > ) ) ); connect( dj, SIGNAL( tracks( QList< Tomahawk::query_ptr > ) ), this, SLOT( parsedDroppedTracks( QList< Tomahawk::query_ptr > ) ) );