[vlc-commits] Qt: fix MLModel uris

Francois Cartegnie git at videolan.org
Sun Aug 18 15:26:07 CEST 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Sep 15 14:53:24 2012 +0200| [3de79f56c26e33d99605b21732b10935ca7939d3] | committer: Francois Cartegnie

Qt: fix MLModel uris

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

 modules/gui/qt4/components/playlist/ml_item.cpp |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/ml_item.cpp b/modules/gui/qt4/components/playlist/ml_item.cpp
index aca7db1..a4eebcc 100644
--- a/modules/gui/qt4/components/playlist/ml_item.cpp
+++ b/modules/gui/qt4/components/playlist/ml_item.cpp
@@ -206,11 +206,15 @@ QVariant MLItem::data( ml_select_e columntype ) const
                 QUrl uri = getURI();
                 vlc_mutex_lock( &media->lock );
                 if ( uri.scheme() != "file" )
+                {
                     ret = QUrl::fromPercentEncoding( uri.toString().toUtf8() );
-
-                QFileInfo p_file( uri.toLocalFile() );
-                ret = p_file.fileName().isEmpty() ? p_file.absoluteFilePath()
-                    : p_file.fileName();
+                }
+                else
+                {
+                    QFileInfo p_file( uri.toLocalFile() );
+                    ret = p_file.fileName().isEmpty() ? p_file.absoluteFilePath()
+                        : p_file.fileName();
+                }
             } else {
                 ret = temp;
             }



More information about the vlc-commits mailing list