extragear/multimedia/amarok/src/browsers/collectionbrowser

Jeff Mitchell mitchell at kde.org
Thu May 7 14:52:03 CEST 2009


Jeff Mitchell wrote:
> Maximilian Kossick wrote:
>> It should probably be return m_parentCollection; in isDataItem
> 
> Just to be clear, you are suggesting:
> 
> return m_parentCollection;
> 
> Instead of the current
> 
> return !m_parentCollection;
> 
> ?

Trying that change out leads to crashes everywhere.  I'm working through
them -- I figure it's good to find these unchecked pointers and check
them, even if we don't change the behavior as above.

However, one of them reveals an issue with the way the code is, as follows:

bool
CollectionTreeItem::isDataItem() const
{
    //return !m_data.isNull();
    //note a various artists node is also a special data node!
    return m_parentCollection;
}

bool
CollectionTreeItem::isAlbumItem() const
{
    return isDataItem() && !Meta::AlbumPtr::dynamicCast( m_data ).isNull();
}

Note that originally, isDataItem seems to have checked whether m_data is
valid, but now doesn't; but isAlbumItem and isTrackItem rely on the
m_data check in isDataItem.

I'll fix those locally -- but something about the whole system seems
kind of screwed up somehow.

--Jeff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20090507/e56355e4/attachment.sig 


More information about the Amarok-devel mailing list