Commit ab61a033 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: use toURI()

parent f73e1071
...@@ -1110,11 +1110,10 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play ) ...@@ -1110,11 +1110,10 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
{ {
if( url.isValid() ) if( url.isValid() )
{ {
char* psz_uri = make_URI( url.toEncoded().constData(), NULL ); QString mrl = toURI( url.toEncoded().constData() );
playlist_Add( THEPL, psz_uri, NULL, playlist_Add( THEPL, qtu(mrl), NULL,
PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE), PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE),
PLAYLIST_END, true, pl_Unlocked ); PLAYLIST_END, true, pl_Unlocked );
free( psz_uri );
first = false; first = false;
RecentsMRL::getInstance( p_intf )->addRecent( url.toString() ); RecentsMRL::getInstance( p_intf )->addRecent( url.toString() );
} }
...@@ -1126,11 +1125,10 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play ) ...@@ -1126,11 +1125,10 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
if( !mimeData->hasUrls() && mimeData->hasText() && if( !mimeData->hasUrls() && mimeData->hasText() &&
QUrl(mimeData->text()).isValid() ) QUrl(mimeData->text()).isValid() )
{ {
char *psz_uri = make_URI( qtu( mimeData->text() ), NULL ); QString mrl = toURI( mimeData->text() );
playlist_Add( THEPL, psz_uri, NULL, playlist_Add( THEPL, qtu(mrl), NULL,
PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE), PLAYLIST_APPEND | (first ? PLAYLIST_GO: PLAYLIST_PREPARSE),
PLAYLIST_END, true, pl_Unlocked ); PLAYLIST_END, true, pl_Unlocked );
free( psz_uri );
} }
event->accept(); event->accept();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment