KService: deprecate KMimeTypeTrader
Open, Needs TriagePublic

Description

in favor of KApplicationTrader (for app desktop files), KParts::PartLoader for parts and KPluginLoader for general plugins.

mart created this task.Nov 23 2019, 5:00 PM
dfaure updated the task description. (Show Details)Feb 4 2020, 10:52 PM

Is there a replacement that features the full trader language? We expose that in ktraderclient: https://invent.kde.org/plasma/kde-cli-tools/-/blob/master/ktraderclient/ktraderclient.cpp

dfaure added a subscriber: dfaure.Aug 13 2020, 10:00 AM

No, we determined that the trader language wasn't the best way to write C++ code.
ktraderclient was mostly written as a debugging helper. I suggest to strip out the constraint functionality from ktraderclient.

I've hit a minor problem while porting:

In https://invent.kde.org/frameworks/kio/-/blob/master/src/core/kprotocolmanager.cpp#L729 KIO uses KMimeTypeTrader to find the preferred browser part and extracts the default user agent from it.

The idiomatic solution would be to port to KParts::PartLoader, but since KParts depends on KIO that would create a cyclic dependency between KIO and KParts

dfaure added a comment.Apr 5 2021, 6:04 PM

My thoughts on that code are the following: T14307. But actually I just realized something.... I'll add a comment there.