[kmail2] [Bug 368692] kMail 5.3.x: Wrong MIME part selected as Reply text

Laurent Montel via KDE Bugzilla bugzilla_noreply at kde.org
Sat Oct 15 06:44:30 BST 2016


https://bugs.kde.org/show_bug.cgi?id=368692

Laurent Montel <montel at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sknauss at kde.org

--- Comment #7 from Laurent Montel <montel at kde.org> ---
it's a bug in mimetreeparser:
We use:
void TemplateParser::processWithTemplate(const QString &tmpl)
{
    mOtp->parseObjectTree(mOrigMsg.data());
=>
void ObjectTreeParser::parseObjectTree(KMime::Content *node)
{
    mTopLevelContent = node;
    mParsedPart = parseObjectTreeInternal(node, showOnlyOneMimePart());

    if (mParsedPart) {
        mParsedPart->fix();
        mParsedPart->copyContentFrom();
        if (auto mp = toplevelTextNode(mParsedPart)) {
            if (auto _mp = mp.dynamicCast<TextMessagePart>()) {
                extractNodeInfos(_mp->mNode, true);
            } else if (auto _mp = mp.dynamicCast<AlternativeMessagePart>()) {
                if (_mp->mChildNodes.contains(Util::MultipartPlain)) {
                    extractNodeInfos(_mp->mChildNodes[Util::MultipartPlain],
true);
                }
            }
            setPlainTextContent(mp->text());
        }

=> mp->text() seems to be not correct.

I CC     Sandro Knauß  who needs better this code.

Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list