D8066: Give legacy BPF::format() handling its own MessagePart sub-class
Sandro Knauß
noreply at phabricator.kde.org
Sat Sep 30 13:10:56 BST 2017
knauss added inline comments.
INLINE COMMENTS
> defaultrenderer.cpp:1057
>
> qCDebug(MESSAGEVIEWER_LOG) << "We got a unkonwn classname, using default behaviour for "
> << className;
should now be a qCWarning or a qCError, becauce this should never happen.
> messagepart.h:118
>
> +// remove once all plugins are ported away from BPF::format()
> +class MIMETREEPARSER_EXPORT LegacyPluginMessagePart : public Interface::MessagePart
add TODO: infront, so it is listed by kdevelop etc.
> messagepart.h:119
> +// remove once all plugins are ported away from BPF::format()
> +class MIMETREEPARSER_EXPORT LegacyPluginMessagePart : public Interface::MessagePart
> +{
mark it as deprecated to make sure nobody using it for new code
> objecttreeparser.cpp:219
> + if (const auto legacyPart = result.dynamicCast<LegacyPluginMessagePart>()) {
> + const auto r = formatter->format(&part, legacyPart->htmlWriter());
> if (r == Interface::BodyPartFormatter::AsIcon) {
not sure if we should try to move the complete handling into LegacyPluginMessagePart, to be able to cleanup OtP directly.
> objecttreeparser.cpp:238
> + return result;
> }
> }
ignore the case when we get a Interface object, that sould result in an qCError. Sofar the Interface:MessagePart is still different from MesasgePart. okay handled in https://phabricator.kde.org/D8068
REPOSITORY
R94 PIM: Message Library
REVISION DETAIL
https://phabricator.kde.org/D8066
To: vkrause, knauss
Cc: #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20170930/0f7faf3d/attachment.html>
More information about the kde-pim
mailing list