Commit 93c7e552 authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf

qt: display user friendly paths in SoutInputBox

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 2279a75a)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent be80fd88
......@@ -69,7 +69,7 @@ SoutInputBox::SoutInputBox( QWidget *_parent, const QString& mrl ) : QGroupBox(
void SoutInputBox::setMRL( const QString& mrl )
{
QUrl uri = QUrl::fromEncoded( mrl.toLatin1() );
QUrl uri( mrl );
QString type = uri.scheme();
if( !uri.isValid() &&
......@@ -91,7 +91,10 @@ void SoutInputBox::setMRL( const QString& mrl )
}
else
{
sourceLine->setText( uri.toString() );
sourceLine->setText(
toNativeSeparators(uri.toDisplayString(
QUrl::RemovePassword | QUrl::PreferLocalFile | QUrl::NormalizePathSegments
)));
if ( type.isEmpty() ) type = qtr( I_FILE_SLASH_DIR );
sourceValueLabel->setText( type );
}
......
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