Skip to content

Conversation

@18202781743
Copy link
Contributor

add cache to stage Bubble, and save it to DB only when processed.

pms: BUG-290145

add cache to stage Bubble, and save it to DB only when processed.

pms: BUG-290145
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, yixinshark

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. BubblePanel::closeBubble函数中,id变量在if (!entity.isValid()) return;之后被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前检查entity的有效性。

  2. NotifyStagingModel::remove函数中,newEntity变量在if (newEntity.id() == id)条件判断之前被赋值,这可能会导致逻辑错误。建议在条件判断之前先检查newEntity的有效性。

  3. NotifyStagingModel::replace函数中,item->id()被替换为item->bubbleId(),这可能会导致逻辑错误。如果itemAppNotifyItem类型,id()函数应该返回bubbleId(),但如果itemBubbleNotifyItem类型,id()函数应该返回id()。建议统一id()函数的返回值,或者根据具体类型进行判断。

  4. DataAccessorProxy::routerToSource函数中,entity变量在if (processedType == NotifyEntity::Processed || processedType == NotifyEntity::Removed)条件判断之后被赋值,这可能会导致逻辑错误。建议在条件判断之前先检查entity的有效性。

  5. DataAccessorProxy::fetchEntity函数中,if (entity.isValid()) return entity;条件判断之后,if (m_source && m_source->isValid())条件判断之前,entity变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查entity的有效性。

  6. DataAccessorProxy::fetchEntity函数中,if (m_source && m_source->isValid())条件判断之后,return {};语句之前,entity变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查entity的有效性。

  7. MemoryAccessor::fetchEntity函数中,if (iter != m_entities.end()) return *iter;条件判断之后,return {};语句之前,iter变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查iter的有效性。

  8. MemoryAccessor::fetchLastEntity函数中,if (iter != m_entities.rend()) return *iter;条件判断之后,return {};语句之前,iter变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查iter的有效性。

  9. MemoryAccessor::fetchLastEntity函数中,if (iter != m_entities.rend()) return *iter;条件判断之后,return {};语句之前,iter变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查iter的有效性。

  10. MemoryAccessor::fetchEntities函数中,if (maxCount >= 0 && ret.count() > maxCount) break;条件判断之后,ret.append(item);语句之前,ret变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查ret的有效性。

  11. MemoryAccessor::fetchApps函数中,if (!ret.contains(item.appName())) ret.append(item.appName());语句之后,if (maxCount >= 0 && ret.count() > maxCount) break;语句之前,ret变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查ret的有效性。

  12. MemoryAccessor::removeEntity函数中,m_entities.removeIf([id](const NotifyEntity &entity) { return entity.id() == id; });语句之后,if (m_source && m_source->isValid())语句之前,m_entities变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查m_entities的有效性。

  13. MemoryAccessor::removeEntityByApp函数中,m_entities.removeIf([appName](const NotifyEntity &entity) { return entity.appName() == appName; });语句之后,if (m_source && m_source->isValid())语句之前,m_entities变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查m_entities的有效性。

  14. MemoryAccessor::clear函数中,m_entities.clear();语句之后,if (m_source && m_source->isValid())语句之前,m_entities变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查m_entities的有效性。

  15. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  16. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  17. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  18. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  19. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  20. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  21. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  22. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  23. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  24. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  25. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  26. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  27. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  28. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  29. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  30. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  31. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  32. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  33. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  34. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  35. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  36. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  37. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  38. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  39. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  40. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  41. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  42. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  43. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  44. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  45. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  46. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  47. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  48. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  49. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  50. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  51. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  52. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  53. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  54. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  55. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  56. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  57. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  58. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  59. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,emitRecordCountChanged();语句之前,id变量被重新赋值,这可能会导致逻辑错误。建议在重新赋值之前先检查id的有效性。

  60. NotificationManager::updateEntityProcessed函数中,Q_EMIT NotificationStateChanged(id, entity.processedType());语句之前,`emit

@18202781743
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Dec 24, 2024

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 7e4f79f into linuxdeepin:master Dec 24, 2024
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants