[qet] [4442] Fix GCC 6 warnings, thanks Remi Collet

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


Revision: 4442
Author:   scorpio810
Date:     2016-04-16 19:45:56 +0200 (Sat, 16 Apr 2016)
Log Message:
-----------
Fix GCC 6 warnings, thanks Remi Collet

Modified Paths:
--------------
    trunk/sources/qetgraphicsitem/qetshapeitem.cpp
    trunk/sources/ui/elementpropertieswidget.cpp

Modified: trunk/sources/qetgraphicsitem/qetshapeitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/qetshapeitem.cpp	2016-04-16 17:20:57 UTC (rev 4441)
+++ trunk/sources/qetgraphicsitem/qetshapeitem.cpp	2016-04-16 17:45:56 UTC (rev 4442)
@@ -220,13 +220,25 @@
 
 	switch (m_shapeType)
 	{
-		case Line:      path.moveTo(m_P1);
-						path.lineTo(m_P2);                   break;
-		case Rectangle: path.addRect(QRectF(m_P1, m_P2));    break;
-		case Ellipse:   path.addEllipse(QRectF(m_P1, m_P2)); break;
-		case Polygon:   path.addPolygon(m_polygon);
-						if (m_close) path.closeSubpath();    break;
-		default:        Q_ASSERT(false);                     break;
+		case Line:      
+			path.moveTo(m_P1);
+			path.lineTo(m_P2);                   
+			break;
+		case Rectangle: 
+			path.addRect(QRectF(m_P1, m_P2));
+			break;
+		case Ellipse:
+			path.addEllipse(QRectF(m_P1, m_P2));
+			break;
+		case Polygon:
+			path.addPolygon(m_polygon);
+			if (m_close) {
+				path.closeSubpath();
+			}
+			break;
+		default:
+			Q_ASSERT(false);
+			break;
 	}
 
 	QPainterPathStroker pps;

Modified: trunk/sources/ui/elementpropertieswidget.cpp
===================================================================
--- trunk/sources/ui/elementpropertieswidget.cpp	2016-04-16 17:20:57 UTC (rev 4441)
+++ trunk/sources/ui/elementpropertieswidget.cpp	2016-04-16 17:45:56 UTC (rev 4442)
@@ -172,12 +172,15 @@
 
 		//Purge the tab widget and delete all widget
 	m_tab->clear();
-	qDeleteAll(m_list_editor); m_list_editor.clear();
-	if(m_general_widget) delete m_general_widget; m_general_widget = nullptr;
+	qDeleteAll(m_list_editor);
+	m_list_editor.clear();
+	if(m_general_widget) {
+		delete m_general_widget;
+		m_general_widget = nullptr;
+	}
 
 		//Create editor according to the type of element
-	switch (m_element -> linkType())
-	{
+	switch (m_element -> linkType())	{
 		case Element::Simple:
 			m_list_editor << new ElementInfoWidget(m_element, this);
 			break;


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