[pim/kmail] src/identity: We need to use index from pos not changing it
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit fb15ae7ca40880eda0e3ea5ff461ca20ddbfa08f by Laurent Montel.
Committed on 28/07/2026 at 06:13.
Pushed by mlaurent into branch 'master'.
We need to use index from pos not changing it
M +0 -1 src/identity/identityngpage.cpp
https://invent.kde.org/pim/kmail/-/commit/fb15ae7ca40880eda0e3ea5ff461ca20ddbfa08f
diff --git a/src/identity/identityngpage.cpp b/src/identity/identityngpage.cpp
index 020bf55bf..c3b67372f 100644
--- a/src/identity/identityngpage.cpp
+++ b/src/identity/identityngpage.cpp
@@ -247,7 +247,6 @@ void IdentityNgPage::slotContextMenu(const QPoint &pos)
menu.addAction(QIcon::fromTheme(QStringLiteral("list-remove")), i18nc("@action", "Remove"), this, &IdentityNgPage::slotRemoveIdentity);
}
- const QModelIndex index = mIPage.mIdentityList->selectionModel()->selectedRows().constFirst();
const QModelIndex newModelIndex = mIPage.mIdentityList->identityProxyModel()->mapToSource(
mIPage.mIdentityList->identityProxyModel()->index(index.row(), KIdentityManagementCore::IdentityTreeModel::DefaultRole));
if (!newModelIndex.data().toBool()) {