r23719 by jghali - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Sat May 9 00:44:12 UTC 2020


Author: jghali
Date: Sat May  9 00:44:12 2020
New Revision: 23719

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23719
Log:
Code cleanup

Modified:
    trunk/Scribus/scribus/ui/smalignselect.cpp
    trunk/Scribus/scribus/ui/smalignselect.h
    trunk/Scribus/scribus/ui/smcellstyle.cpp
    trunk/Scribus/scribus/ui/smcellstyle.h
    trunk/Scribus/scribus/ui/smcellstylewidget.cpp
    trunk/Scribus/scribus/ui/smcellstylewidget.h
    trunk/Scribus/scribus/ui/smcheckbox.cpp
    trunk/Scribus/scribus/ui/smcheckbox.h
    trunk/Scribus/scribus/ui/smcolorcombo.cpp
    trunk/Scribus/scribus/ui/smcstylewidget.cpp
    trunk/Scribus/scribus/ui/smcstylewidget.h
    trunk/Scribus/scribus/ui/smdirectionselect.cpp
    trunk/Scribus/scribus/ui/smdirectionselect.h
    trunk/Scribus/scribus/ui/smfontcomboh.cpp
    trunk/Scribus/scribus/ui/smfontcomboh.h
    trunk/Scribus/scribus/ui/smfontfeatures.cpp
    trunk/Scribus/scribus/ui/smfontfeatures.h
    trunk/Scribus/scribus/ui/smlineedit.cpp
    trunk/Scribus/scribus/ui/smlineedit.h
    trunk/Scribus/scribus/ui/smlinestyle.cpp
    trunk/Scribus/scribus/ui/smlinestyle.h
    trunk/Scribus/scribus/ui/smnumformatcombo.cpp
    trunk/Scribus/scribus/ui/smnumformatcombo.h
    trunk/Scribus/scribus/ui/smpstylewidget.cpp
    trunk/Scribus/scribus/ui/smpstylewidget.h
    trunk/Scribus/scribus/ui/smradiobutton.cpp
    trunk/Scribus/scribus/ui/smradiobutton.h
    trunk/Scribus/scribus/ui/smsccombobox.cpp
    trunk/Scribus/scribus/ui/smsccombobox.h
    trunk/Scribus/scribus/ui/smscrspinbox.h
    trunk/Scribus/scribus/ui/smshadebutton.cpp
    trunk/Scribus/scribus/ui/smshadebutton.h
    trunk/Scribus/scribus/ui/smspinbox.cpp
    trunk/Scribus/scribus/ui/smspinbox.h
    trunk/Scribus/scribus/ui/smstyleselect.cpp
    trunk/Scribus/scribus/ui/smstyleselect.h
    trunk/Scribus/scribus/ui/smtablestyle.cpp
    trunk/Scribus/scribus/ui/smtablestyle.h
    trunk/Scribus/scribus/ui/smtablestylewidget.cpp
    trunk/Scribus/scribus/ui/smtablestylewidget.h
    trunk/Scribus/scribus/ui/smtabruler.cpp
    trunk/Scribus/scribus/ui/smtabruler.h
    trunk/Scribus/scribus/ui/smtextstyles.cpp
    trunk/Scribus/scribus/ui/smtextstyles.h

Modified: trunk/Scribus/scribus/ui/smalignselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smalignselect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smalignselect.cpp	(original)
+++ trunk/Scribus/scribus/ui/smalignselect.cpp	Sat May  9 00:44:12 2020
@@ -9,11 +9,7 @@
 
 
 SMAlignSelect::SMAlignSelect(QWidget *parent)
-: AlignSelect(parent),
-  m_hasParent(false),
-  m_useParentStyle(false),
-  m_pStyle(0),
-  m_pDirection(0)
+	: AlignSelect(parent)
 {
 	parentButton = new QToolButton(this);
 	parentButton->setMaximumSize( QSize( 22, 22 ) );

Modified: trunk/Scribus/scribus/ui/smalignselect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smalignselect.h
==============================================================================
--- trunk/Scribus/scribus/ui/smalignselect.h	(original)
+++ trunk/Scribus/scribus/ui/smalignselect.h	Sat May  9 00:44:12 2020
@@ -10,7 +10,6 @@
 
 #include "alignselect.h"
 
-
 class SMAlignSelect : public AlignSelect
 {
 	Q_OBJECT
@@ -22,16 +21,16 @@
 	void setStyle(int a, int d, bool isParentValue);
 
 	void setParentItem(int a, int d);
-
 	bool useParentValue();
 
 	QToolButton *parentButton;
 
 private:
-	bool   m_hasParent;
-	bool   m_useParentStyle;
-	int    m_pStyle;
-	int    m_pDirection;
+	bool   m_hasParent = false;
+	bool   m_useParentStyle = false;
+	int    m_pStyle = 0;
+	int    m_pDirection = 0;
+
 	void setFont(bool wantBold);
 
 private slots:

Modified: trunk/Scribus/scribus/ui/smcellstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcellstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcellstyle.cpp	Sat May  9 00:44:12 2020
@@ -15,11 +15,7 @@
 #include "smcellstylewidget.h"
 #include "ui/scmessagebox.h"
 
-SMCellStyle::SMCellStyle() :
-	m_widget(nullptr),
-	m_page(nullptr),
-	m_doc(nullptr),
-	m_selectionIsDirty(false)
+SMCellStyle::SMCellStyle()
 {
 	m_widget = new QTabWidget();
 	Q_CHECK_PTR(m_widget);

Modified: trunk/Scribus/scribus/ui/smcellstyle.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcellstyle.h
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstyle.h	(original)
+++ trunk/Scribus/scribus/ui/smcellstyle.h	Sat May  9 00:44:12 2020
@@ -78,13 +78,13 @@
 	void selectionDirty();
 
 private:
-	QTabWidget *m_widget;
-	SMCellStyleWidget *m_page;
-	ScribusDoc *m_doc;
+	QTabWidget *m_widget = nullptr;
+	SMCellStyleWidget *m_page = nullptr;
+	ScribusDoc *m_doc = nullptr;
 	StyleSet<CellStyle> m_cachedStyles;
 	QList<CellStyle*> m_selection;
 	QList<RemoveItem> m_deleted;
-	bool m_selectionIsDirty;
+	bool m_selectionIsDirty = false;
 
 	void updateStylesCache();
 	void setupConnections();

Modified: trunk/Scribus/scribus/ui/smcellstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcellstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcellstylewidget.cpp	Sat May  9 00:44:12 2020
@@ -12,8 +12,7 @@
 #include "scribusapp.h"
 #include "smcellstylewidget.h"
 
-SMCellStyleWidget::SMCellStyleWidget(QWidget *parent) :
-	m_Doc(nullptr)
+SMCellStyleWidget::SMCellStyleWidget(QWidget *parent)
 {
 	setupUi(this);
 

Modified: trunk/Scribus/scribus/ui/smcellstylewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcellstylewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstylewidget.h	(original)
+++ trunk/Scribus/scribus/ui/smcellstylewidget.h	Sat May  9 00:44:12 2020
@@ -69,7 +69,7 @@
 	void showColors(const QList<CellStyle*> &cellStyles);
 
 private:
-	ScribusDoc * m_Doc;
+	ScribusDoc * m_Doc = nullptr;
 
 private slots:
 	void handleUpdateRequest(int);

Modified: trunk/Scribus/scribus/ui/smcheckbox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcheckbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcheckbox.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcheckbox.cpp	Sat May  9 00:44:12 2020
@@ -8,10 +8,7 @@
 #include "smcheckbox.h"
 
 SMCheckBox::SMCheckBox(QWidget *parent)
-: QCheckBox(parent),
-  m_hasParent(false),
-  m_useParentValue(false),
-  m_pValue(false)
+	: QCheckBox(parent)
 {
 
 }

Modified: trunk/Scribus/scribus/ui/smcheckbox.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcheckbox.h
==============================================================================
--- trunk/Scribus/scribus/ui/smcheckbox.h	(original)
+++ trunk/Scribus/scribus/ui/smcheckbox.h	Sat May  9 00:44:12 2020
@@ -20,13 +20,13 @@
 	void setChecked(bool val, bool isParentVal);
 
 	void setParentValue(bool);
-
 	bool useParentValue();
 
 private:
-	bool   m_hasParent;
-	bool   m_useParentValue;
-	bool   m_pValue;
+	bool   m_hasParent = false;
+	bool   m_useParentValue = false;
+	bool   m_pValue = false;
+
 	void setFont(bool wantBold);
 
 private slots:

Modified: trunk/Scribus/scribus/ui/smcolorcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcolorcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcolorcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcolorcombo.cpp	Sat May  9 00:44:12 2020
@@ -10,13 +10,13 @@
 
 
 SMColorCombo::SMColorCombo(QWidget *parent)
-: ColorCombo(parent)
+	: ColorCombo(parent)
 {
 	
 }
 
 SMColorCombo::SMColorCombo(bool rw, QWidget* parent)
-: ColorCombo(rw, parent)
+	: ColorCombo(rw, parent)
 {
 	
 }

Modified: trunk/Scribus/scribus/ui/smcstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.cpp	Sat May  9 00:44:12 2020
@@ -17,8 +17,7 @@
 #include "units.h"
 
 
-SMCStyleWidget::SMCStyleWidget(QWidget *parent) :
-	m_Doc(nullptr)
+SMCStyleWidget::SMCStyleWidget(QWidget *parent)
 {
 	setupUi(this);
 

Modified: trunk/Scribus/scribus/ui/smcstylewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smcstylewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.h	(original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.h	Sat May  9 00:44:12 2020
@@ -35,7 +35,7 @@
 
 private:
 	//QMap<QString, QString> m_langMap;
-	ScribusDoc * m_Doc;
+	ScribusDoc * m_Doc = nullptr;
 
 	void showSizeAndPosition(const QList<CharStyle*> &cstyles);
 	void showEffects(const QList<CharStyle*> &cstyles);

Modified: trunk/Scribus/scribus/ui/smdirectionselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smdirectionselect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smdirectionselect.cpp	(original)
+++ trunk/Scribus/scribus/ui/smdirectionselect.cpp	Sat May  9 00:44:12 2020
@@ -1,10 +1,7 @@
 #include "smdirectionselect.h"
 
 SMDirectionSelect::SMDirectionSelect(QWidget *parent)
-: DirectionSelect(parent),
-  m_hasParent(false),
-  m_useParentStyle(false),
-  m_pStyle(0)
+: DirectionSelect(parent)
 {
 	parentButton = new QToolButton(this);
 	parentButton->setMaximumSize( QSize( 22, 22 ) );

Modified: trunk/Scribus/scribus/ui/smdirectionselect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smdirectionselect.h
==============================================================================
--- trunk/Scribus/scribus/ui/smdirectionselect.h	(original)
+++ trunk/Scribus/scribus/ui/smdirectionselect.h	Sat May  9 00:44:12 2020
@@ -14,15 +14,15 @@
 	void setStyle(int i, bool isParentValue);
 
 	void setParentItem(int i);
-
 	bool useParentValue();
 
 	QToolButton *parentButton;
 
 private:
-	bool   m_hasParent;
-	bool   m_useParentStyle;
-	int    m_pStyle;
+	bool   m_hasParent = false;
+	bool   m_useParentStyle = false;
+	int    m_pStyle = 0;
+
 	void setFont(bool wantBold);
 
 private slots:

Modified: trunk/Scribus/scribus/ui/smfontcomboh.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smfontcomboh.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smfontcomboh.cpp	(original)
+++ trunk/Scribus/scribus/ui/smfontcomboh.cpp	Sat May  9 00:44:12 2020
@@ -9,8 +9,6 @@
 
 SMFontComboH::SMFontComboH(QWidget *parent)
 : FontComboH(parent, true),
-  m_hasParent(false),
-  m_useParentValue(false),
   m_useParentFont( tr("Use Parent Font"))
 {
 	

Modified: trunk/Scribus/scribus/ui/smfontcomboh.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smfontcomboh.h
==============================================================================
--- trunk/Scribus/scribus/ui/smfontcomboh.h	(original)
+++ trunk/Scribus/scribus/ui/smfontcomboh.h	Sat May  9 00:44:12 2020
@@ -22,12 +22,11 @@
 	void setCurrentFont(const QString &s, bool isParentValue);
 
 	void setParentFont(const QString &s);
-	
 	bool useParentFont();
 
 private:
-	bool    m_hasParent;
-	bool    m_useParentValue;
+	bool    m_hasParent = false;
+	bool    m_useParentValue = false;
 	QString m_parentFont;
 	QString m_useParentFont;
 

Modified: trunk/Scribus/scribus/ui/smfontfeatures.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smfontfeatures.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smfontfeatures.cpp	(original)
+++ trunk/Scribus/scribus/ui/smfontfeatures.cpp	Sat May  9 00:44:12 2020
@@ -16,10 +16,7 @@
 #include <QSignalBlocker>
 
 SMFontFeatures::SMFontFeatures(QWidget *parent)
-	: QWidget(parent),
-	  m_hasParent(false),
-	  m_useParentValue(false),
-	  m_pValue("")
+	: QWidget(parent)
 {
 	setupUi(this);
 	styleSetsMenu = new StylisticSetsMenu(this);
@@ -111,7 +108,7 @@
 {
 	disconnectSignals();
 	m_hasParent = false;
-	m_pValue = "";
+	m_pValue.clear();
 
 	resetFontFeatures();
 	enableFontFeatures(fontFeaturesList);

Modified: trunk/Scribus/scribus/ui/smfontfeatures.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smfontfeatures.h
==============================================================================
--- trunk/Scribus/scribus/ui/smfontfeatures.h	(original)
+++ trunk/Scribus/scribus/ui/smfontfeatures.h	Sat May  9 00:44:12 2020
@@ -51,8 +51,6 @@
 	void setParentValue(const QString& val);
 	bool useParentValue();
 
-	StylisticSetsMenu *styleSetsMenu;
-
 protected:
 	void connectSignals();
 	void disconnectSignals();
@@ -67,9 +65,11 @@
 
 	QStringList comboboxFeatures(QComboBox* combo);
 
-	bool m_hasParent;
-	bool m_useParentValue;
+	bool m_hasParent = false;
+	bool m_useParentValue = false;
 	QString m_pValue;
+
+	StylisticSetsMenu *styleSetsMenu = nullptr;
 
 private slots:
 	void slotChange();

Modified: trunk/Scribus/scribus/ui/smlineedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smlineedit.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smlineedit.cpp	(original)
+++ trunk/Scribus/scribus/ui/smlineedit.cpp	Sat May  9 00:44:12 2020
@@ -7,10 +7,7 @@
 #include "smlineedit.h"
 
 SMLineEdit::SMLineEdit(QWidget *parent)
-	: QLineEdit(parent),
-	  m_hasParent(false),
-	  m_useParentValue(false),
-	  m_pValue("")
+	: QLineEdit(parent)
 {
 
 }
@@ -19,7 +16,7 @@
 {
 	disconnect(this, SIGNAL(textChanged(QString)), this, SLOT(slotValueChanged()));
 	m_hasParent = false;
-	m_pValue = "";
+	m_pValue.clear();
 	setFont(false);
 
 	QLineEdit::setText(val);

Modified: trunk/Scribus/scribus/ui/smlineedit.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smlineedit.h
==============================================================================
--- trunk/Scribus/scribus/ui/smlineedit.h	(original)
+++ trunk/Scribus/scribus/ui/smlineedit.h	Sat May  9 00:44:12 2020
@@ -22,13 +22,14 @@
 	void clear();
 
 	void setParentValue(const QString& val);
+	bool useParentValue();
 
-	bool useParentValue();
 private:
+	bool m_hasParent = false;
+	bool m_useParentValue = false;
+	QString m_pValue;
+
 	void setFont(bool wantBold);
-	bool m_hasParent;
-	bool m_useParentValue;
-	QString m_pValue;
 
 private slots:
 	void slotValueChanged();

Modified: trunk/Scribus/scribus/ui/smlinestyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smlinestyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smlinestyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smlinestyle.cpp	Sat May  9 00:44:12 2020
@@ -22,7 +22,7 @@
 #include "util.h"
 
 
-SMLineStyle::SMLineStyle() : m_doc(nullptr), m_widget(nullptr), m_twidget(nullptr), m_selectionIsDirty(false), m_unitRatio(1.0)
+SMLineStyle::SMLineStyle()
 {
 	
 }

Modified: trunk/Scribus/scribus/ui/smlinestyle.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smlinestyle.h
==============================================================================
--- trunk/Scribus/scribus/ui/smlinestyle.h	(original)
+++ trunk/Scribus/scribus/ui/smlinestyle.h	Sat May  9 00:44:12 2020
@@ -53,15 +53,15 @@
 	void selectionDirty();
 
 private:
-	ScribusDoc               *m_doc;
-	SMLineStyleWidget        *m_widget;
-	QTabWidget               *m_twidget;
+	ScribusDoc               *m_doc = nullptr;
+	SMLineStyleWidget        *m_widget = nullptr;
+	QTabWidget               *m_twidget = nullptr;
 	QHash<QString, multiLine> m_tmpLines;
-	bool                      m_selectionIsDirty;
-	double m_unitRatio;
+	bool                      m_selectionIsDirty = false;
+	double                    m_unitRatio = 1.0;
 	QHash<QString, multiLine*> m_selection;
 	QList<RemoveItem>         m_deleted;
-	int                       m_currentLine;
+	int                       m_currentLine = -1;
 
 	void setSelection(const QString& styleName);
 	void setMultiSelection(const QStringList& styles);

Modified: trunk/Scribus/scribus/ui/smnumformatcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smnumformatcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smnumformatcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/smnumformatcombo.cpp	Sat May  9 00:44:12 2020
@@ -7,12 +7,8 @@
 
 #include "smnumformatcombo.h"
 
-
 SMNumFormatCombo::SMNumFormatCombo(QWidget *parent)
-: NumFormatCombo(parent),
-  m_hasParent(false),
-  m_useParentValue(false),
-  m_parentFormat(Type_1_2_3)
+	: NumFormatCombo(parent)
 {
 	
 }

Modified: trunk/Scribus/scribus/ui/smnumformatcombo.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smnumformatcombo.h
==============================================================================
--- trunk/Scribus/scribus/ui/smnumformatcombo.h	(original)
+++ trunk/Scribus/scribus/ui/smnumformatcombo.h	Sat May  9 00:44:12 2020
@@ -21,13 +21,13 @@
 	void setCurrentFormat(NumFormat format, bool isParentValue);
 	
 	void setParentFormat(NumFormat format);
-
 	bool useParentFormat();
 
 private:
-	bool   m_hasParent;
-	bool   m_useParentValue;
-	NumFormat m_parentFormat;
+	bool   m_hasParent = false;
+	bool   m_useParentValue = false;
+	NumFormat m_parentFormat = Type_1_2_3;
+
 	void setFont(bool wantBold);
 
 private slots:

Modified: trunk/Scribus/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smpstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.cpp	Sat May  9 00:44:12 2020
@@ -27,15 +27,9 @@
 
 
 SMPStyleWidget::SMPStyleWidget(ScribusDoc* doc, StyleSet<CharStyle> *cstyles) :
-	m_hasParent(false),
-	m_parentDC(false),
-	m_parentBul(false),
-	m_parentNum(false),
 	m_Doc(doc),
-	m_currPStyle(nullptr)
-{
-	m_cstyles = cstyles;
-
+	m_cstyles(cstyles)
+{
 	setupUi(this);
 
 	//Not used yet

Modified: trunk/Scribus/scribus/ui/smpstylewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smpstylewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.h	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.h	Sat May  9 00:44:12 2020
@@ -37,13 +37,15 @@
 	void setDoc(ScribusDoc* doc);
 
 private:
-	bool m_hasParent;
-	bool m_parentDC, m_parentBul, m_parentNum;
-	CharSelectEnhanced * m_enhanced;
-	ScribusDoc * m_Doc;
+	bool m_hasParent = false;
+	bool m_parentDC = false;
+	bool m_parentBul = false;
+	bool m_parentNum = false;
+	CharSelectEnhanced * m_enhanced = nullptr;
+	ScribusDoc * m_Doc = nullptr;
 	QString m_currFontName;
-	ParagraphStyle* m_currPStyle;
-	StyleSet<CharStyle> *m_cstyles;
+	ParagraphStyle* m_currPStyle = nullptr;
+	StyleSet<CharStyle> *m_cstyles = nullptr;
 
 	void fillColorCombo(ColorList &colors);
 	void fillBulletStrEditCombo();

Modified: trunk/Scribus/scribus/ui/smradiobutton.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smradiobutton.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smradiobutton.cpp	(original)
+++ trunk/Scribus/scribus/ui/smradiobutton.cpp	Sat May  9 00:44:12 2020
@@ -13,10 +13,7 @@
 #include "smradiobutton.h"
 
 SMRadioButton::SMRadioButton ( QWidget * parent )
-		: QRadioButton ( parent ),
-		m_hasParent ( false ),
-		m_useParentValue ( false ),
-		m_pValue ( false )
+		: QRadioButton ( parent )
 {
 }
 

Modified: trunk/Scribus/scribus/ui/smradiobutton.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smradiobutton.h
==============================================================================
--- trunk/Scribus/scribus/ui/smradiobutton.h	(original)
+++ trunk/Scribus/scribus/ui/smradiobutton.h	Sat May  9 00:44:12 2020
@@ -27,15 +27,14 @@
 		void setChecked(bool val, bool isParentVal);
 
 		void setParentValue(bool);
-
 		bool useParentValue();
 
 	private:
-		bool m_hasParent;
-		bool m_useParentValue;
-		bool m_pValue;
+		bool m_hasParent = false;
+		bool m_useParentValue = false;
+		bool m_pValue = false;
+
 		void setFont(bool wantBold);
-
 };
 
 

Modified: trunk/Scribus/scribus/ui/smsccombobox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smsccombobox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smsccombobox.cpp	(original)
+++ trunk/Scribus/scribus/ui/smsccombobox.cpp	Sat May  9 00:44:12 2020
@@ -9,10 +9,7 @@
 
 
 SMScComboBox::SMScComboBox(QWidget *parent)
-: QComboBox(parent),
-  m_hasParent(false),
-  m_useParentValue(false),
-  m_pItem(0)
+	: QComboBox(parent)
 {
 	
 }

Modified: trunk/Scribus/scribus/ui/smsccombobox.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smsccombobox.h
==============================================================================
--- trunk/Scribus/scribus/ui/smsccombobox.h	(original)
+++ trunk/Scribus/scribus/ui/smsccombobox.h	Sat May  9 00:44:12 2020
@@ -31,13 +31,13 @@
 	int getItemIndexForData(double d);
 	
 	void setParentItem(int i);
-
 	bool useParentValue();
 
 private:
-	bool   m_hasParent;
-	bool   m_useParentValue;
-	int    m_pItem;
+	bool   m_hasParent = false;
+	bool   m_useParentValue = false;
+	int    m_pItem = 0;
+
 	void setFont(bool wantBold);
 
 private slots:

Modified: trunk/Scribus/scribus/ui/smscrspinbox.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smscrspinbox.h
==============================================================================
--- trunk/Scribus/scribus/ui/smscrspinbox.h	(original)
+++ trunk/Scribus/scribus/ui/smscrspinbox.h	Sat May  9 00:44:12 2020
@@ -25,7 +25,6 @@
 	void clear();
 
 	void setParentValue(double val);
-
 	bool useParentValue();
 
 protected:

Modified: trunk/Scribus/scribus/ui/smshadebutton.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smshadebutton.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smshadebutton.cpp	(original)
+++ trunk/Scribus/scribus/ui/smshadebutton.cpp	Sat May  9 00:44:12 2020
@@ -9,10 +9,7 @@
 
 
 SMShadeButton::SMShadeButton(QWidget *parent)
-: ShadeButton(parent),
-  m_hasParent(false),
-  m_useParentValue(false),
-  m_pValue(0)
+	: ShadeButton(parent)
 {
 	
 }

Modified: trunk/Scribus/scribus/ui/smshadebutton.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smshadebutton.h
==============================================================================
--- trunk/Scribus/scribus/ui/smshadebutton.h	(original)
+++ trunk/Scribus/scribus/ui/smshadebutton.h	Sat May  9 00:44:12 2020
@@ -21,13 +21,12 @@
 	void setValue(int i, bool isParentValue);
 
 	void setParentValue(int i);
-
 	bool useParentValue();
 
 private:
-	bool   m_hasParent;
-	bool   m_useParentValue;
-	int    m_pValue;
+	bool   m_hasParent = false;
+	bool   m_useParentValue = false;
+	int    m_pValue = 0;
 
 	QString useParentValueText();
 	void setFont(bool wantBold);

Modified: trunk/Scribus/scribus/ui/smspinbox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smspinbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smspinbox.cpp	(original)
+++ trunk/Scribus/scribus/ui/smspinbox.cpp	Sat May  9 00:44:12 2020
@@ -8,10 +8,7 @@
 #include "smspinbox.h"
 
 SMSpinBox::SMSpinBox(QWidget *parent)
-: QSpinBox(parent),
-  m_hasParent(false),
-  m_useParentValue(false),
-  m_pValue(0)
+	: QSpinBox(parent)
 {
 
 }

Modified: trunk/Scribus/scribus/ui/smspinbox.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smspinbox.h
==============================================================================
--- trunk/Scribus/scribus/ui/smspinbox.h	(original)
+++ trunk/Scribus/scribus/ui/smspinbox.h	Sat May  9 00:44:12 2020
@@ -22,16 +22,16 @@
 	void clear();
 
 	void setParentValue(int val);
-
 	bool useParentValue();
 
 protected:
 	void interpretText();
 
 private:
-	bool   m_hasParent;
-	bool   m_useParentValue;
-	int    m_pValue;
+	bool   m_hasParent = false;
+	bool   m_useParentValue = false;
+	int    m_pValue = 0;
+
 	void setFont(bool wantBold);
 
 private slots:

Modified: trunk/Scribus/scribus/ui/smstyleselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smstyleselect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smstyleselect.cpp	(original)
+++ trunk/Scribus/scribus/ui/smstyleselect.cpp	Sat May  9 00:44:12 2020
@@ -7,12 +7,8 @@
 
 #include "smstyleselect.h"
 
-
 SMStyleSelect::SMStyleSelect(QWidget *parent)
-: StyleSelect(parent),
-  m_hasParent(false),
-  m_useParentStyle(false),
-  m_pStyle(0)
+	: StyleSelect(parent)
 {
 	parentButton = new QToolButton(this);
 	parentButton->setMaximumSize(QSize(22, 22));

Modified: trunk/Scribus/scribus/ui/smstyleselect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smstyleselect.h
==============================================================================
--- trunk/Scribus/scribus/ui/smstyleselect.h	(original)
+++ trunk/Scribus/scribus/ui/smstyleselect.h	Sat May  9 00:44:12 2020
@@ -8,7 +8,6 @@
 #define SMSTYLESELECT_H
 
 #include "styleselect.h"
-
 
 class SMStyleSelect  : public StyleSelect
 {
@@ -21,15 +20,15 @@
 	void setStyle(int i, bool isParentValue);
 
 	void setParentItem(int i);
-
 	bool useParentValue();
 
-	QToolButton *parentButton;
+private:
+	bool   m_hasParent = false;
+	bool   m_useParentStyle = false;
+	int    m_pStyle = 0;
 
-private:
-	bool   m_hasParent;
-	bool   m_useParentStyle;
-	int    m_pStyle;
+	QToolButton *parentButton = nullptr;
+
 	void setFont(bool wantBold);
 
 private slots:

Modified: trunk/Scribus/scribus/ui/smtablestyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smtablestyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtablestyle.cpp	Sat May  9 00:44:12 2020
@@ -15,7 +15,7 @@
 #include "smtablestylewidget.h"
 #include "ui/scmessagebox.h"
 
-SMTableStyle::SMTableStyle() : m_widget(nullptr), m_page(nullptr), m_doc(nullptr)
+SMTableStyle::SMTableStyle()
 {
 	m_widget = new QTabWidget();
 	Q_CHECK_PTR(m_widget);

Modified: trunk/Scribus/scribus/ui/smtablestyle.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smtablestyle.h
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestyle.h	(original)
+++ trunk/Scribus/scribus/ui/smtablestyle.h	Sat May  9 00:44:12 2020
@@ -78,13 +78,13 @@
 	void selectionDirty();
 
 private:
-	QTabWidget *m_widget;
-	SMTableStyleWidget *m_page;
-	ScribusDoc *m_doc;
+	QTabWidget *m_widget = nullptr;
+	SMTableStyleWidget *m_page = nullptr;
+	ScribusDoc *m_doc = nullptr;
 	StyleSet<TableStyle> m_cachedStyles;
 	QList<TableStyle*> m_selection;
 	QList<RemoveItem> m_deleted;
-	bool m_selectionIsDirty;
+	bool m_selectionIsDirty = false;
 
 	void updateStylesCache();
 	void setupConnections();

Modified: trunk/Scribus/scribus/ui/smtablestylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smtablestylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtablestylewidget.cpp	Sat May  9 00:44:12 2020
@@ -12,8 +12,7 @@
 #include "scribusapp.h"
 #include "smtablestylewidget.h"
 
-SMTableStyleWidget::SMTableStyleWidget(QWidget *parent) :
-	m_Doc(nullptr)
+SMTableStyleWidget::SMTableStyleWidget(QWidget *parent)
 {
 	setupUi(this);
 

Modified: trunk/Scribus/scribus/ui/smtablestylewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smtablestylewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestylewidget.h	(original)
+++ trunk/Scribus/scribus/ui/smtablestylewidget.h	Sat May  9 00:44:12 2020
@@ -68,7 +68,7 @@
 	void showColors(const QList<TableStyle*> &tableStyles);
 
 private:
-	ScribusDoc * m_Doc;
+	ScribusDoc * m_Doc = nullptr;
 
 private slots:
 	void handleUpdateRequest(int);

Modified: trunk/Scribus/scribus/ui/smtabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smtabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtabruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtabruler.cpp	Sat May  9 00:44:12 2020
@@ -12,7 +12,7 @@
 
 
 SMTabruler::SMTabruler(QWidget* parent, bool haveFirst, int dEin, QList<ParagraphStyle::TabRecord> Tabs, double wid)
-: Tabruler(parent, haveFirst, dEin, Tabs, wid)
+	: Tabruler(parent, haveFirst, dEin, Tabs, wid)
 {
 	m_parentButton = new QToolButton(this);
 	Q_CHECK_PTR(m_parentButton);
@@ -23,9 +23,6 @@
 	f.setBold(true);
 	m_parentButton->setFont(f);
 	connect(m_parentButton, SIGNAL(clicked()), this, SLOT(pbClicked()));
-	m_hasParent = false;
-	m_tabsChanged = false;
-	m_useParentTabs = false;
 	first_ = new SMScrSpinBox(-3000, 4000, this, dEin);
 	Q_CHECK_PTR(first_);
 	left_ = new SMScrSpinBox(0, 4000, this, dEin);

Modified: trunk/Scribus/scribus/ui/smtabruler.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smtabruler.h
==============================================================================
--- trunk/Scribus/scribus/ui/smtabruler.h	(original)
+++ trunk/Scribus/scribus/ui/smtabruler.h	Sat May  9 00:44:12 2020
@@ -52,14 +52,14 @@
 
 private:
 	QList<ParagraphStyle::TabRecord> m_pTabs;
-	int  m_unitIndex;
-	QToolButton *m_parentButton;
-	bool m_hasParent;
-	bool m_tabsChanged;
-	bool m_useParentTabs;
-	bool m_isSetupRight;
-	bool m_isSetupLeft;
-	bool m_isSetupFirst;
+	int  m_unitIndex = 0;
+	QToolButton *m_parentButton = nullptr;
+	bool m_hasParent = false;
+	bool m_tabsChanged = false;
+	bool m_useParentTabs = false;
+	bool m_isSetupRight = false;
+	bool m_isSetupLeft = false;
+	bool m_isSetupFirst = false;
 
 private slots:
 	void slotTabsChanged();

Modified: trunk/Scribus/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smtextstyles.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtextstyles.cpp	Sat May  9 00:44:12 2020
@@ -38,8 +38,7 @@
 #include "util.h"
 
 
-SMParagraphStyle::SMParagraphStyle(SMCharacterStyle* cstyleItem) :
-	m_pwidget(nullptr), m_cstyleItem(cstyleItem), m_doc(nullptr), m_selectionIsDirty(false), m_unitRatio(1.0)
+SMParagraphStyle::SMParagraphStyle(SMCharacterStyle* cstyleItem)
 {
 	Q_ASSERT(m_cstyleItem);
 	m_cstyles = m_cstyleItem->tmpStyles();
@@ -2068,7 +2067,7 @@
 /******************************************************************************/
 /******************************************************************************/
 
-SMCharacterStyle::SMCharacterStyle() : m_widget(nullptr), m_page(nullptr), m_doc(nullptr), m_selectionIsDirty(false)
+SMCharacterStyle::SMCharacterStyle()
 {
 	m_widget = new QTabWidget();
 	Q_CHECK_PTR(m_widget);

Modified: trunk/Scribus/scribus/ui/smtextstyles.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23719&path=/trunk/Scribus/scribus/ui/smtextstyles.h
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.h	(original)
+++ trunk/Scribus/scribus/ui/smtextstyles.h	Sat May  9 00:44:12 2020
@@ -53,13 +53,13 @@
 	void selectionDirty();
 
 private:
-	SMPStyleWidget *m_pwidget;
-	SMCharacterStyle* m_cstyleItem;
-	ScribusDoc *m_doc;
-	bool m_selectionIsDirty;
-	double m_unitRatio;
+	SMPStyleWidget *m_pwidget = nullptr;
+	SMCharacterStyle* m_cstyleItem = nullptr;
+	ScribusDoc *m_doc = nullptr;
+	bool m_selectionIsDirty = false;
+	double m_unitRatio = 1.0;
 	StyleSet<ParagraphStyle> m_tmpStyles;
-	StyleSet<CharStyle> *m_cstyles;
+	StyleSet<CharStyle> *m_cstyles = nullptr;
 	QList<ParagraphStyle*> m_selection;
 	QList<RemoveItem> m_deleted;
 
@@ -175,13 +175,13 @@
 	void charStylesDeleted(const QList<RemoveItem> &removeList);
 
 private:
-	QTabWidget   *m_widget;
-	SMCStyleWidget *m_page;
-	ScribusDoc   *m_doc;
+	QTabWidget   *m_widget = nullptr;
+	SMCStyleWidget *m_page = nullptr;
+	ScribusDoc   *m_doc = nullptr;
 	StyleSet<CharStyle> m_tmpStyles;
 	QList<CharStyle*> m_selection;
 	QList<RemoveItem> m_deleted;
-	bool m_selectionIsDirty;
+	bool m_selectionIsDirty = false;
 
 	void reloadTmpStyles();
 	void setupConnections();
@@ -208,7 +208,6 @@
 	void slotFont(const QString& s);
 	void slotParentChanged(const QString &parent);
 	void slotFontFeatures();
-
 };
 
 #endif




More information about the scribus-commit mailing list