[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: qt: fixup url from openurl dialog

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Sep 4 20:33:33 UTC 2021



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
19c008b3 by Marvin Scholz at 2021-09-04T20:17:08+00:00
qt: fixup url from openurl dialog

Fix #21661

(cherry picked from commit 02836796dc8f2b782173f131877865ca117536eb)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>

- - - - -
5c15ca86 by Marvin Scholz at 2021-09-04T20:17:08+00:00
qt: fixup url from open network panel

Fix #21661

(cherry picked from commit 50728ae64510294784371335fafe8f7d575251fb)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>

- - - - -


2 changed files:

- modules/gui/qt/components/open_panels.cpp
- modules/gui/qt/dialogs_provider.cpp


Changes:

=====================================
modules/gui/qt/components/open_panels.cpp
=====================================
@@ -724,7 +724,19 @@ void NetOpenPanel::updateMRL()
     emit methodChanged( qfu( "network-caching" ) );
 
     QStringList qsl;
-    if( !url.isEmpty() ) qsl << url;
+    if( url.isEmpty() )
+        return;
+
+    if( url.contains( QLatin1String( "://" ) ) )
+    {
+        char *uri = vlc_uri_fixup( qtu( url ) );
+        if( uri == NULL )
+            return;
+        url = qfu(uri);
+        free( uri );
+    }
+
+    qsl << url;
     emit mrlUpdated( qsl, "" );
 }
 


=====================================
modules/gui/qt/dialogs_provider.cpp
=====================================
@@ -553,15 +553,19 @@ void DialogsProvider::openUrlDialog()
     if( url.isEmpty() )
         return;
 
+    char *uri = NULL;
     if( !url.contains( qfu( "://" ) ) )
     {
-        char *uri = vlc_path2uri( qtu( url ), NULL );
-        if( uri == NULL )
-            return;
-        url = qfu(uri);
-        free( uri );
+        uri = vlc_path2uri( qtu( url ), NULL );
+    } else {
+        uri = vlc_uri_fixup( qtu( url ) );
     }
 
+    if( uri == NULL )
+        return;
+    url = qfu(uri);
+    free( uri );
+
     Open::openMRL( p_intf, qtu(url), !oud.shouldEnqueue() );
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/38ff0a0f1f45e91ee5b0ab2b7311499b1fdc609f...5c15ca867dbadb25a7e032c0d6cf7d389cc3df08

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/38ff0a0f1f45e91ee5b0ab2b7311499b1fdc609f...5c15ca867dbadb25a7e032c0d6cf7d389cc3df08
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list