]> git.sesse.net Git - vlc/commitdiff
Qt4: allow drag and drop of any URL, not just a local file
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 10 Apr 2010 16:43:37 +0000 (19:43 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 10 Apr 2010 16:43:37 +0000 (19:43 +0300)
modules/gui/qt4/main_interface.cpp

index 0194e0d537a9bf28b63e4e8a3c99c123ac6fa437..edb494058d10d408bdbcf2c34abbd2a0354078d3 100644 (file)
@@ -1015,14 +1015,12 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
     bool first = b_play;
     foreach( const QUrl &url, mimeData->urls() )
     {
-        QString s = toNativeSeparators( url.toLocalFile() );
+        QString s = url.toString();
 
         if( s.length() > 0 ) {
-            char* psz_uri = make_URI( qtu(s) );
-            playlist_Add( THEPL, psz_uri, NULL,
+            playlist_Add( THEPL, qtu(s), NULL,
                           PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE),
                           PLAYLIST_END, true, pl_Unlocked );
-            free( psz_uri );
             first = false;
             RecentsMRL::getInstance( p_intf )->addRecent( s );
         }