r20961 by craig -

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 9 21:55:03 UTC 2016


Author: craig
Date: Tue Feb  9 21:55:03 2016
New Revision: 20961

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20961
Log:
coverity #1350657: Uninitialised scalar/pointer fields

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

Modified: trunk/Scribus/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20961&path=/trunk/Scribus/scribus/ui/smpstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.cpp	Tue Feb  9 21:55:03 2016
@@ -24,9 +24,14 @@
 }
 
 
-SMPStyleWidget::SMPStyleWidget(ScribusDoc* doc, StyleSet<CharStyle> *cstyles) : QWidget()
-{
-	m_Doc = doc;
+SMPStyleWidget::SMPStyleWidget(ScribusDoc* doc, StyleSet<CharStyle> *cstyles) : QWidget(),
+	m_hasParent(false),
+	m_parentDC(false),
+	m_parentBul(false),
+	m_parentNum(false),
+	m_Doc(doc),
+	m_currPStyle(0)
+{
 	m_cstyles = cstyles;
 
 	setupUi(this);
@@ -333,7 +338,7 @@
 	double unitRatio = unitGetRatioFromIndex(unitIndex);
 	parentCombo->setEnabled(!pstyle->isDefaultStyle());
 	const ParagraphStyle *parent = dynamic_cast<const ParagraphStyle*>(pstyle->parentStyle());
-	hasParent_ = pstyle->hasParent() && parent != NULL && parent->hasName() && pstyle->parent() != "";
+	m_hasParent = pstyle->hasParent() && parent != NULL && parent->hasName() && pstyle->parent() != "";
 
 	lineSpacingMode->clear();
 	lineSpacingMode->addItem( tr("Fixed Linespacing"));
@@ -358,7 +363,7 @@
 	//fillNumerationsCombo();
 	//fillNumRestartCombo();
 
-	if (hasParent_)
+	if (m_hasParent)
 	{
 		lineSpacingMode->setCurrentItem(pstyle->lineSpacingMode(), pstyle->isInhLineSpacingMode());
 		lineSpacingMode->setParentItem(parent->lineSpacingMode());
@@ -570,7 +575,7 @@
 				parentCombo->addItem(pstyles[i].name());
 		}
 	}
-	if (pstyle->isDefaultStyle() || !hasParent_)
+	if (pstyle->isDefaultStyle() || !m_hasParent)
 		parentCombo->setCurrentIndex(0);
 	else
 	{
@@ -1114,7 +1119,7 @@
 void SMPStyleWidget::slotDefaultOpticalMargins()
 {
 	optMarginRadioNone->setChecked(true);
-	if (hasParent_)
+	if (m_hasParent)
 		optMarginParentButton->show();
 }
 
@@ -1151,7 +1156,7 @@
 	}
 	else
 		dropCapLines->setEnabled(false);
-	if (hasParent_)
+	if (m_hasParent)
 		parentParEffectsButton->show();
 	checkParEffectState();
 	connectPESignals();
@@ -1182,7 +1187,7 @@
 		bulletStrEdit->setEnabled(false);
 		bulletCharTableButton->setEnabled(false);
 	}
-	if (hasParent_)
+	if (m_hasParent)
 		parentParEffectsButton->show();
 	checkParEffectState();
 	connectPESignals();
@@ -1218,7 +1223,7 @@
 		numFormatCombo->setEnabled(false);
 		numLevelSpin->setEnabled(false);
 	}
-	if (hasParent_)
+	if (m_hasParent)
 		parentParEffectsButton->show();
 	checkParEffectState();
 	connectPESignals();

Modified: trunk/Scribus/scribus/ui/smpstylewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20961&path=/trunk/Scribus/scribus/ui/smpstylewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.h	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.h	Tue Feb  9 21:55:03 2016
@@ -33,8 +33,7 @@
 	void setDoc(ScribusDoc* doc);
 
 private:
-	bool hasParent_;
-	//bool parentParEffects_;
+	bool m_hasParent;
 	bool m_parentDC, m_parentBul, m_parentNum;
 	CharSelectEnhanced * m_enhanced;
 	ScribusDoc * m_Doc;




More information about the scribus-commit mailing list