From 93836ddf3505a4f02f3d0563cefe2cd137970b83 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 26 Jun 2016 14:33:34 +0300 Subject: [PATCH] Refactoring MainWindowsNoGUI::PrepareDetailsForLayout. Use const iterator. --HG-- branch : feature --- src/app/valentina/mainwindowsnogui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 29c97abcd..b3e6b9e72 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -464,18 +464,18 @@ void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash *de } listDetails.clear(); - QHashIterator idetail(*details); - while (idetail.hasNext()) + QHash::const_iterator i = details->constBegin(); + while (i != details->constEnd()) { - idetail.next(); VLayoutDetail det = VLayoutDetail(); - const VDetail &d = idetail.value(); + const VDetail d = i.value(); det.SetCountourPoints(d.ContourPoints(pattern)); det.SetSeamAllowencePoints(d.SeamAllowancePoints(pattern), d.getSeamAllowance(), d.getClosed()); det.setName(d.getName()); det.setWidth(qApp->toPixel(d.getWidth())); listDetails.append(det); + ++i; } }