Commit e0927171 authored by Cristian Oneț's avatar Cristian Oneț
Browse files

BUG: 291850 - Use KFileDialog::getExistingDirectoryUrl() instead of...

BUG: 291850 - Use KFileDialog::getExistingDirectoryUrl() instead of KDirSelectDialog::selectDirectory() which clearly has some platform issues on
Windows.

This results in the same behaviour on Linux but on Windows it means that the native directory selection dialog will be opened.
I think this solution is better then waiting for a fix in kdelibs on Windows for the following reasons:
1. In the docs of KDirSelectDialog::selectDirectory()  it is stated that it's equivalent with KFileDialog::getExistingDirectoryUrl()
2. The native directory selection dialog works on Windows while the KDE dialog needs a patch to avoid an infinite loop (will contact the KDE on
Windows team regarding this)
(cherry picked from commit c67cd7ac)
parent b57240a9
......@@ -33,11 +33,11 @@
#include <klocale.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <kdirselectdialog.h>
#include <kglobalsettings.h>
#include <kpushbutton.h>
#include <kiconloader.h>
#include <kguiitem.h>
#include <kfiledialog.h>
// ----------------------------------------------------------------------------
// Project Includes
......@@ -69,7 +69,7 @@ KBackupDlg::~KBackupDlg()
void KBackupDlg::chooseButtonClicked()
{
KUrl newDir = KDirSelectDialog::selectDirectory(KGlobalSettings::documentPath());
KUrl newDir = KFileDialog::getExistingDirectoryUrl(KUrl::fromPath(KGlobalSettings::documentPath()));
if (newDir.hasPath())
txtMountPoint->setText(newDir.path());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment