[vlc-devel] [PATCH 3/4] qt: display user friendly paths in SoutInputBox
Pierre Lamot
pierre at videolabs.io
Fri Jan 19 18:10:23 CET 2018
---
modules/gui/qt/components/sout/sout_widgets.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/components/sout/sout_widgets.cpp b/modules/gui/qt/components/sout/sout_widgets.cpp
index 45243b9db1..dba513a944 100644
--- a/modules/gui/qt/components/sout/sout_widgets.cpp
+++ b/modules/gui/qt/components/sout/sout_widgets.cpp
@@ -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 );
}
--
2.14.1
More information about the vlc-devel
mailing list