本文整理汇总了C++中kurl::List::contains方法的典型用法代码示例。如果您正苦于以下问题:C++ List::contains方法的具体用法?C++ List::contains怎么用?C++ List::contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kurl::List
的用法示例。
在下文中一共展示了List::contains方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeItem
void KFindTreeView::removeItem(const KUrl & url)
{
KUrl::List list = selectedUrls();
if ( list.contains(url) )
{
//Close menu
if( m_contextMenu )
{
m_contextMenu->hide();
delete m_contextMenu;
m_contextMenu = 0;
}
}
m_model->removeItem( url );
}
示例2: evil_hack
// This hack is required because of the way we manage .desktop files with
// Forwarding Slaves, their URL is out of the ioslave (most remote:/ files
// have a file:/ based UDS_URL so that they are executed correctly.
// Hence, FilesRemoved and FilesChanged does nothing... We're forced to use
// FilesAdded to re-list the modified directory.
inline void evil_hack(const KURL::List &list)
{
KDirNotify_stub notifier("*", "*");
KURL::List notified;
KURL::List::const_iterator it = list.begin();
KURL::List::const_iterator end = list.end();
for (; it!=end; ++it)
{
KURL url = (*it).upURL();
if (!notified.contains(url))
{
notifier.FilesAdded(url);
notified.append(url);
}
}
}