1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 15:29:42 +01:00

For custom JobItems, the delegate is parented to the view, so don't attempt to delete it in the destructor of the item

This commit is contained in:
Jeff Mitchell 2012-06-18 01:29:40 -04:00
parent 4a1adbfb8a
commit 7896d15536
2 changed files with 2 additions and 3 deletions

View File

@ -164,8 +164,6 @@ AclJobItem::AclJobItem( ACLRegistry::User user, const QString &username )
AclJobItem::~AclJobItem()
{
tLog() << Q_FUNC_INFO;
if ( m_delegate )
delete m_delegate;
}
@ -173,6 +171,7 @@ void
AclJobItem::createDelegate( QObject* parent )
{
tLog() << Q_FUNC_INFO;
if ( m_delegate )
return;

View File

@ -71,7 +71,7 @@ public:
virtual int concurrentJobLimit() const { return 3; }
virtual bool hasCustomDelegate() const { return true; }
virtual void createDelegate( QObject* parent );
virtual void createDelegate( QObject* parent = 0 );
virtual QStyledItemDelegate* customDelegate() const { return m_delegate; }
virtual ACLRegistry::User user() const { return m_user; }