From f3dfc9631c7711685adb3a0c32a65950c02c4464 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sun, 30 Oct 2011 18:41:19 -0400 Subject: [PATCH] fix some playlist drops on sidebar stuff --- src/libtomahawk/dropjob.cpp | 7 +++++++ src/sourcetree/sourcetreeview.cpp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/libtomahawk/dropjob.cpp b/src/libtomahawk/dropjob.cpp index 48f9d212b..5b7955f97 100644 --- a/src/libtomahawk/dropjob.cpp +++ b/src/libtomahawk/dropjob.cpp @@ -152,6 +152,13 @@ DropJob::isDropType( DropJob::DropType desired, const QMimeData* data ) // Not the most elegant if ( url.contains( "spotify" ) && url.contains( "playlist" ) && s_canParseSpotifyPlaylists ) return true; + + // we don't know about these.. gotta say yes for now + if ( url.contains( "bit.ly" ) || + url.contains( "j.mp" ) || + url.contains( "t.co" ) || + url.contains( "rd.io" ) ) + return true; } return false; diff --git a/src/sourcetree/sourcetreeview.cpp b/src/sourcetree/sourcetreeview.cpp index 8e0cbec8d..c14119a7c 100644 --- a/src/sourcetree/sourcetreeview.cpp +++ b/src/sourcetree/sourcetreeview.cpp @@ -539,6 +539,9 @@ SourceTreeView::dropEvent( QDropEvent* event ) dropThis->setDropTypes( DropJob::Playlist ); dropThis->setDropAction( DropJob::Create ); dropThis->parseMimeData( event->mimeData() ); + + // Don't add it to the playlist under drop, it's a new playlist now + return; } QTreeView::dropEvent( event );