[vlc-commits] commit: Qt4: allow drag and drop of any URL, not just a local file ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sat Apr 10 18:43:58 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 10 19:43:37 2010 +0300| [c4961610c72a79c049a38edc9f8112e5bfc96a5b] | committer: Rémi Denis-Courmont 

Qt4: allow drag and drop of any URL, not just a local file

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4961610c72a79c049a38edc9f8112e5bfc96a5b
---

 modules/gui/qt4/main_interface.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 0194e0d..edb4940 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -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 );
         }



More information about the vlc-commits mailing list