[vlc-commits] qt: display user friendly paths in SoutInputBox

Pierre Lamot git at videolan.org
Fri Jan 19 18:27:53 CET 2018


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Jan 19 18:10:23 2018 +0100| [2279a75aa30a119891a0071440fefa45bc5d9cfd] | committer: Jean-Baptiste Kempf

qt: display user friendly paths in SoutInputBox

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2279a75aa30a119891a0071440fefa45bc5d9cfd
---

 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 );
     }



More information about the vlc-commits mailing list