Un-Overload KParts::BrowserExtension::selectionInfo signal
Open, Needs TriagePublic

Description

This signal is not widely used and I am not sure about the usefulness of the overloads:

  • QString: Only used by KHtml. Arguably this can just be deprecated.
  • KFileItemList: Only used by dolphin and listened to in Konqueror
  • QList<QUrl>: Only emitted in the konqueror fsview part

I am not sure about the last two, KFileItemList is very specific for browsing and the mouseOverInfo has only a KFileItem parameter. But we are also limited to files and not whatever can be put in QUrl.

Thoughts?

alex created this task.Sep 7 2021, 3:11 PM
alex added subscribers: dfaure, stefanocrocco, ahmadsamir.

As discussed in the meeting, let's keep the only KFileItemList overload, it's the one that provides most information to the recipient, which doesn't have to re-do things like mimetype determination etc..

fsview can create KFileItems from urls, the way it does in FSViewPart::contextMenu for instance (that code could be extracted into a function that updateActions() uses too).

alex added a comment.Sep 27 2021, 4:52 PM

@dfaure In konqueror the signal is emitted with the QList<QUrl> overload: "ext->selectionInfo(urls);", I can't find any connect to this specific overload.

Is this just a leftover which can safely be removed?

I think it needs to be ported to selectionInfo(KFileItemList) instead.

I'm working on that.

alex moved this task from Backlog to Waiting on KF6 Branching on the KF6 board.Oct 11 2021, 5:58 PM
alex moved this task from Waiting on KF6 Branching to Done on the KF6 board.Feb 7 2023, 8:31 AM