r23742 by jghali - Fix coverity 1438494: Uninitialized scalar field

scribus-commit scribus-commit at lists.scribus.net
Sun May 10 16:01:56 UTC 2020


Author: jghali
Date: Sun May 10 16:01:56 2020
New Revision: 23742

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23742
Log:
Fix coverity 1438494: Uninitialized scalar field

Modified:
    trunk/Scribus/scribus/ui/proptree.cpp
    trunk/Scribus/scribus/ui/proptree.h

Modified: trunk/Scribus/scribus/ui/proptree.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23742&path=/trunk/Scribus/scribus/ui/proptree.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.cpp	(original)
+++ trunk/Scribus/scribus/ui/proptree.cpp	Sun May 10 16:01:56 2020
@@ -278,15 +278,8 @@
 	return sz;
 }
 
-PropTreeItem::PropTreeItem(QTreeWidget *parent, int typ, const QString& title) : QObject(parent), QTreeWidgetItem(parent),
-	m_type(typ),
-	m_unit(0),
-	m_decimals(0),
-	m_fmin(0.0),
-	m_fmax(0.0),
-	m_min(0),
-	m_max(0),
-	m_comboIndex(-1)
+PropTreeItem::PropTreeItem(QTreeWidget *parent, int typ, const QString& title) :QObject(parent), QTreeWidgetItem(parent),
+	m_type(typ)
 {
 	setText(0, title);
 	setData(0, Qt::UserRole, 0);
@@ -297,13 +290,10 @@
 		setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
 }
 
-PropTreeItem::PropTreeItem(PropTreeItem *parent, int typ, const QString& title) : QObject(parent), QTreeWidgetItem(parent)
+PropTreeItem::PropTreeItem(PropTreeItem *parent, int typ, const QString& title) : QObject(parent), QTreeWidgetItem(parent),
+	m_type(typ)
 {
 	setText(0, title);
-	m_type = typ;
-	m_comboIndex = -1;
-	m_unit = 0;
-	m_decimals = 0;
 	setData(0, Qt::UserRole, 0);
 	setData(1, Qt::UserRole, 0);
 	if (typ > 0)

Modified: trunk/Scribus/scribus/ui/proptree.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23742&path=/trunk/Scribus/scribus/ui/proptree.h
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.h	(original)
+++ trunk/Scribus/scribus/ui/proptree.h	Sun May 10 16:01:56 2020
@@ -94,14 +94,15 @@
 	void setMinMaxValues(int min, int max);
 	void setMinMaxValues(double min, double max);
 	void setColorList(const ColorList& colors);
+
 	int m_type;
-	int m_unit;
-	int m_decimals;
-	double m_fmin;
-	double m_fmax;
-	int m_min;
-	int m_max;
-	int m_comboIndex;
+	int m_unit = 0;
+	int m_decimals = 0;
+	double m_fmin = 0.0;
+	double m_fmax = 0.0;
+	int m_min = 0;
+	int m_max = 0;
+	int m_comboIndex = -1;
 	ColorList m_colors;
 
 signals:




More information about the scribus-commit mailing list