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)