1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-02-22 19:05:05 +01:00

* PeerInfos are stored as a QSharedPointer, so don't give them a parent.

This commit is contained in:
Christian Muehlhaeuser 2013-03-31 05:34:35 +02:00
parent 3745cd247e
commit 084a3cd2f3
2 changed files with 6 additions and 4 deletions

View File

@ -89,7 +89,7 @@ PeerInfo::get( SipPlugin* parent, const QString& id, GetOptions options )
peerinfo_ptr peerInfo( new PeerInfo( parent, id ) );
peerInfo->setWeakRef( peerInfo.toWeakRef() );
s_peersByCacheKey.insert( key, peerInfo);
s_peersByCacheKey.insert( key, peerInfo );
return peerInfo;
}
@ -103,7 +103,8 @@ PeerInfo::getAll()
PeerInfo::PeerInfo( SipPlugin* parent, const QString& id )
: QObject( parent )
: QObject()
, m_parent( parent )
, m_type( External )
, m_id( id )
, m_status( Offline )
@ -115,7 +116,7 @@ PeerInfo::PeerInfo( SipPlugin* parent, const QString& id )
PeerInfo::~PeerInfo()
{
tDebug() << Q_FUNC_INFO;
// tDebug() << Q_FUNC_INFO;
delete m_avatar;
delete m_fancyAvatar;
}
@ -186,7 +187,7 @@ QString PeerInfo::id() const
SipPlugin*
PeerInfo::sipPlugin() const
{
return qobject_cast< SipPlugin* >( parent() );
return m_parent;
}

View File

@ -125,6 +125,7 @@ private:
QWeakPointer< Tomahawk::PeerInfo > m_ownRef;
QPointer< ControlConnection > m_controlConnection;
SipPlugin* m_parent;
PeerInfo::Type m_type;
QString m_id;