feat: email grouping by date + stability fixes
- EmailTreeModel: hierarchical model for grouped email view (QTreeView) - DateGroupProxyModel: proxy model for date-based grouping logic - MailListView: migrated from QTableView to QTreeView with grouping support - ReaderView: subject frame with shadow, avatar moved to header, body inside header - MainWindow: frameless with rounded corners, 1px border, edge resize, no status bar - Stability fixes for grouping mode switch: * Proper tree cleanup (no double-delete of root) * Bounds checking on all array accesses * Null pointer checks in index/parent/data methods * Date validity checks before grouping * Index validation before accessing m_emails
This commit is contained in:
@@ -53,6 +53,9 @@ public:
|
||||
void setShowFlaggedOnly(bool show);
|
||||
void setShowHasAttachments(bool show);
|
||||
|
||||
// Get all emails currently in the model (after filtering)
|
||||
const QVector<MailItem>& emails() const { return m_emails; }
|
||||
|
||||
private:
|
||||
QVector<MailItem> m_emails;
|
||||
int m_folderId{-1}; // -1 means all folders
|
||||
|
||||
Reference in New Issue
Block a user