Bug 458467

Summary: Konqueror doesn't use/support any KIO addons anymore
Product: [Applications] konqueror Reporter: kde
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: asturm, stefano.crocco
Priority: NOR    
Version: 22.08.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description kde 2022-08-29 13:01:17 UTC
SUMMARY
Since update from 22.04.3 to 22.8.0 using any  protocol other then 'file' or 'http' opens open-with-dialogue or triggers another application.
Seems konqueror doesn't known how to handle ftp://, webdav://, webdavs://, fish://, ... anymore.


STEPS TO REPRODUCE
1. Enter some ftp, webdav or fish-address in address-bar and press enter, e.g. ftp://ftp.de.debian.org or fish://<You-know-the-name>

OBSERVED RESULT
Open-With-Dialog of type: Folder is shown or an application is started

EXPECTED RESULT
Konqueror shows remote file listing or asks for username/password and then show file-listing

SOFTWARE/OS VERSIONS
OS: Gentoo Linux with portage from 29.08.2022
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version:  5.15.5

ADDITIONAL INFORMATION
Entering such an URL in dolphin directory listing is shown.
Comment 1 Bug Janitor Service 2022-08-29 17:44:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/konqueror/-/merge_requests/136
Comment 2 Andreas Sturmlechner 2022-09-14 15:39:12 UTC
Dear bug reporter, would you please test both commits from the linked MR? You can easily do that by following the instructions in https://wiki.gentoo.org/wiki//etc/portage/patches
Comment 3 kde 2022-09-14 16:50:37 UTC
The file 136.patch (https://invent.kde.org/network/konqueror/-/merge_requests/136.patch) did not apply to version 22.08.0 and 22.08.1 provided from gentoo.
So using latest master of konqueror, applied the patch and build.
Starting konqueror in build directory, but same result: every times entering a non-http address the open-with-dialog comes up and console shows: QObject::connect(KJob, UrlLoader): invalid nullptr parameter
Comment 4 Andreas Sturmlechner 2022-09-14 17:13:42 UTC
That's because the merge request is still pending, not in master.
Comment 5 Andreas Sturmlechner 2022-09-14 17:14:00 UTC
(In reply to Andreas Sturmlechner from comment #4)
> That's because the merge request is still pending, not in master.
Oh sorry, should read more carefully.
Comment 6 Bug Janitor Service 2022-11-06 17:15:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/konqueror/-/merge_requests/148
Comment 7 Stefano Crocco 2022-11-09 13:43:10 UTC
Git commit 253b1f25ff7bd8ba8deaee3f419270caaec9493c by Stefano Crocco.
Committed on 09/11/2022 at 13:34.
Pushed by stefanocrocco into branch 'master'.

Fix UrlLoader behavior in special cases

This fixes two issues:
- a bug causing URLs with schemes like ftp to always be opened in
  external applications. This happens because for these protocols
  KIO::OpenUrlJob doesn't emit the mimeTypeFound signal. To fix this, we
  explicitly use KIO::MimeTypeFinderJob to determine the mimetype of the
  URL
- a bug causing an attempt to open local URLs corresponding to
  nonexisting paths using the smb ioslave. This is fixed by explicitly
  checking whether the file exists and assigning it an "inode/directory"
  if it doesn't exist. This way, the URL is opened by whatever
  part/application the user chose to display directories (of course,
  that part or application will then fail to open the path).

M  +67   -40   src/urlloader.cpp
M  +7    -4    src/urlloader.h

https://invent.kde.org/network/konqueror/commit/253b1f25ff7bd8ba8deaee3f419270caaec9493c
Comment 8 Stefano Crocco 2022-11-09 13:56:53 UTC
Git commit 28760cd6b9ab59f659e2c8222963c2c99a7e092a by Stefano Crocco.
Committed on 09/11/2022 at 13:56.
Pushed by stefanocrocco into branch 'release/22.12'.

Fix UrlLoader behavior in special cases

This fixes two issues:
- a bug causing URLs with schemes like ftp to always be opened in
  external applications. This happens because for these protocols
  KIO::OpenUrlJob doesn't emit the mimeTypeFound signal. To fix this, we
  explicitly use KIO::MimeTypeFinderJob to determine the mimetype of the
  URL
- a bug causing an attempt to open local URLs corresponding to
  nonexisting paths using the smb ioslave. This is fixed by explicitly
  checking whether the file exists and assigning it an "inode/directory"
  if it doesn't exist. This way, the URL is opened by whatever
  part/application the user chose to display directories (of course,
  that part or application will then fail to open the path).


(cherry picked from commit 253b1f25ff7bd8ba8deaee3f419270caaec9493c)

M  +67   -40   src/urlloader.cpp
M  +7    -4    src/urlloader.h

https://invent.kde.org/network/konqueror/commit/28760cd6b9ab59f659e2c8222963c2c99a7e092a