[qet] qet/qet: [4902] Revert r4900

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4902
Author:   scorpio810
Date:     2017-02-05 17:18:50 +0100 (Sun, 05 Feb 2017)
Log Message:
-----------
Revert r4900

Modified Paths:
--------------
    trunk/sources/ElementsCollection/elementcollectionhandler.cpp
    trunk/sources/ElementsCollection/elementcollectionitem.cpp
    trunk/sources/ElementsCollection/elementscollectionmodel.cpp
    trunk/sources/ElementsCollection/elementscollectionwidget.cpp
    trunk/sources/ElementsCollection/fileelementcollectionitem.cpp
    trunk/sources/ElementsCollection/xmlelementcollection.cpp
    trunk/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp
    trunk/sources/PropertiesEditor/propertieseditordockwidget.cpp
    trunk/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp
    trunk/sources/autoNum/numerotationcontext.cpp
    trunk/sources/autoNum/ui/autonumberingdockwidget.cpp
    trunk/sources/autoNum/ui/autonumberingmanagementw.cpp
    trunk/sources/autoNum/ui/folioautonumbering.cpp
    trunk/sources/autoNum/ui/selectautonumw.cpp
    trunk/sources/bordertitleblock.cpp
    trunk/sources/conductorautonumerotation.cpp
    trunk/sources/conductorprofile.cpp
    trunk/sources/conductorproperties.cpp
    trunk/sources/configdialog.cpp
    trunk/sources/configpages.cpp
    trunk/sources/diagram.cpp
    trunk/sources/diagramcommands.cpp
    trunk/sources/diagramcontent.cpp
    trunk/sources/diagramcontext.cpp
    trunk/sources/diagramcontextwidget.cpp
    trunk/sources/diagramevent/diagrameventaddelement.cpp
    trunk/sources/diagramevent/diagrameventaddimage.cpp
    trunk/sources/diagramevent/diagrameventaddshape.cpp
    trunk/sources/diagramprintdialog.cpp
    trunk/sources/diagramschooser.cpp
    trunk/sources/diagramview.cpp
    trunk/sources/editor/editorcommands.cpp
    trunk/sources/editor/elementprimitivedecorator.cpp
    trunk/sources/editor/elementscene.cpp
    trunk/sources/editor/graphicspart/customelementgraphicpart.cpp
    trunk/sources/editor/graphicspart/customelementpart.cpp
    trunk/sources/editor/graphicspart/partarc.cpp
    trunk/sources/editor/graphicspart/partellipse.cpp
    trunk/sources/editor/graphicspart/partline.cpp
    trunk/sources/editor/graphicspart/partpolygon.cpp
    trunk/sources/editor/graphicspart/partrectangle.cpp
    trunk/sources/editor/polygoneditor.cpp
    trunk/sources/editor/qetelementeditor.cpp
    trunk/sources/editor/styleeditor.cpp
    trunk/sources/elementdialog.cpp
    trunk/sources/elementprovider.cpp
    trunk/sources/elementsmover.cpp
    trunk/sources/elementspanel.cpp
    trunk/sources/elementtextsmover.cpp
    trunk/sources/exportdialog.cpp
    trunk/sources/genericpanel.cpp
    trunk/sources/nameslistwidget.cpp
    trunk/sources/nomenclature.cpp
    trunk/sources/projectconfigpages.cpp
    trunk/sources/projectview.cpp
    trunk/sources/properties/xrefproperties.cpp
    trunk/sources/qet.cpp
    trunk/sources/qetapp.cpp
    trunk/sources/qetarguments.cpp
    trunk/sources/qetdiagrameditor.cpp
    trunk/sources/qetgraphicsitem/conductor.cpp
    trunk/sources/qetgraphicsitem/crossrefitem.cpp
    trunk/sources/qetgraphicsitem/customelement.cpp
    trunk/sources/qetgraphicsitem/element.cpp
    trunk/sources/qetgraphicsitem/elementtextitem.cpp
    trunk/sources/qetgraphicsitem/ghostelement.cpp
    trunk/sources/qetgraphicsitem/masterelement.cpp
    trunk/sources/qetgraphicsitem/qetgraphicsitem.cpp
    trunk/sources/qetgraphicsitem/qetshapeitem.cpp
    trunk/sources/qetgraphicsitem/reportelement.cpp
    trunk/sources/qetgraphicsitem/slaveelement.cpp
    trunk/sources/qetgraphicsitem/terminal.cpp
    trunk/sources/qetmainwindow.cpp
    trunk/sources/qetprintpreviewdialog.cpp
    trunk/sources/qetproject.cpp
    trunk/sources/qgimanager.cpp
    trunk/sources/qtextorientationwidget.cpp
    trunk/sources/recentfiles.cpp
    trunk/sources/richtext/richtexteditor.cpp
    trunk/sources/titleblock/helpercell.cpp
    trunk/sources/titleblock/templatecellsset.cpp
    trunk/sources/titleblock/templatecellwidget.cpp
    trunk/sources/titleblock/templatecommands.cpp
    trunk/sources/titleblock/templatelocationchooser.cpp
    trunk/sources/titleblock/templatelogomanager.cpp
    trunk/sources/titleblock/templatescollection.cpp
    trunk/sources/titleblock/templateview.cpp
    trunk/sources/titleblockproperties.cpp
    trunk/sources/titleblocktemplate.cpp
    trunk/sources/ui/conductorpropertiesdialog.cpp
    trunk/sources/ui/diagrampropertieseditordockwidget.cpp
    trunk/sources/ui/elementinfowidget.cpp
    trunk/sources/ui/elementpropertieswidget.cpp
    trunk/sources/ui/linksingleelementwidget.cpp
    trunk/sources/ui/masterpropertieswidget.cpp
    trunk/sources/ui/potentialselectordialog.cpp
    trunk/sources/ui/titleblockpropertieswidget.cpp
    trunk/sources/undocommand/linkelementcommand.cpp

Modified: trunk/sources/ElementsCollection/elementcollectionhandler.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementcollectionhandler.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ElementsCollection/elementcollectionhandler.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -101,7 +101,7 @@
 		if (source_dir == destination_dir)
 			copy_itself = true;
 
-		for (QString str : source_dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name))
+		foreach(QString str, source_dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name))
 		{
 			if (copy_itself)
 			{
@@ -118,7 +118,7 @@
 
             //Copy all elements found in source_dir to destination_dir
         source_dir.setNameFilters(QStringList() << "*.elmt");
-        for (QString str: source_dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
+        foreach(QString str, source_dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
         {
 			ElementsLocation sub_source(source.fileSystemPath() + "/" + str);
             copyElement(sub_source, created_location);
@@ -211,7 +211,7 @@
 		XmlElementCollection *project_collection = source.projectCollection();
 
 		QStringList directories_names = project_collection->directoriesNames( project_collection->directory(source.collectionPath(false)) );
-		for (QString name : directories_names)
+		foreach(QString name, directories_names)
 		{
 			ElementsLocation sub_source_dir(source.projectCollectionPath() + "/" + name);
 			copyDirectory(sub_source_dir,  created_location);
@@ -219,7 +219,7 @@
 
 			//Create all elements found in source to destination
 		QStringList elements_names = project_collection->elementsNames( project_collection->directory(source.collectionPath(false))) ;
-		for (QString name : elements_names)
+		foreach (QString name, elements_names)
 		{
 			ElementsLocation source_element(source.projectCollectionPath() + "/" + name);
 			copyElement(source_element, created_location);

Modified: trunk/sources/ElementsCollection/elementcollectionitem.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementcollectionitem.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ElementsCollection/elementcollectionitem.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -50,7 +50,7 @@
 	if (str_list.isEmpty()) return nullptr;
 
 	ElementCollectionItem *return_eci = this;
-	for (QString str: str_list)
+	foreach (QString str, str_list)
 	{
 		ElementCollectionItem *eci = return_eci->childWithCollectionName(str);
 		if (!eci)
@@ -74,7 +74,7 @@
 ElementCollectionItem *ElementCollectionItem::childWithCollectionName(QString name) const
 {
 	rowCount();
-	for (QStandardItem *qsi: directChilds()) {
+	foreach (QStandardItem *qsi, directChilds()) {
 		ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(qsi);
 		if (eci->name() == name)
 			return eci;
@@ -128,7 +128,7 @@
 			return 0;
 	}
 
-	for (ElementCollectionItem *eci: child)
+	foreach (ElementCollectionItem *eci, child)
 		if (eci->name() > name)
 			return model()->indexFromItem(eci).row();
 
@@ -147,7 +147,7 @@
 		return nullptr;
 
 	ElementCollectionItem *match_eci = this;
-	for (QString str: str_list) {
+	foreach (QString str, str_list) {
 		ElementCollectionItem *eci = match_eci->childWithCollectionName(str);
 		if (!eci)
 			return nullptr;
@@ -166,7 +166,7 @@
 {
 	QList <ElementCollectionItem *> element_child;
 
-	for (QStandardItem *qsi: directChilds()) {
+	foreach (QStandardItem *qsi, directChilds()) {
 		ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(qsi);
 		if (eci->isElement())
 			element_child.append(eci);
@@ -183,7 +183,7 @@
 {
 	QList <ElementCollectionItem *> dir_child;
 
-	for (QStandardItem *qsi: directChilds()) {
+	foreach (QStandardItem *qsi, directChilds()) {
 		ElementCollectionItem *eci = static_cast<ElementCollectionItem *>(qsi);
 		if (eci->isDir())
 			dir_child.append(eci);
@@ -200,7 +200,7 @@
 {
 	QList <ElementCollectionItem *> list = elementsDirectChild();
 
-	for (ElementCollectionItem *eci: directoriesChild())
+	foreach (ElementCollectionItem *eci, directoriesChild())
 		list.append(eci->elementsDirectChild());
 
 	return list;
@@ -214,7 +214,7 @@
 {
 	QList<ElementCollectionItem *> list = directoriesDirectChild();
 	QList<ElementCollectionItem *> child_list;
-	for (ElementCollectionItem *eci: list) {
+	foreach (ElementCollectionItem *eci, list) {
 		child_list.append(eci->directoriesChild());
 	}
 

Modified: trunk/sources/ElementsCollection/elementscollectionmodel.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementscollectionmodel.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ElementsCollection/elementscollectionmodel.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -236,7 +236,7 @@
 		list.append(items());
 
 
-	for (QETProject *project: projects) {
+	foreach (QETProject *project, projects) {
 		addProject(project, false);
 		list.append(projectItems(project));
 	}
@@ -310,7 +310,7 @@
 		for (int i=0 ; i<rowCount() ; i++)
 			child_list.append(static_cast<ElementCollectionItem *>(item(i)));
 
-		for (ElementCollectionItem *eci: child_list) {
+		foreach(ElementCollectionItem *eci, child_list) {
 
 			if (eci->type() == FileElementCollectionItem::Type) {
 				FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci);
@@ -393,7 +393,7 @@
 {
 	QList <ElementsLocation> unused;
 
-	for (QETProject *project: m_project_list)
+	foreach (QETProject *project, m_project_list)
 		unused.append(project->unusedElements());
 
 	QBrush brush;
@@ -400,7 +400,7 @@
 	brush.setStyle(Qt::Dense4Pattern);
 	brush.setColor(Qt::red);
 
-	for (ElementsLocation location: unused) {
+	foreach (ElementsLocation location, unused) {
 		QModelIndex index = indexFromLocation(location);
 		if (index.isValid()) {
 			QStandardItem *qsi = itemFromIndex(index);
@@ -452,7 +452,7 @@
 void ElementsCollectionModel::hideElement()
 {
 	m_hide_element = true;
-	for (ElementCollectionItem *eci: items()) {
+	foreach(ElementCollectionItem *eci, items()) {
 		if (eci->isElement()) {
 			removeRow(eci->row(), indexFromItem(eci).parent());
 		}
@@ -473,7 +473,7 @@
 	for (int i=0 ; i<rowCount() ; i++)
 		child_list.append(static_cast<ElementCollectionItem *>(item(i)));
 
-		foreach (ElementCollectionItem *eci, child_list) {
+		foreach(ElementCollectionItem *eci, child_list) {
 
 			ElementCollectionItem *match_eci = nullptr;
 
@@ -514,7 +514,7 @@
 	QETProject *project = nullptr;
 
 		//Get the owner project of the collection
-	for (QETProject *prj: m_project_list) {
+	foreach (QETProject *prj, m_project_list) {
 		if (prj->embeddedElementCollection() == collection) {
 			project = prj;
 		}
@@ -547,7 +547,7 @@
 	QETProject *project = nullptr;
 
 		//Get the owner project of the collection
-	for (QETProject *prj: m_project_list) {
+	foreach (QETProject *prj, m_project_list) {
 		if (prj->embeddedElementCollection() == collection) {
 			project = prj;
 		}
@@ -575,7 +575,7 @@
 	QETProject *project = nullptr;
 
 		//Get the owner project of the collection
-	for (QETProject *prj: m_project_list) {
+	foreach (QETProject *prj, m_project_list) {
 		if (prj->embeddedElementCollection() == collection) {
 			project = prj;
 		}

Modified: trunk/sources/ElementsCollection/elementscollectionwidget.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementscollectionwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ElementsCollection/elementscollectionwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -311,7 +311,7 @@
 	QETApp *app = QETApp::instance();
 	app->openElementLocations(QList<ElementsLocation>() << location);
 
-	for (QETElementEditor *element_editor: app->elementEditors())
+	foreach (QETElementEditor *element_editor, app->elementEditors())
 		connect(element_editor, &QETElementEditor::saveToLocation, this, &ElementsCollectionWidget::locationWasSaved);
 }
 
@@ -442,7 +442,7 @@
 	elmt_wizard.preselectedLocation(loc);
 	elmt_wizard.exec();
 
-	for (QETElementEditor *element_editor: QETApp::instance()->elementEditors())
+	foreach (QETElementEditor *element_editor, QETApp::instance()->elementEditors())
 		connect(element_editor, &QETElementEditor::saveToLocation, this, &ElementsCollectionWidget::locationWasSaved);
 }
 
@@ -609,12 +609,12 @@
 	hideCollection(true);
 	QStringList text_list = text.split("+", QString::SkipEmptyParts);
 	QModelIndexList match_index;
-	for (QString txt: text_list) {
+	foreach (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);
 	}
 
-	for (QModelIndex index: match_index)
+	foreach(QModelIndex index, match_index)
 		showAndExpandItem(index);
 }
 

Modified: trunk/sources/ElementsCollection/fileelementcollectionitem.cpp
===================================================================
--- trunk/sources/ElementsCollection/fileelementcollectionitem.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ElementsCollection/fileelementcollectionitem.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -297,7 +297,7 @@
 	QDir dir (fileSystemPath());
 
 		//Get all directory in this directory.
-	for (QString str: dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name))
+	foreach(QString str, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name))
 	{
 		FileElementCollectionItem *feci = new FileElementCollectionItem();
 		appendRow(feci);
@@ -311,7 +311,7 @@
 
 		//Get all elmt file in this directory
 	dir.setNameFilters(QStringList() << "*.elmt");
-	for (QString str: dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
+	foreach(QString str, dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
 	{
 		FileElementCollectionItem *feci = new FileElementCollectionItem();
 		appendRow(feci);

Modified: trunk/sources/ElementsCollection/xmlelementcollection.cpp
===================================================================
--- trunk/sources/ElementsCollection/xmlelementcollection.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ElementsCollection/xmlelementcollection.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -136,7 +136,7 @@
 
 	if (found_dom_element.isEmpty()) return QDomElement();
 
-	for (QDomElement elmt: found_dom_element)
+	foreach (QDomElement elmt, found_dom_element)
 		if (elmt.attribute("name") == child_name)
 			return elmt;
 
@@ -154,7 +154,7 @@
 	if (path_list.isEmpty()) return QDomElement();
 
 	QDomElement parent_element = root();
-	for (QString str: path_list)
+	foreach (QString str, path_list)
 	{
 		QDomElement child_element = child(parent_element, str);
 
@@ -198,7 +198,7 @@
 	QList <QDomElement> childs = directories(parent_element);
 	QStringList names;
 
-	for (QDomElement child: childs)
+	foreach (QDomElement child, childs)
 	{
 		QString name = child.attribute("name");
 		if (!name.isEmpty())
@@ -239,7 +239,7 @@
 	QList <QDomElement> childs = elements(parent_element);
 	QStringList names;
 
-	for (QDomElement child: childs)
+	foreach (QDomElement child, childs)
 	{
 		QString name = child.attribute("name");
 		if (!name.isEmpty())
@@ -325,7 +325,7 @@
 		if (!dir.exists())
 			return QString();
 
-		for (QString str: splitted_path) {
+		foreach(QString str, splitted_path) {
 			QDomElement child_element = child(parent_element, str);
 
 				//Child doesn't exist, we create it
@@ -369,7 +369,7 @@
 	}
 	else if (location.isProject()) {
 		QString path;
-		for (QString str: splitted_path) {
+		foreach(QString str, splitted_path) {
 			if (path.isEmpty())
 				path = str;
 			else
@@ -585,7 +585,7 @@
 		//get element childs
 	QList <QDomElement> element_list = elements(dom_element);
 
-	for (QDomElement elmt: element_list) {
+	foreach (QDomElement elmt, element_list) {
 		ElementsLocation location = domToLocation(elmt);
 		if (location.exist())
 			location_list << location;
@@ -594,7 +594,7 @@
 		//get directory childs
 	QList <QDomElement> directory_list = directories(dom_element);
 
-	for (QDomElement dir: directory_list) {
+	foreach (QDomElement dir, directory_list) {
 		ElementsLocation location = domToLocation(dir);
 		if (location.exist())
 			location_list << location;
@@ -638,7 +638,7 @@
  */
 void XmlElementCollection::cleanUnusedElement()
 {
-	for (ElementsLocation loc: m_project->unusedElements())
+	foreach (ElementsLocation loc, m_project->unusedElements())
 		removeElement(loc.collectionPath(false));
 }
 
@@ -705,7 +705,7 @@
 		if (deep_copy)
 		{
 				//Append all directories of source to the new created directory
-			for (QString str: source_dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name))
+			foreach(QString str, source_dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name))
 			{
 				ElementsLocation sub_source(source.fileSystemPath() + "/" + str);
 				copyDirectory(sub_source, created_location);
@@ -713,7 +713,7 @@
 
 				//Append all elements of source to the new created directory
 			source_dir.setNameFilters(QStringList() << "*.elmt");
-			for (QString str: source_dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
+			foreach(QString str, source_dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
 			{
 				ElementsLocation sub_source(source.fileSystemPath() + "/" + str);
 				copyElement(sub_source, created_location);

Modified: trunk/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp
===================================================================
--- trunk/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -227,7 +227,7 @@
 	QList <QDomElement> dom_category = m_project->embeddedElementCollection()->directories(m_dom_element);
 	std::sort(dom_category.begin(), dom_category.end(), [](QDomElement a, QDomElement b){return (a.attribute("name") < b.attribute("name"));});
 
-	for (QDomElement element: dom_category)
+	foreach (QDomElement element, dom_category)
 	{
 		XmlProjectElementCollectionItem *xpeci = new XmlProjectElementCollectionItem();
 		appendRow(xpeci);
@@ -242,7 +242,7 @@
 	QList <QDomElement> dom_elements = m_project->embeddedElementCollection()->elements(m_dom_element);
 	std::sort(dom_elements.begin(), dom_elements.end(), [](QDomElement a, QDomElement b){return (a.attribute("name") < b.attribute("name"));});
 
-	for (QDomElement element: dom_elements)
+	foreach (QDomElement element, dom_elements)
 	{
 		XmlProjectElementCollectionItem *xpeci = new XmlProjectElementCollectionItem();
 		appendRow(xpeci);

Modified: trunk/sources/PropertiesEditor/propertieseditordockwidget.cpp
===================================================================
--- trunk/sources/PropertiesEditor/propertieseditordockwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/PropertiesEditor/propertieseditordockwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -48,7 +48,7 @@
  */
 void PropertiesEditorDockWidget::clear()
 {
-	for (PropertiesEditorWidget *editor: m_editor_list)
+	foreach (PropertiesEditorWidget *editor, m_editor_list)
 	{
 		m_editor_list.removeOne(editor);
 		ui->m_main_vlayout->removeWidget(editor);
@@ -64,7 +64,7 @@
  */
 void PropertiesEditorDockWidget::apply()
 {
-	for (PropertiesEditorWidget *editor: m_editor_list)
+	foreach(PropertiesEditorWidget *editor, m_editor_list)
 		editor->apply();
 }
 
@@ -74,7 +74,7 @@
  */
 void PropertiesEditorDockWidget::reset()
 {
-	for (PropertiesEditorWidget *editor: m_editor_list)
+	foreach(PropertiesEditorWidget *editor, m_editor_list)
 		editor->reset();
 }
 

Modified: trunk/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp
===================================================================
--- trunk/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -56,7 +56,7 @@
  * @param color2
  */
 void QetGraphicsHandlerUtility::drawHandler(QPainter *painter, const QVector<QPointF> &points) {
-	for (QPointF point: points)
+	foreach(QPointF point, points)
 		drawHandler(painter, point);
 }
 
@@ -78,7 +78,7 @@
  */
 int QetGraphicsHandlerUtility::pointIsHoverHandler(const QPointF &point, const QVector<QPointF> &vector) const
 {
-	for (QPointF key_point: vector)
+	foreach (QPointF key_point, vector)
 		if (pointIsInHandler(point, key_point))
 			return vector.indexOf(key_point);
 
@@ -96,7 +96,7 @@
 {
 	QVector <QRectF> rect_vector;
 
-	for (QPointF point: vector)
+	foreach(QPointF point, vector)
 		rect_vector << getRect(point);
 
 	return rect_vector;

Modified: trunk/sources/autoNum/numerotationcontext.cpp
===================================================================
--- trunk/sources/autoNum/numerotationcontext.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/autoNum/numerotationcontext.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -154,7 +154,7 @@
  */
 void NumerotationContext::fromXml(QDomElement &e) {
 	clear();
-	for (QDomElement qde: QET::findInDomElement(e, "part")) addValue(qde.attribute("type"), qde.attribute("value"), qde.attribute("increase").toInt(), qde.attribute("initialvalue").toInt());
+	foreach(QDomElement qde, QET::findInDomElement(e, "part")) addValue(qde.attribute("type"), qde.attribute("value"), qde.attribute("increase").toInt(), qde.attribute("initialvalue").toInt());
 }
 
 /**

Modified: trunk/sources/autoNum/ui/autonumberingdockwidget.cpp
===================================================================
--- trunk/sources/autoNum/ui/autonumberingdockwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/autoNum/ui/autonumberingdockwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -106,7 +106,7 @@
 	ui->m_conductor_cb->addItem("");
 	QList <QString> keys_conductor = m_project->conductorAutoNum().keys();
 	if (!keys_conductor.isEmpty()) {
-		for (QString str: keys_conductor) { ui->m_conductor_cb-> addItem(str); }
+		foreach (QString str, keys_conductor) { ui->m_conductor_cb-> addItem(str); }
 	}
 
 	//Element Combobox
@@ -113,7 +113,7 @@
 	ui->m_element_cb->addItem("");
 	QList <QString> keys_element = m_project->elementAutoNum().keys();
 	if (!keys_element.isEmpty()) {
-		for (QString str: keys_element) {ui->m_element_cb -> addItem(str);}
+		foreach (QString str, keys_element) {ui->m_element_cb -> addItem(str);}
 	}
 
 	//Folio Combobox
@@ -120,7 +120,7 @@
 	ui->m_folio_cb->addItem("");
 	QList <QString> keys_folio = m_project->folioAutoNum().keys();
 	if (!keys_folio.isEmpty()) {
-		for (QString str: keys_folio) { ui->m_folio_cb -> addItem(str);}
+		foreach (QString str, keys_folio) { ui->m_folio_cb -> addItem(str);}
 	}
 
 	this->setActive();
@@ -178,7 +178,7 @@
 	ui->m_conductor_cb->addItem("");
 	QList <QString> keys_conductor = m_project->conductorAutoNum().keys();
 	if (!keys_conductor.isEmpty()) {
-		for (QString str: keys_conductor) { ui->m_conductor_cb-> addItem(str); }
+		foreach (QString str, keys_conductor) { ui->m_conductor_cb-> addItem(str); }
 	}
 	setActive();
 }
@@ -209,7 +209,7 @@
 	ui->m_element_cb->addItem("");
 	QList <QString> keys_element = m_project->elementAutoNum().keys();
 	if (!keys_element.isEmpty()) {
-		for (QString str: keys_element) {ui->m_element_cb -> addItem(str);}
+		foreach (QString str, keys_element) {ui->m_element_cb -> addItem(str);}
 	}
 	setActive();
 }
@@ -237,7 +237,7 @@
 	ui->m_folio_cb->addItem("");
 	QList <QString> keys_folio = m_project->folioAutoNum().keys();
 	if (!keys_folio.isEmpty()) {
-		for (QString str: keys_folio) { ui->m_folio_cb -> addItem(str);}
+		foreach (QString str, keys_folio) { ui->m_folio_cb -> addItem(str);}
 	}
 	setActive();
 }

Modified: trunk/sources/autoNum/ui/autonumberingmanagementw.cpp
===================================================================
--- trunk/sources/autoNum/ui/autonumberingmanagementw.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/autoNum/ui/autonumberingmanagementw.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -106,7 +106,7 @@
 		if (ui->m_from_folios_cb->count()<=0) {
 			ui->m_from_folios_cb->clear();
 			ui->m_from_folios_cb->addItem("");
-			for (Diagram *diagram: project_->diagrams()){
+			foreach (Diagram *diagram, project_->diagrams()){
 				if (diagram->title() != "")
 					ui->m_from_folios_cb->addItem(diagram->title(),diagram->folioIndex());
 				else ui->m_from_folios_cb->addItem(QString::number(diagram->folioIndex()),diagram->folioIndex());

Modified: trunk/sources/autoNum/ui/folioautonumbering.cpp
===================================================================
--- trunk/sources/autoNum/ui/folioautonumbering.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/autoNum/ui/folioautonumbering.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -51,7 +51,7 @@
  * construct autonums in the comboBox selected in the @autonum_chooser QcomboBox
  */
 void FolioAutonumberingW::setContext(QList <QString> autonums) {
-	for (QString str: autonums) { ui->m_autonums_cb->addItem(str);}
+	foreach (QString str, autonums) { ui->m_autonums_cb->addItem(str);}
 }
 
 /**
@@ -123,7 +123,7 @@
 	if (ui->m_from_cb->count()<=0){
 		ui->m_from_cb->clear();
 		ui->m_from_cb->addItem("");
-		for (Diagram *diagram: project_->diagrams()){
+		foreach (Diagram *diagram, project_->diagrams()){
 			ui->m_from_cb->addItem(diagram->title());
 		}
 	}

Modified: trunk/sources/autoNum/ui/selectautonumw.cpp
===================================================================
--- trunk/sources/autoNum/ui/selectautonumw.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/autoNum/ui/selectautonumw.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -105,7 +105,7 @@
  */
 NumerotationContext SelectAutonumW::toNumContext() const {
 	NumerotationContext nc;
-	for (NumPartEditorW *npew: num_part_list_) nc << npew -> toNumContext();
+	foreach (NumPartEditorW *npew, num_part_list_) nc << npew -> toNumContext();
 	return nc;
 }
 
@@ -228,7 +228,7 @@
 void SelectAutonumW::applyEnable(bool b) {
 	if (b){
 		bool valid= true;
-		for (NumPartEditorW *npe: num_part_list_) if (!npe -> isValid()) valid= false;
+		foreach (NumPartEditorW *npe, num_part_list_) if (!npe -> isValid()) valid= false;
 		ui -> buttonBox -> button(QDialogButtonBox::Apply) -> setEnabled(valid);
 	}
 	else {

Modified: trunk/sources/bordertitleblock.cpp
===================================================================
--- trunk/sources/bordertitleblock.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/bordertitleblock.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -692,7 +692,7 @@
 	// Our final DiagramContext is the initial one (which is supposed to bring
 	// project-wide properties), overridden by the "additional fields" one...
 	DiagramContext context = initial_context;
-	for (QString key: additional_fields_.keys()) {
+	foreach (QString key, additional_fields_.keys()) {
 		context.addValue(key, additional_fields_[key]);
 	}
 	

Modified: trunk/sources/conductorautonumerotation.cpp
===================================================================
--- trunk/sources/conductorautonumerotation.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/conductorautonumerotation.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -85,7 +85,7 @@
 		if (!m_parent_undo)
 			undo->setText(QObject::tr("Modifier les propriétés de plusieurs conducteurs", "undo caption"));
 
-		for (Conductor *cond: conductor_list)
+		foreach (Conductor *cond, conductor_list)
 		{
 			ConductorProperties cp2 = cond -> properties();
 			old_value.setValue(cp2);
@@ -107,7 +107,7 @@
 {
 	ConductorProperties cp = conductor_list.first()->properties();
 	bool properties_equal = true;
-	for (const Conductor *conductor: conductor_list)
+	foreach (const Conductor *conductor, conductor_list)
 	{
 		if (conductor->properties() != cp)
 			properties_equal = false;
@@ -122,7 +122,7 @@
 
 	QStringList text_list;
 	QStringList formula_list;
-	for (const Conductor *cc: conductor_list)
+	foreach (const Conductor *cc, conductor_list)
 	{
 		ConductorProperties cp = cc->properties();
 		text_list << cp.text;
@@ -134,7 +134,7 @@
 	if (QET::eachStrIsEqual(text_list) && QET::eachStrIsEqual(formula_list))
 	{
 		QList<ConductorProperties> cp_list;
-		for (Conductor *c: conductor_list)
+		foreach(Conductor *c, conductor_list)
 			cp_list<<c->properties();
 
 		ConductorProperties cp = m_conductor->properties();

Modified: trunk/sources/conductorprofile.cpp
===================================================================
--- trunk/sources/conductorprofile.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/conductorprofile.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -39,7 +39,7 @@
 ConductorProfile::ConductorProfile(const ConductorProfile &c) {
 	beginOrientation = c.beginOrientation;
 	endOrientation   = c.endOrientation;
-	for (ConductorSegmentProfile *csp: c.segments) {
+	foreach(ConductorSegmentProfile *csp, c.segments) {
 		segments << new ConductorSegmentProfile(*csp);
 	}
 }
@@ -57,7 +57,7 @@
 	// copie les informations de l'autre profil de conducteur
 	beginOrientation = c.beginOrientation;
 	endOrientation   = c.endOrientation;
-	for (ConductorSegmentProfile *csp: c.segments) {
+	foreach(ConductorSegmentProfile *csp, c.segments) {
 		segments << new ConductorSegmentProfile(*csp);
 	}
 	return(*this);
@@ -75,7 +75,7 @@
 
 /// supprime les segments du profil de conducteur
 void ConductorProfile::setNull() {
-	for (ConductorSegmentProfile *csp: segments) delete csp;
+	foreach(ConductorSegmentProfile *csp, segments) delete csp;
 	segments.clear();
 }
 
@@ -82,7 +82,7 @@
 /// @return la largeur occupee par le conducteur
 qreal ConductorProfile::width() const {
 	qreal width = 0.0;
-	for (ConductorSegmentProfile *csp: segments) {
+	foreach(ConductorSegmentProfile *csp, segments) {
 		if (csp -> isHorizontal) width += csp -> length;
 	}
 	return(width);
@@ -91,7 +91,7 @@
 /// @return la hauteur occupee par le conducteur
 qreal ConductorProfile::height() const{
 	qreal height = 0.0;
-	for (ConductorSegmentProfile *csp: segments) {
+	foreach(ConductorSegmentProfile *csp, segments) {
 		if (!csp -> isHorizontal) height += csp -> length;
 	}
 	return(height);
@@ -104,7 +104,7 @@
 uint ConductorProfile::segmentsCount(QET::ConductorSegmentType type) const {
 	if (type == QET::Both) return(segments.count());
 	uint nb_seg = 0;
-	for (ConductorSegmentProfile *csp: segments) {
+	foreach(ConductorSegmentProfile *csp, segments) {
 		if (type == QET::Horizontal && csp -> isHorizontal) ++ nb_seg;
 		else if (type == QET::Vertical && !csp -> isHorizontal) ++ nb_seg;
 	}
@@ -114,7 +114,7 @@
 /// @return les segments horizontaux de ce profil
 QList<ConductorSegmentProfile *> ConductorProfile::horizontalSegments() {
 	QList<ConductorSegmentProfile *> segments_list;
-	for (ConductorSegmentProfile *csp: segments) {
+	foreach(ConductorSegmentProfile *csp, segments) {
 		if (csp -> isHorizontal) segments_list << csp;
 	}
 	return(segments_list);
@@ -123,7 +123,7 @@
 /// @return les segments verticaux de ce profil
 QList<ConductorSegmentProfile *> ConductorProfile::verticalSegments() {
 	QList<ConductorSegmentProfile *> segments_list;
-	for (ConductorSegmentProfile *csp: segments) {
+	foreach(ConductorSegmentProfile *csp, segments) {
 		if (!csp -> isHorizontal) segments_list << csp;
 	}
 	return(segments_list);
@@ -136,7 +136,7 @@
 	// supprime les segments precedents
 	setNull();
 	
-	for (ConductorSegment *conductor_segment: conductor -> segmentsList()) {
+	foreach(ConductorSegment *conductor_segment, conductor -> segmentsList()) {
 		segments << new ConductorSegmentProfile(conductor_segment);
 	}
 	beginOrientation = conductor -> terminal1 -> orientation();
@@ -150,7 +150,7 @@
 */
 QDebug &operator<<(QDebug d, ConductorProfile &t) {
 	d << "ConductorProfile {";
-	for (ConductorSegmentProfile *csp: t.segments) {
+	foreach(ConductorSegmentProfile *csp, t.segments) {
 		d << "CSP" << (csp -> isHorizontal ? "horizontal" : "vertical") << ":" << csp -> length << ",";
 	}
 	d << "}";

Modified: trunk/sources/conductorproperties.cpp
===================================================================
--- trunk/sources/conductorproperties.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/conductorproperties.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -412,7 +412,7 @@
 	bool equal = true;
 		//Color
 	QColor c_value = list.first().color;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.color != c_value)
 			equal = false;
@@ -423,7 +423,7 @@
 
 		//text
 	QString s_value = list.first().text;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.text != s_value)
 			equal = false;
@@ -434,7 +434,7 @@
 
 		//formula
 	s_value = list.first().m_formula;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.m_formula != s_value)
 			equal = false;
@@ -445,7 +445,7 @@
 
 		//function
 	s_value = list.first().m_function;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.m_function != s_value)
 			equal = false;
@@ -456,7 +456,7 @@
 
 		//Tension protocol
 	s_value = list.first().m_tension_protocol;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.m_tension_protocol != s_value)
 			equal = false;
@@ -467,7 +467,7 @@
 
 		//text size
 	int i_value = list.first().text_size;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.text_size != i_value)
 			equal = false;
@@ -478,7 +478,7 @@
 
 		//conductor size
 	double d_value = list.first().cond_size;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.cond_size != d_value)
 			equal = false;
@@ -489,7 +489,7 @@
 
 		//show text
 	bool b_value = list.first().m_show_text;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.m_show_text != b_value)
 			equal = false;
@@ -500,7 +500,7 @@
 
 		//One text per folio
 	b_value = list.first().m_one_text_per_folio;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.m_one_text_per_folio != b_value)
 			equal = false;
@@ -511,7 +511,7 @@
 
 		//Text rotation for vertical conducor
 	d_value = list.first().verti_rotate_text;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.verti_rotate_text != d_value)
 			equal = false;
@@ -522,7 +522,7 @@
 
 		//Text rotation for horizontal conducor
 	d_value = list.first().horiz_rotate_text;
-	for (ConductorProperties cp: list)
+	foreach(ConductorProperties cp, list)
 	{
 		if (cp.horiz_rotate_text != d_value)
 			equal = false;
@@ -592,7 +592,7 @@
 	QStringList styles = style_string.split(";", QString::SkipEmptyParts);
 	
 	QRegExp rx("^\\s*([a-z-]+)\\s*:\\s*([a-z-]+)\\s*$");
-	for (QString style_str: styles) {
+	foreach (QString style_str, styles) {
 		if (rx.exactMatch(style_str)) {
 			QString style_name = rx.cap(1);
 			QString style_value = rx.cap(2);

Modified: trunk/sources/configdialog.cpp
===================================================================
--- trunk/sources/configdialog.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/configdialog.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -70,7 +70,7 @@
 */
 void ConfigDialog::buildPagesList() {
 	pages_list -> clear();
-	for (ConfigPage *page: pages) {
+	foreach(ConfigPage *page, pages) {
 		addPageToList(page);
 	}
 }
@@ -90,7 +90,7 @@
 	Applique la configuration de toutes les pages
 */
 void ConfigDialog::applyConf() {
-	for (ConfigPage *page: pages) {
+	foreach(ConfigPage *page, pages) {
 		page -> applyConf();
 	}
 	accept();

Modified: trunk/sources/configpages.cpp
===================================================================
--- trunk/sources/configpages.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/configpages.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -155,7 +155,7 @@
 
 		// default xref properties
 		QHash <QString, XRefProperties> hash_xrp = xrefpw -> properties();
-		for (QString key: hash_xrp.keys()) {
+		foreach (QString key, hash_xrp.keys()) {
 			XRefProperties xrp = hash_xrp[key];
 			QString str("diagrameditor/defaultxref");
 			xrp.toSettings(settings, str += key);

Modified: trunk/sources/diagram.cpp
===================================================================
--- trunk/sources/diagram.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagram.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -107,7 +107,7 @@
 	
 	// list removable items
 	QList<QGraphicsItem *> deletable_items;
-	for (QGraphicsItem *qgi: items()) {
+	foreach(QGraphicsItem *qgi, items()) {
 		if (qgi -> parentItem()) continue;
 		if (qgraphicsitem_cast<Conductor *>(qgi)) continue;
 		deletable_items << qgi;
@@ -251,7 +251,7 @@
 		if (!this->selectedContent().items(255).isEmpty()) {
 		switch(e -> key()) {
 			case Qt::Key_Left:
-				for (Element *item: selectedContent().elements) {
+				foreach (Element *item, selectedContent().elements) {
 					left_position = item->mapRectFromScene(item->boundingRect()).x();
 					if (left_position >= this->sceneRect().left() - item->boundingRect().width())
 					return;
@@ -260,7 +260,7 @@
 				break;
 			case Qt::Key_Right: movement = QPointF(+xGrid, 0.0); break;
 			case Qt::Key_Up:
-				for (Element *item:selectedContent().elements) {
+				foreach (Element *item, selectedContent().elements) {
 					top_position = item->mapRectFromScene(item->boundingRect()).y();
 					if (top_position >= this->sceneRect().top() - item->boundingRect().height())
 						return;
@@ -382,7 +382,7 @@
 	
 	// deselectionne tous les elements
 	QList<QGraphicsItem *> selected_elmts = selectedItems();
-	for (QGraphicsItem *qgi: selected_elmts) qgi -> setSelected(false);
+	foreach (QGraphicsItem *qgi, selected_elmts) qgi -> setSelected(false);
 	
 	// effectue le rendu lui-meme
 	render(&p, QRect(QPoint(0, 0), image_size), source_area, aspectRatioMode);
@@ -389,7 +389,7 @@
 	p.end();
 	
 	// restaure les elements selectionnes
-	for (QGraphicsItem *qgi: selected_elmts) qgi -> setSelected(true);
+	foreach (QGraphicsItem *qgi, selected_elmts) qgi -> setSelected(true);
 	
 	return(true);
 }
@@ -438,7 +438,7 @@
 	do {
 		QSet <Conductor *> one_potential = conductors_list.first() -> relatedPotentialConductors();
 		one_potential << conductors_list.takeFirst();
-		for (Conductor *c: one_potential) conductors_list.removeOne(c);
+		foreach (Conductor *c, one_potential) conductors_list.removeOne(c);
 		potential_List << one_potential;
 	} while (!conductors_list.empty());
 
@@ -545,7 +545,7 @@
 	QList<QGraphicsItem *> list_items = items();
 	;
 	// Determine les elements a "XMLiser"
-	for (QGraphicsItem *qgi: list_items) {
+	foreach(QGraphicsItem *qgi, list_items) {
 		if (Element *elmt = qgraphicsitem_cast<Element *>(qgi)) {
 			if (whole_content) list_elements << elmt;
 			else if (elmt -> isSelected()) list_elements << elmt;
@@ -574,7 +574,7 @@
 	// enregistrement des elements
 	if (!list_elements.isEmpty()) {
 		QDomElement elements = document.createElement("elements");
-		for (Element *elmt: list_elements) {
+		foreach(Element *elmt, list_elements) {
 			elements.appendChild(elmt -> toXml(document, table_adr_id));
 		}
 		racine.appendChild(elements);
@@ -583,7 +583,7 @@
 	// enregistrement des conducteurs
 	if (!list_conductors.isEmpty()) {
 		QDomElement conductors = document.createElement("conductors");
-		for (Conductor *cond: list_conductors) {
+		foreach(Conductor *cond, list_conductors) {
 			conductors.appendChild(cond -> toXml(document, table_adr_id));
 		}
 		racine.appendChild(conductors);
@@ -592,7 +592,7 @@
 	// enregistrement des champs de texte
 	if (!list_texts.isEmpty()) {
 		QDomElement inputs = document.createElement("inputs");
-		for (DiagramTextItem *dti: list_texts) {
+		foreach(DiagramTextItem *dti, list_texts) {
 			inputs.appendChild(dti -> toXml(document));
 		}
 		racine.appendChild(inputs);
@@ -601,7 +601,7 @@
 	// save of images
 	if (!list_images.isEmpty()) {
 		QDomElement images = document.createElement("images");
-		for (DiagramImageItem *dii: list_images) {
+		foreach (DiagramImageItem *dii, list_images) {
 			images.appendChild(dii -> toXml(document));
 		}
 		racine.appendChild(images);
@@ -610,7 +610,7 @@
 	// save of basic shapes
 	if (!list_shapes.isEmpty()) {
 		QDomElement shapes = document.createElement("shapes");
-		for (QetShapeItem *dii: list_shapes) {
+		foreach (QetShapeItem *dii, list_shapes) {
 			shapes.appendChild(dii -> toXml(document));
 		}
 		racine.appendChild(shapes);
@@ -768,7 +768,7 @@
 			//in the embedded collection of this project
 		if (other_project && other_project != m_project) {
 			ElementCollectionHandler ech;
-			for (QDomElement element_xml: QET::findInDomElement(root, "elements", "element")) {
+			foreach (QDomElement element_xml, QET::findInDomElement(root, "elements", "element")) {
 				if (!Element::valideXml(element_xml)) continue;
 
 				QString type_id = element_xml.attribute("type");
@@ -783,7 +783,7 @@
 		//Load all elements from the XML
 	QList<Element *> added_elements;
 	QHash<int, Terminal *> table_adr_id;
-	for (QDomElement element_xml: QET::findInDomElement(root, "elements", "element"))
+	foreach (QDomElement element_xml, QET::findInDomElement(root, "elements", "element"))
 	{
 		if (!Element::valideXml(element_xml)) continue;
 		
@@ -822,7 +822,7 @@
 	
 	// Load text
 	QList<IndependentTextItem *> added_texts;
-	for (QDomElement text_xml: QET::findInDomElement(root, "inputs", "input")) {
+	foreach (QDomElement text_xml, QET::findInDomElement(root, "inputs", "input")) {
 		IndependentTextItem *iti = new IndependentTextItem();
 		iti -> fromXml(text_xml);
 		addItem(iti);
@@ -831,7 +831,7 @@
 
 	// Load image
 	QList<DiagramImageItem *> added_images;
-	for (QDomElement image_xml: QET::findInDomElement(root, "images", "image")) {
+	foreach (QDomElement image_xml, QET::findInDomElement(root, "images", "image")) {
 		DiagramImageItem *dii = new DiagramImageItem ();
 		dii -> fromXml(image_xml);
 		addItem(dii);
@@ -840,7 +840,7 @@
 
 	// Load shape
 	QList<QetShapeItem *> added_shapes;
-	for (QDomElement shape_xml: QET::findInDomElement(root, "shapes", "shape")) {
+	foreach (QDomElement shape_xml, QET::findInDomElement(root, "shapes", "shape")) {
 		QetShapeItem *dii = new QetShapeItem (QPointF(0,0));
 		dii -> fromXml(shape_xml);
 		addItem(dii);
@@ -849,7 +849,7 @@
 
 		// Load conductor
 	QList<Conductor *> added_conductors;
-	for (QDomElement f: QET::findInDomElement(root, "conductors", "conductor"))
+	foreach (QDomElement f, QET::findInDomElement(root, "conductors", "conductor"))
 	{
 		if (!Conductor::valideXml(f)) continue;
 
@@ -880,15 +880,15 @@
 	if (position != QPointF()) {
 
 		QList<QGraphicsItem *> added_items;
-		for (Element          *added_element: added_elements  ) added_items << added_element;
-		for (Conductor        *added_cond:    added_conductors) added_items << added_cond;
-		for (QetShapeItem     *added_shape:   added_shapes    ) added_items << added_shape;
-		for (DiagramTextItem  *added_text:    added_texts     ) added_items << added_text;
-		for (DiagramImageItem *added_image:   added_images    ) added_items << added_image;
+		foreach (Element          *added_element, added_elements  ) added_items << added_element;
+		foreach (Conductor        *added_cond,    added_conductors) added_items << added_cond;
+		foreach (QetShapeItem     *added_shape,   added_shapes    ) added_items << added_shape;
+		foreach (DiagramTextItem  *added_text,    added_texts     ) added_items << added_text;
+		foreach (DiagramImageItem *added_image,   added_images    ) added_items << added_image;
 
 		//Get the top left corner of the rectangle that contain all added items
 		QRectF items_rect;
-		for (QGraphicsItem *item: added_items) {
+		foreach (QGraphicsItem *item, added_items) {
 			items_rect = items_rect.united(item -> mapToScene(item -> boundingRect()).boundingRect());
 		}
 
@@ -897,7 +897,7 @@
 													position.y() - point_.y()));
 
 		//Translate all added items
-		for (QGraphicsItem *qgi: added_items)
+		foreach (QGraphicsItem *qgi, added_items)
 			qgi -> setPos( qgi -> pos() += pos_);
 	}
 	
@@ -923,7 +923,7 @@
  * @param type of sequential
  */
 void Diagram::folioSequentialsFromXml(const QDomElement &root, QHash<QString, QStringList>* hash, QString folioSeq, QString seq, QString type, QString autonumFolioSeqType) {
-	for (QDomElement folioSeqAutoNum: QET::findInDomElement(root, autonumFolioSeqType, folioSeq)) {
+	foreach (QDomElement folioSeqAutoNum, QET::findInDomElement(root, autonumFolioSeqType, folioSeq)) {
 		for(QDomElement folioseq = folioSeqAutoNum.firstChildElement(type); !folioseq.isNull(); folioseq = folioseq.nextSiblingElement(type)) {
 			QString title = folioseq.attribute("title");
 			QStringList list;
@@ -987,10 +987,10 @@
  */
 void Diagram::refreshContents() {
 
-	for (Element *elmt: elements())
+	foreach (Element *elmt, elements())
 		elmt->initLink(project());
 
-	for (Conductor *conductor: conductors())
+	foreach (Conductor *conductor, conductors())
 		conductor->refreshText();
 }
 
@@ -1127,7 +1127,7 @@
 	if (items().isEmpty()) return;
 	
 	blockSignals(true);
-	for (QGraphicsItem *qgi: items()) qgi -> setSelected(true);
+	foreach(QGraphicsItem *qgi, items()) qgi -> setSelected(true);
 	blockSignals(false);
 	emit(selectionChanged());
 }
@@ -1148,7 +1148,7 @@
 	if (items().isEmpty()) return;
 	
 	blockSignals(true);
-	for (QGraphicsItem *item: items()) item -> setSelected(!item -> isSelected());
+	foreach (QGraphicsItem *item, items()) item -> setSelected(!item -> isSelected());
 	blockSignals(false);
 	emit(selectionChanged());
 }
@@ -1159,11 +1159,11 @@
  * in their labels.
  */
 void Diagram::updateLabels() {
-	for (Element *elmt: elements()) {
+	foreach (Element *elmt, elements()) {
 		if (elmt->elementInformations()["label"].toString().contains(("%F")))
 			elmt->updateLabel();
 	}
-	for (Conductor *cnd: content().conductors()) {
+	foreach (Conductor *cnd, content().conductors()) {
 		cnd->refreshText();
 	}
 }
@@ -1341,7 +1341,7 @@
 */
 QList<CustomElement *> Diagram::customElements() const {
 	QList<CustomElement *> elements_list;
-	for (QGraphicsItem *qgi: items()) {
+	foreach(QGraphicsItem *qgi, items()) {
 		if (CustomElement *elmt = qgraphicsitem_cast<CustomElement *>(qgi)) {
 			elements_list << elmt;
 		}
@@ -1351,7 +1351,7 @@
 
 QList <Element *> Diagram::elements() const {
 	QList<Element *> element_list;
-	for (QGraphicsItem *qgi: items()) {
+	foreach (QGraphicsItem *qgi, items()) {
 		if (Element *elmt = qgraphicsitem_cast<Element *>(qgi))
 			element_list <<elmt;
 	}
@@ -1364,7 +1364,7 @@
  */
 QList <Conductor *> Diagram::conductors() const {
 	QList<Conductor *> cnd_list;
-	for (QGraphicsItem *qgi: items()) {
+	foreach (QGraphicsItem *qgi, items()) {
 		if (Conductor *cnd = qgraphicsitem_cast<Conductor *>(qgi))
 			cnd_list <<cnd;
 	}
@@ -1433,7 +1433,7 @@
 	@return true si l'element location est utilise sur ce schema, false sinon
 */
 bool Diagram::usesElement(const ElementsLocation &location) {
-	for (CustomElement *element: customElements()) {
+	foreach(CustomElement *element, customElements()) {
 		if (element -> location() == location) {
 			return(true);
 		}
@@ -1455,7 +1455,7 @@
  * Freeze every existent element label.
  */
 void Diagram::freezeElements(bool freeze) {
-	for (Element *elmt: elements()) {
+	foreach (Element *elmt, elements()) {
 		elmt->freezeLabel(freeze);
 	}
 }
@@ -1465,7 +1465,7 @@
  * Unfreeze every existent element label.
  */
 void Diagram::unfreezeElements() {
-	for (Element *elmt: elements()) {
+	foreach (Element *elmt, elements()) {
 		elmt->freezeLabel(false);
 	}
 }
@@ -1491,7 +1491,7 @@
  * Freeze every existent conductor label.
  */
 void Diagram::freezeConductors(bool freeze) {
-	for (Conductor *cnd: conductors()) {
+	foreach (Conductor *cnd, conductors()) {
 		cnd->setFreezeLabel(freeze);
 	}
 }
@@ -1595,7 +1595,7 @@
 	@param dt true pour afficher les bornes, false sinon
 */
 void Diagram::setDrawTerminals(bool dt) {
-	for (QGraphicsItem *qgi: items()) {
+	foreach(QGraphicsItem *qgi, items()) {
 		if (Terminal *t = qgraphicsitem_cast<Terminal *>(qgi)) {
 			t -> setVisible(dt);
 		}
@@ -1616,7 +1616,7 @@
 */
 QSet<Conductor *> Diagram::selectedConductors() const {
 	QSet<Conductor *> conductors_set;
-	for (QGraphicsItem *qgi: selectedItems()) {
+	foreach(QGraphicsItem *qgi, selectedItems()) {
 		if (Conductor *c = qgraphicsitem_cast<Conductor *>(qgi)) {
 			conductors_set << c;
 		}
@@ -1630,7 +1630,7 @@
 */
 QSet<DiagramTextItem *> Diagram::selectedTexts() const {
 	QSet<DiagramTextItem *> selected_texts;
-	for (QGraphicsItem *item: selectedItems()) {
+	foreach(QGraphicsItem *item, selectedItems()) {
 		if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(item)) {
 			selected_texts << cti;
 		} else if (ElementTextItem *eti = qgraphicsitem_cast<ElementTextItem *>(item)) {
@@ -1648,7 +1648,7 @@
  */
 QSet<ConductorTextItem *> Diagram::selectedConductorTexts() const {
 	QSet<ConductorTextItem *> selected_texts;
-	for (QGraphicsItem *item: selectedItems()) {
+	foreach(QGraphicsItem *item, selectedItems()) {
 		if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(item)) {
 			selected_texts << cti;
 		}
@@ -1662,7 +1662,7 @@
  */
 QSet<ElementTextItem*> Diagram::selectedElementTexts() const {
 	QSet<ElementTextItem *> selected_texts;
-	for (QGraphicsItem *item: selectedItems()) {
+	foreach(QGraphicsItem *item, selectedItems()) {
 		if (ElementTextItem *cti = qgraphicsitem_cast< ElementTextItem*>(item)) {
 			selected_texts << cti;
 		}
@@ -1750,7 +1750,7 @@
 */
 DiagramContent Diagram::content() const {
 	DiagramContent dc;
-	for (QGraphicsItem *qgi: items()) {
+	foreach(QGraphicsItem *qgi, items()) {
 		if (Element *e = qgraphicsitem_cast<Element *>(qgi)) {
 			dc.elements << e;
 		} else if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(qgi)) {
@@ -1769,7 +1769,7 @@
 	DiagramContent dc;
 	
 	// recupere les elements deplaces
-	for (QGraphicsItem *item: selectedItems()) {
+	foreach (QGraphicsItem *item, selectedItems()) {
 		if (Element *elmt = qgraphicsitem_cast<Element *>(item)) {
 			dc.elements << elmt;
 		} else if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(item)) {
@@ -1790,9 +1790,9 @@
 	}
 	
 	// pour chaque element deplace, determine les conducteurs qui seront modifies
-	for (Element *elmt: dc.elements) {
-		for (Terminal *terminal: elmt -> terminals()) {
-			for (Conductor *conductor: terminal -> conductors()) {
+	foreach(Element *elmt, dc.elements) {
+		foreach(Terminal *terminal, elmt -> terminals()) {
+			foreach(Conductor *conductor, terminal -> conductors()) {
 				Terminal *other_terminal;
 				if (conductor -> terminal1 == terminal) {
 					other_terminal = conductor -> terminal2;
@@ -1818,7 +1818,7 @@
 	et qu'au moins l'un d'entre eux peut etre pivote.
 */
 bool Diagram::canRotateSelection() const {
-	for (QGraphicsItem * qgi: selectedItems()) {
+	foreach(QGraphicsItem * qgi, selectedItems()) {
 		if (qgraphicsitem_cast<IndependentTextItem *>(qgi) ||
 		qgraphicsitem_cast<ConductorTextItem *>(qgi) ||
 		qgraphicsitem_cast<DiagramImageItem *>(qgi) ||

Modified: trunk/sources/diagramcommands.cpp
===================================================================
--- trunk/sources/diagramcommands.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramcommands.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -81,12 +81,12 @@
 {
 	diagram -> showMe();
 
-	for (QGraphicsItem *item: removed_content.items())
+	foreach(QGraphicsItem *item, removed_content.items())
 		diagram->addItem(item);
 
 		//We relink element after every element was added to diagram
-	for (Element *e: removed_content.elements)
-		for (Element *elmt: m_link_hash[e])
+	foreach(Element *e, removed_content.elements)
+		foreach (Element *elmt, m_link_hash[e])
 				e -> linkToElement(elmt);
 }
 
@@ -98,7 +98,7 @@
 {
 	diagram -> showMe();
 
-	for (Conductor *c: removed_content.conductors(DiagramContent::AnyConductor))
+	foreach(Conductor *c, removed_content.conductors(DiagramContent::AnyConductor))
 	{
 			//If option one text per folio is enable, and the text item of
 			//current conductor is visible (that mean the conductor have the single displayed text)
@@ -113,7 +113,7 @@
 		}
 	}
 	
-	for (Element *e: removed_content.elements)
+	foreach(Element *e, removed_content.elements)
 	{
 			//Get linked element, for relink it at undo
 		if (!e->linkedElements().isEmpty())
@@ -120,7 +120,7 @@
 			m_link_hash.insert(e, e->linkedElements());
 	}
 
-	for (QGraphicsItem *item: removed_content.items())
+	foreach(QGraphicsItem *item, removed_content.items())
 		diagram->removeItem(item);
 }
 
@@ -158,7 +158,7 @@
 {
 	diagram -> showMe();
 
-	for (QGraphicsItem *item: content.items(filter))
+	foreach(QGraphicsItem *item, content.items(filter))
 		diagram->removeItem(item);
 }
 
@@ -175,7 +175,7 @@
 		first_redo = false;
 
 			//this is the first paste, we do some actions for the new element
-		for (Element *e: content.elements) {
+		foreach(Element *e, content.elements) {
 				//make new uuid, because old uuid are the uuid of the copied element
 			e -> newUuid();
 
@@ -205,7 +205,7 @@
 				eti -> setPlainText("_");
 			
 				//Reset the text of conductors
-				for (Conductor *c: content.conductorsToMove) {
+				foreach (Conductor *c, content.conductorsToMove) {
 					ConductorProperties cp = c -> properties();
 					cp.text = c->diagram() ? c -> diagram() -> defaultConductorProperties.text : "_";
 					c -> setProperties(cp);
@@ -214,7 +214,7 @@
 }
 	}
 	else {
-		for (QGraphicsItem *item: content.items(filter)) {
+		foreach (QGraphicsItem *item, content.items(filter)) {
 			diagram->item_paste = true;
 			diagram->addItem(item);
 			diagram->item_paste = false;
@@ -221,7 +221,7 @@
 		}
 	}
 
-	for (QGraphicsItem *qgi: content.items())
+	foreach (QGraphicsItem *qgi, content.items())
 		qgi -> setSelected(true);
 }
 
@@ -335,7 +335,7 @@
 	typedef DiagramContent dc;
 
 	//Move every movable item, except conductor
-	for (QGraphicsItem *qgi: content_to_move.items(dc::Elements | dc::TextFields | dc::Images | dc::Shapes)) {
+	foreach (QGraphicsItem *qgi, content_to_move.items(dc::Elements | dc::TextFields | dc::Images | dc::Shapes)) {
 		//If curent item have parent, and parent item is in content_to_move
 		//we don't apply movement to this item, because this item will be moved by is parent.
 		if (qgi->parentItem()) {
@@ -349,12 +349,12 @@
 	}
 	
 	// Move some conductors
-	for (Conductor *conductor: content_to_move.conductorsToMove) {
+	foreach(Conductor *conductor, content_to_move.conductorsToMove) {
 		setupAnimation(conductor, "pos", conductor->pos(), conductor->pos() + actual_movement);
 	}
 	
 	// Recalcul the path of other conductor
-	for (Conductor *conductor: content_to_move.conductorsToUpdate) {
+	foreach(Conductor *conductor, content_to_move.conductorsToUpdate) {
 		setupAnimation(conductor, "animPath", 1, 1);
 	}
 }
@@ -403,7 +403,7 @@
 /// annule le deplacement
 void MoveConductorsTextsCommand::undo() {
 	diagram -> showMe();
-	for (ConductorTextItem *cti: texts_to_move_.keys()) {
+	foreach(ConductorTextItem *cti, texts_to_move_.keys()) {
 		QPointF movement = texts_to_move_[cti].first;
 		bool was_already_moved = texts_to_move_[cti].second;
 		
@@ -420,7 +420,7 @@
 	if (first_redo) {
 		first_redo = false;
 	} else {
-		for (ConductorTextItem *cti: texts_to_move_.keys()) {
+		foreach(ConductorTextItem *cti, texts_to_move_.keys()) {
 			QPointF movement = texts_to_move_[cti].first;
 			
 			cti -> forceMovedByUser(true);
@@ -539,10 +539,10 @@
 /// defait le pivotement
 void RotateElementsCommand::undo() {
 	diagram -> showMe();
-	for (Element *e: elements_to_rotate) {
+	foreach(Element *e, elements_to_rotate) {
 		e -> rotateBy(-applied_rotation_angle_);
 	}
-	for (DiagramTextItem *dti: texts_to_rotate) {
+	foreach(DiagramTextItem *dti, texts_to_rotate) {
 		//ConductorTextItem have a default rotation angle, we apply a specific treatment
 		if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(dti)) {
 			cti -> forceRotateByUser(previous_rotate_by_user_[cti]);
@@ -551,16 +551,16 @@
 		}
 		else {dti -> rotateBy(-applied_rotation_angle_);}
 	}
-	for (DiagramImageItem *dii: images_to_rotate) dii -> rotateBy(-applied_rotation_angle_);
+	foreach(DiagramImageItem *dii, images_to_rotate) dii -> rotateBy(-applied_rotation_angle_);
 }
 
 /// refait le pivotement
 void RotateElementsCommand::redo() {
 	diagram -> showMe();
-	for (Element *e: elements_to_rotate) {
+	foreach(Element *e, elements_to_rotate) {
 		e -> rotateBy(applied_rotation_angle_);
 	}
-	for (DiagramTextItem *dti: texts_to_rotate) {
+	foreach(DiagramTextItem *dti, texts_to_rotate) {
 		//we grab the previous rotation by user of each ConductorTextItem
 		if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(dti)) {
 			previous_rotate_by_user_.insert(cti, cti -> wasRotateByUser());
@@ -568,7 +568,7 @@
 		}
 		dti -> rotateBy(applied_rotation_angle_);
 	}
-	for (DiagramImageItem *dii: images_to_rotate) dii -> rotateBy(applied_rotation_angle_);
+	foreach(DiagramImageItem *dii, images_to_rotate) dii -> rotateBy(applied_rotation_angle_);
 }
 
 /**
@@ -597,7 +597,7 @@
 	applied_rotation_angle_(applied_rotation),
 	diagram(texts.first()->diagram())
 {
-	for (DiagramTextItem *text: texts) {
+	foreach(DiagramTextItem *text, texts) {
 		texts_to_rotate.insert(text, text -> rotationAngle());
 	}
 	defineCommandName();
@@ -614,7 +614,7 @@
 */
 void RotateTextsCommand::undo() {
 	diagram -> showMe();
-	for (DiagramTextItem *text: texts_to_rotate.keys()) {
+	foreach(DiagramTextItem *text, texts_to_rotate.keys()) {
 		if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(text))
 			cti -> forceRotateByUser(previous_rotate_by_user_[cti]);
 		text -> setRotationAngle(texts_to_rotate[text]);
@@ -626,7 +626,7 @@
 */
 void RotateTextsCommand::redo() {
 	diagram -> showMe();
-	for (DiagramTextItem *text: texts_to_rotate.keys()) {
+	foreach(DiagramTextItem *text, texts_to_rotate.keys()) {
 		if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(text)) {
 			//we grab the previous rotation by user of each ConductorTextItem
 			previous_rotate_by_user_.insert(cti, cti -> wasRotateByUser());
@@ -741,7 +741,7 @@
  */
 void ResetConductorCommand::undo() {
 	diagram -> showMe();
-	for (Conductor *c: conductors_profiles.keys()) {
+	foreach(Conductor *c, conductors_profiles.keys()) {
 		c -> setProfiles(conductors_profiles[c]);
 	}
 }
@@ -751,7 +751,7 @@
  */
 void ResetConductorCommand::redo() {
 	diagram -> showMe();
-	for (Conductor *c: conductors_profiles.keys()) {
+	foreach(Conductor *c, conductors_profiles.keys()) {
 		c -> textItem() -> forceMovedByUser  (false);
 		c -> textItem() -> forceRotateByUser (false);
 		c -> setProfiles(ConductorProfilesGroup());

Modified: trunk/sources/diagramcontent.cpp
===================================================================
--- trunk/sources/diagramcontent.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramcontent.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -60,7 +60,7 @@
 	if (filter & ConductorsToUpdate) result += conductorsToUpdate;
 	if (filter & OtherConductors)    result += otherConductors;
 	if (filter & SelectedOnly) {
-		for (Conductor *conductor: result) {
+		foreach(Conductor *conductor, result) {
 			if (!conductor -> isSelected()) result.remove(conductor);
 		}
 	}
@@ -89,19 +89,19 @@
 {
 	int count_ = 0;
 
-	for (Element *elmt: elements) {
+	foreach(Element *elmt, elements) {
 		if (!elmt->isMovable()) {
 			elements.remove(elmt);
 			++count_;
 		}
 	}
-	for (DiagramImageItem *img: images) {
+	foreach(DiagramImageItem *img, images) {
 		if (!img->isMovable()) {
 			images.remove(img);
 			++count_;
 		}
 	}
-	for (QetShapeItem *shape: shapes) {
+	foreach (QetShapeItem *shape, shapes) {
 		if (!shape->isMovable()) {
 			shapes.remove(shape);
 			++count_;
@@ -116,7 +116,7 @@
 */
 QList<QGraphicsItem *> DiagramContent::items(int filter) const {
 	QList<QGraphicsItem *> items_list;
-	for (QGraphicsItem *qgi: conductors(filter)) items_list << qgi;
+	foreach(QGraphicsItem *qgi, conductors(filter)) items_list << qgi;
 
 	if (filter & Elements)          foreach(QGraphicsItem *qgi, elements)           items_list << qgi;
 	if (filter & TextFields)        foreach(QGraphicsItem *qgi, textFields)         items_list << qgi;
@@ -124,7 +124,7 @@
 	if (filter & Shapes)            foreach(QGraphicsItem *qgi, shapes)             items_list << qgi;
 
 	if (filter & SelectedOnly) {
-		for (QGraphicsItem *qgi: items_list) {
+		foreach(QGraphicsItem *qgi, items_list) {
 			if (!qgi -> isSelected()) items_list.removeOne(qgi);
 		}
 	}

Modified: trunk/sources/diagramcontext.cpp
===================================================================
--- trunk/sources/diagramcontext.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramcontext.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -110,7 +110,7 @@
 	named \a tag_name (defaults to "property").
 */
 void DiagramContext::toXml(QDomElement &e, const QString &tag_name) const {
-	for (QString key : keys()) {
+	foreach (QString key, keys()) {
 		QDomElement property = e.ownerDocument().createElement(tag_name);
 		property.setAttribute("name", key);
 		property.setAttribute("show",content_show[key]);
@@ -125,7 +125,7 @@
 	\a tag_name (defaults to "property").
 */
 void DiagramContext::fromXml(const QDomElement &e, const QString &tag_name) {
-	for (QDomElement property : QET::findInDomElement(e, tag_name)) {
+	foreach (QDomElement property, QET::findInDomElement(e, tag_name)) {
 		if (!property.hasAttribute("name")) continue;
 		addValue(property.attribute("name"), QVariant(property.text()));
 		content_show.insert(property.attribute("name"), property.attribute("show", "1").toInt());
@@ -139,7 +139,7 @@
 void DiagramContext::toSettings(QSettings &settings, const QString &array_name) const {
 	settings.beginWriteArray(array_name);
 	int i = 0;
-	for (QString key : content_.keys()) {
+	foreach (QString key, content_.keys()) {
 		settings.setArrayIndex(i);
 		settings.setValue("name", key);
 		settings.setValue("value", content_[key].toString());

Modified: trunk/sources/diagramcontextwidget.cpp
===================================================================
--- trunk/sources/diagramcontextwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramcontextwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -70,7 +70,7 @@
 void DiagramContextWidget::setContext(const DiagramContext &context) {
 	clear();
 	int i = 0;
-	for (QString key: context.keys(DiagramContext::Alphabetical)) {
+	foreach (QString key, context.keys(DiagramContext::Alphabetical)) {
 		table_ -> setItem(i, 0, new QTableWidgetItem(key));
 		table_ -> setItem(i, 1, new QTableWidgetItem(context[key].toString()));
 		++ i;

Modified: trunk/sources/diagramevent/diagrameventaddelement.cpp
===================================================================
--- trunk/sources/diagramevent/diagrameventaddelement.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramevent/diagrameventaddelement.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -59,7 +59,7 @@
 DiagramEventAddElement::~DiagramEventAddElement()
 {
 	if (m_element) delete m_element;
-	for (QGraphicsView *view: m_diagram->views())
+	foreach(QGraphicsView *view, m_diagram->views())
 		view -> setContextMenuPolicy(Qt::DefaultContextMenu);
 }
 
@@ -159,7 +159,7 @@
  */
 void DiagramEventAddElement::init()
 {
-	for (QGraphicsView *view: m_diagram->views())
+	foreach(QGraphicsView *view, m_diagram->views())
 		view->setContextMenuPolicy(Qt::NoContextMenu);
 }
 

Modified: trunk/sources/diagramevent/diagrameventaddimage.cpp
===================================================================
--- trunk/sources/diagramevent/diagrameventaddimage.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramevent/diagrameventaddimage.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -45,7 +45,7 @@
         delete m_image;
     }
 
-    for (QGraphicsView *view: m_diagram->views())
+    foreach (QGraphicsView *view, m_diagram->views())
         view->setContextMenuPolicy((Qt::DefaultContextMenu));
 }
 
@@ -64,7 +64,7 @@
         pos.ry() -= m_image->boundingRect().height()/2;
         m_diagram -> undoStack().push (new AddItemCommand<DiagramImageItem *>(m_image, m_diagram, pos));
 
-        for (QGraphicsView *view: m_diagram->views())
+        foreach (QGraphicsView *view, m_diagram->views())
             view->setContextMenuPolicy((Qt::DefaultContextMenu));
 
         m_running = false;
@@ -95,7 +95,7 @@
 
     if (!m_is_added)
     {
-        for (QGraphicsView *view: m_diagram->views())
+        foreach (QGraphicsView *view, m_diagram->views())
             view->setContextMenuPolicy((Qt::NoContextMenu));
 
         m_diagram -> addItem(m_image);

Modified: trunk/sources/diagramevent/diagrameventaddshape.cpp
===================================================================
--- trunk/sources/diagramevent/diagrameventaddshape.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramevent/diagrameventaddshape.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -49,7 +49,7 @@
 	delete m_help_horiz;
 	delete m_help_verti;
 
-	for (QGraphicsView *v: m_diagram->views())
+	foreach (QGraphicsView *v, m_diagram->views())
 		v->setContextMenuPolicy(Qt::DefaultContextMenu);
 }
 
@@ -191,7 +191,7 @@
 
 void DiagramEventAddShape::init()
 {
-	for (QGraphicsView *v: m_diagram->views())
+	foreach (QGraphicsView *v, m_diagram->views())
 		v->setContextMenuPolicy(Qt::NoContextMenu);
 }
 

Modified: trunk/sources/diagramprintdialog.cpp
===================================================================
--- trunk/sources/diagramprintdialog.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramprintdialog.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -395,11 +395,11 @@
 	
 	// deselectionne tous les elements
 	QList<QGraphicsItem *> selected_elmts = diagram -> selectedItems();
-	for (QGraphicsItem *qgi: selected_elmts) qgi -> setSelected(false);
+	foreach (QGraphicsItem *qgi, selected_elmts) qgi -> setSelected(false);
 	
 	// enleve le flag focusable de tous les elements concernes pour eviter toute reprise de focus par un champ de texte editable
 	QList<QGraphicsItem *> focusable_items;
-	for (QGraphicsItem *qgi: diagram -> items()) {
+	foreach (QGraphicsItem *qgi, diagram -> items()) {
 		if (qgi -> flags() & QGraphicsItem::ItemIsFocusable) {
 			focusable_items << qgi;
 			qgi -> setFlag(QGraphicsItem::ItemIsFocusable, false);
@@ -407,7 +407,7 @@
 	}
 	
 	// evite toute autre forme d'interaction
-	for (QGraphicsView *view: diagram -> views()) {
+	foreach (QGraphicsView *view, diagram -> views()) {
 		view -> setInteractive(false);
 	}
 	
@@ -476,17 +476,17 @@
 	}
 	
 	// remet en place les interactions
-	for (QGraphicsView *view: diagram -> views()) {
+	foreach (QGraphicsView *view, diagram -> views()) {
 		view -> setInteractive(true);
 	}
 	
 	// restaure les flags focusable
-	for (QGraphicsItem *qgi: focusable_items) {
+	foreach (QGraphicsItem *qgi, focusable_items) {
 		qgi -> setFlag(QGraphicsItem::ItemIsFocusable, true);
 	}
 	
 	// restaure les elements selectionnes
-	for (QGraphicsItem *qgi: selected_elmts) qgi -> setSelected(true);
+	foreach (QGraphicsItem *qgi, selected_elmts) qgi -> setSelected(true);
 	
 	saveReloadDiagramParameters(diagram, options, false);
 }

Modified: trunk/sources/diagramschooser.cpp
===================================================================
--- trunk/sources/diagramschooser.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramschooser.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -62,7 +62,7 @@
 */
 QList<Diagram *> DiagramsChooser::selectedDiagrams() const {
 	QList<Diagram *> selected_diagrams;
-	for (Diagram *diagram: project_ -> diagrams()) {
+	foreach(Diagram *diagram, project_ -> diagrams()) {
 		QCheckBox *check_box = diagrams_[diagram];
 		if (check_box && check_box -> isChecked()) {
 			selected_diagrams << diagram;
@@ -76,7 +76,7 @@
 */
 QList<Diagram *> DiagramsChooser::nonSelectedDiagrams() const {
 	QList<Diagram *> selected_diagrams;
-	for (Diagram *diagram: diagrams_.keys()) {
+	foreach(Diagram *diagram, diagrams_.keys()) {
 		if (!(diagrams_[diagram] -> isChecked())) {
 			selected_diagrams << diagram;
 		}
@@ -107,7 +107,7 @@
 	
 	// deselectionne tous les schemas si demande
 	if (reset) {
-		for (QCheckBox *check_box: diagrams_.values()) {
+		foreach(QCheckBox *check_box, diagrams_.values()) {
 			check_box -> setChecked(false);
 		}
 	}
@@ -114,7 +114,7 @@
 	
 	int changes = 0;
 	QCheckBox *check_box;
-	for (Diagram *diagram: diagrams_list) {
+	foreach(Diagram *diagram, diagrams_list) {
 		if ((check_box = diagrams_[diagram])) {
 			if (check_box -> isChecked() != select) {
 				check_box -> setChecked(select);
@@ -136,7 +136,7 @@
 */
 void DiagramsChooser::setSelectedAllDiagrams(bool select) {
 	blockSignals(true);
-	for (QCheckBox *check_box: diagrams_.values()) {
+	foreach(QCheckBox *check_box, diagrams_.values()) {
 		check_box -> setChecked(select);
 	}
 	blockSignals(false);
@@ -159,7 +159,7 @@
 	buildLayout();
 	
 	// recree les checkbox necessaires
-	for (Diagram *diagram: project_ -> diagrams()) {
+	foreach(Diagram *diagram, project_ -> diagrams()) {
 		// titre du schema
 		QString diagram_title = diagram -> title();
         if (diagram_title.isEmpty()) diagram_title = tr("Folio sans titre");

Modified: trunk/sources/diagramview.cpp
===================================================================
--- trunk/sources/diagramview.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/diagramview.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -149,7 +149,7 @@
 	QList<Element *> elements_to_rotate;
 	QList<DiagramTextItem *> texts_to_rotate;
 	QList<DiagramImageItem *> images_to_rotate;
-	for (QGraphicsItem *item: scene -> selectedItems()) {
+	foreach (QGraphicsItem *item, scene -> selectedItems()) {
 		if (Element *e = qgraphicsitem_cast<Element *>(item)) {
 			elements_to_rotate << e;
 		} else if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(item)) {
@@ -176,7 +176,7 @@
 
 	// recupere les champs de texte a orienter
 	QList<DiagramTextItem *> texts_to_rotate;
-	for (QGraphicsItem *item: scene -> selectedItems()) {
+	foreach (QGraphicsItem *item, scene -> selectedItems()) {
 		if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(item)) {
 			texts_to_rotate << cti;
 		} else if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(item)) {
@@ -714,7 +714,7 @@
 void DiagramView::scrollOnMovement(QKeyEvent *e){
 			QList<QGraphicsItem *> selected_elmts = scene->selectedContent().items(255);
 			QRectF viewed_scene = viewedSceneRect();
-			for (QGraphicsItem *qgi: selected_elmts){
+			foreach (QGraphicsItem *qgi, selected_elmts){
 				if (qgraphicsitem_cast<Conductor *>(qgi)) continue;
 				if (qgraphicsitem_cast<QetShapeItem *>(qgi)) continue;
 				qreal x = qgi->pos().x();
@@ -802,7 +802,7 @@
 	peuvent etre copies dans le presse-papier, false sinon
 */
 bool DiagramView::hasCopiableItems() {
-	for (QGraphicsItem *qgi: scene -> selectedItems()) {
+	foreach(QGraphicsItem *qgi, scene -> selectedItems()) {
 		if (
 			qgraphicsitem_cast<Element *>(qgi) ||
 			qgraphicsitem_cast<IndependentTextItem *>(qgi) ||
@@ -819,7 +819,7 @@
 	@return true if there is any Text Item selected
 */
 bool DiagramView::hasTextItems() {
-	for (QGraphicsItem *qgi: scene -> selectedItems()) {
+	foreach(QGraphicsItem *qgi, scene -> selectedItems()) {
 		if (
 			qgraphicsitem_cast<IndependentTextItem *>(qgi) ||
 			qgraphicsitem_cast<ElementTextItem *>(qgi) ||
@@ -837,7 +837,7 @@
 	peuvent etre supprimes, false sinon
 */
 bool DiagramView::hasDeletableItems() {
-	for (QGraphicsItem *qgi: scene -> selectedItems()) {
+	foreach(QGraphicsItem *qgi, scene -> selectedItems()) {
 		if (
 			qgraphicsitem_cast<Element *>(qgi) ||
 			qgraphicsitem_cast<Conductor *>(qgi) ||
@@ -1068,7 +1068,7 @@
 
 	// repere les conducteurs modifies (= profil non nul)
 	QHash<Conductor *, ConductorProfilesGroup> conductors_and_profiles;
-	for (Conductor *conductor: selected_conductors) {
+	foreach(Conductor *conductor, selected_conductors) {
 		ConductorProfilesGroup profile = conductor -> profiles();
 		if (
 			!profile[Qt::TopLeftCorner].isNull() ||\

Modified: trunk/sources/editor/editorcommands.cpp
===================================================================
--- trunk/sources/editor/editorcommands.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/editorcommands.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -89,7 +89,7 @@
 	ElementEditionCommand(QObject::tr("suppression", "undo caption"), scene, 0, parent),
 	deleted_parts(parts)
 {
-	for (QGraphicsItem *qgi: deleted_parts) {
+	foreach(QGraphicsItem *qgi, deleted_parts) {
 		editor_scene_ -> qgiManager().manage(qgi);
 	}
 }
@@ -96,7 +96,7 @@
 
 /// Destructeur : detruit egalement les parties supprimees
 DeletePartsCommand::~DeletePartsCommand() {
-	for (QGraphicsItem *qgi: deleted_parts) {
+	foreach(QGraphicsItem *qgi, deleted_parts) {
 		editor_scene_ -> qgiManager().release(qgi);
 	}
 }
@@ -104,7 +104,7 @@
 /// Restaure les parties supprimees
 void DeletePartsCommand::undo() {
 	editor_scene_ -> blockSignals(true);
-	for (QGraphicsItem *qgi: deleted_parts) {
+	foreach(QGraphicsItem *qgi, deleted_parts) {
 		editor_scene_ -> addItem(qgi);
 	}
 	editor_scene_ -> blockSignals(false);
@@ -113,7 +113,7 @@
 /// Supprime les parties
 void DeletePartsCommand::redo() {
 	editor_scene_ -> blockSignals(true);
-	for (QGraphicsItem *qgi: deleted_parts) {
+	foreach(QGraphicsItem *qgi, deleted_parts) {
 		editor_scene_ -> removeItem(qgi);
 	}
 	editor_scene_ -> blockSignals(false);
@@ -149,7 +149,7 @@
 void PastePartsCommand::undo() {
 	// enleve les parties
 	editor_scene_ -> blockSignals(true);
-	for (QGraphicsItem *part: content_) {
+	foreach(QGraphicsItem *part, content_) {
 		editor_scene_ -> removeItem(part);
 	}
 	editor_scene_ -> blockSignals(false);
@@ -166,7 +166,7 @@
 	else {
 		// pose les parties
 		editor_scene_ -> blockSignals(true);
-		for (QGraphicsItem *part: content_) {
+		foreach(QGraphicsItem *part, content_) {
 			editor_scene_ -> addItem(part);
 		}
 		editor_scene_ -> blockSignals(false);
@@ -240,7 +240,7 @@
 
 /// Annule le deplacement
 void MovePartsCommand::undo() {
-	for (QGraphicsItem *qgi: moved_parts) qgi -> moveBy(-movement.x(), -movement.y());
+	foreach(QGraphicsItem *qgi, moved_parts) qgi -> moveBy(-movement.x(), -movement.y());
 }
 
 /// Refait le deplacement
@@ -250,7 +250,7 @@
 		first_redo = false;
 		return;
 	}
-	for (QGraphicsItem *qgi: moved_parts) qgi -> moveBy(movement.x(), movement.y());
+	foreach(QGraphicsItem *qgi, moved_parts) qgi -> moveBy(movement.x(), movement.y());
 }
 
 /*** AddPartCommand ***/
@@ -353,7 +353,7 @@
 	QList<QGraphicsItem *> items_list = editor_scene_ -> zItems(ElementScene::SortByZValue | ElementScene::SelectedOrNot);
 	
 	// prend un snapshot des zValues
-	for (QGraphicsItem *qgi: items_list) undo_hash.insert(qgi, qgi -> zValue());
+	foreach(QGraphicsItem *qgi, items_list) undo_hash.insert(qgi, qgi -> zValue());
 	
 	// choisit le nom en fonction du traitement
 	if (option == BringForward) {
@@ -377,12 +377,12 @@
 
 /// Annule les changements de zValue
 void ChangeZValueCommand::undo() {
-	for (QGraphicsItem *qgi: undo_hash.keys()) qgi -> setZValue(undo_hash[qgi]);
+	foreach(QGraphicsItem *qgi, undo_hash.keys()) qgi -> setZValue(undo_hash[qgi]);
 }
 
 /// Refait les changements de zValue
 void ChangeZValueCommand::redo() {
-	for (QGraphicsItem *qgi: redo_hash.keys()) qgi -> setZValue(redo_hash[qgi]);
+	foreach(QGraphicsItem *qgi, redo_hash.keys()) qgi -> setZValue(redo_hash[qgi]);
 }
 
 /**
@@ -392,7 +392,7 @@
 void ChangeZValueCommand::applyBringForward(const QList<QGraphicsItem *> &items_list) {
 	QList<QGraphicsItem *> non_selected_items = items_list;
 	QList<QGraphicsItem *> selected_items;
-	for (QGraphicsItem *qgi: non_selected_items) {
+	foreach(QGraphicsItem *qgi, non_selected_items) {
 		if (qgi -> isSelected()) {
 			selected_items << qgi;
 			non_selected_items.removeAt(non_selected_items.indexOf(qgi));
@@ -399,8 +399,8 @@
 		}
 	}
 	int z = 1;
-	for (QGraphicsItem *qgi: non_selected_items) redo_hash.insert(qgi, z ++);
-	for (QGraphicsItem *qgi:     selected_items) redo_hash.insert(qgi, z ++);
+	foreach(QGraphicsItem *qgi, non_selected_items) redo_hash.insert(qgi, z ++);
+	foreach(QGraphicsItem *qgi,     selected_items) redo_hash.insert(qgi, z ++);
 }
 
 /**
@@ -418,7 +418,7 @@
 		}
 	}
 	int z = 1;
-	for (QGraphicsItem *qgi: my_items_list) redo_hash.insert(qgi, z ++);
+	foreach(QGraphicsItem *qgi, my_items_list) redo_hash.insert(qgi, z ++);
 }
 
 /**
@@ -437,7 +437,7 @@
 	}
 	
 	int z = 1;
-	for (QGraphicsItem *qgi: my_items_list) redo_hash.insert(qgi, z ++);
+	foreach(QGraphicsItem *qgi, my_items_list) redo_hash.insert(qgi, z ++);
 }
 
 /**
@@ -447,7 +447,7 @@
 void ChangeZValueCommand::applySendBackward(const QList<QGraphicsItem *> &items_list) {
 	QList<QGraphicsItem *> non_selected_items = items_list;
 	QList<QGraphicsItem *> selected_items;
-	for (QGraphicsItem *qgi: non_selected_items) {
+	foreach(QGraphicsItem *qgi, non_selected_items) {
 		if (qgi -> isSelected()) {
 			selected_items << qgi;
 			non_selected_items.removeAt(non_selected_items.indexOf(qgi));
@@ -454,8 +454,8 @@
 		}
 	}
 	int z = 1;
-	for (QGraphicsItem *qgi:     selected_items) redo_hash.insert(qgi, z ++);
-	for (QGraphicsItem *qgi: non_selected_items) redo_hash.insert(qgi, z ++);
+	foreach(QGraphicsItem *qgi,     selected_items) redo_hash.insert(qgi, z ++);
+	foreach(QGraphicsItem *qgi, non_selected_items) redo_hash.insert(qgi, z ++);
 }
 
 /**
@@ -569,7 +569,7 @@
 	if (before == after) return;
 	if (!before.width() || !before.height()) return; // cowardly flee division by zero FIXME?
 	
-	for (CustomElementPart *part_item: scaled_primitives_) {
+	foreach (CustomElementPart *part_item, scaled_primitives_) {
 		part_item -> startUserTransformation(before);
 		part_item -> handleUserTransformation(before, after);
 	}

Modified: trunk/sources/editor/elementprimitivedecorator.cpp
===================================================================
--- trunk/sources/editor/elementprimitivedecorator.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/elementprimitivedecorator.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -58,7 +58,7 @@
 		}
 	}
 	QRectF rect = decorated_items_.first() -> sceneGeometricRect();
-	for (CustomElementPart *item: decorated_items_) {
+	foreach (CustomElementPart *item, decorated_items_) {
 		rect = rect.united(item -> sceneGeometricRect());
 	}
 	return(rect);
@@ -146,7 +146,7 @@
 */
 void ElementPrimitiveDecorator::setItems(const QList<QGraphicsItem *> &items) {
 	QList<CustomElementPart *> primitives;
-	for (QGraphicsItem *item: items) {
+	foreach (QGraphicsItem *item, items) {
 		if (CustomElementPart *part_item = dynamic_cast<CustomElementPart *>(item)) {
 			primitives << part_item;
 		}
@@ -166,7 +166,7 @@
 */
 QList<QGraphicsItem *> ElementPrimitiveDecorator::graphicsItems() const {
 	QList<QGraphicsItem *> list;
-	for (CustomElementPart *part_item: decorated_items_) {
+	foreach (CustomElementPart *part_item, decorated_items_) {
 		if (QGraphicsItem *item = dynamic_cast<QGraphicsItem *>(part_item)) {
 			list << item;
 		}
@@ -410,7 +410,7 @@
 		} else {
 			keys_movement_ += movement;
 		}
-		for (QGraphicsItem *qgi: graphicsItems()) {
+		foreach(QGraphicsItem *qgi, graphicsItems()) {
 			qgi -> setPos(qgi -> pos() + movement);
 			adjust();
 		}
@@ -469,7 +469,7 @@
 void ElementPrimitiveDecorator::startMovement() {
 	adjust();
 	
-	for (CustomElementPart *item: decorated_items_) {
+	foreach(CustomElementPart *item, decorated_items_) {
 		item -> startUserTransformation(mapToScene(original_bounding_rect_).boundingRect());
 	}
 }
@@ -533,7 +533,7 @@
 void ElementPrimitiveDecorator::translateItems(const QPointF &movement) {
 	if (!decorated_items_.count()) return;
 	
-	for (QGraphicsItem *qgi: graphicsItems()) {
+	foreach(QGraphicsItem *qgi, graphicsItems()) {
 		// this is a naive, proof-of-concept implementation; we actually need to take
 		// the grid into account and create a command object in mouseReleaseEvent()
 		qgi -> moveBy(movement.x(), movement.y());
@@ -553,7 +553,7 @@
 	QRectF scene_original_rect = mapToScene(original_rect).boundingRect();
 	QRectF scene_new_rect = mapToScene(new_rect).boundingRect();
 	
-	for (CustomElementPart *item: decorated_items_) {
+	foreach(CustomElementPart *item, decorated_items_) {
 		item -> handleUserTransformation(scene_original_rect, scene_new_rect);
 	}
 }

Modified: trunk/sources/editor/elementscene.cpp
===================================================================
--- trunk/sources/editor/elementscene.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/elementscene.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -332,7 +332,7 @@
 	QDomElement description = xml_document.createElement("description");
 
 		//the graphic description of the element
-	for (QGraphicsItem *qgi: zItems())
+	foreach(QGraphicsItem *qgi, zItems())
 	{
 			//If the export concerns only the selection, the not selected part is ignored
 		if (!all_parts && !qgi -> isSelected()) continue;
@@ -416,7 +416,7 @@
 */
 QRectF ElementScene::elementSceneGeometricRect() const{
 	QRectF esgr;
-	for (QGraphicsItem *qgi: items()) {
+	foreach (QGraphicsItem *qgi, items()) {
 		if (qgi -> type() == ElementPrimitiveDecorator::Type) continue;
 		if (qgi -> type() == QGraphicsRectItem::Type) continue;
 		if (qgi -> type() == PartTextField::Type) continue;
@@ -432,7 +432,7 @@
 	aucune.
 */
 bool ElementScene::containsTerminals() const {
-	for (QGraphicsItem *qgi:items()) {
+	foreach(QGraphicsItem *qgi,items()) {
 		if (qgraphicsitem_cast<PartTerminal *>(qgi)) {
 			return(true);
 		}
@@ -515,7 +515,7 @@
 void ElementScene::slot_select(const ElementContent &content) {
 	blockSignals(true);
 	clearSelection();
-	for (QGraphicsItem *qgi: content) qgi -> setSelected(true);
+	foreach(QGraphicsItem *qgi, content) qgi -> setSelected(true);
 	blockSignals(false);
 	emit(selectionChanged());
 }
@@ -539,7 +539,7 @@
 */
 void ElementScene::slot_invertSelection() {
 	blockSignals(true);
-	for (QGraphicsItem *qgi: items()) qgi -> setSelected(!qgi -> isSelected());
+	foreach(QGraphicsItem *qgi, items()) qgi -> setSelected(!qgi -> isSelected());
 	blockSignals(false);
 	emit(selectionChanged());
 }
@@ -698,7 +698,7 @@
 */
 QList<CustomElementPart *> ElementScene::primitives() const {
 	QList<CustomElementPart *> primitives_list;
-	for (QGraphicsItem *item: items()) {
+	foreach (QGraphicsItem *item, items()) {
 		if (CustomElementPart *primitive = dynamic_cast<CustomElementPart *>(item)) {
 			primitives_list << primitive;
 		}
@@ -768,7 +768,7 @@
 */
 ElementContent ElementScene::selectedContent() const {
 	ElementContent content;
-	for (QGraphicsItem *qgi: zItems()) {
+	foreach(QGraphicsItem *qgi, zItems()) {
 		if (qgi -> isSelected()) content << qgi;
 	}
 	return(content);
@@ -796,7 +796,7 @@
 	clearSelection();
 	undoStack().clear();
 
-	for (QGraphicsItem *qgi: items())
+	foreach (QGraphicsItem *qgi, items())
 	{
 		removeItem(qgi);
 		qgiManager().release(qgi);
@@ -813,7 +813,7 @@
 */
 QRectF ElementScene::elementContentBoundingRect(const ElementContent &content) const {
 	QRectF bounding_rect;
-	for (QGraphicsItem *qgi: content) {
+	foreach(QGraphicsItem *qgi, content) {
 		// skip non-primitives QGraphicsItems (paste area, selection decorator)
 		if (qgi -> type() == ElementPrimitiveDecorator::Type) continue;
 		if (qgi -> type() == QGraphicsRectItem::Type) continue;
@@ -924,7 +924,7 @@
 */
 ElementContent ElementScene::addContent(const ElementContent &content, QString *error_message) {
 	Q_UNUSED(error_message);
-	for (QGraphicsItem *part: content) {
+	foreach(QGraphicsItem *part, content) {
 		addPrimitive(part);
 	}
 	return(content);
@@ -947,7 +947,7 @@
 	QPointF offset = pos - bounding_rect.topLeft();
 	
 	// ajoute les parties avec le decalage adequat
-	for (QGraphicsItem *part: content) {
+	foreach(QGraphicsItem *part, content) {
 		part -> setPos(part -> pos() + offset);
 		addPrimitive(part);
 	}
@@ -1018,7 +1018,7 @@
 	if (center_y < 0) move_y -= 10;
 
 		//move each primitive by @move
-		for (QGraphicsItem *qgi: items()) {
+		foreach (QGraphicsItem *qgi, items()) {
 			if (qgi -> type() == ElementPrimitiveDecorator::Type) continue;
 			if (qgi -> type() == QGraphicsRectItem::Type) continue;
 			//deselect item for disable decorator
@@ -1075,7 +1075,7 @@
 	}
 	
 	if (!command -> elementView()) {
-		for (QGraphicsView *view: views()) {
+		foreach (QGraphicsView *view, views()) {
 			if (ElementView *element_view = dynamic_cast<ElementView *>(view)) {
 				command -> setElementView(element_view);
 				break;

Modified: trunk/sources/editor/graphicspart/customelementgraphicpart.cpp
===================================================================
--- trunk/sources/editor/graphicspart/customelementgraphicpart.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/graphicspart/customelementgraphicpart.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -219,7 +219,7 @@
 	
 		//Check each pair of style
 	QRegExp rx("^\\s*([a-z-]+)\\s*:\\s*([a-z-]+)\\s*$");
-	for (QString style: styles)
+	foreach (QString style, styles)
 	{
 		if (!rx.exactMatch(style)) continue;
 		QString style_name = rx.cap(1);

Modified: trunk/sources/editor/graphicspart/customelementpart.cpp
===================================================================
--- trunk/sources/editor/graphicspart/customelementpart.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/graphicspart/customelementpart.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -129,7 +129,7 @@
 	qreal new_top_left_x = new_selection_rect.x();
 	qreal new_top_left_y = new_selection_rect.y();
 	
-	for (QPointF point: points) {
+	foreach (QPointF point, points) {
 		QPointF point_offset = point - initial_top_left;
 		new_points << QPointF(
 			new_top_left_x + (point_offset.rx() * sx),

Modified: trunk/sources/editor/graphicspart/partarc.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partarc.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/graphicspart/partarc.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -133,7 +133,7 @@
 {
 	QRectF r = AbstractPartEllipse::boundingRect();
 
-	for (QRectF rect: m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
+	foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
 		r |= rect;
 
 	return r;
@@ -154,7 +154,7 @@
 	shape = pps.createStroke(shape);
 
 	if (isSelected())
-		for (QRectF rect: m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
+		foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
 			shape.addRect(rect);
 
 	return shape;

Modified: trunk/sources/editor/graphicspart/partellipse.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partellipse.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/graphicspart/partellipse.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -129,7 +129,7 @@
 {
 	QRectF r = AbstractPartEllipse::boundingRect();
 
-	for (QRectF rect: m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
+	foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
 		r |= rect;
 
 	return r;
@@ -149,7 +149,7 @@
 	shape = pps.createStroke(shape);
 
 	if (isSelected())
-		for (QRectF rect: m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
+		foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
 			shape.addRect(rect);
 
 	return shape;

Modified: trunk/sources/editor/graphicspart/partline.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partline.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/graphicspart/partline.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -244,7 +244,7 @@
 	shape = pps.createStroke(shape);
 
 	if (isSelected())
-		for (QRectF rect: m_handler.handlerRect(m_handler.pointsForLine(m_line)))
+		foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForLine(m_line)))
 			shape.addRect(rect);
 
 	return shape;
@@ -373,10 +373,10 @@
 	
 	painter -> setPen(Qt::red);
 
-	for (QPointF pointy: fourEndPoints(m_line.p1(), m_line.p2(), first_length))
+	foreach(QPointF pointy, fourEndPoints(m_line.p1(), m_line.p2(), first_length))
 		painter -> drawEllipse(pointy, 0.1, 0.1);
 
-	for (QPointF pointy: fourEndPoints(m_line.p2(), m_line.p1(), second_length))
+	foreach(QPointF pointy, fourEndPoints(m_line.p2(), m_line.p1(), second_length))
 		painter -> drawEllipse(pointy, 0.1, 0.1);
 	
 	painter -> restore();
@@ -402,7 +402,7 @@
 	bound = bound.normalized();
 	bound.adjust(-adjust, -adjust, adjust, adjust);
 
-	for (QRectF rect: m_handler.handlerRect(m_handler.pointsForLine(m_line)))
+	foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForLine(m_line)))
 		bound |= rect;
 
 	return bound;

Modified: trunk/sources/editor/graphicspart/partpolygon.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partpolygon.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/graphicspart/partpolygon.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -109,7 +109,7 @@
 {
 	QDomElement xml_element = xml_document.createElement("polygon");
 	int i = 1;
-	for (QPointF point: m_polygon) {
+	foreach(QPointF point, m_polygon) {
 		point = mapToScene(point);
 		xml_element.setAttribute(QString("x%1").arg(i), QString("%1").arg(point.x()));
 		xml_element.setAttribute(QString("y%1").arg(i), QString("%1").arg(point.y()));
@@ -344,7 +344,7 @@
 	shape = pps.createStroke(shape);
 
 	if (isSelected())
-		for (QRectF rect: m_handler.handlerRect(m_polygon))
+		foreach(QRectF rect, m_handler.handlerRect(m_polygon))
 			shape.addRect(rect);
 
 	return shape;
@@ -379,7 +379,7 @@
 
 	r.adjust(-adjust, -adjust, adjust, adjust);
 
-	for (QRectF rect: m_handler.handlerRect(m_polygon))
+	foreach(QRectF rect, m_handler.handlerRect(m_polygon))
 		r |=rect;
 
 	return(r);

Modified: trunk/sources/editor/graphicspart/partrectangle.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partrectangle.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/graphicspart/partrectangle.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -165,7 +165,7 @@
 	shape = pps.createStroke(shape);
 
 	if (isSelected())
-		for (QRectF rect: m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
+		foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
 			shape.addRect(rect);
 
 	return shape;
@@ -196,7 +196,7 @@
 	QRectF r = m_rect.normalized();
 	r.adjust(-adjust, -adjust, adjust, adjust);
 
-	for (QRectF rect: m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
+	foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
 		r |= rect;
 
 	return(r);

Modified: trunk/sources/editor/polygoneditor.cpp
===================================================================
--- trunk/sources/editor/polygoneditor.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/polygoneditor.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -101,7 +101,7 @@
 	if (!part) return;
 	activeConnections(false);
 	while(points_list.takeTopLevelItem(0)) {}
-	for (QPointF point: part -> polygon()) {
+	foreach(QPointF point, part -> polygon()) {
 		point = part -> mapToScene(point);
 		QStringList qsl;
 		qsl << QString("%1").arg(point.x()) << QString("%1").arg(point.y());

Modified: trunk/sources/editor/qetelementeditor.cpp
===================================================================
--- trunk/sources/editor/qetelementeditor.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/qetelementeditor.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -276,7 +276,7 @@
 	QAction *add_terminal  = new QAction(QET::Icons::Terminal,      tr("Ajouter une borne"),         parts);
 	QAction *add_textfield = new QAction(QET::Icons::PartTextField, tr("Ajouter un champ de texte"), parts);
 
-	for (QAction *action: parts -> actions()) action -> setCheckable(true);
+	foreach (QAction *action, parts -> actions()) action -> setCheckable(true);
 
 	connect(add_line,      SIGNAL(triggered()), this, SLOT(addLine()      ));
 	connect(add_rectangle, SIGNAL(triggered()), this, SLOT(addRect()      ));
@@ -433,7 +433,7 @@
 	bool clipboard_elmt = !read_only && ElementScene::clipboardMayContainElement();
 	
 	// actions dependant seulement de l'etat "lecture seule" de l'editeur
-	for (QAction *action: parts -> actions()) {
+	foreach (QAction *action, parts -> actions()) {
 		action -> setEnabled(!read_only);
 	}
 	selectall       -> setEnabled(!read_only);
@@ -447,7 +447,7 @@
 	cut             -> setEnabled(selected_items);
 	copy            -> setEnabled(selected_items);
 	edit_delete     -> setEnabled(selected_items);
-	for (QAction *action: m_depth_ag -> actions())
+	foreach (QAction *action, m_depth_ag -> actions())
 		action->setEnabled(selected_items);
 	
 	// actions dependant du contenu du presse-papiers
@@ -579,7 +579,7 @@
 	if (selected_qgis.size() >= 2)
 	{
 		style_editable = true;
-		for (QGraphicsItem *qgi: selected_qgis)
+		foreach (QGraphicsItem *qgi, selected_qgis)
 		{
 			if (CustomElementPart *cep = dynamic_cast<CustomElementPart *>(qgi))
 				cep_list << cep;
@@ -689,7 +689,7 @@
 
 	{
 		bool wrng = true;
-		for (CustomElementPart *cep: ce_scene->primitives())
+		foreach (CustomElementPart *cep, ce_scene->primitives())
 			if (cep->property("tagg").toString() == "label") wrng = false;
 
 			///Error #1: element is master, slave or simple but havent got input tagged 'label'
@@ -708,7 +708,7 @@
 	{
 		int text =0, terminal =0;
 
-		for (QGraphicsItem *qgi: ce_scene->items())
+		foreach(QGraphicsItem *qgi, ce_scene->items())
 		{
 			if		(qgraphicsitem_cast<PartTerminal *>(qgi))  terminal ++;
 			else if (qgraphicsitem_cast<PartTextField *>(qgi)) text ++;
@@ -744,7 +744,7 @@
 
 	dialog_message += "<ol>";
 	QList<QETWarning> total = warnings << errors;
-	for (QETWarning warning: total) {
+	foreach(QETWarning warning, total) {
 		dialog_message += "<li>";
 		dialog_message += QString(
 			tr("<b>%1</b> : %2", "warning title: warning description")
@@ -990,7 +990,7 @@
  * Uncheck all action related to primitive
  */
 void QETElementEditor::UncheckAddPrimitive() {
-	for (QAction *action: parts->actions()) action -> setChecked(false);
+	foreach(QAction *action, parts->actions()) action -> setChecked(false);
 }
 
 /**

Modified: trunk/sources/editor/styleeditor.cpp
===================================================================
--- trunk/sources/editor/styleeditor.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/editor/styleeditor.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -177,7 +177,7 @@
 		size_weight   -> setCurrentIndex(first_part -> lineWeight());
 		filling_color -> setCurrentIndex(first_part -> filling());
 
-		for (CustomElementGraphicPart *cegp: m_part_list)
+		foreach (CustomElementGraphicPart *cegp, m_part_list)
 		{
 			if (first_part -> antialiased() != cegp -> antialiased()) antialiasing -> setChecked(false);
 			if (first_part -> color()       != cegp -> color())      outline_color -> setCurrentIndex(-1);
@@ -236,7 +236,7 @@
 
 	if (!isStyleEditable(part_list)) return false;
 
-	for (CustomElementPart *cep: part_list)
+	foreach (CustomElementPart *cep, part_list)
 	{
 		if (CustomElementGraphicPart *cegp = dynamic_cast<CustomElementGraphicPart *>(cep))
 			m_part_list << cegp;
@@ -244,7 +244,7 @@
 			return false;
 	}
 
-	for (CustomElementGraphicPart *cegp: m_part_list)
+	foreach (CustomElementGraphicPart *cegp, m_part_list)
 		m_cep_list << cegp;
 
 	updateForm();
@@ -268,7 +268,7 @@
 	QStringList str;
 	str << "arc" << "ellipse" << "line" << "polygon" << "rect";
 
-	for (CustomElementPart *cep: cep_list)
+	foreach (CustomElementPart *cep, cep_list)
 		if (!str.contains(cep -> xmlName()))
 			return false;
 
@@ -307,7 +307,7 @@
 	}
 	else if (!m_part_list.isEmpty())
 	{
-		for (CustomElementGraphicPart *cegp: m_part_list)
+		foreach (CustomElementGraphicPart *cegp, m_part_list)
 		{
 			if (!undo)
 			{

Modified: trunk/sources/elementdialog.cpp
===================================================================
--- trunk/sources/elementdialog.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/elementdialog.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -89,7 +89,7 @@
 	m_model = new ElementsCollectionModel(m_tree_view);
 
 	QList <QETProject *> prjs;
-	for (QETProject *prj: QETApp::registeredProjects())
+	foreach(QETProject *prj, QETApp::registeredProjects())
 			prjs.append(prj);
 
 	if (m_mode == OpenElement)

Modified: trunk/sources/elementprovider.cpp
===================================================================
--- trunk/sources/elementprovider.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/elementprovider.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -52,11 +52,11 @@
 	QList <Element *> free_elmt;
 
 	//serch in all diagram
-	for (Diagram *d: diag_list) {
+	foreach (Diagram *d, diag_list) {
 		//get all element in diagram d
 		QList <Element *> elmt_list;
 		elmt_list = d->elements();
-		for (Element *elmt: elmt_list) {
+		foreach (Element *elmt, elmt_list) {
 			if (filter & elmt->linkType())
 				if (elmt->isFree()) free_elmt << elmt;
 		}
@@ -72,8 +72,8 @@
 QList <Element *> ElementProvider::fromUuids(QList<QUuid> uuid_list) const {
 	QList <Element *> found_element;
 
-	for (Diagram *d: diag_list) {
-		for (Element *elmt: d->elements()) {
+	foreach (Diagram *d, diag_list) {
+		foreach(Element *elmt, d->elements()) {
 			if (uuid_list.contains(elmt->uuid())) {
 				found_element << elmt;
 				uuid_list.removeAll(elmt->uuid());
@@ -94,11 +94,11 @@
 	QList <Element *> elmt_;
 
 	//serch in all diagram
-	for (Diagram *d: diag_list) {
+	foreach (Diagram *d, diag_list) {
 		//get all element in diagram d
 		QList <Element *> elmt_list;
 		elmt_list = d->elements();
-		for (Element *elmt: elmt_list) {
+		foreach (Element *elmt, elmt_list) {
 			if (filter & elmt->linkType())
 				elmt_ << elmt;
 		}

Modified: trunk/sources/elementsmover.cpp
===================================================================
--- trunk/sources/elementsmover.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/elementsmover.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -99,18 +99,18 @@
 
 	//Move every movable item, except conductor
 	typedef DiagramContent dc;
-	for (QGraphicsItem *qgi: moved_content_.items(dc::Elements | dc::TextFields | dc::Images | dc::Shapes)) {
+	foreach (QGraphicsItem *qgi, moved_content_.items(dc::Elements | dc::TextFields | dc::Images | dc::Shapes)) {
 		if (qgi == movement_driver_) continue;
 		qgi -> setPos(qgi->pos() + movement);
 	}
 	
 	// Move some conductors
-	for (Conductor *conductor: moved_content_.conductorsToMove) {
+	foreach(Conductor *conductor, moved_content_.conductorsToMove) {
 		conductor -> setPos(conductor -> pos() + movement);
 	}
 	
 	// Recalcul the path of other conductors
-	for (Conductor *conductor: moved_content_.conductorsToUpdate) {
+	foreach(Conductor *conductor, moved_content_.conductorsToUpdate) {
 		conductor -> updatePath();
 	}
 }
@@ -168,7 +168,7 @@
 			{
 				use_properties = true;
 				others_properties = (*conductors_list.begin())->properties();
-				for (Conductor *cond: conductors_list)
+				foreach (Conductor *cond, conductors_list)
 					if (cond->properties() != others_properties)
 						use_properties = false;
 			}

Modified: trunk/sources/elementspanel.cpp
===================================================================
--- trunk/sources/elementspanel.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/elementspanel.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -238,7 +238,7 @@
 	if (first_reload_) custom_tbt_collection_item_ -> setExpanded(true);
 	
 	// add projects
-	for (QETProject *project: projects_to_display_.values()) {
+	foreach(QETProject *project, projects_to_display_.values()) {
 		addProject(project);
 	}
 	
@@ -321,7 +321,7 @@
 	const int expanded_role = 42; // magic number? So you consider Douglas Adams wrote about magic?
 	
 	if (filtering == QET::BeginFilter) {
-		for (QTreeWidgetItem *item: items) {
+		foreach (QTreeWidgetItem *item, items) {
 			item -> setData(0, expanded_role, item -> isExpanded());
 		}
 	}
@@ -334,7 +334,7 @@
 		QTreeWidgetItem *current_item = currentItem();
 		
 		// restore the tree as it was before the filtering
-		for (QTreeWidgetItem *qtwi: items) {
+		foreach (QTreeWidgetItem *qtwi, items) {
 			qtwi -> setHidden(false);
 			qtwi -> setExpanded(qtwi -> data(0, expanded_role).toBool());
 		}
@@ -377,7 +377,7 @@
 	filter_list_ = filter_.split( '+' );
 	/*
 	qDebug() << "*******************";
-	for ( QString filter , filter_list_ )	{
+	foreach( QString filter , filter_list_ )	{
 		filter = filter.trimmed();
 		qDebug() << filter;
 	}
@@ -392,10 +392,10 @@
 	buildFilterList();
 	QList<QTreeWidgetItem *> matching_items;
 
-	for (QTreeWidgetItem *item: items) {
+	foreach (QTreeWidgetItem *item, items) {
 		bool item_matches = true;
 
-		for ( QString filter : filter_list_ )	{
+		foreach( QString filter , filter_list_ )	{
 			filter = filter.trimmed();
 			if ( !filter.isEmpty() )	{
 				item_matches &= matchesFilter(item, filter);
@@ -414,7 +414,7 @@
 void ElementsPanel::ensureHierarchyIsVisible(const QList<QTreeWidgetItem *> &items) {
 	// remonte l'arborescence pour lister les categories contenant les elements filtres
 	QSet<QTreeWidgetItem *> parent_items;
-	for (QTreeWidgetItem *item: items) {
+	foreach(QTreeWidgetItem *item, items) {
 		for (QTreeWidgetItem *parent_qtwi = item -> parent() ; parent_qtwi ; parent_qtwi = parent_qtwi -> parent()) {
 			parent_items << parent_qtwi;
 		}
@@ -421,12 +421,12 @@
 	}
 	
 	// etend les parents
-	for (QTreeWidgetItem *parent_qtwi: parent_items) {
+	foreach(QTreeWidgetItem *parent_qtwi, parent_items) {
 		if (!parent_qtwi -> isExpanded()) parent_qtwi -> setExpanded(true);
 	}
 	
 	// affiche les parents
-	for (QTreeWidgetItem *parent_qtwi: parent_items) {
+	foreach(QTreeWidgetItem *parent_qtwi, parent_items) {
 		if (parent_qtwi -> isHidden()) parent_qtwi -> setHidden(false);
 	}
 }

Modified: trunk/sources/elementtextsmover.cpp
===================================================================
--- trunk/sources/elementtextsmover.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/elementtextsmover.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -53,7 +53,7 @@
 	movement_driver_ = driver_item;
 	m_texts_item_H.clear();
 
-	for (QGraphicsItem *item: diagram -> selectedItems())
+	foreach(QGraphicsItem *item, diagram -> selectedItems())
 	{
 		if (item->type() == ElementTextItem::Type)
 		{
@@ -79,7 +79,7 @@
 {
 	if (!movement_running_ || movement.isNull()) return;
 	
-	for (ElementTextItem *text_item: m_texts_item_H.keys())
+	foreach(ElementTextItem *text_item, m_texts_item_H.keys())
 	{
 		if (text_item == movement_driver_) continue;
 		QPointF applied_movement = text_item -> mapMovementToParent(text_item-> mapMovementFromScene(movement));
@@ -101,7 +101,7 @@
 	
 	QPropertyUndoCommand *undo = nullptr;
 
-	for (ElementTextItem *eti: m_texts_item_H.keys())
+	foreach (ElementTextItem *eti, m_texts_item_H.keys())
 	{
 		if (undo)
 		{

Modified: trunk/sources/exportdialog.cpp
===================================================================
--- trunk/sources/exportdialog.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/exportdialog.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -110,7 +110,7 @@
 */
 int ExportDialog::diagramsToExportCount() const {
 	int checked_diagrams_count = 0;
-	for (ExportDiagramLine *diagram_line: diagram_lines_.values()) {
+	foreach(ExportDiagramLine *diagram_line, diagram_lines_.values()) {
 		if (diagram_line -> must_export -> isChecked()) ++ checked_diagrams_count;
 	}
 	return(checked_diagrams_count);
@@ -143,7 +143,7 @@
 	diagrams_list_layout_ -> addWidget(new QLabel(tr("Dimensions")),       line_count, 3, Qt::AlignHCenter | Qt::AlignVCenter);
 	
 	// remplit la liste
-	for (Diagram *diagram: project_ -> diagrams()) {
+	foreach (Diagram *diagram, project_ -> diagrams()) {
 		++ line_count;
 		ExportDiagramLine *diagram_line = new ExportDiagramLine(diagram, diagramSize(diagram));
 		diagram_lines_.insert(line_count, diagram_line);
@@ -184,13 +184,13 @@
 }
 
 void ExportDialog::slot_selectAllClicked() {
-	for (ExportDiagramLine *diagramLine: diagram_lines_) {
+	foreach (ExportDiagramLine *diagramLine, diagram_lines_) {
 		diagramLine -> must_export -> setChecked(true);
 	}
 }
 
 void ExportDialog::slot_deSelectAllClicked() {
-	for (ExportDiagramLine *diagramLine: diagram_lines_) {
+	foreach (ExportDiagramLine *diagramLine, diagram_lines_) {
 		diagramLine -> must_export -> setChecked(false);
 	}
 }
@@ -465,7 +465,7 @@
 
 	} else {
 		// Determine les elements a "XMLiser"
-		for (QGraphicsItem *qgi: diagram -> items()) {
+		foreach(QGraphicsItem *qgi, diagram -> items()) {
 			if (Element *elmt = qgraphicsitem_cast<Element *>(qgi)) {
 				list_elements << elmt;
 			} else if (Conductor *f = qgraphicsitem_cast<Conductor *>(qgi)) {
@@ -480,10 +480,10 @@
 		}
 	}
 
-	for (QetShapeItem *qsi: list_shapes) qsi->toDXF(file_path);
+	foreach (QetShapeItem *qsi, list_shapes) qsi->toDXF(file_path);
 
 	//Draw elements
-	for (Element *elmt: list_elements) {
+	foreach(Element *elmt, list_elements) {
 
 		double rotation_angle = elmt -> orientation() * 90;
 
@@ -494,7 +494,7 @@
 		qreal hotspot_y = Createdxf::sheetHeight - (elem_pos_y) * Createdxf::yScale;
 
 		QList<ElementTextItem *> elmt_text = elmt -> texts();
-		for (ElementTextItem *dti: elmt_text) {
+		foreach(ElementTextItem *dti, elmt_text) {
 			qreal fontSize = dti -> font().pointSizeF();
 			if (fontSize < 0)
 				fontSize = dti -> font().pixelSize();
@@ -508,7 +508,7 @@
 			y = transformed_point.y();
 			QStringList lines = dti -> toPlainText().split('\n');
 			y += (fontSize/2) * (lines.count()-1);
-			for (QString line: lines) {
+			foreach (QString line, lines) {
 				qreal angle = 360 - (dti -> rotationAngle() + rotation_angle);
 				if (line.size() > 0 && line != "_" )
 					Createdxf::drawText(file_path, line, x, y, fontSize, angle, 0);
@@ -528,7 +528,7 @@
 		}
 
 		QList<QLineF *> elmt_line = elmt -> lines();
-		for (QLineF *line: elmt_line) {
+		foreach(QLineF *line, elmt_line) {
 			qreal x1 = (elem_pos_x + line -> p1().x()) * Createdxf::xScale;
 			qreal y1 = Createdxf::sheetHeight - (elem_pos_y + line -> p1().y()) * Createdxf::yScale;
 			QPointF transformed_point = rotation_transformed(x1, y1, hotspot_x, hotspot_y, rotation_angle);
@@ -543,7 +543,7 @@
 		}
 
 		QList<QRectF *> elmt_rectangle = elmt -> rectangles();
-		for (QRectF *rect: elmt_rectangle) {
+		foreach(QRectF *rect, elmt_rectangle) {
 			qreal x1 = (elem_pos_x + rect -> bottomLeft().x()) * Createdxf::xScale;
 			qreal y1 = Createdxf::sheetHeight - (elem_pos_y + rect -> bottomLeft().y()) * Createdxf::yScale;
 			qreal w = rect -> width() * Createdxf::xScale;
@@ -565,7 +565,7 @@
 		}
 
 		QList<QRectF *> elmt_circle = elmt -> circles();
-		for (QRectF *circle_rect: elmt_circle) {
+		foreach(QRectF *circle_rect, elmt_circle) {
 			qreal x1 = (elem_pos_x + circle_rect ->center().x()) * Createdxf::xScale;
 			qreal y1 = Createdxf::sheetHeight - (elem_pos_y + circle_rect -> center().y()) * Createdxf::yScale;
 			qreal r = circle_rect -> width() * Createdxf::xScale / 2;
@@ -576,7 +576,7 @@
 		}
 
 		QList<QVector<QPointF> *> elmt_polygon = elmt -> polygons();
-		for (QVector<QPointF> *polygon: elmt_polygon) {
+		foreach(QVector<QPointF> *polygon, elmt_polygon) {
 			if (polygon -> size() == 0)
 				continue;
 			qreal x1 = (elem_pos_x + polygon -> at(0).x()) * Createdxf::xScale;
@@ -598,7 +598,7 @@
 
 		// Draw arcs and ellipses
 		QList<QVector<qreal> *> elmt_arc = elmt -> arcs();
-		for (QVector<qreal> *arc: elmt_arc) {
+		foreach(QVector<qreal> *arc, elmt_arc) {
 			if (arc -> size() == 0)
 				continue;
 			qreal x = (elem_pos_x + arc -> at(0)) * Createdxf::xScale;
@@ -612,8 +612,8 @@
 	}
 
 	//Draw conductors
-	for (Conductor *cond: list_conductors) {
-		for (ConductorSegment *segment: cond -> segmentsList()) {
+	foreach(Conductor *cond, list_conductors) {
+		foreach(ConductorSegment *segment, cond -> segmentsList()) {
 			qreal x1 = (segment -> firstPoint().x()) * Createdxf::xScale;
 			qreal y1 = Createdxf::sheetHeight - (segment -> firstPoint().y() * Createdxf::yScale);
 			qreal x2 = (segment -> secondPoint().x()) * Createdxf::xScale;
@@ -630,7 +630,7 @@
 			qreal x = (textItem -> pos().x()) * Createdxf::xScale;
 			qreal y = Createdxf::sheetHeight - (textItem -> pos().y() * Createdxf::yScale) - fontSize;
 			QStringList lines = textItem->toPlainText().split('\n');
-			for (QString line: lines) {
+			foreach (QString line, lines) {
 				qreal angle = 360 - (textItem -> rotationAngle());
 				if (line.size() > 0 && line != "_" )
 					Createdxf::drawText(file_path, line, x, y, fontSize, angle, 0 );
@@ -651,7 +651,7 @@
 	}
 
 	//Draw text items
-	for (DiagramTextItem *dti: list_texts) {
+	foreach(DiagramTextItem *dti, list_texts) {
 		qreal fontSize = dti -> font().pointSizeF();
 		if (fontSize < 0)
 			fontSize = dti -> font().pixelSize();
@@ -659,7 +659,7 @@
 		qreal x = (dti -> pos().x()) * Createdxf::xScale;
 		qreal y = Createdxf::sheetHeight - (dti -> pos().y() * Createdxf::yScale) - fontSize*1.05;
 		QStringList lines = dti -> toPlainText().split('\n');
-		for (QString line: lines) {
+		foreach (QString line, lines) {
 			qreal angle = 360 - (dti -> rotationAngle());
 			if (line.size() > 0 && line != "_" )
 				Createdxf::drawText(file_path, line, x, y, fontSize, angle, 0);
@@ -742,7 +742,7 @@
 void ExportDialog::slot_export() {
 	// recupere la liste des schemas a exporter
 	QList<ExportDiagramLine *> diagrams_to_export;
-	for (ExportDiagramLine *diagram_line: diagram_lines_.values()) {
+	foreach(ExportDiagramLine *diagram_line, diagram_lines_.values()) {
 		if (diagram_line -> must_export -> isChecked()) {
 			diagrams_to_export << diagram_line;
 		}
@@ -750,7 +750,7 @@
 	
 	// verification #1 : chaque schema coche doit avoir un nom de fichier distinct
 	QSet<QString> filenames;
-	for (ExportDiagramLine *diagram_line: diagrams_to_export) {
+	foreach(ExportDiagramLine *diagram_line, diagrams_to_export) {
 		QString diagram_file = diagram_line -> file_name -> text();
 		if (!diagram_file.isEmpty()) {
 			filenames << diagram_file;
@@ -783,7 +783,7 @@
 	}
 	
 	// exporte chaque schema a exporter
-	for (ExportDiagramLine *diagram_line: diagrams_to_export) {
+	foreach(ExportDiagramLine *diagram_line, diagrams_to_export) {
 		exportDiagram(diagram_line);
 	}
 	
@@ -868,7 +868,7 @@
 */
 void ExportDialog::slot_changeUseBorder() {
 	// parcourt les schemas a exporter
-	for (int diagram_id: diagram_lines_.keys()) {
+	foreach(int diagram_id, diagram_lines_.keys()) {
 		ExportDiagramLine *diagram_line = diagram_lines_[diagram_id];
 		
 		// corrige les dimensions des schemas dont il faut preserver le ratio
@@ -900,7 +900,7 @@
 	QString format_extension = "." + format_acronym.toLower();
 	
 	// parcourt les schemas a exporter
-	for (ExportDiagramLine *diagram_line: diagram_lines_.values()) {
+	foreach(ExportDiagramLine *diagram_line, diagram_lines_.values()) {
 		QString diagram_filename = diagram_line -> file_name -> text();
 		
 		// cas 1 : l'extension est presente et correcte : on ne fait rien
@@ -959,7 +959,7 @@
 	);
 	
 	// nettoie l'apercu
-	for (QGraphicsItem *qgi: preview_scene -> items()) {
+	foreach (QGraphicsItem *qgi, preview_scene -> items()) {
 		preview_scene -> removeItem(qgi);
 		delete qgi;
 	}

Modified: trunk/sources/genericpanel.cpp
===================================================================
--- trunk/sources/genericpanel.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/genericpanel.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -210,7 +210,7 @@
 			removeObsoleteItems(project -> diagrams(), project_qtwi, QET::Diagram, false);
 		}
 		int index = 0;
-		for (Diagram *diagram: project -> diagrams()) {
+		foreach (Diagram *diagram, project -> diagrams()) {
 			QTreeWidgetItem *diagram_qtwi = addDiagram(diagram, 0, options);
 			project_qtwi -> insertChild(index, diagram_qtwi);
 			++ index;
@@ -428,7 +428,7 @@
 		}
 		
 		int index = 0;
-		for (QString template_name: tbt_collection -> templates()) {
+		foreach (QString template_name, tbt_collection -> templates()) {
 			QTreeWidgetItem *template_item = addTemplate(tbt_collection -> location(template_name), 0, options);
 			tbt_collection_qtwi -> insertChild(index ++, template_item);
 		}
@@ -770,7 +770,7 @@
 template<typename T>
 void GenericPanel::removeObsoleteItems(const QList<T> &expected_items, QTreeWidgetItem *item, QET::ItemType type, bool recursive) {
 	// remove items not found in expected_items
-	for (QTreeWidgetItem *child_item: childItems(item, type, recursive)) {
+	foreach (QTreeWidgetItem *child_item, childItems(item, type, recursive)) {
 		T child_value = valueForItem<T>(child_item);
 		if (!expected_items.contains(child_value)) {
 			deleteItem(child_item);

Modified: trunk/sources/nameslistwidget.cpp
===================================================================
--- trunk/sources/nameslistwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/nameslistwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -133,7 +133,7 @@
 	Definit les noms que le widget doit afficher
 */
 void NamesListWidget::setNames(const NamesList &provided_names) {
-	for (QString lang: provided_names.langs()) {
+	foreach(QString lang, provided_names.langs()) {
 		QString value = provided_names[lang];
 		QStringList values;
 		values << lang << value;

Modified: trunk/sources/nomenclature.cpp
===================================================================
--- trunk/sources/nomenclature.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/nomenclature.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -103,7 +103,7 @@
 
 	if(m_list_diagram.isEmpty()) return data;
 
-	for (Diagram *d: m_list_diagram) {
+	foreach (Diagram *d, m_list_diagram) {
 		//Get only simple, master and unlinked slave element.
 		ElementProvider ep(d);
 		QSettings settings;
@@ -120,7 +120,7 @@
 		
 		list_elements << ep.freeElement(Element::Slave);
 
-		for (Element *elmt: list_elements) {
+		foreach (Element *elmt, list_elements) {
 			data += getElementInfo(elmt);
 		}
 	}

Modified: trunk/sources/projectconfigpages.cpp
===================================================================
--- trunk/sources/projectconfigpages.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/projectconfigpages.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -385,19 +385,19 @@
 	//Conductor Tab
 	QList <QString> keys_conductor = m_project->conductorAutoNum().keys();
 	if (!keys_conductor.isEmpty()){
-	for (QString str: keys_conductor) { m_context_cb_conductor-> addItem(str); }
+	foreach (QString str, keys_conductor) { m_context_cb_conductor-> addItem(str); }
 	}
 
 	//Element Tab
 	QList <QString> keys_element = m_project->elementAutoNum().keys();
 	if (!keys_element.isEmpty()){
-	for (QString str: keys_element) { m_context_cb_element -> addItem(str);}
+	foreach (QString str, keys_element) { m_context_cb_element -> addItem(str);}
 	}
 
 	//Folio Tab
 	QList <QString> keys_folio = m_project->folioAutoNum().keys();
 	if (!keys_folio.isEmpty()){
-	for (QString str: keys_folio) { m_context_cb_folio -> addItem(str);}
+	foreach (QString str, keys_folio) { m_context_cb_folio -> addItem(str);}
 	}
 
 	//Folio AutoNumbering Tab

Modified: trunk/sources/projectview.cpp
===================================================================
--- trunk/sources/projectview.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/projectview.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -55,7 +55,7 @@
 */
 ProjectView::~ProjectView() {
 	// qDebug() << "Suppression du ProjectView" << ((void *)this);
-	for (int id: diagram_ids_.keys()) {
+	foreach(int id, diagram_ids_.keys()) {
 		DiagramView *diagram_view = diagram_ids_.take(id);
 		delete diagram_view;
 	}
@@ -281,12 +281,12 @@
 		editant un element du projet.
 	*/
 	QList<QETElementEditor *> editors = QETApp::elementEditors(m_project);
-	for (QETElementEditor *editor: editors) {
+	foreach(QETElementEditor *editor, editors) {
 		if (!editor -> close()) return(false);
 	}
 
 	QList<QETTitleBlockTemplateEditor *> template_editors = QETApp::titleBlockTemplateEditors(m_project);
-	for (QETTitleBlockTemplateEditor *template_editor: template_editors) {
+	foreach(QETTitleBlockTemplateEditor *template_editor, template_editors) {
 		if (!template_editor -> close()) return(false);
 	}
 	return(true);
@@ -389,7 +389,7 @@
 	if (m_project -> isReadOnly()) return;
 	int i = 1; //< Each new diagram is added  to the end of the project.
 			   //< We use @i to move the folio list at second position in the project
-	for (Diagram *d: m_project -> addNewDiagramFolioList()) {
+	foreach (Diagram *d, m_project -> addNewDiagramFolioList()) {
 		DiagramView *new_diagram_view = new DiagramView(d);
 		addDiagram(new_diagram_view);
 		showDiagram(new_diagram_view);
@@ -745,7 +745,7 @@
 	the project file itself.
 */
 void ProjectView::saveDiagrams(const QList<Diagram *> &diagrams) {
-	for (Diagram *diagram: diagrams) {
+	foreach (Diagram *diagram, diagrams) {
 		// Diagram::write() emits the written() signal, which is connected
 		// to QETProject::write() through QETProject::componentWritten().
 		// We do not want to write the project immediately, so we block
@@ -892,7 +892,7 @@
 
 	setDisplayFallbackWidget(m_project -> diagrams().isEmpty());
 
-	for (Diagram *diagram: m_project -> diagrams()) {
+	foreach(Diagram *diagram, m_project -> diagrams()) {
 		DiagramView *sv = new DiagramView(diagram);
 		addDiagram(sv);
 	}
@@ -972,7 +972,7 @@
 	le schema n'est pas trouve
 */
 DiagramView *ProjectView::findDiagram(Diagram *diagram) {
-	for (DiagramView *diagram_view: diagrams()) {
+	foreach(DiagramView *diagram_view, diagrams()) {
 		if (diagram_view -> diagram() == diagram) {
 			return(diagram_view);
 		}
@@ -987,7 +987,7 @@
 	// vide la map
 	diagram_ids_.clear();
 
-	for (DiagramView *diagram_view: m_diagram_view_list) {
+	foreach(DiagramView *diagram_view, m_diagram_view_list) {
 		int dv_idx = m_tab -> indexOf(diagram_view);
 		if (dv_idx == -1) continue;
 		diagram_ids_.insert(dv_idx, diagram_view);

Modified: trunk/sources/properties/xrefproperties.cpp
===================================================================
--- trunk/sources/properties/xrefproperties.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/properties/xrefproperties.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -51,7 +51,7 @@
 	settings.setValue(prefix + "master_label", master_label);
 	QString slave_label = m_slave_label;
 	settings.setValue(prefix + "slave_label", slave_label);
-	for (QString key: m_prefix.keys()) {
+	foreach (QString key, m_prefix.keys()) {
 		settings.setValue(prefix + key + "prefix", m_prefix.value(key));
 	}
 }
@@ -71,7 +71,7 @@
 	m_offset = settings.value(prefix + "offset", "0").toInt();
 	m_master_label = settings.value(prefix + "master_label", "%f-%l%c").toString();
 	m_slave_label = settings.value(prefix + "slave_label", "(%f-%l%c)").toString();
-	for (QString key: m_prefix_keys) {
+	foreach (QString key, m_prefix_keys) {
 		m_prefix.insert(key, settings.value(prefix + key + "prefix").toString());
 	}
 }
@@ -93,7 +93,7 @@
 	xml_element.setAttribute("master_label", master_label);
 	QString slave_label = m_slave_label;
 	xml_element.setAttribute("slave_label", slave_label);
-	for (QString key: m_prefix.keys()) {
+	foreach (QString key, m_prefix.keys()) {
 		xml_element.setAttribute(key + "prefix", m_prefix.value(key));
 	}
 }
@@ -112,7 +112,7 @@
 	m_offset = xml_element.attribute("offset", "0").toInt();
 	m_master_label = xml_element.attribute("master_label", "%f-%l%c");
 	m_slave_label = xml_element.attribute("slave_label","(%f-%l%c)");
-	for (QString key: m_prefix_keys) {
+	foreach (QString key, m_prefix_keys) {
 		m_prefix.insert(key, xml_element.attribute(key + "prefix"));
 	}
 }
@@ -132,7 +132,7 @@
 
 	QSettings settings;
 
-	for (QString key: keys)
+	foreach (QString key, keys)
 	{
 		XRefProperties properties;
 		QString str("diagrameditor/defaultxref");

Modified: trunk/sources/qet.cpp
===================================================================
--- trunk/sources/qet.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qet.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -398,7 +398,7 @@
 	QString file_name(name.toLower());
 	
 	// remplace les caracteres interdits par des tirets
-	for (QChar c: QET::forbiddenCharacters()) {
+	foreach(QChar c, QET::forbiddenCharacters()) {
 		file_name.replace(c, '-');
 	}
 	
@@ -454,7 +454,7 @@
 	QStringList escaped_strings = string.split(QRegExp("[^\\]?(?:\\\\)* "), QString::SkipEmptyParts);
 	
 	QStringList returned_list;
-	for (QString escaped_string: escaped_strings) {
+	foreach(QString escaped_string, escaped_strings) {
 		returned_list << QET::unescapeSpaces(escaped_string);
 	}
 	return(returned_list);
@@ -670,7 +670,7 @@
  */
 bool QET::eachStrIsEqual(const QStringList &qsl) {
 	if (qsl.size() == 1) return true;
-	for (const QString t: qsl) {
+	foreach (const QString t, qsl) {
 		if (qsl.at(0) != t) return false;
 	}
 	return true;

Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetapp.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -360,7 +360,7 @@
 	collections_list << common_tbt_collection_;
 	collections_list << custom_tbt_collection_;
 
-	for (QETProject *opened_project: registered_projects_) {
+	foreach(QETProject *opened_project, registered_projects_) {
 		collections_list << opened_project -> embeddedTitleBlockTemplatesCollection();
 	}
 
@@ -582,7 +582,7 @@
 */
 QStringList QETApp::handledFiles(const QList<QUrl> &urls) {
 	QList<QString> filepaths;
-	for (QUrl url: urls) {
+	foreach (QUrl url, urls) {
 		if (url.scheme() != "file") continue;
 		QString local_path = url.toLocalFile();
 		QFileInfo local_path_info(local_path);
@@ -604,7 +604,7 @@
 	if (filepath.isEmpty()) return(0);
 
 	QETApp *qet_app(QETApp::instance());
-	for (QETDiagramEditor *diagram_editor: qet_app -> diagramEditors()) {
+	foreach (QETDiagramEditor *diagram_editor, qet_app -> diagramEditors()) {
 		if (diagram_editor -> viewForFile(filepath)) {
 			return(diagram_editor);
 		}
@@ -621,7 +621,7 @@
  */
 QETDiagramEditor *QETApp::diagramEditorAncestorOf (const QWidget *child)
 {
-	for (QETDiagramEditor *qde: QETApp::diagramEditors()) {
+	foreach (QETDiagramEditor *qde, QETApp::diagramEditors()) {
 		if (qde->isAncestorOf(child)) {
 			return qde;
 		}
@@ -713,14 +713,14 @@
 bool QETApp::closeEveryEditor() {
 	// s'assure que toutes les fenetres soient visibles avant de quitter
 	restoreEveryEditor();
-	for (QETProject *project: registered_projects_) {
+	foreach(QETProject *project, registered_projects_) {
 		project -> close();
 	}
 	bool every_window_closed = true;
-	for (QETDiagramEditor *e: diagramEditors()) {
+	foreach(QETDiagramEditor *e, diagramEditors()) {
 		every_window_closed = every_window_closed && e -> close();
 	}
-	for (QETElementEditor *e: elementEditors()) {
+	foreach(QETElementEditor *e, elementEditors()) {
 		every_window_closed = every_window_closed && e -> close();
 	}
 	return(every_window_closed);
@@ -782,8 +782,8 @@
 	QList<QETTitleBlockTemplateEditor *> editors;
 	if (!project) return(editors);
 
-	// for  known template editor
-	for (QETTitleBlockTemplateEditor *tbt_editor: titleBlockTemplateEditors()) {
+	// foreach known template editor
+	foreach (QETTitleBlockTemplateEditor *tbt_editor, titleBlockTemplateEditors()) {
 		if (tbt_editor -> location().parentProject() == project) {
 			editors << tbt_editor;
 		}
@@ -839,7 +839,7 @@
 	if (!project) return(editors);
 
 	// pour chaque editeur d'element...
-	for (QETElementEditor *elmt_editor: elementEditors()) {
+	foreach(QETElementEditor *elmt_editor, elementEditors()) {
 		// on recupere l'emplacement de l'element qu'il edite
 		ElementsLocation elmt_editor_loc(elmt_editor -> location());
 
@@ -867,7 +867,7 @@
 */
 template <class T> QList<T *> QETApp::detectWindows() const {
 	QList<T *> windows;
-	for (QWidget *widget: topLevelWidgets()) {
+	foreach(QWidget *widget, topLevelWidgets()) {
 		if (!widget -> isWindow()) continue;
 		if (T *window = qobject_cast<T *>(widget)) {
 			windows << window;
@@ -881,7 +881,7 @@
 	@param visible whether detected main windows should be visible
 */
 template <class T> void QETApp::setMainWindowsVisible(bool visible) {
-	for (T *e: detectWindows<T>()) {
+	foreach(T *e, detectWindows<T>()) {
 		setMainWindowVisible(e, visible);
 	}
 }
@@ -912,7 +912,7 @@
 		window_states.insert(window, window -> saveState());
 		window -> hide();
 		// cache aussi les toolbars et les docks
-		for (QWidget *qw: floatingToolbarsAndDocksForMainWindow(window)) {
+		foreach (QWidget *qw, floatingToolbarsAndDocksForMainWindow(window)) {
 			qw -> hide();
 		}
 	} else {
@@ -1044,7 +1044,7 @@
 	// s'il y a des editeur de schemas ouvert, on cherche ceux qui sont visibles
 	if (diagrams_editors.count()) {
 		QList<QETDiagramEditor *> visible_diagrams_editors;
-		for (QETDiagramEditor *de: diagrams_editors) {
+		foreach(QETDiagramEditor *de, diagrams_editors) {
 			if (de -> isVisible()) visible_diagrams_editors << de;
 		}
 
@@ -1058,7 +1058,7 @@
 		}
 
 		// ouvre les fichiers dans l'editeur ainsi choisi
-		for (QString file: files_list) {
+		foreach(QString file, files_list) {
 			de_open -> openAndAddProject(file);
 		}
 	} else {
@@ -1077,7 +1077,7 @@
 
 	// evite autant que possible les doublons dans la liste fournie
 	QSet<QString> files_set;
-	for (QString file: files_list) {
+	foreach(QString file, files_list) {
 		QString canonical_filepath = QFileInfo(file).canonicalFilePath();
 		if (!canonical_filepath.isEmpty()) files_set << canonical_filepath;
 	}
@@ -1088,9 +1088,9 @@
 	QList<QETElementEditor *> element_editors = elementEditors();
 
 	// on traite les fichiers a la queue leu leu...
-	for (QString element_file: files_set) {
+	foreach(QString element_file, files_set) {
 		bool already_opened_in_existing_element_editor = false;
-		for (QETElementEditor *element_editor: element_editors) {
+		foreach(QETElementEditor *element_editor, element_editors) {
 			if (element_editor -> isEditing(element_file)) {
 				// ce fichier est deja ouvert dans un editeur
 				already_opened_in_existing_element_editor = true;
@@ -1120,9 +1120,9 @@
 	QList<QETElementEditor *> element_editors = elementEditors();
 
 	// on traite les emplacements  a la queue leu leu...
-	for (ElementsLocation element_location: locations_list) {
+	foreach(ElementsLocation element_location, locations_list) {
 		bool already_opened_in_existing_element_editor = false;
-		for (QETElementEditor *element_editor: element_editors) {
+		foreach(QETElementEditor *element_editor, element_editors) {
 			if (element_editor -> isEditing(element_location)) {
 				// cet emplacement est deja ouvert dans un editeur
 				already_opened_in_existing_element_editor = true;
@@ -1175,7 +1175,7 @@
 
 	// avoid duplicates in the provided files list
 	QSet<QString> files_set;
-	for (QString file: files_list) {
+	foreach (QString file, files_list) {
 		QString canonical_filepath = QFileInfo(file).canonicalFilePath();
 		if (!canonical_filepath.isEmpty()) files_set << canonical_filepath;
 	}
@@ -1185,9 +1185,9 @@
 	// opened title block template editors
 	QList<QETTitleBlockTemplateEditor *> tbt_editors = titleBlockTemplateEditors();
 
-	for (QString tbt_file: files_set) {
+	foreach(QString tbt_file, files_set) {
 		bool already_opened_in_existing_tbt_editor = false;
-		for (QETTitleBlockTemplateEditor *tbt_editor: tbt_editors) {
+		foreach(QETTitleBlockTemplateEditor *tbt_editor, tbt_editors) {
 			if (tbt_editor -> isEditing(tbt_file)) {
 				// this file is already opened
 				already_opened_in_existing_tbt_editor = true;
@@ -1267,7 +1267,7 @@
 */
 QList<QWidget *> QETApp::floatingToolbarsAndDocksForMainWindow(QMainWindow *window) const {
 	QList<QWidget *> widgets;
-	for (QWidget *qw: topLevelWidgets()) {
+	foreach(QWidget *qw, topLevelWidgets()) {
 		if (!qw -> isWindow()) continue;
 		if (qobject_cast<QToolBar *>(qw) || qobject_cast<QDockWidget *>(qw)) {
 			if (qw -> parent() == window) widgets << qw;
@@ -1455,7 +1455,7 @@
 */
 template <class T> void QETApp::addWindowsListToMenu(QMenu *menu, const QList<T *> &windows) {
 	menu -> addSeparator();
-	for (QMainWindow *window: windows) {
+	foreach (QMainWindow *window, windows) {
 		QAction *current_menu = menu -> addAction(window -> windowTitle());
 		current_menu -> setCheckable(true);
 		current_menu -> setChecked(window -> isVisible());
@@ -1547,19 +1547,19 @@
 ) {
 	// compte le nombre de schemas visibles
 	int visible_diagrams = 0;
-	for (QMainWindow *w: diagrams) if (w -> isVisible()) ++ visible_diagrams;
+	foreach(QMainWindow *w, diagrams) if (w -> isVisible()) ++ visible_diagrams;
 	every_diagram_reduced = !visible_diagrams;
 	every_diagram_visible = visible_diagrams == diagrams.count();
 
 	// compte le nombre de schemas visibles
 	int visible_elements = 0;
-	for (QMainWindow *w: elements) if (w -> isVisible()) ++ visible_elements;
+	foreach(QMainWindow *w, elements) if (w -> isVisible()) ++ visible_elements;
 	every_element_reduced = !visible_elements;
 	every_element_visible = visible_elements == elements.count();
 
 	// count visible template editors
 	int visible_templates = 0;
-	for (QMainWindow *window: tbtemplates) {
+	foreach(QMainWindow *window, tbtemplates) {
 		if (window -> isVisible()) ++ visible_templates;
 	}
 	every_template_reduced = !visible_templates;
@@ -1683,7 +1683,7 @@
 	@return l'id du projet en parametre si celui-ci est enregistre, -1 sinon
 */
 int QETApp::projectId(const QETProject *project) {
-	for (int id: registered_projects_.keys()) {
+	foreach(int id, registered_projects_.keys()) {
 		if (registered_projects_[id] == project) {
 			return(id);
 		}

Modified: trunk/sources/qetarguments.cpp
===================================================================
--- trunk/sources/qetarguments.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetarguments.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -193,7 +193,7 @@
 	clear();
 	
 	// separe les fichiers des options
-	for (QString argument: arguments) {
+	foreach(QString argument, arguments) {
 		QFileInfo argument_info(argument);
 		if (argument_info.exists()) {
 		// on exprime les chemins des fichiers en absolu

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetdiagrameditor.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -111,7 +111,7 @@
 	if (files.count())
 	{
 			//So we open this files
-		for (QString file: files)
+		foreach(QString file, files)
 			if (openAndAddProject(file, false))
 				++ opened_projects;
 	}
@@ -282,8 +282,8 @@
 	m_draw_grid->setCheckable(true);
 	m_draw_grid->setChecked(true);
 	connect(m_draw_grid, &QAction::triggered, [this](bool checked) {
-		for (ProjectView *prjv: this->openedProjects())
-			for (Diagram *d: prjv->project()->diagrams()) {
+		foreach (ProjectView *prjv, this->openedProjects())
+			foreach (Diagram *d, prjv->project()->diagrams()) {
 				d->setDisplayGrid(checked);
 				d->update();
 			}
@@ -436,7 +436,7 @@
 	add_ellipse  ->setData("ellipse");
 	add_polyline ->setData("polyline");
 
-	for (QAction *action: m_add_item_actions_group.actions()) action->setCheckable(true);
+	foreach (QAction *action, m_add_item_actions_group.actions()) action->setCheckable(true);
 	connect(&m_add_item_actions_group, &QActionGroup::triggered, this, &QETDiagramEditor::addItemGroupTriggered);
 
 		//Keyboard shortcut
@@ -657,7 +657,7 @@
 			else showNormal();
 		}
 		// sinon demande la permission de fermer chaque projet
-		for (ProjectView *project: openedProjects()) {
+		foreach(ProjectView *project, openedProjects()) {
 			if (!closeProject(project)) {
 				can_quit = false;
 				qce -> ignore();
@@ -985,7 +985,7 @@
 QList<ProjectView *> QETDiagramEditor::openedProjects() const {
 	QList<ProjectView *> result;
 	QList<QMdiSubWindow *> window_list(workspace.subWindowList());
-	for (QMdiSubWindow *window: window_list) {
+	foreach(QMdiSubWindow *window, window_list) {
 		if (ProjectView *project_view = qobject_cast<ProjectView *>(window -> widget())) {
 			result << project_view;
 		}
@@ -1054,7 +1054,7 @@
 	@return la vue sur le projet contenant ce schema ou 0 s'il n'y en a pas
 */
 ProjectView *QETDiagramEditor::findProject(DiagramView *diagram_view) const {
-	for (ProjectView *project_view: openedProjects()) {
+	foreach(ProjectView *project_view, openedProjects()) {
 		if (project_view -> diagrams().contains(diagram_view)) {
 			return(project_view);
 		}
@@ -1068,8 +1068,8 @@
 	@return la vue sur le projet contenant ce schema ou 0 s'il n'y en a pas
 */
 ProjectView *QETDiagramEditor::findProject(Diagram *diagram) const {
-	for (ProjectView *project_view: openedProjects()) {
-		for (DiagramView *diagram_view: project_view -> diagrams()) {
+	foreach(ProjectView *project_view, openedProjects()) {
+		foreach(DiagramView *diagram_view, project_view -> diagrams()) {
 			if (diagram_view -> diagram() == diagram) {
 				return(project_view);
 			}
@@ -1083,7 +1083,7 @@
 	@return la vue du projet passe en parametre
 */
 ProjectView *QETDiagramEditor::findProject(QETProject *project) const {
-	for (ProjectView *opened_project: openedProjects()) {
+	foreach(ProjectView *opened_project, openedProjects()) {
 		if (opened_project -> project() == project) {
 			return(opened_project);
 		}
@@ -1097,7 +1097,7 @@
 	celui-ci n'a pas ete trouve
 */
 ProjectView *QETDiagramEditor::findProject(const QString &filepath) const {
-	for (ProjectView *opened_project: openedProjects()) {
+	foreach(ProjectView *opened_project, openedProjects()) {
 		if (QETProject *project = opened_project -> project()) {
 			if (project -> filePath() == filepath) {
 				return(opened_project);
@@ -1113,7 +1113,7 @@
 	celui-ci n'a pas ete trouve.
 */
 QMdiSubWindow *QETDiagramEditor::subWindowForWidget(QWidget *widget) const {
-	for (QMdiSubWindow *sub_window: workspace.subWindowList()) {
+	foreach(QMdiSubWindow *sub_window, workspace.subWindowList()) {
 		if (sub_window -> widget() == widget) {
 			return(sub_window);
 		}
@@ -1284,7 +1284,7 @@
 void QETDiagramEditor::slot_setSelectionMode()
 {
 	if (ProjectView *pv = currentProject())
-		for (DiagramView *dv: pv -> diagrams())
+		foreach(DiagramView *dv, pv -> diagrams())
 			dv -> setSelectionMode();
 }
 
@@ -1295,7 +1295,7 @@
 void QETDiagramEditor::slot_setVisualisationMode()
 {
 	if (ProjectView *pv = currentProject())
-		for (DiagramView *dv: pv -> diagrams())
+		foreach(DiagramView *dv, pv -> diagrams())
 			dv -> setVisualisationMode();
 }
 
@@ -1506,7 +1506,7 @@
 {
 	if (!project_view) return;
 
-	for (DiagramView *dv: project_view -> diagrams())
+	foreach(DiagramView *dv, project_view -> diagrams())
 		diagramWasAdded(dv);
 	
 		//Manage the close event of project
@@ -1543,7 +1543,7 @@
 */
 QList<QString> QETDiagramEditor::editedFiles() const {
 	QList<QString> edited_files_list;
-	for (ProjectView *project_view: openedProjects()) {
+	foreach (ProjectView *project_view, openedProjects()) {
 		QString diagram_file(project_view -> project() -> filePath());
 		if (!diagram_file.isEmpty()) {
 			edited_files_list << QFileInfo(diagram_file).canonicalFilePath();
@@ -1566,7 +1566,7 @@
 		// QFileInfo returns an empty path for non-existent files
 		return(0);
 	}
-	for (ProjectView *project_view: openedProjects()) {
+	foreach (ProjectView *project_view, openedProjects()) {
 		QString project_can_file_path = QFileInfo(project_view -> project() -> filePath()).canonicalFilePath();
 		if (project_can_file_path == searched_can_file_path) {
 			return(project_view);
@@ -1616,7 +1616,7 @@
 */
 void QETDiagramEditor::slot_updateWindowsMenu() {
 	// nettoyage du menu
-	for (QAction *a: windows_menu -> actions()) windows_menu -> removeAction(a);
+	foreach(QAction *a, windows_menu -> actions()) windows_menu -> removeAction(a);
 	
 	// actions de fermeture
 	windows_menu -> addAction(close_file);
@@ -1642,7 +1642,7 @@
 	
 	if (!windows.isEmpty()) windows_menu -> addSeparator();
 	QActionGroup *windows_actions = new QActionGroup(this);
-	for (ProjectView *project_view: windows) {
+	foreach(ProjectView *project_view, windows) {
 		QString pv_title = project_view -> windowTitle();
 		QAction *action  = windows_menu -> addAction(pv_title);
 		windows_actions -> addAction(action);
@@ -2035,7 +2035,7 @@
 
 			// if the removed diagram was a folio sheet, then delete all the remaining folio sheets also.
 			if (isFolioList) {
-				for (DiagramView *diag: current_project -> diagrams()) {
+				foreach (DiagramView *diag, current_project -> diagrams()) {
 					if (dynamic_cast<DiagramFolioList *>(diag -> diagram())) {
 						current_project -> removeDiagram(diag);
 					}
@@ -2044,7 +2044,7 @@
 			  // else if after diagram removal, the total diagram quantity becomes a factor of 58, then
 			  // remove one (last) folio sheet.
 			} else if (current_project -> diagrams().size() % 58 == 0) {
-				for (DiagramView *diag: current_project -> diagrams()) {
+				foreach (DiagramView *diag, current_project -> diagrams()) {
 					DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diag -> diagram());
 					if (ptr && ptr -> getId() == current_project -> project() -> getFolioSheetsQuantity() - 1) {
 						current_project -> removeDiagram(diag);

Modified: trunk/sources/qetgraphicsitem/conductor.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductor.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/conductor.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -280,13 +280,13 @@
 ) const {
 	// construit le QHash qui sera retourne
 	QHash<ConductorSegmentProfile *, qreal> segments_hash;
-	for (ConductorSegmentProfile *csp: segments_list) {
+	foreach(ConductorSegmentProfile *csp, segments_list) {
 		segments_hash.insert(csp, csp -> length);
 	}
 	
 	// memorise le signe de la longueur de chaque segement
 	QHash<ConductorSegmentProfile *, int> segments_signs;
-	for (ConductorSegmentProfile *csp: segments_hash.keys()) {
+	foreach(ConductorSegmentProfile *csp, segments_hash.keys()) {
 		segments_signs.insert(csp, getSign(csp -> length));
 	}
 	
@@ -297,12 +297,12 @@
 	while (remaining_offset > precision || remaining_offset < -precision) {
 		// recupere le nombre de segments differents ayant une longueur non nulle
 		uint segments_count = 0;
-		for (ConductorSegmentProfile *csp: segments_hash.keys()) if (segments_hash[csp]) ++ segments_count;
+		foreach(ConductorSegmentProfile *csp, segments_hash.keys()) if (segments_hash[csp]) ++ segments_count;
 		//qDebug() << "  remaining_offset =" << remaining_offset;
 		qreal local_offset = remaining_offset / segments_count;
 		//qDebug() << "  repartition d'un offset local de" << local_offset << "px sur" << segments_count << "segments";
 		remaining_offset = 0.0;
-		for (ConductorSegmentProfile *csp: segments_hash.keys()) {
+		foreach(ConductorSegmentProfile *csp, segments_hash.keys()) {
 			// ignore les segments de longueur nulle
 			if (!segments_hash[csp]) continue;
 			// applique l'offset au segment
@@ -526,7 +526,7 @@
 		qp -> setPen(final_conductor_pen);
 		qp -> setBrush(junction_brush);
 		qp -> setRenderHint(QPainter::Antialiasing, true);
-		for (QPointF point: junctions_list) {
+		foreach(QPointF point, junctions_list) {
 			qp -> drawEllipse(QRectF(point.x() - 1.5, point.y() - 1.5, 3.0, 3.0));
 		}
 	}
@@ -764,7 +764,7 @@
 		https://qelectrotech.org/forum/viewtopic.php?pid=5067#p5067
 	**/
 //	if (isSelected()) {
-//		for (QRectF rect, m_handler.handlerRect(handlerPoints())) {
+//		foreach (QRectF rect, m_handler.handlerRect(handlerPoints())) {
 //			shape_.addRect(rect);
 //		}
 //	}
@@ -792,7 +792,7 @@
 	QList<ConductorSegment *> segments_list = segmentsList();
 	if (type == QET::Both) return(segments_list.count());
 	uint nb_seg = 0;
-	for (ConductorSegment *conductor_segment: segments_list) {
+	foreach(ConductorSegment *conductor_segment, segments_list) {
 		if (conductor_segment -> type() == type) ++ nb_seg;
 	}
 	return(nb_seg);
@@ -895,7 +895,7 @@
 	{
 		// parcours et export des segments
 		QDomElement current_segment;
-		for (ConductorSegment *segment: segmentsList())
+		foreach(ConductorSegment *segment, segmentsList())
 		{
 			current_segment = dom_document.createElement("segment");
 			current_segment.setAttribute("orientation", segment -> isHorizontal() ? "horizontal" : "vertical");
@@ -954,8 +954,8 @@
 
 	// les longueurs recueillies doivent etre coherentes avec les positions des bornes
 	qreal width = 0.0, height = 0.0;
-	for (qreal t: segments_x) width  += t;
-	for (qreal t: segments_y) height += t;
+	foreach (qreal t, segments_x) width  += t;
+	foreach (qreal t, segments_y) height += t;
 	QPointF t1 = terminal1 -> dockConductor();
 	QPointF t2 = terminal2 -> dockConductor();
 	qreal expected_width  = t2.x() - t1.x();
@@ -1009,7 +1009,7 @@
 
 	QVector <QPointF> middle_points;
 
-	for (ConductorSegment *segment: sl)
+	foreach(ConductorSegment *segment, sl)
 		middle_points.append(segment->middle());
 
 	return middle_points;
@@ -1145,7 +1145,7 @@
 		}
 
 		//At this point this conductor is the longuest conductor we hide all text of conductor_list
-		for (Conductor *c: relatedPotentialConductors(false)) {
+		foreach (Conductor *c, relatedPotentialConductors(false)) {
 					c -> textItem() -> setVisible(false);
 			}
 		//Make sure text item is visible
@@ -1295,7 +1295,7 @@
 	setProperties(property);
 	QSet <Conductor *> potential_list = relatedPotentialConductors();
 
-	for (Conductor *other_conductor: potential_list)
+	foreach(Conductor *other_conductor, potential_list)
 	{
 		if (only_text)
 		{
@@ -1400,7 +1400,7 @@
 	{
 		undo->setText(tr("Modifier les propriétés de plusieurs conducteurs", "undo caption"));
 
-		for (Conductor *potential_conductor: relatedPotentialConductors())
+		foreach (Conductor *potential_conductor, relatedPotentialConductors())
 		{
 			old_value.setValue(potential_conductor->properties());
 			ConductorProperties new_properties = potential_conductor->properties();
@@ -1436,7 +1436,7 @@
 	this_terminal << terminal1 << terminal2;
 
 	// Return all conductor of terminal 1 and 2
-	for (Terminal *terminal: this_terminal) {
+	foreach (Terminal *terminal, this_terminal) {
 		if (!t_list -> contains(terminal)) {
 			t_list -> append(terminal);
 			QList <Conductor *> other_conductors_list_t = terminal -> conductors();
@@ -1450,7 +1450,7 @@
 
 			other_conductors_list_t.removeAll(this);
 			// Research the conductors connected to conductors already found
-			for (Conductor *c: other_conductors_list_t) {
+			foreach (Conductor *c, other_conductors_list_t) {
 				other_conductors += c -> relatedPotentialConductors(all_diagram, t_list);
 			}
 			other_conductors += other_conductors_list_t.toSet();
@@ -1554,7 +1554,7 @@
 		// determine si le point est une bifurcation ou non
 		bool is_bend = false;
 		Qt::Corner current_bend_type = Qt::TopLeftCorner;
-		for (ConductorBend cb: bends_list) {
+		foreach(ConductorBend cb, bends_list) {
 			if (cb.first == point) {
 				is_bend = true;
 				current_bend_type = cb.second;
@@ -1566,7 +1566,7 @@
 		
 		bool is_junction = false;
 		QPointF scene_point = mapToScene(point);
-		for (Conductor *c: other_conductors) {
+		foreach(Conductor *c, other_conductors) {
 			// exprime le point dans les coordonnees de l'autre conducteur
 			QPointF conductor_point = c -> mapFromScene(scene_point);
 			// recupere les segments de l'autre conducteur
@@ -1580,7 +1580,7 @@
 					is_junction = true;
 					// ce point commun ne doit pas etre une bifurcation identique a celle-ci
 					QList<ConductorBend> other_conductor_bends = c -> bends();
-					for (ConductorBend cb: other_conductor_bends) {
+					foreach(ConductorBend cb, other_conductor_bends) {
 						if (cb.first == conductor_point && cb.second == current_bend_type) {
 							is_junction = false;
 						}
@@ -1714,7 +1714,7 @@
 	QList<QPolygonF> polygons = polygon.simplified().toSubpathPolygons();
 	QList<QLineF> lines;
 	QList<QPointF> points;
-	for (QPolygonF polygon: polygons) {
+	foreach(QPolygonF polygon, polygons) {
 		if (polygon.count() <= 1) continue;
 		
 		// on recense les lignes et les points
@@ -1727,7 +1727,7 @@
 	// on fait des projetes orthogonaux du point sur les differents segments du
 	// polygone, en les triant par longueur croissante
 	QMap<qreal, QPointF> intersections;
-	for (QLineF line: lines) {
+	foreach (QLineF line, lines) {
 		QPointF intersection_point;
 		if (QET::orthogonalProjection(point, line, &intersection_point)) {
 			intersections.insert(QLineF(intersection_point, point).length(), intersection_point);
@@ -1764,7 +1764,7 @@
 Conductor * longuestConductorInPotential(Conductor *conductor, bool all_diagram) {
 	Conductor *longuest_conductor = conductor;
 	//Search the longuest conductor
-	for (Conductor *c: conductor -> relatedPotentialConductors(all_diagram))
+	foreach (Conductor *c, conductor -> relatedPotentialConductors(all_diagram))
 		if (c -> length() > longuest_conductor -> length())
 			longuest_conductor = c;
 

Modified: trunk/sources/qetgraphicsitem/crossrefitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/crossrefitem.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/crossrefitem.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -209,7 +209,7 @@
 		m_hovered_contact->setSelected(true);
 
 			//Zoom to the linked slave element
-		for (QGraphicsView *view: m_hovered_contact->diagram()->views())
+		foreach(QGraphicsView *view, m_hovered_contact->diagram()->views())
 		{
 			QRectF fit = m_hovered_contact->sceneBoundingRect();
 			fit.adjust(-200, -200, 200, 200);
@@ -230,7 +230,7 @@
 
 	if (m_hovered_contact)
 	{
-		for (QRectF rect: m_hovered_contacts_map.values(m_hovered_contact))
+		foreach(QRectF rect, m_hovered_contacts_map.values(m_hovered_contact))
 		{
 				//Mouse hover the same rect than previous hover event
 			if (rect.contains(pos))
@@ -243,9 +243,9 @@
 			//At this point, mouse don't hover previous rect
 		m_hovered_contact = nullptr;
 
-		for (Element *elmt: m_hovered_contacts_map.keys())
+		foreach (Element *elmt, m_hovered_contacts_map.keys())
 		{
-			for (QRectF rect: m_hovered_contacts_map.values(elmt))
+			foreach(QRectF rect, m_hovered_contacts_map.values(elmt))
 			{
 					//Mouse hover a contact
 				if (rect.contains(pos))
@@ -261,9 +261,9 @@
 	}
 	else
 	{
-		for (Element *elmt: m_hovered_contacts_map.keys())
+		foreach (Element *elmt, m_hovered_contacts_map.keys())
 		{
-			for (QRectF rect: m_hovered_contacts_map.values(elmt))
+			foreach(QRectF rect, m_hovered_contacts_map.values(elmt))
 			{
 					//Mouse hover a contact
 				if (rect.contains(pos))
@@ -344,9 +344,9 @@
 
 	QStringList no_str, nc_str;
 
-	for (Element *elmt: NOElements())
+	foreach (Element *elmt, NOElements())
 		no_str.append(elementPositionText(elmt, true));
-	for (Element *elmt: NCElements())
+	foreach(Element *elmt, NCElements())
 		nc_str.append(elementPositionText(elmt, true));
 
 
@@ -358,7 +358,7 @@
 
 		//Bounding rect of the NO text
 	QRectF no_bounding;
-	for (QString str: no_str)
+	foreach(QString str, no_str)
 	{
 		QRectF bounding = painter.boundingRect(QRectF (), Qt::AlignCenter, str);
 		no_bounding = no_bounding.united(bounding);
@@ -371,7 +371,7 @@
 
 		//Bounding rect of the NC text
 	QRectF nc_bounding;
-	for (QString str: nc_str)
+	foreach(QString str, nc_str)
 	{
 		QRectF bounding = painter.boundingRect(QRectF (), Qt::AlignCenter, str);
 		nc_bounding = nc_bounding.united(bounding);
@@ -434,7 +434,7 @@
 	QRectF bounding_rect;
 
 	//Draw each linked contact
-	for (Element *elmt:  m_element->linkedElements())
+	foreach (Element *elmt,  m_element->linkedElements())
 	{
 		DiagramContext info = elmt->kindInformations();
 
@@ -627,7 +627,7 @@
 
 		//Fill NO
 	QPointF no_top_left(0, header);
-	for (Element *elmt: NOElements())
+	foreach(Element *elmt, NOElements())
 	{
 		QPen pen = painter.pen();
 		m_hovered_contact == elmt ? pen.setColor(Qt::blue) :pen.setColor(Qt::black);
@@ -651,7 +651,7 @@
 
 		//Fill NC
 	QPointF nc_top_left(middle_cross, header);
-	for (Element *elmt: NCElements())
+	foreach(Element *elmt, NCElements())
 	{
 		QPen pen = painter.pen();
 		m_hovered_contact == elmt ? pen.setColor(Qt::blue) :pen.setColor(Qt::black);
@@ -731,7 +731,7 @@
 {
 	QList<Element *> no_list;
 
-	for (Element *elmt: m_element->linkedElements())
+	foreach (Element *elmt, m_element->linkedElements())
 	{
 			//We continue if element is a power contact and xref propertie
 			//is set to don't show power contact
@@ -761,7 +761,7 @@
 {
 	QList<Element *> nc_list;
 
-	for (Element *elmt: m_element->linkedElements())
+	foreach (Element *elmt, m_element->linkedElements())
 	{
 			//We continue if element is a power contact and xref propertie
 			//is set to don't show power contact

Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/customelement.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -211,7 +211,7 @@
 /// @return la liste des conducteurs rattaches a cet element
 QList<Conductor *> CustomElement::conductors() const {
 	QList<Conductor *> conductors;
-	for (Terminal *t: list_terminals) conductors << t -> conductors();
+	foreach(Terminal *t, list_terminals) conductors << t -> conductors();
 	return(conductors);
 }
 
@@ -850,7 +850,7 @@
 
 	// agit sur le QPen et la QBrush en fonction des valeurs rencontrees
 	QRegExp rx("^\\s*([a-z-]+)\\s*:\\s*([a-z-]+)\\s*$");
-	for (QString style: styles) {
+	foreach (QString style, styles) {
 		if (rx.exactMatch(style)) {
 			QString style_name = rx.cap(1);
 			QString style_value = rx.cap(2);
@@ -988,7 +988,7 @@
  * @param tagg
  */
 ElementTextItem* CustomElement::taggedText(const QString &tagg) const {
-	for (ElementTextItem *eti: list_texts_) {
+	foreach (ElementTextItem *eti, list_texts_) {
 		if (eti -> tagg() == tagg) return eti;
 	}
 	return NULL;

Modified: trunk/sources/qetgraphicsitem/element.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/element.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/element.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -115,7 +115,7 @@
  */
 void Element::displayHelpLine(bool b)
 {
-	for (Terminal *t: terminals())
+	foreach (Terminal *t, terminals())
 		t->drawHelpLine(b);
 }
 
@@ -225,7 +225,7 @@
 	applyRotation(applied_angle + rotation());
 
 	//update the path of conductor
-	for (QGraphicsItem *qgi: childItems()) {
+	foreach(QGraphicsItem *qgi, childItems()) {
 		if (Terminal *p = qgraphicsitem_cast<Terminal *>(qgi)) {
 			p -> updateConductor();
 		}
@@ -232,7 +232,7 @@
 	}
 
 	// repositionne les textes de l'element qui ne comportent pas l'option "FollowParentRotations"
-	for (ElementTextItem *eti: texts()) {
+	foreach(ElementTextItem *eti, texts()) {
 		if (!eti -> followParentRotations())  {
 			// on souhaite pivoter le champ de texte par rapport a son centre
 			QPointF eti_center = eti -> boundingRect().center();
@@ -400,16 +400,16 @@
 		ce recensement servira lors de la mise en place des fils
 	*/
 	QList<QDomElement> liste_terminals;
-	for (QDomElement qde: QET::findInDomElement(e, "terminals", "terminal")) {
+	foreach(QDomElement qde, QET::findInDomElement(e, "terminals", "terminal")) {
 		if (Terminal::valideXml(qde)) liste_terminals << qde;
 	}
 	
 	QHash<int, Terminal *> priv_id_adr;
 	int terminals_non_trouvees = 0;
-	for (QGraphicsItem *qgi: childItems()) {
+	foreach(QGraphicsItem *qgi, childItems()) {
 		if (Terminal *p = qgraphicsitem_cast<Terminal *>(qgi)) {
 			bool terminal_trouvee = false;
-			for (QDomElement qde: liste_terminals) {
+			foreach(QDomElement qde, liste_terminals) {
 				if (p -> fromXml(qde)) {
 					priv_id_adr.insert(qde.attribute("id").toInt(), p);
 					terminal_trouvee = true;
@@ -426,7 +426,7 @@
 		return(false);
 	} else {
 		// verifie que les associations id / adr n'entrent pas en conflit avec table_id_adr
-		for (int id_trouve: priv_id_adr.keys()) {
+		foreach(int id_trouve, priv_id_adr.keys()) {
 			if (table_id_adr.contains(id_trouve)) {
 				// cet element possede un id qui est deja reference (= conflit)
 				return(false);
@@ -433,7 +433,7 @@
 			}
 		}
 		// copie des associations id / adr
-		for (int id_trouve: priv_id_adr.keys()) {
+		foreach(int id_trouve, priv_id_adr.keys()) {
 			table_id_adr.insert(id_trouve, priv_id_adr.value(id_trouve));
 		}
 	}
@@ -440,11 +440,11 @@
 
 		//import text filed value
 	QList<QDomElement> inputs = QET::findInDomElement(e, "inputs", "input");
-	for (QGraphicsItem *qgi: childItems())
+	foreach(QGraphicsItem *qgi, childItems())
 	{
 		if (ElementTextItem *eti = qgraphicsitem_cast<ElementTextItem *>(qgi))
 		{
-			for (QDomElement input: inputs)
+			foreach(QDomElement input, inputs)
 			{
 				eti -> fromXml(input);
 				etiToElementLabels(eti);
@@ -454,7 +454,7 @@
 
 	//load uuid of connected elements
 	QList <QDomElement> uuid_list = QET::findInDomElement(e, "links_uuids", "link_uuid");
-	for (QDomElement qdo: uuid_list) tmp_uuids_link << qdo.attribute("uuid");
+	foreach (QDomElement qdo, uuid_list) tmp_uuids_link << qdo.attribute("uuid");
 	
 	//uuid of this element
 	uuid_= QUuid(e.attribute("uuid", QUuid::createUuid().toString()));
@@ -540,7 +540,7 @@
 	if (!table_adr_id.isEmpty()) {
 		// trouve le plus grand id
 		int max_id_t = -1;
-		for (int id_t: table_adr_id.values()) {
+		foreach (int id_t, table_adr_id.values()) {
 			if (id_t > max_id_t) max_id_t = id_t;
 		}
 		id_terminal = max_id_t + 1;
@@ -549,7 +549,7 @@
 	// enregistrement des bornes de l'appareil
 	QDomElement xml_terminals = document.createElement("terminals");
 	// pour chaque enfant de l'element
-	for (Terminal *t: terminals()) {
+	foreach(Terminal *t, terminals()) {
 		// alors on enregistre la borne
 		QDomElement terminal = t -> toXml(document);
 		terminal.setAttribute("id", id_terminal);
@@ -560,7 +560,7 @@
 	
 	// enregistrement des champ de texte de l'appareil
 	QDomElement inputs = document.createElement("inputs");
-	for (ElementTextItem *eti: texts()) {
+	foreach(ElementTextItem *eti, texts()) {
 		inputs.appendChild(eti -> toXml(document));
 	}
 	element.appendChild(inputs);
@@ -569,7 +569,7 @@
 	//save the uuid of each other elements
 	if (! isFree()) {
 		QDomElement links_uuids = document.createElement("links_uuids");
-		for (Element *elmt: connected_elements) {
+		foreach (Element *elmt, connected_elements) {
 			QDomElement link_uuid = document.createElement("link_uuid");
 			link_uuid.setAttribute("uuid", elmt->uuid().toString());
 			links_uuids.appendChild(link_uuid);
@@ -599,7 +599,7 @@
 {
 	QList <QPair <Terminal *, Terminal *> > list;
 
-	for (Terminal *terminal: terminals())
+	foreach (Terminal *terminal, terminals())
 	{
 		if (terminal->conductors().isEmpty())
 		{
@@ -627,7 +627,7 @@
 	if (tmp_uuids_link.isEmpty()) return;
 
 	ElementProvider ep(prj);
-	for (Element *elmt: ep.fromUuids(tmp_uuids_link)) {
+	foreach (Element *elmt, ep.fromUuids(tmp_uuids_link)) {
 		elmt->linkToElement(this);
 	}
 	tmp_uuids_link.clear();
@@ -676,7 +676,7 @@
 void Element::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
 {
 	QetGraphicsItem::mouseMoveEvent(event);
-	for (Terminal *t: terminals())
+	foreach (Terminal *t, terminals())
 	{
 		t -> drawHelpLine(true);
 	}
@@ -689,7 +689,7 @@
 void Element::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
 {
 	QetGraphicsItem::mouseReleaseEvent(event);
-	for (Terminal *t: terminals())
+	foreach (Terminal *t, terminals())
 	{
 		t -> drawHelpLine(false);
 	}
@@ -704,7 +704,7 @@
 void Element::hoverEnterEvent(QGraphicsSceneHoverEvent *e) {
 	Q_UNUSED(e);
 
-	for (Element *elmt: linkedElements())
+	foreach (Element *elmt, linkedElements())
 		elmt -> setHighlighted(true);
 
 	m_mouse_over = true;
@@ -721,7 +721,7 @@
 void Element::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) {
 	Q_UNUSED(e);
 
-	for (Element *elmt: linkedElements())
+	foreach (Element *elmt, linkedElements())
 		elmt -> setHighlighted(false);
 
 	m_mouse_over = false;

Modified: trunk/sources/qetgraphicsitem/elementtextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/elementtextitem.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/elementtextitem.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -210,7 +210,7 @@
 			linked -> setSelected(true);
 
 				//Zoom to the linked element
-			for (QGraphicsView *view: linked -> diagram() -> views()) {
+			foreach(QGraphicsView *view, linked -> diagram() -> views()) {
 				QRectF fit = linked -> sceneBoundingRect();
 				fit.adjust(-200, -200, 200, 200);
 				view -> fitInView(fit, Qt::KeepAspectRatioByExpanding);
@@ -328,7 +328,7 @@
 
 				//Also color the child text if parent is a slave and linked
 			if (parent_element_-> linkType() == Element::Slave && !parent_element_ -> isFree())
-				for (QGraphicsItem *qgi: childItems())
+				foreach (QGraphicsItem *qgi, childItems())
 					if (QGraphicsTextItem *qgti = qgraphicsitem_cast<QGraphicsTextItem *> (qgi))
 						qgti -> setDefaultTextColor(Qt::blue);
 		}
@@ -364,7 +364,7 @@
 
 			//Also color the child text if parent is a slave and linked
 		if (parent_element_-> linkType() == Element::Slave && !parent_element_ -> isFree())
-			for (QGraphicsItem *qgi: childItems())
+			foreach (QGraphicsItem *qgi, childItems())
 				if (QGraphicsTextItem *qgti = qgraphicsitem_cast<QGraphicsTextItem *> (qgi))
 					qgti -> setDefaultTextColor(Qt::black);
 	}

Modified: trunk/sources/qetgraphicsitem/ghostelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/ghostelement.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/ghostelement.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -58,7 +58,7 @@
 	terminalsFromXml(e, table_id_adr);
 	
 	// instancie les champs de texte decrits dans l'element XML
-	for (QDomElement qde: QET::findInDomElement(e, "inputs", "input")) {
+	foreach(QDomElement qde, QET::findInDomElement(e, "inputs", "input")) {
 		qde.setAttribute("size", 9); // arbitraire
 		if (ElementTextItem *new_input = CustomElement::parseInput(qde)) {
 			new_input -> fromXml(qde);
@@ -116,7 +116,7 @@
 */
 bool GhostElement::terminalsFromXml(QDomElement &e, QHash<int, Terminal *> &table_id_adr) {
 	// instancie les bornes decrites dans l'element XML
-	for (QDomElement qde: QET::findInDomElement(e, "terminals", "terminal")) {
+	foreach(QDomElement qde, QET::findInDomElement(e, "terminals", "terminal")) {
 		if (!Terminal::valideXml(qde)) continue;
 		
 		// modifie certains attributs pour que l'analyse par la classe CustomElement reussisse

Modified: trunk/sources/qetgraphicsitem/masterelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/masterelement.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/masterelement.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -79,7 +79,7 @@
 		// if this element is free no need to do something
 	if (!isFree())
 	{
-		for (Element *elmt: connected_elements)
+		foreach(Element *elmt, connected_elements)
 			unlinkElement(elmt);
 		emit linkedElementChanged();
 	}

Modified: trunk/sources/qetgraphicsitem/qetgraphicsitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/qetgraphicsitem.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/qetgraphicsitem.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -96,7 +96,7 @@
 	{
 			//Disable views context menu
 		if (scene())
-			for (QGraphicsView *view: scene()->views())
+			foreach (QGraphicsView *view, scene()->views())
 				view->setContextMenuPolicy(Qt::NoContextMenu);
 
 		first_move_ = true;
@@ -164,6 +164,6 @@
 		//Enable views context menu
 	if (e -> button() == Qt::LeftButton)
 		if (scene())
-			for (QGraphicsView *view: scene()->views())
+			foreach (QGraphicsView *view, scene()->views())
 				view -> setContextMenuPolicy(Qt::DefaultContextMenu);
 }

Modified: trunk/sources/qetgraphicsitem/qetshapeitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/qetshapeitem.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/qetshapeitem.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -259,7 +259,7 @@
 		else
 			vector = m_polygon;
 
-		for (QRectF r: m_handler.handlerRect(vector))
+		foreach(QRectF r, m_handler.handlerRect(vector))
 			path.addRect(r);
 	}
 
@@ -562,7 +562,7 @@
 		m_P2.setY(e.attribute("y2", 0).toDouble());
 	}
 	else
-		for (QDomElement de: QET::findInDomElement(e, "points", "point"))
+		foreach(QDomElement de, QET::findInDomElement(e, "points", "point"))
 			m_polygon << QPointF(de.attribute("x", 0).toDouble(), de.attribute("y", 0).toDouble());
 
 	return (true);
@@ -596,7 +596,7 @@
 	else
 	{
 		QDomElement points = document.createElement("points");
-		for (QPointF p: m_polygon)
+		foreach(QPointF p, m_polygon)
 		{
 			QDomElement point = document.createElement("point");
 			QPointF pf = mapToScene(p);

Modified: trunk/sources/qetgraphicsitem/reportelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/reportelement.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/reportelement.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -122,7 +122,7 @@
 
 	QList <Element *> tmp_elmt = connected_elements;
 
-	for (Element *elmt: connected_elements)
+	foreach(Element *elmt, connected_elements)
 	{
 		disconnect(elmt, SIGNAL(xChanged()), this, SLOT(updateLabel()));
 		disconnect(elmt, SIGNAL(yChanged()), this, SLOT(updateLabel()));
@@ -139,7 +139,7 @@
 	}
 	updateLabel();
 
-	for (Element *elmt: tmp_elmt)
+	foreach(Element *elmt, tmp_elmt)
 	{
 		elmt -> setHighlighted(false);
 		elmt -> unlinkAllElements();

Modified: trunk/sources/qetgraphicsitem/slaveelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/slaveelement.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/slaveelement.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -83,7 +83,7 @@
 		// if this element is free no need to do something
 	if (!isFree())
 	{
-		for (Element *elmt: connected_elements)
+		foreach(Element *elmt, connected_elements)
 			unlinkElement(elmt);
 		emit linkedElementChanged();
 	}

Modified: trunk/sources/qetgraphicsitem/terminal.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/terminal.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetgraphicsitem/terminal.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -134,7 +134,7 @@
 	associes.
 */
 Terminal::~Terminal() {
-	for (Conductor *c: conductors_) delete c;
+	foreach(Conductor *c, conductors_) delete c;
 	delete br_;
 }
 
@@ -194,7 +194,7 @@
 	Terminal *other_terminal = (conductor -> terminal1 == this) ? conductor->terminal2 : conductor->terminal1;
 	
 		//Check if this terminal isn't already linked with other_terminal
-	for (Conductor* cond: conductors_)
+	foreach (Conductor* cond, conductors_)
 		if (cond -> terminal1 == other_terminal || cond -> terminal2 == other_terminal)
 			return false; //They already a conductor linked to this and other_terminal
 
@@ -418,7 +418,7 @@
 	QList <QGraphicsItem *> qgi_list = diagram() -> items(path);
 
 		//Remove all terminals of the parent element
-	for (Terminal *t: parent_element_ -> terminals())
+	foreach (Terminal *t, parent_element_ -> terminals())
 		qgi_list.removeAll(t);
 
 	if (qgi_list.isEmpty()) return nullptr;
@@ -425,7 +425,7 @@
 
 		//Get terminals only if orientation is opposed with this terminal
 	QList <Terminal *>  available_terminals;
-	for (QGraphicsItem *qgi: qgi_list)
+	foreach (QGraphicsItem *qgi, qgi_list)
 	{
 		if (Terminal *tt = qgraphicsitem_cast <Terminal *> (qgi))
 		{
@@ -448,7 +448,7 @@
 	Terminal *nearest_terminal = available_terminals.takeFirst();
 
 		//Search the nearest terminal to this one
-	for (Terminal *terminal: available_terminals)
+	foreach (Terminal *terminal, available_terminals)
 	{
 		line.setP2(terminal -> dockConductor());
 		if (line.length() < current_lenght)
@@ -595,7 +595,7 @@
 	{
 		use_properties = true;
 		others_properties = (*conductors_list.begin())->properties();
-		for (Conductor *conductor: conductors_list) {
+		foreach (Conductor *conductor, conductors_list) {
 			if (conductor->properties() != others_properties)
 				use_properties = false;
 		}
@@ -632,7 +632,7 @@
  * Update the path of conductor docked to this terminal
  */
 void Terminal::updateConductor() {
-	for (Conductor *conductor: conductors_)
+	foreach (Conductor *conductor, conductors_)
 		conductor->updatePath();
 }
 
@@ -644,7 +644,7 @@
 	if (other_terminal == this) return(false);
 	
 	bool already_linked = false;
-	for (Conductor *c: conductors_) {
+	foreach (Conductor *c, conductors_) {
 		if (c -> terminal1 == other_terminal || c -> terminal2 == other_terminal) {
 			already_linked = true;
 			break;

Modified: trunk/sources/qetmainwindow.cpp
===================================================================
--- trunk/sources/qetmainwindow.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetmainwindow.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -59,7 +59,7 @@
 		qet_app->configureQET();
 		//TODO we use reloadOldElementPanel only to keep up to date the string of the folio in the old element panel.
 		//then, if user change the option "Use labels of folio instead of their ID" the string of folio in the old element panel is up to date
-		for (QETDiagramEditor *qde: qet_app->diagramEditors())
+		foreach (QETDiagramEditor *qde, qet_app->diagramEditors())
 			qde->reloadOldElementPanel();
 	});
 	

Modified: trunk/sources/qetprintpreviewdialog.cpp
===================================================================
--- trunk/sources/qetprintpreviewdialog.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetprintpreviewdialog.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -408,7 +408,7 @@
 	int current_zoom_index = -1;
 	zoom_box_ -> blockSignals(true);
 	zoom_box_ -> clear();
-	for (qreal z: zooms_real) {
+	foreach (qreal z, zooms_real) {
 		zoom_box_ -> addItem(QString(tr("%1 %")).arg(z * 100.0, 0, 'f', 2), z);
 		if (z == current_zoom) current_zoom_index = zoom_box_ -> count() - 1;
 	}

Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qetproject.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -737,7 +737,7 @@
 	// titleblock templates, if any
 	if (titleblocks_.templates().count()) {
 		QDomElement titleblocktemplates_elmt = xml_doc.createElement("titleblocktemplates");
-		for (QString template_name: titleblocks_.templates()) {
+		foreach (QString template_name, titleblocks_.templates()) {
 			QDomElement e = titleblocks_.getTemplateXmlDescription(template_name);
 			titleblocktemplates_elmt.appendChild(xml_doc.importNode(e, true));
 		}
@@ -758,7 +758,7 @@
 	
 	// qDebug() << "Export XML de" << diagrams_.count() << "schemas";
 	int order_num = 1;
-	for (Diagram *diagram: diagrams_) {
+	foreach(Diagram *diagram, diagrams_) {
 
 		// Write the diagram to XML only if it is not of type DiagramFolioList.
 		DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diagram);
@@ -848,7 +848,7 @@
 	
 	// compte le nombre de schemas non vides
 	int pertinent_diagrams = 0;
-	for (Diagram *diagram: diagrams_) {
+	foreach(Diagram *diagram, diagrams_) {
 		if (!diagram -> isEmpty()) ++ pertinent_diagrams;
 	}
 	
@@ -988,7 +988,7 @@
 */
 bool QETProject::usesElement(const ElementsLocation &location) const
 {
-	for (Diagram *diagram: diagrams()) {
+	foreach(Diagram *diagram, diagrams()) {
 		if (diagram -> usesElement(location)) {
 			return(true);
 		}
@@ -1007,7 +1007,7 @@
 {
 	QList <ElementsLocation> unused_list;
 
-	for (ElementsLocation location: m_elements_collection->elementsLocation())
+	foreach(ElementsLocation location, m_elements_collection->elementsLocation())
 		if (location.isElement() && !usesElement(location))
 			unused_list << location;
 
@@ -1023,7 +1023,7 @@
 	// a diagram can only use a title block template embedded wihtin its parent project
 	if (location.parentProject() != this) return(false);
 	
-	for (Diagram *diagram: diagrams()) {
+	foreach (Diagram *diagram, diagrams()) {
 		if (diagram -> usesTitleBlockTemplate(location.name())) {
 			return(true);
 		}
@@ -1279,12 +1279,12 @@
 	}
 	
 		//Add the diagrams according to there "order" attribute
-	for (Diagram *diagram: loaded_diagrams.values())
+	foreach(Diagram *diagram, loaded_diagrams.values())
 		addDiagram(diagram);
 
 		//Initialise links between elements in this project
 		//and refresh the text of conductor
-	for (Diagram *d: diagrams())
+	foreach (Diagram *d, diagrams())
 		d->refreshContents();
 
 	delete dlgWaiting;
@@ -1323,7 +1323,7 @@
  */
 void QETProject::readProjectPropertiesXml(QDomDocument &xml_project)
 {
-	for (QDomElement e: QET::findInDomElement(xml_project.documentElement(), "properties"))
+	foreach (QDomElement e, QET::findInDomElement(xml_project.documentElement(), "properties"))
 		project_properties_.fromXml(e);
 }
 
@@ -1381,7 +1381,7 @@
 	if (!report_elmt.isNull())	   setDefaultReportProperties(report_elmt.attribute("label"));
 	if (!xref_elmt.isNull())
 	{
-		for (QDomElement elmt: QET::findInDomElement(xref_elmt, "xref"))
+		foreach(QDomElement elmt, QET::findInDomElement(xref_elmt, "xref"))
 		{
 			XRefProperties xrp;
 			xrp.fromXml(elmt);
@@ -1392,7 +1392,7 @@
 	{
 		m_current_conductor_autonum = conds_autonums.attribute("current_autonum");
 		m_freeze_new_conductors = conds_autonums.attribute("freeze_new_conductors") == "true";
-		for (QDomElement elmt: QET::findInDomElement(conds_autonums, "conductor_autonum"))
+		foreach (QDomElement elmt, QET::findInDomElement(conds_autonums, "conductor_autonum"))
 		{
 			NumerotationContext nc;
 			nc.fromXml(elmt);
@@ -1401,7 +1401,7 @@
 	}
 	if (!folio_autonums.isNull())
 	{
-		for (QDomElement elmt: QET::findInDomElement(folio_autonums, "folio_autonum"))
+		foreach (QDomElement elmt, QET::findInDomElement(folio_autonums, "folio_autonum"))
 		{
 			NumerotationContext nc;
 			nc.fromXml(elmt);
@@ -1412,7 +1412,7 @@
 	{
 		m_current_element_autonum = element_autonums.attribute("current_autonum");
 		m_freeze_new_elements = element_autonums.attribute("freeze_new_elements") == "true";
-		for (QDomElement elmt: QET::findInDomElement(element_autonums, "element_autonum"))
+		foreach (QDomElement elmt, QET::findInDomElement(element_autonums, "element_autonum"))
 		{
 			NumerotationContext nc;
 			nc.fromXml(elmt);
@@ -1463,7 +1463,7 @@
 
 	// export default XRef properties
 	QDomElement xrefs_elmt = xml_document.createElement("xrefs");
-	for (QString key: defaultXRefProperties().keys()) {
+	foreach (QString key, defaultXRefProperties().keys()) {
 		QDomElement xref_elmt = xml_document.createElement("xref");
 		xref_elmt.setAttribute("type", key);
 		defaultXRefProperties()[key].toXml(xref_elmt);
@@ -1475,7 +1475,7 @@
 	QDomElement conductor_autonums = xml_document.createElement("conductors_autonums");
 	conductor_autonums.setAttribute("current_autonum", m_current_conductor_autonum);
 	conductor_autonums.setAttribute("freeze_new_conductors", m_freeze_new_conductors ? "true" : "false");
-	for (QString key: conductorAutoNum().keys()) {
+	foreach (QString key, conductorAutoNum().keys()) {
 	QDomElement conductor_autonum = conductorAutoNum(key).toXml(xml_document, "conductor_autonum");
 		if (key != "" && conductorAutoNumFormula(key) != "") {
 			conductor_autonum.setAttribute("title", key);
@@ -1487,7 +1487,7 @@
 
 	//Export Folio Autonums
 	QDomElement folio_autonums = xml_document.createElement("folio_autonums");
-	for (QString key: folioAutoNum().keys()) {
+	foreach (QString key, folioAutoNum().keys()) {
 	QDomElement folio_autonum = folioAutoNum(key).toXml(xml_document, "folio_autonum");
 		folio_autonum.setAttribute("title", key);
 		folio_autonums.appendChild(folio_autonum);
@@ -1498,7 +1498,7 @@
 	QDomElement element_autonums = xml_document.createElement("element_autonums");
 	element_autonums.setAttribute("current_autonum", m_current_element_autonum);
 	element_autonums.setAttribute("freeze_new_elements", m_freeze_new_elements ? "true" : "false");
-	for (QString key: elementAutoNum().keys()) {
+	foreach (QString key, elementAutoNum().keys()) {
 	QDomElement element_autonum = elementAutoNum(key).toXml(xml_document, "element_autonum");
 		if (key != "" && elementAutoNumFormula(key) != "") {
 			element_autonum.setAttribute("title", key);
@@ -1652,7 +1652,7 @@
 void QETProject::updateDiagramsTitleBlockTemplate(TitleBlockTemplatesCollection *collection, const QString &template_name) {
 	Q_UNUSED(collection)
 	
-	for (Diagram *diagram: diagrams_) {
+	foreach (Diagram *diagram, diagrams_) {
 		diagram -> titleBlockTemplateChanged(template_name);
 	}
 }
@@ -1666,7 +1666,7 @@
 	Q_UNUSED(collection)
 	
 	// warn diagrams that the given template is about to be removed
-	for (Diagram *diagram: diagrams_) {
+	foreach (Diagram *diagram, diagrams_) {
 		diagram -> titleBlockTemplateRemoved(template_name);
 	}
 }

Modified: trunk/sources/qgimanager.cpp
===================================================================
--- trunk/sources/qgimanager.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qgimanager.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -36,7 +36,7 @@
 */
 QGIManager::~QGIManager(){
 	if (!destroy_qgi_on_delete) return;
-	for (QGraphicsItem *qgi: qgi_manager.keys()) {
+	foreach(QGraphicsItem *qgi, qgi_manager.keys()) {
 		if (!scene -> items().contains(qgi)) delete qgi;
 	}
 }
@@ -71,7 +71,7 @@
 	@param qgis QGraphicsItems a gerer
 */
 void QGIManager::manage(const QList<QGraphicsItem *> &qgis) {
-	for (QGraphicsItem *qgi: qgis) manage(qgi);
+	foreach(QGraphicsItem *qgi, qgis) manage(qgi);
 }
 
 /**
@@ -82,7 +82,7 @@
 	@param qgis QGraphicsItems a ne plus gerer
 */
 void QGIManager::release(const QList<QGraphicsItem *> &qgis) {
-	for (QGraphicsItem *qgi: qgis) release(qgi);
+	foreach(QGraphicsItem *qgi, qgis) release(qgi);
 }
 
 /**

Modified: trunk/sources/qtextorientationwidget.cpp
===================================================================
--- trunk/sources/qtextorientationwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/qtextorientationwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -82,7 +82,7 @@
 	text_font_ = font;
 	
 	// invalide le cache contenant les longueurs des textes a disposition
-	for (QString text: text_size_hash_.keys()) {
+	foreach(QString text, text_size_hash_.keys()) {
 		text_size_hash_[text] = -1;
 	}
 }
@@ -119,7 +119,7 @@
 	if (texts_list.isEmpty()) return;
 	
 	// on oublie les anciennes chaines
-	for (QString text: text_size_hash_.keys()) {
+	foreach(QString text, text_size_hash_.keys()) {
 		// il faut oublier les anciennes chaines
 		if (!texts_list.contains(text)) {
 			text_size_hash_.remove(text);
@@ -127,7 +127,7 @@
 	}
 	
 	// on ajoute les nouvelles, sans les calculer (on met -1 en guise de longueur)
-	for (QString text: texts_list) {
+	foreach(QString text, texts_list) {
 		if (!text_size_hash_.contains(text)) {
 			text_size_hash_[text] = -1;
 		}
@@ -306,7 +306,7 @@
 */
 void QTextOrientationWidget::generateTextSizeHash() {
 	QFontMetrics font_metrics(text_font_);
-	for (QString text: text_size_hash_.keys()) {
+	foreach(QString text, text_size_hash_.keys()) {
 		if (text_size_hash_[text] == -1) {
 			text_size_hash_[text] = font_metrics.boundingRect(text).width();
 		}

Modified: trunk/sources/recentfiles.cpp
===================================================================
--- trunk/sources/recentfiles.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/recentfiles.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -173,7 +173,7 @@
 	}
 	
 	// remplit le menu
-	for (QString filepath: list_) {
+	foreach (QString filepath, list_) {
 		// creee une nouvelle action pour le fichier
 		QAction *action = new QAction(filepath, this);
 		if (!files_icon_.isNull()) {

Modified: trunk/sources/richtext/richtexteditor.cpp
===================================================================
--- trunk/sources/richtext/richtexteditor.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/richtext/richtexteditor.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -440,7 +440,7 @@
     // Font size combo box
     m_font_size_input->setEditable(false);
     const QList<int> font_sizes = QFontDatabase::standardSizes();
-    for (int font_size: font_sizes)
+    foreach (int font_size, font_sizes)
         m_font_size_input->addItem(QString::number(font_size));
 
     connect(m_font_size_input, SIGNAL(activated(QString)),

Modified: trunk/sources/titleblock/helpercell.cpp
===================================================================
--- trunk/sources/titleblock/helpercell.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblock/helpercell.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -137,7 +137,7 @@
 	if (actions_.isEmpty()) return;
 	
 	QMenu context_menu;
-	for (QAction *action: actions_) {
+	foreach (QAction *action, actions_) {
 		context_menu.addAction(action);
 	}
 	emit(contextMenuTriggered(this));

Modified: trunk/sources/titleblock/templatecellsset.cpp
===================================================================
--- trunk/sources/titleblock/templatecellsset.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblock/templatecellsset.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -50,7 +50,7 @@
 */
 QPainterPath TitleBlockTemplateCellsSet::painterPath() const {
 	QPainterPath cells_path;
-	for (TitleBlockTemplateVisualCell *cell: *this) {
+	foreach (TitleBlockTemplateVisualCell *cell, *this) {
 		cells_path.addRect(cell -> geometry());
 	}
 	return(cells_path);
@@ -74,7 +74,7 @@
 	@return true if all cells within this set are selected
 */
 bool TitleBlockTemplateCellsSet::allCellsAreSelected() const {
-	for (TitleBlockTemplateVisualCell *cell: *this) {
+	foreach (TitleBlockTemplateVisualCell *cell, *this) {
 		if (!cell -> isSelected()) {
 			return(false);
 		}
@@ -91,7 +91,7 @@
 	QSet<TitleBlockCell *> all_cells = cells(true);
 	
 	// look for cells spanned by cells that do not belong to this set
-	for (TitleBlockCell *cell: all_cells) {
+	foreach (TitleBlockCell *cell, all_cells) {
 		if (cell -> spanner_cell && !all_cells.contains(cell -> spanner_cell)) {
 			return(true);
 		}
@@ -108,7 +108,7 @@
 	
 	// look for cells at the top
 	QMultiMap<int, TitleBlockTemplateVisualCell *> top_cells;
-	for (TitleBlockTemplateVisualCell *cell_view: *this) {
+	foreach (TitleBlockTemplateVisualCell *cell_view, *this) {
 		if (TitleBlockCell *cell = cell_view -> cell()) {
 			top_cells.insertMulti(cell -> num_row, cell_view);
 		}
@@ -119,7 +119,7 @@
 	// look for the cell at the left
 	int lowest_num_col = 100000;
 	TitleBlockTemplateVisualCell *candidate = 0;
-	for (TitleBlockTemplateVisualCell *cell_view: candidates) {
+	foreach (TitleBlockTemplateVisualCell *cell_view, candidates) {
 		if (TitleBlockCell *cell = cell_view -> cell()) {
 			if (cell -> num_col < lowest_num_col) {
 				lowest_num_col = cell -> num_col;
@@ -139,7 +139,7 @@
 	
 	// look for cells at the bottom
 	QMultiMap<qreal, TitleBlockTemplateVisualCell *> bottom_cells;
-	for (TitleBlockTemplateVisualCell *cell_view: *this) {
+	foreach (TitleBlockTemplateVisualCell *cell_view, *this) {
 		bottom_cells.insertMulti(cell_view -> geometry().bottom(), cell_view);
 	}
 	QList<TitleBlockTemplateVisualCell *> candidates = bottom_cells.values(bottom_cells.keys().last());
@@ -148,7 +148,7 @@
 	// look for the cell at the right
 	qreal highest_right = -100000;
 	TitleBlockTemplateVisualCell *candidate = 0;
-	for (TitleBlockTemplateVisualCell *cell_view: candidates) {
+	foreach (TitleBlockTemplateVisualCell *cell_view, candidates) {
 		qreal right = cell_view -> geometry().right();
 		if (right > highest_right) {
 			highest_right = right;
@@ -197,10 +197,10 @@
 */
 QSet<TitleBlockCell *> TitleBlockTemplateCellsSet::cells(bool include_spanned) const {
 	QSet<TitleBlockCell *> set;
-	for (TitleBlockTemplateVisualCell *cell_view: *this) {
+	foreach (TitleBlockTemplateVisualCell *cell_view, *this) {
 		if (TitleBlockCell *cell = cell_view -> cell()) {
 			if (include_spanned) {
-				for (TitleBlockCell *cell: cell_view -> cells()) {
+				foreach (TitleBlockCell *cell, cell_view -> cells()) {
 					set << cell;
 				}
 			} else {

Modified: trunk/sources/titleblock/templatecellwidget.cpp
===================================================================
--- trunk/sources/titleblock/templatecellwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblock/templatecellwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -308,7 +308,7 @@
 	logo_input_ -> setCurrentIndex(0);
 	
 	if (!parent_template) return;
-	for (QString logo: parent_template -> logos()) {
+	foreach (QString logo, parent_template -> logos()) {
 		logo_input_ -> addItem(logo, QVariant(logo));
 	}
 	int current_value_index = logo_input_ -> findData(current_value);

Modified: trunk/sources/titleblock/templatecommands.cpp
===================================================================
--- trunk/sources/titleblock/templatecommands.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblock/templatecommands.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -72,7 +72,7 @@
 */
 void ModifyTitleBlockCellCommand::undo() {
 	if (!modified_cell_) return;
-	for (QString attribute: old_values_.keys()) {
+	foreach (QString attribute, old_values_.keys()) {
 		modified_cell_ -> setAttribute(attribute, old_values_[attribute]);
 	}
 	if (view_) view_ -> refresh();
@@ -83,7 +83,7 @@
 */
 void ModifyTitleBlockCellCommand::redo() {
 	if (!modified_cell_) return;
-	for (QString attribute: new_values_.keys()) {
+	foreach (QString attribute, new_values_.keys()) {
 		modified_cell_ -> setAttribute(attribute, new_values_[attribute]);
 	}
 	if (view_) view_ -> refresh();
@@ -601,7 +601,7 @@
 	if (!spanning_cell_) return;
 	
 	// store the spanner_cell attribute of each cell implied in the merge
-	for (TitleBlockCell *cell: merged_cells.cells()) {
+	foreach(TitleBlockCell *cell, merged_cells.cells()) {
 		spanner_cells_before_merge_.insert(cell, cell -> spanner_cell);
 	}
 	
@@ -670,7 +670,7 @@
 	if (!isValid()) return;
 	
 	// restore the original spanning_cell attribute of all impacted cells
-	for (TitleBlockCell *cell: spanner_cells_before_merge_.keys()) {
+	foreach (TitleBlockCell *cell, spanner_cells_before_merge_.keys()) {
 		cell -> spanner_cell = spanner_cells_before_merge_[cell];
 	}
 	
@@ -691,7 +691,7 @@
 	if (!isValid()) return;
 	
 	// set the spanning_cell attributes of spanned cells to the spanning cell
-	for (TitleBlockCell *cell: spanner_cells_before_merge_.keys()) {
+	foreach (TitleBlockCell *cell, spanner_cells_before_merge_.keys()) {
 		if (cell == spanning_cell_) continue;
 		cell -> spanner_cell = spanning_cell_;
 	}
@@ -723,7 +723,7 @@
 	// we then look for the bottom right logical cell
 	int max_num_row = -1, max_num_col = -1;
 	TitleBlockCell *candidate = 0;
-	for (TitleBlockCell *cell: logical_cells) {
+	foreach(TitleBlockCell *cell, logical_cells) {
 		if (cell -> num_row > max_num_row) max_num_row = cell -> num_row;
 		if (cell -> num_col > max_num_col) max_num_col = cell -> num_col;
 		if (cell -> num_row == max_num_row && cell -> num_col == max_num_col) {
@@ -810,7 +810,7 @@
 	if (!isValid()) return;
 	
 	// the spanned cells are spanned again
-	for (TitleBlockCell *cell: spanned_cells_) {
+	foreach(TitleBlockCell *cell, spanned_cells_) {
 		cell -> spanner_cell = spanning_cell_;
 	}
 	
@@ -831,7 +831,7 @@
 	if (!isValid()) return;
 	
 	// the spanned cells are not spanned anymore
-	for (TitleBlockCell *cell: spanned_cells_) {
+	foreach(TitleBlockCell *cell, spanned_cells_) {
 		cell -> spanner_cell = 0;
 	}
 	
@@ -898,7 +898,7 @@
 	Undo a cut operation
 */
 void CutTemplateCellsCommand::undo() {
-	for (TitleBlockCell *cell: cut_cells_.keys()) {
+	foreach (TitleBlockCell *cell, cut_cells_.keys()) {
 		cell -> cell_type = cut_cells_.value(cell);
 	}
 	refreshView();
@@ -908,7 +908,7 @@
 	Redo a cut operation
 */
 void CutTemplateCellsCommand::redo() {
-	for (TitleBlockCell *cell: cut_cells_.keys()) {
+	foreach (TitleBlockCell *cell, cut_cells_.keys()) {
 		cell -> cell_type = TitleBlockCell::EmptyCell;
 	}
 	refreshView();
@@ -915,7 +915,7 @@
 }
 
 void CutTemplateCellsCommand::setCutCells(const QList<TitleBlockCell *> &cells) {
-	for (TitleBlockCell *cell: cells) {
+	foreach (TitleBlockCell *cell, cells) {
 		cut_cells_.insert(cell, cell -> cell_type);
 	}
 	updateText();
@@ -957,7 +957,7 @@
 */
 void PasteTemplateCellsCommand::undo() {
 	bool span_management = erased_cells_.count() > 1;
-	for (TitleBlockCell *cell: erased_cells_.keys()) {
+	foreach (TitleBlockCell *cell, erased_cells_.keys()) {
 		cell -> loadContentFromCell(erased_cells_.value(cell));
 	}
 	if (span_management) {
@@ -987,7 +987,7 @@
 	}
 	
 	// copy data from each pasted cell into each erased cell
-	for (TitleBlockCell *cell: erased_cells_.keys()) {
+	foreach (TitleBlockCell *cell, erased_cells_.keys()) {
 		if (span_management) {
 			// the erased cell may be spanned by another cell
 			if (TitleBlockCell *spanning_cell = cell -> spanner_cell) {
@@ -1012,7 +1012,7 @@
 				
 				if (cell -> row_span || cell -> col_span) {
 					// browse newly spanned cells...
-					for (TitleBlockCell *spanned_cell: tbtemplate_ -> spannedCells(cell, true)) {
+					foreach (TitleBlockCell *spanned_cell, tbtemplate_ -> spannedCells(cell, true)) {
 						// ... to ensure they are not already spanned by other cells
 						if (spanned_cell -> spanner_cell && spanned_cell -> spanner_cell != cell) {
 							// if so, simply cancel the whole spanning

Modified: trunk/sources/titleblock/templatelocationchooser.cpp
===================================================================
--- trunk/sources/titleblock/templatelocationchooser.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblock/templatelocationchooser.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -116,7 +116,7 @@
 	collections_index_.clear();
 	
 	int index = 0;
-	for (TitleBlockTemplatesCollection *collection: QETApp::availableTitleBlockTemplatesCollections()) {
+	foreach(TitleBlockTemplatesCollection *collection, QETApp::availableTitleBlockTemplatesCollections()) {
 		collections_ -> addItem(collection -> title());
 		collections_index_.insert(index, collection);
 		++ index;
@@ -136,7 +136,7 @@
 	
 	QStringList available_templates = current_collection -> templates();
 	if (available_templates.count()) {
-		for (QString template_name: available_templates) {
+		foreach (QString template_name, available_templates) {
 			templates_ -> addItem(template_name, QVariant(true));
 		}
 	}

Modified: trunk/sources/titleblock/templatelogomanager.cpp
===================================================================
--- trunk/sources/titleblock/templatelogomanager.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblock/templatelogomanager.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -137,7 +137,7 @@
 	if (!managed_template_) return;
 	logos_view_ -> clear();
 	
-	for (QString logo_name: managed_template_ -> logos()) {
+	foreach (QString logo_name, managed_template_ -> logos()) {
 		QIcon current_icon;
 		QPixmap current_logo = managed_template_ -> bitmapLogo(logo_name);
 		if (!current_logo.isNull()) {

Modified: trunk/sources/titleblock/templatescollection.cpp
===================================================================
--- trunk/sources/titleblock/templatescollection.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblock/templatescollection.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -98,7 +98,7 @@
 */
 QList<TitleBlockTemplateLocation> TitleBlockTemplatesCollection::templatesLocations() {
 	QList<TitleBlockTemplateLocation> locations;
-	for (QString template_name: templates()) {
+	foreach (QString template_name, templates()) {
 		locations << location(template_name);
 	}
 	return(locations);
@@ -320,7 +320,7 @@
 	@param xml_element XML element to be parsed to load title block templates
 */
 void TitleBlockTemplatesProjectCollection::fromXml(const QDomElement &xml_element) {
-	for (QDomElement e: QET::findInDomElement(xml_element, "titleblocktemplates", "titleblocktemplate")) {
+	foreach (QDomElement e, QET::findInDomElement(xml_element, "titleblocktemplates", "titleblocktemplate")) {
 		// each titleblock template must have a name
 		if (!e.hasAttribute("name")) continue;
 		QString titleblock_template_name = e.attribute("name");
@@ -340,7 +340,7 @@
 void TitleBlockTemplatesProjectCollection::deleteUnusedTitleBlocKTemplates() {
 	if (!project_) return;
 	
-	for (QString template_name: templates()) {
+	foreach (QString template_name, templates()) {
 		if (!project_ -> usesTitleBlockTemplate(location(template_name))) {
 			removeTemplate(template_name);
 		}
@@ -390,7 +390,7 @@
 QStringList TitleBlockTemplatesFilesCollection::templates() {
 	QStringList templates_names;
 	QRegExp replace_regexp(QString("%1$").arg(TITLEBLOCKS_FILE_EXTENSION));
-	for (QString name: dir_.entryList()) {
+	foreach(QString name, dir_.entryList()) {
 		templates_names << name.replace(replace_regexp, "");
 	}
 	return(templates_names);

Modified: trunk/sources/titleblock/templateview.cpp
===================================================================
--- trunk/sources/titleblock/templateview.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblock/templateview.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -158,7 +158,7 @@
 	QDomDocument xml_export;
 	QDomElement tbtpartial = xml_export.createElement("titleblocktemplate-partial");
 	xml_export.appendChild(tbtpartial);
-	for (TitleBlockCell *cell: copied_cells) {
+	foreach (TitleBlockCell *cell, copied_cells) {
 		tbtemplate_ -> exportCellToXml(cell, tbtpartial);
 		tbtpartial.setAttribute("row", cell -> num_row);
 		tbtpartial.setAttribute("col", cell -> num_col);
@@ -248,7 +248,7 @@
 	normalizeCells(pasted_cells, erased_cell -> num_row, erased_cell -> num_col);
 	
 	PasteTemplateCellsCommand *paste_command = new PasteTemplateCellsCommand(tbtemplate_);
-	for (TitleBlockCell cell: pasted_cells) {
+	foreach (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 @@
 */
 TitleBlockTemplateCellsSet TitleBlockTemplateView::makeCellsSetFromGraphicsItems(const QList<QGraphicsItem *> &items) const {
 	TitleBlockTemplateCellsSet set(this);
-	for (QGraphicsItem *item: items) {
+	foreach (QGraphicsItem *item, items) {
 		if (TitleBlockTemplateVisualCell *cell_view = dynamic_cast<TitleBlockTemplateVisualCell *>(item)) {
 			if (cell_view -> cell() && cell_view -> cell() -> num_row != -1) {
 				set << cell_view;

Modified: trunk/sources/titleblockproperties.cpp
===================================================================
--- trunk/sources/titleblockproperties.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblockproperties.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -125,7 +125,7 @@
 	
 	// reads the additional fields used to fill the title block
 	context.clear();
-	for (QDomElement e: QET::findInDomElement(e, "properties")) {
+	foreach (QDomElement e, QET::findInDomElement(e, "properties")) {
 		context.fromXml(e);
 	}
 }

Modified: trunk/sources/titleblocktemplate.cpp
===================================================================
--- trunk/sources/titleblocktemplate.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/titleblocktemplate.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -172,7 +172,7 @@
 	copy -> information_ = information_;
 	
 	// this does not really duplicates pixmaps, only the objects that hold a key to the implicitly shared pixmaps
-	for (QString logo_key: bitmap_logos_.keys()) {
+	foreach (QString logo_key, bitmap_logos_.keys()) {
 		copy -> bitmap_logos_[logo_key] = QPixmap(bitmap_logos_[logo_key]);
 #ifdef TITLEBLOCK_TEMPLATE_DEBUG
 		qDebug() << Q_FUNC_INFO << "copying " << bitmap_logos_[logo_key] -> cacheKey() << "to" << copy -> bitmap_logos_[logo_key] -> cacheKey();
@@ -180,7 +180,7 @@
 	}
 	
 	// we have to create new QSvgRenderer objects from the data (no copy constructor)
-	for (QString logo_key: vector_logos_.keys()) {
+	foreach (QString logo_key, vector_logos_.keys()) {
 		copy -> vector_logos_[logo_key] = new QSvgRenderer(data_logos_[logo_key]);
 	}
 	
@@ -336,7 +336,7 @@
 	bool conv_ok;
 	
 	QStringList rows_descriptions = rows_string.split(QChar(';'), QString::SkipEmptyParts);
-	for (QString rows_description: rows_descriptions) {
+	foreach (QString rows_description, rows_descriptions) {
 		if (row_size_format.exactMatch(rows_description)) {
 			int row_size = row_size_format.capturedTexts().at(1).toInt(&conv_ok);
 			if (conv_ok) rows_heights_ << row_size;
@@ -359,7 +359,7 @@
 	bool conv_ok;
 	
 	QStringList cols_descriptions = cols_string.split(QChar(';'), QString::SkipEmptyParts);
-	for (QString cols_description: cols_descriptions) {
+	foreach (QString cols_description, cols_descriptions) {
 		if (abs_col_size_format.exactMatch(cols_description)) {
 			int col_size = abs_col_size_format.capturedTexts().at(1).toInt(&conv_ok);
 			if (conv_ok) columns_width_ << TitleBlockDimension(col_size, QET::Absolute);
@@ -370,7 +370,7 @@
 		}
 	}
 #ifdef TITLEBLOCK_TEMPLATE_DEBUG
-	for (TitleBlockColDimension icd, columns_width_) {
+	foreach (TitleBlockColDimension icd, columns_width_) {
 		qDebug() << Q_FUNC_INFO << QString("%1 [%2]").arg(icd.value).arg(QET::titleBlockColumnLengthToString(icd.type));
 	}
 #endif
@@ -423,7 +423,7 @@
 */
 void TitleBlockTemplate::saveLogos(QDomElement &xml_element) const {
 	QDomElement logos_element = xml_element.ownerDocument().createElement("logos");
-	for (QString logo_name: type_logos_.keys()) {
+	foreach(QString logo_name, type_logos_.keys()) {
 		QDomElement logo_element = xml_element.ownerDocument().createElement("logo");
 		saveLogo(logo_name, logo_element);
 		logos_element.appendChild(logo_element);
@@ -462,8 +462,8 @@
 	QDomElement grid_element = xml_element.ownerDocument().createElement("grid");
 	
 	QString rows_attr, cols_attr;
-	for (int row_height: rows_heights_) rows_attr += QString("%1;").arg(row_height);
-	for (TitleBlockDimension col_width: columns_width_) cols_attr += col_width.toShortString();
+	foreach(int row_height, rows_heights_) rows_attr += QString("%1;").arg(row_height);
+	foreach(TitleBlockDimension col_width, columns_width_) cols_attr += col_width.toShortString();
 	grid_element.setAttribute("rows", rows_attr);
 	grid_element.setAttribute("cols", cols_attr);
 	
@@ -719,7 +719,7 @@
 			int share = difference > 0 ? 1 : -1;
 			if (qAbs(difference) <= max_acceptable_difference) {
 				while (difference) {
-					for (int index: relative_columns) {
+					foreach (int index, relative_columns) {
 						final_widths[index] += share;
 						difference -= share;
 						if (!difference) break;
@@ -807,7 +807,7 @@
 */
 int TitleBlockTemplate::width(int total_width) {
 	int width = 0;
-	for (int col_width: columnsWidth(total_width)) {
+	foreach (int col_width, columnsWidth(total_width)) {
 		width += col_width;
 	}
 	return(width);
@@ -818,7 +818,7 @@
 */
 int TitleBlockTemplate::height() const {
 	int height = 0;
-	for (int row_height: rows_heights_) {
+	foreach(int row_height, rows_heights_) {
 		height += row_height;
 	}
 	return(height);
@@ -1011,7 +1011,7 @@
 	Restore a set of span parameters.
 */
 void TitleBlockTemplate::setAllSpans(const QHash<TitleBlockCell *, QPair<int, int> > &spans) {
-	for (TitleBlockCell *cell: spans.keys()) {
+	foreach (TitleBlockCell *cell, spans.keys()) {
 		cell -> row_span = spans[cell].first;
 		cell -> col_span = spans[cell].second;
 	}
@@ -1362,7 +1362,7 @@
 */
 QString TitleBlockTemplate::interpreteVariables(const QString &string, const DiagramContext &diagram_context) const {
 	QString interpreted_string = string;
-	for (QString key: diagram_context.keys(DiagramContext::DecreasingLength)) {
+	foreach (QString key, diagram_context.keys(DiagramContext::DecreasingLength)) {
 		interpreted_string.replace("%{" + key + "}", diagram_context[key].toString());
 		interpreted_string.replace("%" + key,        diagram_context[key].toString());
 	}
@@ -1505,7 +1505,7 @@
 */
 void TitleBlockTemplate::forgetSpanning(TitleBlockCell *spanning_cell, bool modify_cell) {
 	if (!spanning_cell) return;
-	for (TitleBlockCell *spanned_cell: spannedCells(spanning_cell)) {
+	foreach (TitleBlockCell *spanned_cell, spannedCells(spanning_cell)) {
 		spanned_cell -> spanner_cell = 0;
 	}
 	if (modify_cell) {

Modified: trunk/sources/ui/conductorpropertiesdialog.cpp
===================================================================
--- trunk/sources/ui/conductorpropertiesdialog.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ui/conductorpropertiesdialog.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -74,7 +74,7 @@
 	{
 		undo->setText(tr("Modifier les propriétés de plusieurs conducteurs", "undo caption"));
 
-		for (Conductor *potential_conductor: conductor->relatedPotentialConductors())
+		foreach (Conductor *potential_conductor, conductor->relatedPotentialConductors())
 		{
 			old_value.setValue(potential_conductor->properties());
 			new QPropertyUndoCommand (potential_conductor, "properties", old_value, new_value, undo);

Modified: trunk/sources/ui/diagrampropertieseditordockwidget.cpp
===================================================================
--- trunk/sources/ui/diagrampropertieseditordockwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ui/diagrampropertieseditordockwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -125,7 +125,7 @@
 			clear();
 	}
 
-	for (PropertiesEditorWidget *pew: editors())
+	foreach (PropertiesEditorWidget *pew, editors())
 		pew->setLiveEdit(true);
 }
 

Modified: trunk/sources/ui/elementinfowidget.cpp
===================================================================
--- trunk/sources/ui/elementinfowidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ui/elementinfowidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -157,7 +157,7 @@
  */
 void ElementInfoWidget::enableLiveEdit()
 {
-	for (ElementInfoPartWidget *eipw: m_eipw_list)
+	foreach (ElementInfoPartWidget *eipw, m_eipw_list)
 	{
 		connect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
 		connect(eipw, &ElementInfoPartWidget::showClicked, this, &ElementInfoWidget::apply);
@@ -170,7 +170,7 @@
  */
 void ElementInfoWidget::disableLiveEdit()
 {
-	for (ElementInfoPartWidget *eipw: m_eipw_list)
+	foreach (ElementInfoPartWidget *eipw, m_eipw_list)
 	{
 		disconnect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
 		disconnect(eipw, &ElementInfoPartWidget::showClicked, this, &ElementInfoWidget::apply);
@@ -183,7 +183,7 @@
  */
 void ElementInfoWidget::buildInterface()
 {
-	for (QString str: QETApp::elementInfoKeys())
+	foreach (QString str, QETApp::elementInfoKeys())
 	{
 		ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETApp::elementTranslatedInfoKey(str), this);
 		ui->scroll_vlayout->addWidget(eipw);
@@ -199,7 +199,7 @@
  */
 ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &key) const
 {
-	for (ElementInfoPartWidget *eipw: m_eipw_list)
+	foreach (ElementInfoPartWidget *eipw, m_eipw_list)
 	{
 		if (eipw->key() == key)
 			return eipw;
@@ -219,7 +219,7 @@
 	if (m_live_edit) disableLiveEdit();
 
 	DiagramContext element_info = m_element->elementInformations();
-	for (ElementInfoPartWidget *eipw: m_eipw_list)
+	foreach (ElementInfoPartWidget *eipw, m_eipw_list)
 	{
 
 		eipw -> setText (element_info[eipw->key()].toString());
@@ -246,7 +246,7 @@
 {
 	DiagramContext info_;
 
-	for (ElementInfoPartWidget *eipw: m_eipw_list)
+	foreach (ElementInfoPartWidget *eipw, m_eipw_list)
 		if (!eipw->text().isEmpty()) //add value only if they're something to store
 			info_.addValue(eipw->key(), eipw->text(), eipw->mustShow());
 

Modified: trunk/sources/ui/elementpropertieswidget.cpp
===================================================================
--- trunk/sources/ui/elementpropertieswidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ui/elementpropertieswidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -61,7 +61,7 @@
 			//If previous element is same type as new element we just call setElement for each editor
 		if(previous_element->linkType() == m_element->linkType())
 		{
-			for (AbstractElementPropertiesEditorWidget *aepew: m_list_editor)
+			foreach (AbstractElementPropertiesEditorWidget *aepew, m_list_editor)
 			{
 				aepew->setElement(m_element);
 				addGeneralWidget();
@@ -81,7 +81,7 @@
 {
 	QList <QUndoCommand *> undo_list;
 
-	for (PropertiesEditorWidget *pew: m_list_editor)
+	foreach (PropertiesEditorWidget *pew, m_list_editor)
 		if (QUndoCommand *undo = pew->associatedUndo())
 			undo_list << undo;
 
@@ -88,14 +88,14 @@
 	if (undo_list.isEmpty()) return;
 
 	QString str;
-	for (QUndoCommand *uc: undo_list) str += uc->text() += " ";
+	foreach(QUndoCommand *uc, undo_list) str += uc->text() += " ";
 
 	QUndoStack &stack = m_element -> diagram() -> undoStack();
 	stack.beginMacro(str);
-	for (QUndoCommand *uc: undo_list) stack.push(uc);
+	foreach(QUndoCommand *uc, undo_list) stack.push(uc);
 	stack.endMacro();
 
-	for (PropertiesEditorWidget *pew: m_list_editor)
+	foreach(PropertiesEditorWidget *pew, m_list_editor)
 		pew->updateUi();
 }
 
@@ -104,7 +104,7 @@
  * Reset the edited properties
  */
 void ElementPropertiesWidget::reset() {
-	for (PropertiesEditorWidget *pew: m_list_editor) pew->reset();
+	foreach (PropertiesEditorWidget *pew, m_list_editor) pew->reset();
 }
 
 bool ElementPropertiesWidget::setLiveEdit(bool live_edit)
@@ -112,7 +112,7 @@
 	if (m_live_edit == live_edit) return true;
 	m_live_edit = live_edit;
 
-	for (AbstractElementPropertiesEditorWidget *aepew: m_list_editor)
+	foreach (AbstractElementPropertiesEditorWidget *aepew, m_list_editor)
 		aepew->setLiveEdit(m_live_edit);
 
 	return true;
@@ -205,7 +205,7 @@
 	}
 
 		//Add each editors in tab widget
-	for (AbstractElementPropertiesEditorWidget *aepew: m_list_editor)
+	foreach (AbstractElementPropertiesEditorWidget *aepew, m_list_editor)
 	{
 		aepew->setLiveEdit(m_live_edit);
 		m_tab->addTab(aepew, aepew->title());

Modified: trunk/sources/ui/linksingleelementwidget.cpp
===================================================================
--- trunk/sources/ui/linksingleelementwidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ui/linksingleelementwidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -211,7 +211,7 @@
 	
 	if (m_element->linkType() == Element::Slave)
 	{
-		for (Element *elmt: availableElements())
+		foreach(Element *elmt, availableElements())
 		{
 			QStringList search_list;
 			QStringList str_list;
@@ -255,7 +255,7 @@
 	
 	else if (m_element->linkType() & Element::AllReport)
 	{	
-		for (Element *elmt: availableElements())
+		foreach(Element *elmt, availableElements())
 		{
 			QStringList search_list;
 			QStringList str_list;
@@ -362,7 +362,7 @@
 		delete ui->m_search_field->completer();
 	
 	QStringList search;
-	for (QStringList strl: m_qtwi_strl_hash.values())
+	foreach(QStringList strl , m_qtwi_strl_hash.values())
 		search.append(strl);
 	
 	QCompleter *c = new QCompleter(search, ui->m_search_field);
@@ -385,7 +385,7 @@
 			delete qtwi;
 	}
 	
-	for (QTreeWidgetItem *qtwi: m_qtwi_elmt_hash.keys())
+	foreach(QTreeWidgetItem *qtwi, m_qtwi_elmt_hash.keys())
 		delete qtwi;
 	
 	m_qtwi_elmt_hash.clear();
@@ -589,14 +589,14 @@
 void LinkSingleElementWidget::on_m_search_field_textEdited(const QString &arg1)
 {
 		//Show all items if arg1 is empty, if not hide all items
-	for (QTreeWidgetItem *qtwi: m_qtwi_elmt_hash.keys())
+	foreach(QTreeWidgetItem *qtwi, m_qtwi_elmt_hash.keys())
 		qtwi->setHidden(!arg1.isEmpty());
 	
 	QList <QTreeWidgetItem *> qtwi_list;
 	
-	for (QTreeWidgetItem *qtwi: m_qtwi_strl_hash.keys())
+	foreach(QTreeWidgetItem *qtwi, m_qtwi_strl_hash.keys())
 	{
-		for (QString str: m_qtwi_strl_hash.value(qtwi))
+		foreach(QString str, m_qtwi_strl_hash.value(qtwi))
 		{
 			if(str.contains(arg1, Qt::CaseInsensitive))
 			{
@@ -607,6 +607,6 @@
 	}
 	
 		//Show items which match with arg1
-	for (QTreeWidgetItem *qtwi: qtwi_list)
+	foreach(QTreeWidgetItem *qtwi, qtwi_list)
 		qtwi->setHidden(false);
 }

Modified: trunk/sources/ui/masterpropertieswidget.cpp
===================================================================
--- trunk/sources/ui/masterpropertieswidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ui/masterpropertieswidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -150,7 +150,7 @@
  */
 void MasterPropertiesWidget::reset()
 {
-	for (QTreeWidgetItem *qtwi: m_qtwi_hash.keys())
+	foreach (QTreeWidgetItem *qtwi, m_qtwi_hash.keys())
 		delete qtwi;
 	
 	m_qtwi_hash.clear();
@@ -177,7 +177,7 @@
 	{
 		bool equal = true;
 
-		for (Element *elmt: to_link)
+		foreach(Element *elmt, to_link)
 			if (!linked_.contains(elmt))
 				equal = false;
 
@@ -224,7 +224,7 @@
 
 		//Build the list of free available element
 	QList <QTreeWidgetItem *> items_list;
-	for (Element *elmt: elmt_prov.freeElement(Element::Slave))
+	foreach(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 @@
 	items_list.clear();
 
 		//Build the list of already linked element
-	for (Element *elmt: m_element->linkedElements())
+	foreach(Element *elmt, m_element->linkedElements())
 	{
 		QTreeWidgetItem *qtwi = new QTreeWidgetItem(ui->m_link_tree_widget);
 		qtwi->setIcon(0, elmt->pixmap());

Modified: trunk/sources/ui/potentialselectordialog.cpp
===================================================================
--- trunk/sources/ui/potentialselectordialog.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ui/potentialselectordialog.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -82,7 +82,7 @@
 
 				if ((elmt_->linkType() & Element::Terminale) && !elmt_->terminals().isEmpty())
 				{
-					for (Terminal *t: elmt_->terminals())
+					foreach(Terminal *t, elmt_->terminals())
 					{
 						if (t->conductors().isEmpty()) continue;
 						conductor_in_potential = t->conductors().first();
@@ -106,7 +106,7 @@
 
 			c_list = conductor_in_potential->relatedPotentialConductors().toList();
 			c_list.append(conductor_in_potential);
-			for (Conductor *c: c_list)
+			foreach(Conductor *c, c_list)
 				properties_list.append(c->properties());
 		}
 
@@ -139,7 +139,7 @@
 				m_seq_num_1 = report->conductors().first()->sequenceNum();
 				m_conductors_list_1.append(report->conductors().first()->relatedPotentialConductors().toList());
 				m_conductors_list_1.append(report->conductors().first());
-				for (Conductor *c: m_conductors_list_1)
+				foreach(Conductor *c, m_conductors_list_1)
 					m_properties_list_1 << c->properties();
 
 				m_conductor_number_2 = other_report->conductors().first()->relatedPotentialConductors().size() + 1;
@@ -146,7 +146,7 @@
 				m_seq_num_2 = other_report->conductors().first()->sequenceNum();
 				m_conductors_list_2.append(other_report->conductors().first()->relatedPotentialConductors().toList());
 				m_conductors_list_2.append(other_report->conductors().first());
-				for (Conductor *c: m_conductors_list_2)
+				foreach(Conductor *c, m_conductors_list_2)
 					m_properties_list_2 << c->properties();
 
 					//We relink the report
@@ -283,7 +283,7 @@
 			new_seq.setValue(m_sequential_num);
 
 				//Set the new properties for each conductors of the new potential
-			for (Conductor *cond: m_conductors_to_change)
+			foreach(Conductor *cond, m_conductors_to_change)
 			{
 				ConductorProperties new_properties = cond->properties();
 				new_properties.applyForEqualAttributes(m_properties_list);
@@ -296,7 +296,7 @@
 			
 				//Check if formula of the new potential have incompatible variable with folio report
 			QRegularExpression rx ("%sequf_|%seqtf_|%seqhf_|%id|%F|%M|%LM");
-			for (ConductorProperties cp: m_properties_list)
+			foreach(ConductorProperties cp, m_properties_list)
 			{
 				if (cp.m_formula.contains(rx))
 				{
@@ -316,7 +316,7 @@
 					QString new_formula = fag.formula();
 					QSet <Conductor *> c_list = m_report->conductors().first()->relatedPotentialConductors();
 					c_list.insert(m_report->conductors().first());
-					for (Conductor *cond: c_list)
+					foreach(Conductor *cond, c_list)
 					{
 						old_value.setValue(cond->properties());
 						ConductorProperties new_properties = cond->properties();
@@ -351,7 +351,7 @@
 		new QPropertyUndoCommand(m_conductor, "properties", old_value, new_value, undo);
 
 			//Set the new properties for each conductors of the new potential
-		for (Conductor *cond: m_conductor->relatedPotentialConductors())
+		foreach(Conductor *cond, m_conductor->relatedPotentialConductors())
 		{
 			new_properties = cond->properties();
 			new_properties.applyForEqualAttributes(m_properties_list);

Modified: trunk/sources/ui/titleblockpropertieswidget.cpp
===================================================================
--- trunk/sources/ui/titleblockpropertieswidget.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/ui/titleblockpropertieswidget.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -72,7 +72,7 @@
 {
 	ui->setupUi(this);
 	initDialog(current_date,project);
-	for (TitleBlockTemplatesCollection *c: tbt_collection)
+	foreach (TitleBlockTemplatesCollection *c, tbt_collection)
 		addCollection(c);
 	updateTemplateList();
 	setProperties(titleblock);
@@ -230,7 +230,7 @@
 {
 	QET::QetCollection qc = m_map_index_to_collection_type.at(ui->m_tbt_cb->currentIndex());
 	TitleBlockTemplatesCollection *collection = nullptr;
-	for (TitleBlockTemplatesCollection *c: m_tbt_collection_list)
+	foreach (TitleBlockTemplatesCollection *c, m_tbt_collection_list)
 		if (c -> collection() == qc)
 			collection = c;
 
@@ -307,7 +307,7 @@
 
 	if (project!= NULL){
 		keys_2 = project -> folioAutoNum().keys();
-		for (QString str: keys_2) { ui -> auto_page_cb -> addItem(str); }
+		foreach (QString str, keys_2) { ui -> auto_page_cb -> addItem(str); }
 		if (ui->auto_page_cb->currentText()==NULL)
 			ui->auto_page_cb->addItem(tr("Créer un Folio Numérotation Auto"));
 	}
@@ -365,7 +365,7 @@
 	ui -> m_tbt_cb -> addItem(QET::Icons::QETLogo, tr("Modèle par défaut"));
 
 		//Add every title block stored in m_tbt_collection_list
-	for (TitleBlockTemplatesCollection *tbt_c: m_tbt_collection_list)
+	foreach (TitleBlockTemplatesCollection *tbt_c, m_tbt_collection_list)
 	{
 		QIcon icon;
 		QET::QetCollection qc = tbt_c -> collection();
@@ -376,7 +376,7 @@
 		else if (qc == QET::QetCollection::Embedded)
 			icon = QET::Icons::TitleBlock;
 
-		for (QString tbt_name: tbt_c -> templates())
+		foreach(QString tbt_name, tbt_c -> templates())
 		{
 			m_map_index_to_collection_type.append(qc);
 			ui -> m_tbt_cb -> addItem(icon, tbt_name, tbt_name);
@@ -394,7 +394,7 @@
 
 	QET::QetCollection qc = m_map_index_to_collection_type.at(index);
 	TitleBlockTemplatesCollection *collection = nullptr;
-	for (TitleBlockTemplatesCollection *c: m_tbt_collection_list)
+	foreach (TitleBlockTemplatesCollection *c, m_tbt_collection_list)
 		if (c -> collection() == qc)
 			collection = c;
 

Modified: trunk/sources/undocommand/linkelementcommand.cpp
===================================================================
--- trunk/sources/undocommand/linkelementcommand.cpp	2017-02-05 07:51:57 UTC (rev 4901)
+++ trunk/sources/undocommand/linkelementcommand.cpp	2017-02-05 16:18:50 UTC (rev 4902)
@@ -177,7 +177,7 @@
  */
 void LinkElementCommand::unlink(QList<Element *> element_list)
 {
-	for (Element *elmt: element_list)
+	foreach(Element *elmt, element_list)
 		m_linked_after.removeAll(elmt);
 }
 
@@ -218,7 +218,7 @@
 		c_list << m_element->conductors().first();
 			//fill list of text
 		QStringList strl;
-		for (const Conductor *c: c_list) strl<<(c->properties().text);
+		foreach (const Conductor *c, c_list) strl<<(c->properties().text);
 
 			//check text list, isn't same in potential, ask user what to do
 		if (!QET::eachStrIsEqual(strl))
@@ -245,7 +245,7 @@
 		//if m_element isn't master (may be a report or slave) we can connect only one element
 	if (m_element->linkType() == Element::Master || element_list.size() == 1)
 	{
-		for (Element *elmt: element_list)
+		foreach(Element *elmt, element_list)
 			if (isLinkable(m_element, elmt, already_link))
 				m_linked_after << elmt;
 	}
@@ -253,7 +253,7 @@
 	{
 		qDebug() << "LinkElementCommand::setUpNewLink : try to link several elements to a report element or slave element,"
 					" only the first element of the list will be taken to be linked";
-		for (Element *elmt: element_list)
+		foreach(Element *elmt, element_list)
 			if (isLinkable(m_element, elmt, already_link))
 			{
 				m_linked_after << elmt;
@@ -278,17 +278,17 @@
 	}
 
 		//We link all element from element_list
-	for (Element *elmt: element_list)
+	foreach(Element *elmt, element_list)
 		m_element->linkToElement(elmt);
 
 		//At this point may be there are unwanted linked elements to m_element. We must to unlink it.
 		//Elements from @element_list are wanted so we compare @element_list to current linked element of @m_element
 	QList<Element *> to_unlink = m_element->linkedElements();
-	for (Element *elmt: element_list)
+	foreach(Element *elmt, element_list)
 		to_unlink.removeAll(elmt);
 
 		//All elements stored in to_unlink is unwanted we unlink it from m_element
 	if (!to_unlink.isEmpty())
-		for (Element *elmt: to_unlink)
+		foreach(Element *elmt, to_unlink)
 			m_element->unlinkElement(elmt);
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/