mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
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:
@@ -158,7 +158,7 @@ QList<TitleBlockCell *> TitleBlockTemplateView::copy() {
|
||||
QDomDocument xml_export;
|
||||
QDomElement tbtpartial = xml_export.createElement("titleblocktemplate-partial");
|
||||
xml_export.appendChild(tbtpartial);
|
||||
foreach (TitleBlockCell *cell, copied_cells) {
|
||||
for (TitleBlockCell *cell: copied_cells) {
|
||||
tbtemplate_ -> exportCellToXml(cell, tbtpartial);
|
||||
tbtpartial.setAttribute("row", cell -> num_row);
|
||||
tbtpartial.setAttribute("col", cell -> num_col);
|
||||
@@ -248,7 +248,7 @@ void TitleBlockTemplateView::paste() {
|
||||
normalizeCells(pasted_cells, erased_cell -> num_row, erased_cell -> num_col);
|
||||
|
||||
PasteTemplateCellsCommand *paste_command = new PasteTemplateCellsCommand(tbtemplate_);
|
||||
foreach (TitleBlockCell cell, pasted_cells) {
|
||||
for (TitleBlockCell cell: pasted_cells) {
|
||||
TitleBlockCell *erased_cell = tbtemplate_ -> cell(cell.num_row, cell.num_col);
|
||||
if (!erased_cell) continue;
|
||||
paste_command -> addCell(erased_cell, *erased_cell, cell);
|
||||
@@ -1056,7 +1056,7 @@ void TitleBlockTemplateView::removeItem(QGraphicsLayoutItem *item) {
|
||||
*/
|
||||
TitleBlockTemplateCellsSet TitleBlockTemplateView::makeCellsSetFromGraphicsItems(const QList<QGraphicsItem *> &items) const {
|
||||
TitleBlockTemplateCellsSet set(this);
|
||||
foreach (QGraphicsItem *item, items) {
|
||||
for (QGraphicsItem *item: items) {
|
||||
if (TitleBlockTemplateVisualCell *cell_view = dynamic_cast<TitleBlockTemplateVisualCell *>(item)) {
|
||||
if (cell_view -> cell() && cell_view -> cell() -> num_row != -1) {
|
||||
set << cell_view;
|
||||
|
||||
Reference in New Issue
Block a user