[vlc-commits] qt: properly remember last used folder
    Pierre Lamot 
    git at videolan.org
       
    Thu May 24 14:44:05 CEST 2018
    
    
  
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu May 24 13:41:53 2018 +0200| [8013c7cc59cf405d326bd790a48776a5bb3d1657] | committer: Jean-Baptiste Kempf
qt: properly remember last used folder
url scheme was pruned
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8013c7cc59cf405d326bd790a48776a5bb3d1657
---
 modules/gui/qt/dialogs_provider.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt/dialogs_provider.cpp b/modules/gui/qt/dialogs_provider.cpp
index 71315de1cb..d6edaa06d5 100644
--- a/modules/gui/qt/dialogs_provider.cpp
+++ b/modules/gui/qt/dialogs_provider.cpp
@@ -581,14 +581,15 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
 QString DialogsProvider::getDirectoryDialog( intf_thread_t *p_intf )
 {
     const QStringList schemes = QStringList(QStringLiteral("file"));
-    QString dir = QFileDialog::getExistingDirectoryUrl( NULL,
+    QUrl dirurl = QFileDialog::getExistingDirectoryUrl( NULL,
             qtr( I_OP_DIR_WINTITLE ), p_intf->p_sys->filepath,
-            QFileDialog::ShowDirsOnly, schemes ).toLocalFile();
+            QFileDialog::ShowDirsOnly, schemes );
 
-    if( dir.isEmpty() ) return QString();
+    if( dirurl.isEmpty() ) return QString();
 
-    p_intf->p_sys->filepath = dir;
+    p_intf->p_sys->filepath = dirurl;
 
+    QString dir = dirurl.toLocalFile();
     const char *scheme = "directory";
     if( dir.endsWith( DIR_SEP "VIDEO_TS", Qt::CaseInsensitive ) )
         scheme = "dvd";
    
    
More information about the vlc-commits
mailing list