From f8427923318a16c458b6ee2b43766380fc622688 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 14 Jun 2013 16:36:26 +0200 Subject: [PATCH] Use deleteLater so that peerinfo_ptr can be used in different threads. --- src/libtomahawk/sip/PeerInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/sip/PeerInfo.cpp b/src/libtomahawk/sip/PeerInfo.cpp index f122ba2ae..385524202 100644 --- a/src/libtomahawk/sip/PeerInfo.cpp +++ b/src/libtomahawk/sip/PeerInfo.cpp @@ -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 );