From 74d53255af56fa81c7712298921bb6aead3618d0 Mon Sep 17 00:00:00 2001 From: sunwen Date: Wed, 21 May 2025 11:18:12 +0800 Subject: [PATCH] fix:fix delete pacs settings bug. --- src/src/PACS/Widget/pacsconfiguration.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/src/PACS/Widget/pacsconfiguration.cpp b/src/src/PACS/Widget/pacsconfiguration.cpp index 98fa0ae..c83a6b1 100644 --- a/src/src/PACS/Widget/pacsconfiguration.cpp +++ b/src/src/PACS/Widget/pacsconfiguration.cpp @@ -331,13 +331,10 @@ void ConfigurationDialog::del() return; QString name = m_pPacsModel->index(currentRow, 3).data().toString(); - int index = 0; - QList::iterator itr = m_lHostsNew.begin(); - for (; itr != m_lHostsNew.end(); ++itr) - { - if (name == itr->name) - m_lHostsNew.removeAt(index); - index++; + for (int index = 0; index < m_lHostsNew.size(); ++index) + { + if (name == m_lHostsNew[index].name) + m_lHostsNew.removeAt(index); } //for each (host var in m_lHostsNew)