fix: onRowSelected signal signature to match currentRowChanged

- Changed from (const QModelIndex&) to (const QModelIndex&, const QModelIndex&)
- Required for QItemSelectionModel::currentRowChanged signal connection
This commit is contained in:
2026-08-26 12:01:01 +02:00
parent a75143628b
commit 8767d66b2a
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -572,10 +572,11 @@ void MailListView::onRowsInserted(const QModelIndex &parent, int first, int last
}
}
void MailListView::onRowSelected(const QModelIndex &index)
void MailListView::onRowSelected(const QModelIndex &current, const QModelIndex &previous)
{
if (!index.isValid()) return;
QModelIndex proxyIdx = m_proxyModel->mapToSource(index);
Q_UNUSED(previous);
if (!current.isValid()) return;
QModelIndex proxyIdx = m_proxyModel->mapToSource(current);
if (proxyIdx.isValid() && proxyIdx.data(EmailTreeModel::MailIdRole).isValid()) {
int mailId = proxyIdx.data(EmailTreeModel::MailIdRole).toInt();
emit emailSelected(mailId);