mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
filelight: use the static KFileDialog::getExistingDirectoryUrl() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f6fd57439d
commit
4038966ad0
1 changed files with 4 additions and 10 deletions
|
@ -152,16 +152,10 @@ void SettingsDialog::toggleDontScanRemovableMedia(bool b)
|
|||
|
||||
void SettingsDialog::addFolder()
|
||||
{
|
||||
KFileDialog dlg(KUrl(QDir::rootPath()), QString(), this);
|
||||
dlg.setOperationMode(KFileDialog::Opening);
|
||||
dlg.setMode(KFile::Directory | KFile::ExistingOnly);
|
||||
dlg.setCaption(i18n( "Select Folder to Scan" ));
|
||||
dlg.exec();
|
||||
const KUrl url = dlg.selectedUrl();
|
||||
|
||||
//TODO error handling!
|
||||
//TODO wrong protocol handling!
|
||||
|
||||
const KUrl url = KFileDialog::getExistingDirectoryUrl(
|
||||
KUrl(QDir::rootPath()), this,
|
||||
i18n("Select Folder to Scan")
|
||||
);
|
||||
if (!url.isEmpty())
|
||||
{
|
||||
const QString path = url.path(KUrl::AddTrailingSlash);
|
||||
|
|
Loading…
Add table
Reference in a new issue