Bug 357171 - Create new symlink dialog shows directories but not files
Summary: Create new symlink dialog shows directories but not files
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.29.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords: usability
: 369611 broken, Link, location, to (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-26 10:49 UTC by Paul Worrall
Modified: 2019-05-29 17:44 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.59


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Worrall 2015-12-26 10:49:08 UTC
Right Click => Create New => Basic Link to File or Directory => Browse

This does not show files in the browser dialog, only directories

Reproducible: Always
Comment 1 Pedro Neves 2016-04-16 14:38:44 UTC
I can confirm this using Arch Linux, KDE Frameworks 5.21.0 and Dolphin 16.03.90 (built against qt 5.6.0).

One can create links to folders but not to files. 
Links created with ln -s don't work properly with Dolphin.

Using Konqueror to create links works fine (Dialog shows both files and folders).
Comment 2 Rog131 2016-04-16 15:01:24 UTC
Workarounds etc. at the  KDE Forums: https://forum.kde.org/viewtopic.php?f=224&t=132415&p=355420#p355420
Comment 3 GiovanniES 2016-05-01 04:34:49 UTC
Kubuntu 16.04, Dolphin 15.12.3, Linux (x86_64) release 4.4.0-21-generic.
There is no way to pick a file, but the workaround https://forum.kde.org/viewtopic.php?f=224&t=132415&p=355420#p355420 works: to copy the filepath, but this is against the whole point of using this way to create a symlink.
Comment 4 Mike E. 2016-10-26 16:53:44 UTC
Same issue here...  Hoping this gets a second look since it hasn't had any activity for a while.
Comment 5 taro yamada 2016-10-29 02:32:24 UTC
Maybe this is caused by qt5.
I reported it to qt bugtracker.
https://bugreports.qt.io/browse/QTBUG-56802
Comment 6 taro yamada 2016-11-05 03:54:39 UTC
Sorry, #5 was wrong...
Comment 7 Francesco 2016-12-15 08:34:53 UTC
Same bug on KDE on Ubuntu 16.04.1 with Dolphin 15.12.3 and KDE Frameworks 5.18.0 and Qt 5.5.1 (compiled with 5.5.1) and Plasma 5.5.5
Comment 8 Elvis Angelaccio 2017-01-15 23:36:28 UTC
This dialog is provided  by KIO. The bug should be in KNameAndUrlInputDialog.
Comment 9 Nate Graham 2017-11-20 04:42:58 UTC
I did some investigation in Bug 369611 and as currently implemented, we'd need some Qt changes (https://bugreports.qt.io/browse/QTBUG-720): currently the Qt file picker only allows the display of either files or directories, not both. Absend an upstream fix, we'd need to redo the UI here to first prompt the user to choose whether to make a link to an application, file, or directory.
Comment 10 Nate Graham 2017-11-20 04:43:30 UTC
*** Bug 369611 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2018-02-10 20:33:39 UTC
*** Bug 390190 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2019-05-24 05:19:14 UTC
Git commit 95d0b44a3837a9e121ab90fdec8a239422d713fd by Nate Graham, on behalf of Robert Hoffmann.
Committed on 24/05/2019 at 05:18.
Pushed by ngraham into branch 'master'.

Fix desktop link to file or directory

Summary: KUrlRequester: Show a popup to select between File and Directory before displaying the file dialog.

Test Plan:
Right click onto desktop, select 'Create new' and then
'Basic link to file or directory' or 'Link to Location (URL)'.
Click the file selection icon. A popup is displayed.

If 'File' is selected, a file dialog is displayed, showing files and directories, allowing the selection of a file.
If 'Directory' is selected, a file dialog is displayed, showing only directories, allowing the selection of a directory.

Without the patch, no popup is displayed, only directories are shown in the file dialog and only a directory can be selected.
FIXED-IN: 5.59

Reviewers: #frameworks, ngraham, dfaure

Reviewed By: ngraham, dfaure

Subscribers: bruns, michaelweghorn, ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D20197

M  +73   -28   src/widgets/kurlrequester.cpp

https://commits.kde.org/kio/95d0b44a3837a9e121ab90fdec8a239422d713fd
Comment 13 Nate Graham 2019-05-29 17:44:59 UTC
*** Bug 408077 has been marked as a duplicate of this bug. ***