| 555 | } |
| 556 | |
| 557 | void WizMessageListView::markAllMessagesReaded(bool removeItems) |
| 558 | { |
| 559 | for (int i = 0; i < count(); i++) { |
| 560 | MessageListViewItem* pItem = messageItem(i); |
| 561 | if (!pItem->data().nReadStatus) { |
| 562 | m_dbMgr.db().setMessageReadStatus(pItem->data()); |
| 563 | m_readList.push_back(pItem->data().nId); |
| 564 | } |
| 565 | } |
| 566 | m_timerTriggerSync.start(); |
| 567 | |
| 568 | if (removeItems) |
| 569 | { |
| 570 | while (count() > 0) |
| 571 | { |
| 572 | if (QListWidgetItem* item = takeItem(0)) |
| 573 | { |
| 574 | delete item; |
| 575 | } |
| 576 | } |
| 577 | } |
| 578 | } |
| 579 | |
| 580 | void WizMessageListView::on_uploadReadStatus_finished(const QString& ids) |
| 581 | { |
no test coverage detected