From 8013c7cc59cf405d326bd790a48776a5bb3d1657 Mon Sep 17 00:00:00 2001 From: Pierre Lamot Date: Thu, 24 May 2018 13:41:53 +0200 Subject: [PATCH] qt: properly remember last used folder url scheme was pruned Signed-off-by: Jean-Baptiste Kempf --- 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"; -- 2.11.4.GIT