Replace foreach function by for, please try and report problem

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4900 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2017-02-04 21:43:23 +00:00
parent 6ed750b355
commit 6422dd096f
98 changed files with 606 additions and 606 deletions

View File

@@ -150,7 +150,7 @@ void MasterPropertiesWidget::apply() {
*/
void MasterPropertiesWidget::reset()
{
foreach (QTreeWidgetItem *qtwi, m_qtwi_hash.keys())
for (QTreeWidgetItem *qtwi: m_qtwi_hash.keys())
delete qtwi;
m_qtwi_hash.clear();
@@ -177,7 +177,7 @@ QUndoCommand* MasterPropertiesWidget::associatedUndo() const
{
bool equal = true;
foreach(Element *elmt, to_link)
for (Element *elmt: to_link)
if (!linked_.contains(elmt))
equal = false;
@@ -224,7 +224,7 @@ void MasterPropertiesWidget::updateUi()
//Build the list of free available element
QList <QTreeWidgetItem *> items_list;
foreach(Element *elmt, elmt_prov.freeElement(Element::Slave))
for (Element *elmt: elmt_prov.freeElement(Element::Slave))
{
QTreeWidgetItem *qtwi = new QTreeWidgetItem(ui->m_free_tree_widget);
qtwi->setIcon(0, elmt->pixmap());
@@ -243,7 +243,7 @@ void MasterPropertiesWidget::updateUi()
items_list.clear();
//Build the list of already linked element
foreach(Element *elmt, m_element->linkedElements())
for (Element *elmt: m_element->linkedElements())
{
QTreeWidgetItem *qtwi = new QTreeWidgetItem(ui->m_link_tree_widget);
qtwi->setIcon(0, elmt->pixmap());