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:
parent
4a1adbfb8a
commit
7896d15536
@ -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;
|
||||
|
||||
|
@ -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; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user