本文整理汇总了C++中item::List::size方法的典型用法代码示例。如果您正苦于以下问题:C++ List::size方法的具体用法?C++ List::size怎么用?C++ List::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类item::List
的用法示例。
在下文中一共展示了List::size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: qCDebug
void RetrieveItemsJob::Private::akonadiFetchResult(KJob *job)
{
if (job->error() != 0) {
return; // handled by base class
}
ItemFetchJob *itemFetch = qobject_cast<ItemFetchJob *>(job);
Q_ASSERT(itemFetch != 0);
Item::List items = itemFetch->items();
itemFetch->clearItems(); // save memory
qCDebug(MIXEDMAILDIR_LOG) << "Akonadi fetch got" << items.count() << "items";
mServerItemsByRemoteId.reserve(items.size());
for (int i = 0; i < items.count(); ++i) {
Item &item = items[i];
// items without remoteId have not been written to the resource yet
if (!item.remoteId().isEmpty()) {
// set the parent collection (with all ancestors) in every item
item.setParentCollection(mCollection);
mServerItemsByRemoteId.insert(item.remoteId(), item);
}
}
qCDebug(MIXEDMAILDIR_LOG) << "of which" << mServerItemsByRemoteId.count() << "have remoteId";
FileStore::ItemFetchJob *storeFetch = mStore->fetchItems(mCollection);
// just basic items, no data
connect(storeFetch, SIGNAL(result(KJob*)), q, SLOT(storeListResult(KJob*)));
}
示例2:
LiteralSequence::LiteralSequence(const Item::List &list) : m_list(list)
{
Q_ASSERT(list.size() >= 2);
}