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 )
{
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();
}
......
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