1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 00:09:47 +01:00

Use deleteLater so that peerinfo_ptr can be used in different threads.

This commit is contained in:
Uwe L. Korn 2013-06-14 16:36:26 +02:00
parent c3c0208e55
commit f842792331

View File

@ -58,7 +58,7 @@ PeerInfo::getSelf( SipPlugin* parent, PeerInfo::GetOptions options )
return peerinfo_ptr();
}
peerinfo_ptr selfPeer( new PeerInfo( parent, "local peerinfo don't use this id for anything" ) );
peerinfo_ptr selfPeer( new PeerInfo( parent, "local peerinfo don't use this id for anything" ), &QObject::deleteLater );
selfPeer->setWeakRef( selfPeer.toWeakRef() );
selfPeer->setContactId( "localpeer" );
@ -91,7 +91,7 @@ PeerInfo::get( SipPlugin* parent, const QString& id, GetOptions options )
return peerinfo_ptr();
}
peerinfo_ptr peerInfo( new PeerInfo( parent, id ) );
peerinfo_ptr peerInfo( new PeerInfo( parent, id ), &QObject::deleteLater );
peerInfo->setWeakRef( peerInfo.toWeakRef() );
s_peersByCacheKey.insert( key, peerInfo );