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; }
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; }