[vlc-commits] commit: Qt4: use toURI() ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Wed Nov 10 17:27:39 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 10 18:27:33 2010 +0200| [ab61a0330c45b2c1a511fe2e23e3680e222a85dc] | committer: Rémi Denis-Courmont
Qt4: use toURI()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ab61a0330c45b2c1a511fe2e23e3680e222a85dc
---
modules/gui/qt4/main_interface.cpp | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index ec9c97e..3182775 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -1110,11 +1110,10 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
{
if( url.isValid() )
{
- char* psz_uri = make_URI( url.toEncoded().constData(), NULL );
- playlist_Add( THEPL, psz_uri, NULL,
+ QString mrl = toURI( url.toEncoded().constData() );
+ playlist_Add( THEPL, qtu(mrl), NULL,
PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE),
PLAYLIST_END, true, pl_Unlocked );
- free( psz_uri );
first = false;
RecentsMRL::getInstance( p_intf )->addRecent( url.toString() );
}
@@ -1126,11 +1125,10 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
if( !mimeData->hasUrls() && mimeData->hasText() &&
QUrl(mimeData->text()).isValid() )
{
- char *psz_uri = make_URI( qtu( mimeData->text() ), NULL );
- playlist_Add( THEPL, psz_uri, NULL,
+ QString mrl = toURI( mimeData->text() );
+ playlist_Add( THEPL, qtu(mrl), NULL,
PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE),
PLAYLIST_END, true, pl_Unlocked );
- free( psz_uri );
}
event->accept();
}
More information about the vlc-commits
mailing list