r23609 by craig - Align propertiies standard variable defaults, remove doc initialisation

scribus-commit scribus-commit at lists.scribus.net
Tue Apr 14 09:15:54 UTC 2020


Author: craig
Date: Tue Apr 14 09:15:54 2020
New Revision: 23609

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23609
Log:
Align propertiies standard variable defaults, remove doc initialisation
when its a ScGuardedPtr

Modified:
    trunk/Scribus/scribus/ui/propertiespalette.h
    trunk/Scribus/scribus/ui/propertiespalette_group.cpp
    trunk/Scribus/scribus/ui/propertiespalette_group.h
    trunk/Scribus/scribus/ui/propertiespalette_image.cpp
    trunk/Scribus/scribus/ui/propertiespalette_image.h
    trunk/Scribus/scribus/ui/propertiespalette_line.cpp
    trunk/Scribus/scribus/ui/propertiespalette_line.h
    trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
    trunk/Scribus/scribus/ui/propertiespalette_shadow.h
    trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
    trunk/Scribus/scribus/ui/propertiespalette_shape.h
    trunk/Scribus/scribus/ui/propertiespalette_table.cpp
    trunk/Scribus/scribus/ui/propertiespalette_table.h
    trunk/Scribus/scribus/ui/propertiespalette_text.cpp
    trunk/Scribus/scribus/ui/propertiespalette_text.h
    trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
    trunk/Scribus/scribus/ui/propertiespalette_xyz.h
    trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
    trunk/Scribus/scribus/ui/propertywidget_advanced.h
    trunk/Scribus/scribus/ui/propertywidget_distance.cpp
    trunk/Scribus/scribus/ui/propertywidget_distance.h
    trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
    trunk/Scribus/scribus/ui/propertywidget_pareffect.h
    trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
    trunk/Scribus/scribus/ui/propertywidget_pathtext.h
    trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
    trunk/Scribus/scribus/ui/propertywidget_textcolor.h

Modified: trunk/Scribus/scribus/ui/propertiespalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.h	Tue Apr 14 09:15:54 2020
@@ -29,6 +29,7 @@
 #include "scpage.h"
 #include "spalette.h"
 #include "sctreewidget.h"
+#include "units.h"
 
 class ColorCombo;
 class ColorPalette;
@@ -107,14 +108,14 @@
 	void handleShapeEdit();
 
 protected:
-	ScribusMainWindow *m_ScMW {nullptr};
 	ScTreeWidget* TabStack {nullptr};
 
 	bool m_haveDoc {false};
 	bool m_haveItem {false};
 	double m_unitRatio {1.0};
-	int m_unitIndex {0};
-	PageItem* m_item {nullptr};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 	UndoManager *undoManager {nullptr};
 	
 	ScGuardedPtr<ScribusDoc> m_doc;

Modified: trunk/Scribus/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.cpp	Tue Apr 14 09:15:54 2020
@@ -67,13 +67,7 @@
 
 
 PropertiesPalette_Group::PropertiesPalette_Group( QWidget* parent)
-	: QWidget(parent),
-	  m_haveDoc(false),
-	  m_haveItem(false),
-	  m_unitRatio(1.0),
-	  m_unitIndex(SC_PT),
-	  m_item(nullptr),
-	  m_doc(nullptr)
+	: QWidget(parent)
 {
 	m_tmpSelection = new Selection(this, false);
 	m_tmpSelection->clear();

Modified: trunk/Scribus/scribus/ui/propertiespalette_group.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_group.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.h	Tue Apr 14 09:15:54 2020
@@ -13,6 +13,7 @@
 #include "pageitem.h"
 #include "scguardedptr.h"
 #include "scribusdoc.h"
+#include "units.h"
 
 class ScribusDoc;
 class ScribusMainWindow;
@@ -34,16 +35,14 @@
 	void updateColorSpecialGradient();
 
 protected:
-
-	bool      m_haveDoc;
-	bool      m_haveItem;
-	double    m_unitRatio;
-	int       m_unitIndex;
-
-	PageItem *m_item;
-	ScribusMainWindow*       m_ScMW;
+	bool m_haveDoc {false};
+	bool m_haveItem {false};
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 	ScGuardedPtr<ScribusDoc> m_doc;
-	Selection*               m_tmpSelection;
+	Selection* m_tmpSelection {nullptr};
 
 private:
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp	Tue Apr 14 09:15:54 2020
@@ -32,15 +32,6 @@
 
 PropertiesPalette_Image::PropertiesPalette_Image( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW = nullptr;
-	m_doc  = nullptr;
-	m_haveDoc    = false;
-	m_haveItem   = false;
-	m_item       = nullptr;
-	m_unitRatio  = 1.0;
-	m_unitIndex  = 0;
-
-	m_userActionOn    = false;
 	userActionSniffer = new UserActionSniffer(this);
 	connect(userActionSniffer, SIGNAL(actionStart()), this, SLOT(spinboxStartUserAction()));
 	connect(userActionSniffer, SIGNAL(actionEnd()), this, SLOT(spinboxFinishUserAction()));

Modified: trunk/Scribus/scribus/ui/propertiespalette_image.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_image.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.h	Tue Apr 14 09:15:54 2020
@@ -14,6 +14,7 @@
 #include "scrspinbox.h"
 #include "sclistboxpixmap.h"
 #include "scguardedptr.h"
+#include "units.h"
 
 class PageItem;
 class ScribusDoc;
@@ -38,14 +39,14 @@
 
 protected:
 
-	bool      m_haveDoc;
-	bool      m_haveItem;
-	bool      m_userActionOn;
-	double    m_unitRatio;
-	int       m_unitIndex;
+	bool m_haveDoc {false};
+	bool m_haveItem {false};
+	bool m_userActionOn {false};
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
 
-	PageItem *m_item;
-	ScribusMainWindow*       m_ScMW;
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 	ScGuardedPtr<ScribusDoc> m_doc;
 
 	UserActionSniffer *userActionSniffer;

Modified: trunk/Scribus/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.cpp	Tue Apr 14 09:15:54 2020
@@ -36,15 +36,6 @@
 
 PropertiesPalette_Line::PropertiesPalette_Line( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW = nullptr;
-	m_doc  = nullptr;
-	m_haveDoc  = false;
-	m_haveItem = false;
-	m_item     = nullptr;
-	m_lineMode = false;
-	m_unitRatio = 1.0;
-	m_unitIndex = 0;
-
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_line.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_line.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.h	Tue Apr 14 09:15:54 2020
@@ -12,6 +12,7 @@
 #include "scribusapi.h"
 #include "linecombo.h"
 #include "scguardedptr.h"
+#include "units.h"
 
 class ArrowChooser;
 class DashEditor;
@@ -33,15 +34,13 @@
 	void updateArrowStyles();
 
 protected:
-
-	bool m_haveDoc;
-	bool m_haveItem;
-	bool m_lineMode;
-	double m_unitRatio;
-	int m_unitIndex;
-
-	PageItem *m_item;
-	ScribusMainWindow*       m_ScMW;
+	bool m_lineMode {false};
+	bool m_haveDoc {false};
+	bool m_haveItem {false};
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 	ScGuardedPtr<ScribusDoc> m_doc;
 
 private:

Modified: trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp	Tue Apr 14 09:15:54 2020
@@ -28,13 +28,6 @@
 
 PropertiesPalette_Shadow::PropertiesPalette_Shadow( QWidget* parent) : PropTreeWidget(parent)
 {
-	m_ScMW = nullptr;
-	m_doc = nullptr;
-	m_item = nullptr;
-	m_haveDoc  = false;
-	m_haveItem = false;
-	m_unitIndex = 0;
-	m_unitRatio = 1.0;
 	hasSoftShadow = new PropTreeItem(this, PropTreeItem::CheckBox, tr( "Has Drop Shadow"));
 	hasSoftShadow->setBoolValue(false);
 
@@ -83,13 +76,9 @@
 	softShadowObjTrans->setBoolValue(false);
 
 	languageChange();
-	m_haveItem = false;
-
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
 	connect(this->model(), SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(handleNewValues()));
 	connect(ScQApp, SIGNAL(localeChanged()), this, SLOT(localeChange()));
-
-	m_haveItem = false;
 }
 
 void PropertiesPalette_Shadow::setMainWindow(ScribusMainWindow* mw)

Modified: trunk/Scribus/scribus/ui/propertiespalette_shadow.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_shadow.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shadow.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shadow.h	Tue Apr 14 09:15:54 2020
@@ -11,6 +11,7 @@
 #include "scguardedptr.h"
 
 #include "proptree.h"
+#include "units.h"
 
 class PageItem;
 class ScribusDoc;
@@ -54,23 +55,22 @@
 	void updateSpinBoxConstants();
 
 protected:
-	PropTreeItem *hasSoftShadow;
-	PropTreeItem *softShadowXOffset;
-	PropTreeItem *softShadowYOffset;
-	PropTreeItem *softShadowBlurRadius;
-	PropTreeItem *softShadowColor;
-	PropTreeItem *softShadowShade;
-	PropTreeItem *softShadowOpacity;
-	PropTreeItem *softShadowBlendMode;
-	PropTreeItem *softShadowErase;
-	PropTreeItem *softShadowObjTrans;
-	ScribusMainWindow *m_ScMW;
-
-	bool      m_haveDoc;
-	bool      m_haveItem;
-	double    m_unitRatio;
-	int       m_unitIndex;
-	PageItem *m_item;
+	PropTreeItem *hasSoftShadow {nullptr};
+	PropTreeItem *softShadowXOffset {nullptr};
+	PropTreeItem *softShadowYOffset {nullptr};
+	PropTreeItem *softShadowBlurRadius {nullptr};
+	PropTreeItem *softShadowColor {nullptr};
+	PropTreeItem *softShadowShade {nullptr};
+	PropTreeItem *softShadowOpacity {nullptr};
+	PropTreeItem *softShadowBlendMode {nullptr};
+	PropTreeItem *softShadowErase {nullptr};
+	PropTreeItem *softShadowObjTrans {nullptr};
+	bool m_haveDoc {false};
+	bool m_haveItem {false};
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 	ScGuardedPtr<ScribusDoc> m_doc;
 };
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.cpp	Tue Apr 14 09:15:54 2020
@@ -37,13 +37,7 @@
 #include "util_math.h"
 
 PropertiesPalette_Shape::PropertiesPalette_Shape( QWidget* parent)
-	: QWidget(parent),
-	  m_haveDoc(false),
-	  m_haveItem(false),
-	  m_unitRatio(1.0),
-	  m_unitIndex(SC_PT),
-	  m_item(nullptr),
-	  m_doc(nullptr)
+	: QWidget(parent)
 {
 	m_tmpSelection = new Selection(this, false);
 	m_tmpSelection->clear();

Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.h	Tue Apr 14 09:15:54 2020
@@ -16,6 +16,7 @@
 #include "sclistboxpixmap.h"
 #include "scguardedptr.h"
 #include "sctreewidget.h"
+#include "units.h"
 
 class Autoforms;
 class ScribusDoc;
@@ -39,12 +40,11 @@
 	void showTextFlowMode(PageItem::TextFlowMode mode);
 
 protected:
-
-	bool      m_haveDoc;
-	bool      m_haveItem;
-	double    m_unitRatio;
-	int       m_unitIndex;
-	PageItem *m_item;
+	bool m_haveDoc {false};
+	bool m_haveItem {false};
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
 	ScGuardedPtr<ScribusDoc> m_doc;
 
 	Selection* m_tmpSelection;

Modified: trunk/Scribus/scribus/ui/propertiespalette_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_table.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.cpp	Tue Apr 14 09:15:54 2020
@@ -29,8 +29,7 @@
 
 
 
-PropertiesPalette_Table::PropertiesPalette_Table(QWidget* parent) : QWidget(parent),
-	m_mainWindow(nullptr), m_doc(nullptr), m_item(nullptr), m_previousItem(nullptr)
+PropertiesPalette_Table::PropertiesPalette_Table(QWidget* parent) : QWidget(parent)
 {
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));

Modified: trunk/Scribus/scribus/ui/propertiespalette_table.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_table.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.h	Tue Apr 14 09:15:54 2020
@@ -16,6 +16,7 @@
 #include "scribusapi.h"
 #include "scguardedptr.h"
 #include "tableborder.h"
+#include "units.h"
 
 #include "ui_propertiespalette_tablebase.h"
 
@@ -117,13 +118,13 @@
 
 private:
 	/// The current main window.
-	ScribusMainWindow* m_mainWindow;
+	ScribusMainWindow* m_mainWindow {nullptr};
 	/// The current document.
 	ScGuardedPtr<ScribusDoc> m_doc;
 	/// The currently edited item.
-	PageItem* m_item;
+	PageItem* m_item {nullptr};
 	/// The previous edited selected items.
-	PageItem* m_previousItem;
+	PageItem* m_previousItem {nullptr};
 
 	/// The currently edited border.
 	TableBorder m_currentBorder;

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp	Tue Apr 14 09:15:54 2020
@@ -53,14 +53,6 @@
 
 PropertiesPalette_Text::PropertiesPalette_Text( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW=nullptr;
-	m_doc=nullptr;
-	m_item=nullptr;
-	m_haveDoc = false;
-	m_haveItem = false;
-	m_unitIndex = 0;
-	m_unitRatio = 1.0;
-
 	setupUi(this);
 
 	fontSize->setPrefix( "" );
@@ -125,8 +117,6 @@
 	connect(parEffectWidgets,   SIGNAL(needsRelayout()), this, SLOT(updateTreeLayout()));
 
 	connect(ScQApp, SIGNAL(localeChanged()), this, SLOT(localeChange()));
-
-	m_haveItem = false;
 	setEnabled(false);
 }
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_text.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.h	Tue Apr 14 09:15:54 2020
@@ -15,6 +15,7 @@
 
 #include "scguardedptr.h"
 #include "sctextstruct.h"
+#include "units.h"
 
 class PageItem;
 class PropertyWidget_Advanced;
@@ -49,14 +50,12 @@
                          // and if in ScribusView a groupTransaction has been started it must be also
                          // commmited
 protected:
-
-	bool   m_haveDoc;
-	bool   m_haveItem;
-	double m_unitRatio;
-	int    m_unitIndex;
-
-	PageItem *m_item;
-	ScribusMainWindow*       m_ScMW;
+	bool m_haveDoc {false};
+	bool m_haveItem {false};
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 	ScGuardedPtr<ScribusDoc> m_doc;
 
 private:

Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	Tue Apr 14 09:15:54 2020
@@ -47,14 +47,6 @@
 
 PropertiesPalette_XYZ::PropertiesPalette_XYZ( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW = nullptr;
-	m_doc = nullptr;
-	m_haveDoc  = false;
-	m_haveItem = false;
-	m_lineMode = false;
-	m_oldRotation = 0;
-	m_unitRatio = 1.0;
-
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
 
@@ -75,7 +67,7 @@
 	keepFrameWHRatioButton->setMaximumSize( QSize( 15, 32767 ) );
 	keepFrameWHRatioButton->setChecked(false);
 
-	rotationSpin->setNewUnit(6);
+	rotationSpin->setNewUnit(SC_DEG);
 	rotationSpin->setWrapping( true );
 	installSniffer(rotationSpin);
 	rotationLabel->setBuddy(rotationSpin);
@@ -88,8 +80,6 @@
 	doLock->setCheckable(true);
 	noPrint->setCheckable(true);
 	noResize->setCheckable(true);
-
-	m_lineMode = false;
 
 	iconSetChange();
 	languageChange();
@@ -409,7 +399,7 @@
 	PageItem* currItem = currentItemFromSelection();
 	if (m_doc->m_Selection->count() > 1)
 	{
-		m_oldRotation = 0;
+		m_oldRotation = 0.0;
 		double gx, gy, gh, gw;
 		m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
 		int bp = basePointWidget->checkedId();

Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.h	Tue Apr 14 09:15:54 2020
@@ -14,6 +14,7 @@
 #include "linkbutton.h"
 #include "sclistboxpixmap.h"
 #include "scguardedptr.h"
+#include "units.h"
 
 class BasePointWidget;
 class NameWidget;
@@ -97,17 +98,16 @@
 	void updateSpinBoxConstants();
 
 protected:
-	ScribusMainWindow *m_ScMW;
-
-	bool      m_haveDoc;
-	bool      m_haveItem;
-	bool      m_lineMode;
-	double    m_unitRatio;
-	int       m_unitIndex;
-	PageItem *m_item;
+	bool m_lineMode {false};
+	bool m_haveDoc {false};
+	bool m_haveItem {false};
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 	ScGuardedPtr<ScribusDoc> m_doc;
 	
-	double    m_oldRotation;
+	double m_oldRotation {0.0};
 
 	bool _userActionOn;
 	UserActionSniffer *userActionSniffer;

Modified: trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_advanced.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_advanced.cpp	Tue Apr 14 09:15:54 2020
@@ -15,15 +15,9 @@
 #include "scribusapp.h"
 #include "scribusdoc.h"
 #include "selection.h"
-#include "units.h"
 
 PropertyWidget_Advanced::PropertyWidget_Advanced(QWidget* parent) : QFrame(parent)
 {
-	m_item = nullptr;
-	m_ScMW = nullptr;
-	m_unitIndex = 0;
-	m_unitRatio = 1.0;
-
 	setupUi(this);
 
 	setFrameStyle(QFrame::Box | QFrame::Plain);

Modified: trunk/Scribus/scribus/ui/propertywidget_advanced.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_advanced.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_advanced.h	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_advanced.h	Tue Apr 14 09:15:54 2020
@@ -10,6 +10,7 @@
 #include "ui_propertywidget_advancedbase.h"
 
 #include "propertywidgetbase.h"
+#include "units.h"
 
 class CharStyle;
 class ParagraphStyle;
@@ -29,11 +30,10 @@
 	void connectSignals();
 	void disconnectSignals();
 
-	double m_unitRatio;
-	int    m_unitIndex;
-
-	PageItem*          m_item;
-	ScribusMainWindow* m_ScMW;
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 
 	void configureWidgets();
 	void setCurrentItem(PageItem *item);

Modified: trunk/Scribus/scribus/ui/propertywidget_distance.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_distance.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_distance.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_distance.cpp	Tue Apr 14 09:15:54 2020
@@ -19,16 +19,9 @@
 #include "scribusdoc.h"
 #include "selection.h"
 #include "tabmanager.h"
-#include "units.h"
 
 PropertyWidget_Distance::PropertyWidget_Distance(QWidget* parent) : QFrame(parent)
 {
-	m_item = nullptr;
-	m_ScMW = nullptr;
-
-	m_unitRatio = 1.0;
-	m_unitIndex = 0;
-
 	setupUi(this);
 
 	setFrameStyle(QFrame::Box | QFrame::Plain);

Modified: trunk/Scribus/scribus/ui/propertywidget_distance.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_distance.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_distance.h	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_distance.h	Tue Apr 14 09:15:54 2020
@@ -10,6 +10,7 @@
 #include "ui_propertywidget_distancebase.h"
 
 #include "propertywidgetbase.h"
+#include "units.h"
 
 class ScribusDoc;
 class ScribusMainWindow;
@@ -27,11 +28,10 @@
 	void connectSignals();
 	void disconnectSignals();
 
-	PageItem *         m_item;
-	ScribusMainWindow* m_ScMW;
-
-	double m_unitRatio;
-	int    m_unitIndex;
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 
 	void configureWidgets();
 	void setCurrentItem(PageItem *item);

Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	Tue Apr 14 09:15:54 2020
@@ -20,10 +20,9 @@
 #include "scribusdoc.h"
 #include "selection.h"
 #include "ui/sctreewidget.h"
-#include "units.h"
 #include "util.h"
 
-PropertyWidget_ParEffect::PropertyWidget_ParEffect(QWidget *parent) : QFrame(parent), m_enhanced(nullptr), m_item(nullptr), m_ScMW(nullptr)
+PropertyWidget_ParEffect::PropertyWidget_ParEffect(QWidget *parent) : QFrame(parent)
 {
 	setupUi(this);
 	setFrameStyle(QFrame::Box | QFrame::Plain);

Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.h	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.h	Tue Apr 14 09:15:54 2020
@@ -3,10 +3,11 @@
 
 #include <QVector>
 
-#include "ui_propertywidget_pareffectbase.h"
 #include "numeration.h"
 #include "propertywidgetbase.h"
 #include "ui/charselectenhanced.h"
+#include "ui_propertywidget_pareffectbase.h"
+#include "units.h"
 
 class PageItem;
 class ParagraphStyle;
@@ -26,16 +27,15 @@
 	void showCharStyle(const QString& name);
 	void connectSignals();
 	void disconnectSignals();
-	CharSelectEnhanced * m_enhanced;
+	CharSelectEnhanced * m_enhanced {nullptr};
 	
 	void fillNumerationsCombo();
 
 protected:
-	double m_unitRatio;
-	int    m_unitIndex;
-
-	PageItem *         m_item;
-	ScribusMainWindow* m_ScMW;
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 
 	void configureWidgets();
 	void setCurrentItem(PageItem *item);

Modified: trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	Tue Apr 14 09:15:54 2020
@@ -14,16 +14,9 @@
 #include "scribusapp.h"
 #include "scribusdoc.h"
 #include "selection.h"
-#include "units.h"
 
 PropertyWidget_PathText::PropertyWidget_PathText(QWidget* parent) : QFrame(parent)
 {
-	m_ScMW = nullptr;
-	m_doc  = nullptr;
-	m_item = nullptr;
-	m_unitRatio = 1.0;
-	m_unitIndex = 0;
-
 	setupUi(this);
 
 	setFrameStyle(QFrame::Box | QFrame::Plain);

Modified: trunk/Scribus/scribus/ui/propertywidget_pathtext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_pathtext.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pathtext.h	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pathtext.h	Tue Apr 14 09:15:54 2020
@@ -10,6 +10,7 @@
 #include "ui_propertywidget_pathtextbase.h"
 
 #include "propertywidgetbase.h"
+#include "units.h"
 
 class ScribusDoc;
 class ScribusMainWindow;
@@ -24,11 +25,10 @@
 	~PropertyWidget_PathText() {};
 
 protected:
-	PageItem *         m_item;
-	ScribusMainWindow* m_ScMW;
-
-	double m_unitRatio;
-	int    m_unitIndex;
+	double m_unitRatio {1.0};
+	int m_unitIndex {SC_PT};
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 
 	void connectSignals();
 	void disconnectSignals();

Modified: trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp	Tue Apr 14 09:15:54 2020
@@ -17,9 +17,6 @@
 
 PropertyWidget_TextColor::PropertyWidget_TextColor(QWidget* parent) : QFrame(parent)
 {
-	m_item = nullptr;
-	m_ScMW = nullptr;
-
 	setupUi(this);
 
 	setFrameStyle(QFrame::Box | QFrame::Plain);

Modified: trunk/Scribus/scribus/ui/propertywidget_textcolor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23609&path=/trunk/Scribus/scribus/ui/propertywidget_textcolor.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_textcolor.h	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_textcolor.h	Tue Apr 14 09:15:54 2020
@@ -27,8 +27,8 @@
 	void setCurrentItem(PageItem *item);
 
 protected:
-	PageItem *         m_item;
-	ScribusMainWindow* m_ScMW;
+	PageItem *m_item {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
 
 	void connectSignals();
 	void disconnectSignals();




More information about the scribus-commit mailing list