vlc | branch: master | Pierre Lamot <[email protected]> | 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 <[email protected]>

> 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";

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to