示例#1
0
// ResolveWeakRefs
//------------------------------------------------------------------------------
void TextReader::ResolveWeakRefs() const
{
    auto end = m_UnresolvedWeakRefs.End();
    for ( auto it=m_UnresolvedWeakRefs.Begin(); it!=end; ++it )
    {
        const UnresolvedWeakRef & u = *it;
        WeakRef< Object > weakRef( ReflectionInfo::FindObjectByScopedName( u.m_WeakRefValue ) );
        u.m_Reflection->SetProperty( u.m_Base, u.m_WeakRefName.Get(), weakRef );
    }
}
示例#2
0
void
PeerInfo::setStatus( PeerInfo::Status status )
{
    d_func()->status = status;

    if ( status == Online )
    {
        announce();
    }
    else if ( status == Offline && controlConnection() )
    {
        controlConnection()->removePeerInfo( weakRef().toStrongRef() );
    }

    // we need this to update the DiagnosticsDialog on new peers
    // if we ever happen to have a central PeerInfo manager object
    // we better add it there, but so far this would be the only
    // usage
    emit sipPlugin()->peerStatusChanged( weakRef().toStrongRef() );
}
示例#3
0
void
PeerInfo::sendLocalSipInfos( const QList<SipInfo>& sipInfos )
{
    sipPlugin()->sendSipInfos( weakRef().toStrongRef(), sipInfos );
}