From 8767d66b2a2d3e01d5d83224debd146943789f46 Mon Sep 17 00:00:00 2001 From: Javier Date: Wed, 26 Aug 2026 12:01:01 +0200 Subject: [PATCH] fix: onRowSelected signal signature to match currentRowChanged - Changed from (const QModelIndex&) to (const QModelIndex&, const QModelIndex&) - Required for QItemSelectionModel::currentRowChanged signal connection --- src/ui/maillistview.cpp | 7 ++++--- src/ui/maillistview.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ui/maillistview.cpp b/src/ui/maillistview.cpp index 7f19273..b8ca346 100644 --- a/src/ui/maillistview.cpp +++ b/src/ui/maillistview.cpp @@ -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 ¤t, 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); diff --git a/src/ui/maillistview.h b/src/ui/maillistview.h index 11fd90c..ba4fc3e 100644 --- a/src/ui/maillistview.h +++ b/src/ui/maillistview.h @@ -54,7 +54,7 @@ public slots: void setFolderType(const QString& folderType); // "inbox", "sent", "drafts", etc. private slots: - void onRowSelected(const QModelIndex &index); + void onRowSelected(const QModelIndex ¤t, const QModelIndex &previous); void onSearchTextChanged(const QString &text); void onFilterChanged(); void onGroupByChanged(int index);