Bug 383311 - "Import torrent" files filter does not allow user to see & select .torrent files
Summary: "Import torrent" files filter does not allow user to see & select .torrent files
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 5.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-09 12:36 UTC by Germano Massullo
Modified: 2024-09-15 12:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 24.08.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Germano Massullo 2017-08-09 12:36:22 UTC
In "import torrent" view, when I open the file browser to select a .torrent file, I get the following files filter, that unables me to see any .torrent file in the current folder:
Torrents (*.torrent);;Tutti i file (*) (Torrents (*.torrent);;Tutti i file 
that in English language is:
Torrents (*.torrent);;All files (*) (Torrents (*.torrent);;All files
Cleaning such filter, makes .torrent files be visible again.

ktorrent-5.0.1-3.fc26.x86_64
Comment 1 Christoph Feck 2017-08-23 13:02:54 UTC
That's odd. According to the code, the filter should be:

Torrents (*.torrent);; All files (*)
Comment 2 Germano Massullo 2017-08-23 13:12:57 UTC
I think the problem could be coming from Italian translation that has been inserted into file filter
Comment 3 Syam 2018-05-05 06:45:39 UTC
I can confirm this problem on Fedora 28. KTorrent v5.1.0. x86-64
And the language is just US English.

The file filter is shown as: 
Torrents (*.torrent);;All files (*) (Torrents (*.torrent);;All files 

Changing the filter to * makes the files visible and selectable. But import still fails with a cannot copy error for the selected torrent file (bug #383310).
Comment 4 Bug Janitor Service 2024-09-09 21:38:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/ktorrent/-/merge_requests/125
Comment 5 Jack Hill 2024-09-15 11:50:56 UTC
Git commit 5fcc97bc8e25b254cd491f5cdde7344ad401f8db by Jack Hill.
Committed on 15/09/2024 at 11:45.
Pushed by jackh into branch 'master'.

Fix torrent selection dialog in Import Torrent dialog

KUrlRequester receives name filters in the same format as QFileDialog
in KF6. The old format was a leftover from KF5.

Also KUrlRequester will only split the filter on ";;" if we call
`setNameFilter`, i.e. the singular version of the function.
FIXED-IN: 24.08.2

M  +1    -1    ktorrent/dialogs/importdialog.cpp
M  +1    -8    libktcore/interfaces/functions.cpp
M  +1    -5    libktcore/interfaces/functions.h

https://invent.kde.org/network/ktorrent/-/commit/5fcc97bc8e25b254cd491f5cdde7344ad401f8db
Comment 6 Jack Hill 2024-09-15 12:41:59 UTC
Git commit 4caf8b6c214441aad9fc6e05ecd8d5cae29179e0 by Jack Hill.
Committed on 15/09/2024 at 12:41.
Pushed by jackh into branch 'release/24.08'.

Fix torrent selection dialog in Import Torrent dialog

KUrlRequester receives name filters in the same format as QFileDialog
in KF6. The old format was a leftover from KF5.

Also KUrlRequester will only split the filter on ";;" if we call
`setNameFilter`, i.e. the singular version of the function.
FIXED-IN: 24.08.2


(cherry picked from commit 5fcc97bc8e25b254cd491f5cdde7344ad401f8db)

Co-authored-by: Jack Hill <jackhill3103@gmail.com>

M  +1    -1    ktorrent/dialogs/importdialog.cpp
M  +1    -8    libktcore/interfaces/functions.cpp
M  +1    -5    libktcore/interfaces/functions.h

https://invent.kde.org/network/ktorrent/-/commit/4caf8b6c214441aad9fc6e05ecd8d5cae29179e0