[qet] [4270] Minor change

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


Revision: 4270
Author:   blacksun
Date:     2015-11-19 18:20:04 +0100 (Thu, 19 Nov 2015)
Log Message:
-----------
Minor change

Modified Paths:
--------------
    trunk/sources/qetgraphicsitem/crossrefitem.cpp

Modified: trunk/sources/qetgraphicsitem/crossrefitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/crossrefitem.cpp	2015-11-19 15:19:45 UTC (rev 4269)
+++ trunk/sources/qetgraphicsitem/crossrefitem.cpp	2015-11-19 17:20:04 UTC (rev 4270)
@@ -109,9 +109,11 @@
  * @param nc_str the string of NC contacts
  * @param add_prefix must add prefix to text (true) or not (false);
  */
-void CrossRefItem::allElementsPositionText(QString &no_str, QString &nc_str, const bool &add_prefix) const {
-	QString *tmp_str;
-	foreach (Element *elmt, m_element->linkedElements()) {
+void CrossRefItem::allElementsPositionText(QString &no_str, QString &nc_str, const bool &add_prefix) const
+{
+	QString *tmp_str = nullptr;
+	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
 		if (m_properties.displayHas() == XRefProperties::Cross &&
@@ -122,7 +124,8 @@
 		QString state = elmt->kindInformations()["state"].toString();
 
 		//NO and NC are displayed in single place in the cross
-		if (state == "NO" || state == "NC") {
+		if (state == "NO" || state == "NC")
+		{
 			if (state == "NO") tmp_str = &no_str;
 			else if (state == "NC") tmp_str = &nc_str;
 
@@ -131,8 +134,10 @@
 		}
 
 		//SW are displayed in NC and NO column in the cross
-		else if (state == "SW") {
-			for (int i = 0; i < 2; i++) {
+		else if (state == "SW")
+		{
+			for (int i = 0; i < 2; i++)
+			{
 				tmp_str = i==0? &no_str : &nc_str;
 				if (!tmp_str->isEmpty()) *tmp_str += "\n";
 				*tmp_str += elementPositionText(elmt, add_prefix);


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