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

@@ -311,7 +311,7 @@ void ElementsCollectionWidget::editElement()
QETApp *app = QETApp::instance();
app->openElementLocations(QList<ElementsLocation>() << location);
foreach (QETElementEditor *element_editor, app->elementEditors())
for (QETElementEditor *element_editor: app->elementEditors())
connect(element_editor, &QETElementEditor::saveToLocation, this, &ElementsCollectionWidget::locationWasSaved);
}
@@ -442,7 +442,7 @@ void ElementsCollectionWidget::newElement()
elmt_wizard.preselectedLocation(loc);
elmt_wizard.exec();
foreach (QETElementEditor *element_editor, QETApp::instance()->elementEditors())
for (QETElementEditor *element_editor: QETApp::instance()->elementEditors())
connect(element_editor, &QETElementEditor::saveToLocation, this, &ElementsCollectionWidget::locationWasSaved);
}
@@ -609,12 +609,12 @@ void ElementsCollectionWidget::search()
hideCollection(true);
QStringList text_list = text.split("+", QString::SkipEmptyParts);
QModelIndexList match_index;
foreach (QString txt, text_list) {
for (QString txt: text_list) {
match_index << m_model->match(m_showed_index.isValid() ? m_model->index(0,0,m_showed_index) : m_model->index(0,0),
Qt::DisplayRole, QVariant(txt), -1, Qt::MatchContains | Qt::MatchRecursive);
}
foreach(QModelIndex index, match_index)
for (QModelIndex index: match_index)
showAndExpandItem(index);
}