Пример #1
0
void SearchFile::removeChild( int position )
{
	SearchTreeItem* pItem = m_lChildItems.at( position );
	Q_ASSERT( pItem->type() == SearchHitType );

	( ( TreeRoot* )m_pParentItem )->removeFromFilterControl( pItem );
	SearchTreeItem::removeChild( position );
}
Пример #2
0
void TreeRoot::removeChild( int position )
{
	SearchTreeItem* pItem = m_lChildItems.at( position );
	Q_ASSERT( pItem->type() == SearchFileType );

	const Hash* const * const pHashes = &( ( SearchFile* )pItem )->m_vHashes[0];
	for ( quint8 i = 0, nSize = ( ( SearchFile* )pItem )->m_vHashes.size(); i < nSize; ++i )
	{
		if ( pHashes[i] )
		{
			unregisterHash( *pHashes[i] );
		}
	}

	removeFromFilterControl( pItem );
	SearchTreeItem::removeChild( position );
}