As there is no API to retrieve and restore all parameters, it is otherwise
impossible to change the mimetype while preserving all other parameters.
This is needed for example when fixing wrong mimetype information for
display in KMail (see D8551).
Details
Details
- Reviewers
knauss - Group Reviewers
KDE PIM - Commits
- R180:9d0159b4dddb: Do not clear parameters when changing the mimetype of a Content-Type header
Unit test of messagelib (which is the primary consumer of this API) still
pass too.
Diff Detail
Diff Detail
- Repository
- R180 PIM: KMime
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
that is a behaviour change - did you check what parts use this code and may rely on the cleaning? The other solution would fix magicSetType to store all paramenters before and reset afterwards.
Comment Actions
I did not find a user relying on this, but it's possible I missed some subtle details of course. It's certainly a surprising behavior, and I could not find any explanation in the history on why this was there.
As noted in the commit message, there is no API to iterate the parameters, or retrieve all of them, so the proposed workaround in magicSetType would also require API changes in KMime first.