示例#1
0
void KviChannelListSelector::removeClicked()
{
	KviPointerList<QTreeWidgetItem> lst;
	QList<QTreeWidgetItem *> items=m_pTreeWidget->selectedItems () ;
	for (int i=0;i<items.count();i++)
	{
		lst.append((QTreeWidgetItem *)items.at(i));
	}
	lst.setAutoDelete(true);
	lst.clear();
}
示例#2
0
void KviActionManager::killAllKvsUserActions()
{
	KviPointerList<KviKvsUserAction> dying;
	dying.setAutoDelete(true);

	KviPointerHashTableIterator<QString, KviAction> it(*m_pActions);
	while(KviAction * a = it.current())
	{
		if(a->isKviUserActionNeverOverrideThis())
		{
			dying.append(((KviKvsUserAction *)a));
		}
		++it;
	}

	dying.clear(); // bye :)
}