mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
Add comment to prevent others from doing the same mistake
This commit is contained in:
committed by
Michael Zanetti
parent
7daebc655a
commit
04e5b338c4
@@ -66,6 +66,7 @@ public:
|
|||||||
|
|
||||||
void insert( const QString& key, const QSharedPointer<T>& value )
|
void insert( const QString& key, const QSharedPointer<T>& value )
|
||||||
{
|
{
|
||||||
|
// Do not pass the QSharedPointer to the closure as this will prevent the object from being destroyed.
|
||||||
_detail::Closure* cl = NewClosure( value.data(), SIGNAL( destroyed( QObject* ) ), &m_private, SLOT( remove( QString ) ), key );
|
_detail::Closure* cl = NewClosure( value.data(), SIGNAL( destroyed( QObject* ) ), &m_private, SLOT( remove( QString ) ), key );
|
||||||
cl->setAutoDelete( true );
|
cl->setAutoDelete( true );
|
||||||
m_hash.insert( key, value.toWeakRef() );
|
m_hash.insert( key, value.toWeakRef() );
|
||||||
|
Reference in New Issue
Block a user