KParts: BrowserExtension cleanups
Open, Needs TriagePublic

Description

Classname: it ended up being used by more than browsers (e.g. to save/restore state, share common actions...). We could rename it, but I'm not sure what to. In fact this is about browsing in general (going back and forth between documents), not just webbrowsing.

Deprecate actionSlotMap() and port konqueror away from it. KF6: remove the Ptr from the name of actionSlotMapPtr().

Related Objects

StatusAssignedTask
OpenNone
Openalex
dfaure created this task.Nov 24 2019, 2:01 PM
dfaure renamed this task from BrowserExtension cleanups to KParts: BrowserExtension cleanups.Nov 24 2019, 2:08 PM

It looks like konqueror doesn't use actionSlotMap(), only actionSlotMapPtr().

I worked on this locally:

  • deprecated actionSlotMap(), and actionSlotMapPtr()
  • added a new function actionsSlotMap(); because:
‘static KParts::BrowserExtension::ActionSlotMap* KParts::BrowserExtension::actionSlotMap()’ cannot be overloaded with ‘static KParts::BrowserExtension::ActionSlotMap KParts::BrowserExtension::actionSlotMap()

actionSlotMap() doesn't have any usage, commenting it out altogether, KParts still compiled.

Right, actionSlotMap() can be deprecated, actionSlotMapPtr() is the replacement.

I'm not too fond of the added 's' because this is a key->value map, in this case a action->slot map (key=action, value=slot).

How about we just deprecate actionSlotMap() and add a KF6 todo to rename actionSlotMapPtr to actionSlotMap? It's not like there will be a lot of porting effort with this :-)

alex added a subscriber: alex.May 7 2021, 10:02 AM

https://invent.kde.org/frameworks/kparts/-/merge_requests/23

Classname: it ended up being used by more than browsers (e.g. to save/restore state, share common actions...). We could rename it, but I'm not sure what to. In fact this is about browsing in general (going back and forth between documents), not just webbrowsing.

Could one describe the functionality as a session? In Firefox and a bunch of KDE Apps that term is already used.

See the desktop sessions KCM:

No this isn't about sessions (which involves persistence across application restarts). This is all in memory.

Maybe NavigationExtension would be a better name.

alex added a comment.May 7 2021, 10:53 AM

Maybe NavigationExtension would be a better name.

Yeah, that seems like a good idea! Should the class + header be renamed when KF6 is branched and just adding a TODO for now?

Yes, I don't think we can do that earlier, since host and part need to agree on the class being used.

alex claimed this task.May 8 2021, 6:01 AM
alex moved this task from Backlog to Waiting on KF6 Branching on the KF6 board.