|
QList查询 find- QList<SyncMailIndexInfo>::const_iterator itFind = qFind(m_mapMailIndexData[folderId].vecSyncMailIndexs.begin(), m_mapMailIndexData[folderId].vecSyncMailIndexs.end(), stSyncMailIndexInfo);
- if (itFind == m_mapMailIndexData[folderId].vecSyncMailIndexs.end())
- {
- return false;
- }
- return true;
- struct SyncMailIndexInfo
- {
- SyncMailIndexInfo()
- : indexPop(DEFAULT_VALUE_ZERO)
- , flags(DEFAULT_VALUE_ZERO)
- , date(NOT_SET_VALUE)
- , operType(IOT_ADD)
- {
- }
- QString uid; //exchange id
- uint32_t indexPop; //兼容 pop
- uint32_t flags;
- uint64_t date;
- IndexOperType operType;
- bool operator == (const SyncMailIndexInfo& rhs) const {
- return (uid == rhs.uid && operType == rhs.operType);
- }
- };
复制代码 |
|