[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: Serial number-related trouble, again
From: David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date: 2005-05-26 14:24:25
Message-ID: 200505261624.27203.dfaure () klaralvdalens-datakonsult ! se
[Download RAW message or body]
On Thursday 26 May 2005 15:56, David Faure wrote:
> KMMsgBase::~KMMsgBase()
> {
> MessageProperty::forget( this );
> }
BTW the same happens in KMMsgBase::assign(const KMMsgBase*),
which also deliberately "forgets" about a serial number, even if it might still be in use.
On the other hand, one part of MessageProperty::forget( this ) works on the
KMMsgBase pointer and not on the serial number: the sSerialCache.remove( msgBase ) line.
Doing that is obviously needed from the destructor (otherwise we keep a ref to a deleted message).
So my suggested patch would be:
--- messageproperty.cpp (revision 415305)
+++ messageproperty.cpp (working copy)
@@ -214,14 +221,8 @@
void MessageProperty::forget( const KMMsgBase *msgBase )
{
- Q_UINT32 serNum = serialCache( msgBase );
- if (serNum) {
- Q_ASSERT( !transferInProgress( serNum ) );
- sCompletes.remove( serNum );
- sTransfers.remove( serNum );
- sReadyToShows.remove( serNum );
- sSerialCache.remove( msgBase );
- }
+ // Don't touch sCompletes etc. - see https://intevation.de/roundup/kolab/issue757
+ sSerialCache.remove( msgBase );
}
#include "messageproperty.moc"
--
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic