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

qt: sub-file expects a file path (fixes #18664)

The sub-file wants a file path, not an URI. Set it accordingly.

NOTE: Either way, this won´t work if the path contains a whitespace
because of longstanding bug #1952.
parent 9abb9e10
......@@ -249,12 +249,18 @@ void FileOpenPanel::removeFile()
/* Show a fileBrowser to select a subtitle */
void FileOpenPanel::browseFileSub()
// TODO Handle selection of more than one subtitles file
QStringList urls = THEDP->showSimpleOpen( qtr("Open subtitle file"),
EXT_FILTER_SUBTITLE, p_intf->p_sys->filepath );
if( urls.isEmpty() ) return;
ui.subInput->setText( urls.join(" ") );
// TODO Handle selection of more than one subtitles file
char *path = vlc_uri2path( qtu(urls[0]) );
if( path == NULL )
ui.subInput->setText( qfu(path) );
free( path );
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