KIO::AccessManager
Open, Needs TriagePublic

Description

KIO::AccessManager has a number of smells

  • It depends on Widgets to set a window. Used for setting a window for the KCookieJar integration and KJobWidgets::setWindow
  • Code example in the docs uses QtWebKit
  • Deprecated KIO::AccessManager is still around. Should be all ported to KIO::Integration::AccessManager
  • quite a few features are probably unused (e.g. putReplyOnHold)

Also related: T12120

nicolasfella added a parent task: T12089: KIO for KF6.
ervin moved this task from Needs Input to Backlog on the KF6 board.Mar 28 2021, 8:18 AM
adjam added a subscriber: adjam.Jun 15 2021, 2:56 PM

I'd like to investigate whether KIO::AccessManager serves a purpose at all these days.

The main thing it seems to provide is integration with the CookieJar, but with the lack of KIO-based browsers this is likely not interesting any more.

There is some mangling of HTTP headers/metadata, but nothing that strikes me as significant

setExternalContentAllowed is only used by kdewebkit

nicolasfella added a comment.EditedJun 26 2021, 2:06 PM

Remaining users of KIO::AccessManager or KIO::Integration::AccessManager are:

alex added a subscriber: alex.Jun 26 2021, 4:07 PM

Your MRs seem like good stuff, not sure what the implications of using the standard QNetworkAccessManager class in kdeclarative are.

Remaining users of KIO::AccessManager or KIO::Integration::AccessManager are:

Not a big deal, but one deprecation point less to worry about

alex added a comment.Feb 22 2022, 4:30 PM

With the plans to get getting rid of KDeclarative, we should consider not using KIO::AccessManager when creating the alternative.

alex added a comment.Aug 19 2022, 7:10 PM

kdeclarative/ everything that calls KDeclarative::setupEngine

This is in the process of being ported away from and consequently deprecated

alex added a comment.Aug 22 2022, 7:40 AM

In KScreenLocker was a usage introduced that I got rid of using https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/92.

I am not sure to what degree Konqueror actually needs this. IMHO we could move it there if no other KDE Frameworks consumer depends on it.

Curious: how do the settings in Plasma SystemSettings>Network>Setings (Proxy, Connection Preferences, Cookies) make it at least to Qt/KF-based applications? Is there a chance this config data is only picked up by KIO classes, and thus only when KIO::AccessManager is hooked into the QtNetwork logic?

Asking because https://invent.kde.org/frameworks/kdeclarative/-/merge_requests/142 says

KIOAccessManagerFactory does not seem to be needed either

and the "not seem" triggers my curiousity if someone actually knows?

Curious: how do the settings in Plasma SystemSettings>Network>Setings (Proxy, Connection Preferences, Cookies) make it at least to Qt/KF-based applications? Is there a chance this config data is only picked up by KIO classes, and thus only when KIO::AccessManager is hooked into the QtNetwork logic?

Asking because https://invent.kde.org/frameworks/kdeclarative/-/merge_requests/142 says

KIOAccessManagerFactory does not seem to be needed either

and the "not seem" triggers my curiousity if someone actually knows?

In Konqueror, since QtWebEngine doesn't use QNetworkManager, proxy settings are read using KProtocolManager, while for cookies I had to write a compatibility layer which copies cookies from KCookieJar to the QtWebEngine cookie stores at startup and keeps them synchronized while the application is running. As for connection preferences, they're unfortunately ignored.

  • The proxy settings are read via libproxy and can be used by QNAM that way, see T11530. That's also IMHO the only thing on this which is really still relevant.
  • Cookie settings are IMHO application-specific, non-browser applications shouldn't be using cookies by default to begin with. Having this global and on by default predates privacy consideration (or rather the abuse of cookies in that context).
  • FTP settings don't matter for QNAM, which leaves the remaining connection settings.
nicolasfella moved this task from Backlog to Done on the KF6 board.May 28 2023, 9:26 PM