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

Pierre Lamot git at videolan.org
Fri Jan 19 18:44:26 CET 2018


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

qt: display user friendly paths in SoutInputBox

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 2279a75aa30a119891a0071440fefa45bc5d9cfd)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=93c7e55224993af1baa24d799c8daa4b278c744d
---

 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