本文整理汇总了C++中QMessageIdList::at方法的典型用法代码示例。如果您正苦于以下问题:C++ QMessageIdList::at方法的具体用法?C++ QMessageIdList::at怎么用?C++ QMessageIdList::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMessageIdList
的用法示例。
在下文中一共展示了QMessageIdList::at方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeMessages
bool QMessageStore::removeMessages(const QMessageFilter& filter, QMessageManager::RemovalOption option)
{
bool noErrors;
d_ptr->error = QMessageManager::NoError;
noErrors = QMFStore::instance()->removeMessages(filter, option, d_ptr->error);
QMessageIdList ids = StorageEngine::instance()->queryMessagesSync(filter, QMessageSortOrder(), 0, 0);
for (int i = 0; i < ids.size(); i++) {
if (!removeMessage(ids.at(i), option))
noErrors = false;
}
return noErrors;
}
示例2: moveMessages
bool QMessageServicePrivate::moveMessages(const QMessageIdList &messageIds, const QMessageFolderId &toFolderId)
{
bool ret = false;
// it'a already verified that messageIds has elements and they are of same type
switch (idType(messageIds.at(0))) {
case EngineTypeFreestyle: {
#ifdef FREESTYLEMAILMAPI12USED
ret = CFSEngine::instance()->moveMessages( *this, messageIds, toFolderId );
#else
// not supported
ret = false;
#endif
break;
}
case EngineTypeMTM: // flow through
default: {
// not supported
ret = false;
break;
}
}
return ret;
}