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:
@@ -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;
|
Q_UNUSED(previous);
|
||||||
QModelIndex proxyIdx = m_proxyModel->mapToSource(index);
|
if (!current.isValid()) return;
|
||||||
|
QModelIndex proxyIdx = m_proxyModel->mapToSource(current);
|
||||||
if (proxyIdx.isValid() && proxyIdx.data(EmailTreeModel::MailIdRole).isValid()) {
|
if (proxyIdx.isValid() && proxyIdx.data(EmailTreeModel::MailIdRole).isValid()) {
|
||||||
int mailId = proxyIdx.data(EmailTreeModel::MailIdRole).toInt();
|
int mailId = proxyIdx.data(EmailTreeModel::MailIdRole).toInt();
|
||||||
emit emailSelected(mailId);
|
emit emailSelected(mailId);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public slots:
|
|||||||
void setFolderType(const QString& folderType); // "inbox", "sent", "drafts", etc.
|
void setFolderType(const QString& folderType); // "inbox", "sent", "drafts", etc.
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onRowSelected(const QModelIndex &index);
|
void onRowSelected(const QModelIndex ¤t, const QModelIndex &previous);
|
||||||
void onSearchTextChanged(const QString &text);
|
void onSearchTextChanged(const QString &text);
|
||||||
void onFilterChanged();
|
void onFilterChanged();
|
||||||
void onGroupByChanged(int index);
|
void onGroupByChanged(int index);
|
||||||
|
|||||||
Reference in New Issue
Block a user