r23612 by craig - Clean up canvasmode and canvasgesture variable initialisation, fix some

scribus-commit scribus-commit at lists.scribus.net
Tue Apr 14 12:20:26 UTC 2020


Author: craig
Date: Tue Apr 14 12:20:25 2020
New Revision: 23612

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23612
Log:
Clean up canvasmode and canvasgesture variable initialisation, fix some
deprecated call warnings

Modified:
    trunk/Scribus/scribus/canvasgesture.h
    trunk/Scribus/scribus/canvasgesture_resize.cpp
    trunk/Scribus/scribus/canvasgesture_resize.h
    trunk/Scribus/scribus/canvasgesture_rulermove.cpp
    trunk/Scribus/scribus/canvasgesture_rulermove.h
    trunk/Scribus/scribus/canvasmode_copyproperties.cpp
    trunk/Scribus/scribus/canvasmode_copyproperties.h
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_create.h
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/canvasmode_drawbezier.h
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
    trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
    trunk/Scribus/scribus/canvasmode_drawfreehand.h
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/canvasmode_edit.h
    trunk/Scribus/scribus/canvasmode_editarc.cpp
    trunk/Scribus/scribus/canvasmode_editarc.h
    trunk/Scribus/scribus/canvasmode_editgradient.cpp
    trunk/Scribus/scribus/canvasmode_editgradient.h
    trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
    trunk/Scribus/scribus/canvasmode_editmeshgradient.h
    trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
    trunk/Scribus/scribus/canvasmode_editmeshpatch.h
    trunk/Scribus/scribus/canvasmode_editpolygon.cpp
    trunk/Scribus/scribus/canvasmode_editpolygon.h
    trunk/Scribus/scribus/canvasmode_editspiral.cpp
    trunk/Scribus/scribus/canvasmode_editspiral.h
    trunk/Scribus/scribus/canvasmode_edittable.cpp
    trunk/Scribus/scribus/canvasmode_edittable.h
    trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
    trunk/Scribus/scribus/canvasmode_editweldpoint.h
    trunk/Scribus/scribus/canvasmode_eyedropper.cpp
    trunk/Scribus/scribus/canvasmode_eyedropper.h
    trunk/Scribus/scribus/canvasmode_framelinks.cpp
    trunk/Scribus/scribus/canvasmode_framelinks.h
    trunk/Scribus/scribus/canvasmode_imageimport.cpp
    trunk/Scribus/scribus/canvasmode_imageimport.h
    trunk/Scribus/scribus/canvasmode_magnifier.cpp
    trunk/Scribus/scribus/canvasmode_magnifier.h
    trunk/Scribus/scribus/canvasmode_measurements.cpp
    trunk/Scribus/scribus/canvasmode_measurements.h
    trunk/Scribus/scribus/canvasmode_nodeedit.cpp
    trunk/Scribus/scribus/canvasmode_nodeedit.h
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/canvasmode_normal.h
    trunk/Scribus/scribus/canvasmode_objimport.cpp
    trunk/Scribus/scribus/canvasmode_objimport.h
    trunk/Scribus/scribus/canvasmode_rotate.cpp
    trunk/Scribus/scribus/canvasmode_rotate.h
    trunk/Scribus/scribus/fpoint.h
    trunk/Scribus/scribus/ui/inspage.cpp
    trunk/Scribus/scribus/ui/measurements.cpp
    trunk/Scribus/scribus/ui/movepage.cpp
    trunk/Scribus/scribus/ui/pageselector.cpp
    trunk/Scribus/scribus/ui/prefs_fonts.cpp
    trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
    trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
    trunk/Scribus/scribus/ui/storyeditor.cpp

Modified: trunk/Scribus/scribus/canvasgesture.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasgesture.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture.h	(original)
+++ trunk/Scribus/scribus/canvasgesture.h	Tue Apr 14 12:20:25 2020
@@ -50,7 +50,7 @@
 
 protected:
 	explicit CanvasGesture (CanvasMode* parent) : CanvasMode(parent->view()), m_delegate(parent) {};
-	explicit CanvasGesture (ScribusView* view) : CanvasMode(view), m_delegate(nullptr) {};
+	explicit CanvasGesture (ScribusView* view) : CanvasMode(view) {};
 	
 public:
 	~CanvasGesture() override = default;
@@ -75,7 +75,7 @@
 	void setDelegate(CanvasMode* delegate) { if (delegate) m_delegate = delegate; }
 	
 protected:
-	CanvasMode* m_delegate;
+	CanvasMode* m_delegate {nullptr};
 };
 
 

Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp	Tue Apr 14 12:20:25 2020
@@ -37,13 +37,6 @@
 
 ResizeGesture::ResizeGesture (CanvasMode* parent) : CanvasGesture(parent)
 {
-	m_handle = Canvas::INSIDE;
-	m_rotation = 0.0;
-	m_origRatio = 1.0;
-	m_extraWidth = 0.0;
-	m_extraHeight = 0.0;
-	m_extraX = 0.0;
-	m_extraY = 0.0;
 	m_transaction = UndoTransaction();
 }
 

Modified: trunk/Scribus/scribus/canvasgesture_resize.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasgesture_resize.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.h	(original)
+++ trunk/Scribus/scribus/canvasgesture_resize.h	Tue Apr 14 12:20:25 2020
@@ -77,18 +77,18 @@
 	FPoint applyGrid(const FPoint& docPoint);
 	FPoint applyGuides(const FPoint& docPoint);
 
-	Canvas::FrameHandle m_handle;
-	double m_rotation;
-	double m_origRatio;
+	Canvas::FrameHandle m_handle {Canvas::INSIDE};
 	QPoint m_mousePressPoint;
 	QRectF m_bounds;
+	QRectF m_mousePressBounds;
 	QRectF m_origBounds;
-	QRectF m_mousePressBounds;
 	UndoTransaction m_transaction;
-	double m_extraWidth;
-	double m_extraHeight;
-	double m_extraX;
-	double m_extraY;
+	double m_extraHeight {0.0};
+	double m_extraWidth {0.0};
+	double m_extraX {0.0};
+	double m_extraY {0.0};
+	double m_origRatio {1.0};
+	double m_rotation {0.0};
 };
 
 

Modified: trunk/Scribus/scribus/canvasgesture_rulermove.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasgesture_rulermove.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_rulermove.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_rulermove.cpp	Tue Apr 14 12:20:25 2020
@@ -30,15 +30,8 @@
 
 RulerGesture::RulerGesture(ScribusView *view, RulerGesture::Mode mode) :
 	CanvasGesture(view),
-	m_ScMW(m_view->m_ScMW),
 	m_mode(mode),
-	m_haveGuide(false),
-	m_page(0),
-	m_guide(0.0),
-	m_currentGuide(0.0),
-	m_haveCursor(false),
-	m_xy(0,0),
-	m_mousePoint(0,0)
+	m_ScMW(m_view->m_ScMW)
 {
 }
 

Modified: trunk/Scribus/scribus/canvasgesture_rulermove.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasgesture_rulermove.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_rulermove.h	(original)
+++ trunk/Scribus/scribus/canvasgesture_rulermove.h	Tue Apr 14 12:20:25 2020
@@ -45,54 +45,55 @@
  */
 class SCRIBUS_API RulerGesture : public CanvasGesture
 {
-	Q_OBJECT
-public:
-	enum Mode { HORIZONTAL, VERTICAL, ORIGIN };
-	RulerGesture (ScribusView* view, Mode mode);
-	~RulerGesture() override = default;
+		Q_OBJECT
+	public:
+		enum Mode { HORIZONTAL, VERTICAL, ORIGIN };
+		RulerGesture (ScribusView* view, Mode mode);
+		~RulerGesture() override = default;
 
-	/**
+		/**
 		Prepares the gesture for 'mode' without using an existing guide. If 'mode' is HORIZONTAL
 		or VERTICAL, a new guide will be created when the mouse is moved over a page.
 	 */
-	void prepare(Mode mode);
-	void clear();
-	
-	void drawControls(QPainter* p) override;
-	void activate(bool) override;
-	void deactivate(bool) override;
-	void mouseReleaseEvent(QMouseEvent *m) override;
-	void mouseMoveEvent(QMouseEvent *m) override;
-	/**
+		void prepare(Mode mode);
+		void clear();
+
+		void drawControls(QPainter* p) override;
+		void activate(bool) override;
+		void deactivate(bool) override;
+		void mouseReleaseEvent(QMouseEvent *m) override;
+		void mouseMoveEvent(QMouseEvent *m) override;
+		/**
 	  This method should be called when the mousebutton is pressed.
 	  If there's a moveable guide near this position, it prepares the gesture for moving this guide.
 	 */
-	void mousePressEvent(QMouseEvent *m) override;
-	
-	Mode getMode() { return m_mode; }
-	/**
+		void mousePressEvent(QMouseEvent *m) override;
+
+		Mode getMode() { return m_mode; }
+		/**
 		Use this to test if there's a moveable guide near this position.
 		It prepares the gesture for moving this guide.
 	 */
-	bool mouseHitsGuide(const FPoint& mousePointDoc);
-	/**
+		bool mouseHitsGuide(const FPoint& mousePointDoc);
+		/**
 	  It tests for a guide near position, that guide being moveable or not.
 	  If the test results in success, emits guideInfo;
 	*/
-	void mouseSelectGuide(QMouseEvent *m);
-private:
-	ScribusMainWindow* m_ScMW;
-	Mode m_mode;
-	bool m_haveGuide;
-	int m_page;
-	double m_guide;
-	double m_currentGuide;
-	bool m_haveCursor;
-	QCursor m_cursor;
-	QPoint m_xy;
-	FPoint m_mousePoint;
-	void movePoint(QMouseEvent *m, bool mouseRelease);
-	
+		void mouseSelectGuide(QMouseEvent *m);
+	private:
+		FPoint m_mousePoint;
+		Mode m_mode;
+		QCursor m_cursor;
+		QPoint m_xy;
+		ScribusMainWindow* m_ScMW {nullptr};
+		bool m_haveCursor {false};
+		bool m_haveGuide {false};
+		double m_currentGuide {0.0};
+		double m_guide {0.0};
+		int m_page {0};
+
+		void movePoint(QMouseEvent *m, bool mouseRelease);
+
 	signals:
 		void guideInfo(int /*direction*/, qreal /*position*/);
 };

Modified: trunk/Scribus/scribus/canvasmode_copyproperties.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_copyproperties.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_copyproperties.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_copyproperties.cpp	Tue Apr 14 12:20:25 2020
@@ -39,9 +39,6 @@
 
 CanvasMode_CopyProperties::CanvasMode_CopyProperties(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	Mxp = Myp = -1;
-	Dxp = Dyp = -1;
-	frameResizeHandle = -1;
 }
 
 inline bool CanvasMode_CopyProperties::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_copyproperties.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_copyproperties.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_copyproperties.h	(original)
+++ trunk/Scribus/scribus/canvasmode_copyproperties.h	Tue Apr 14 12:20:25 2020
@@ -51,8 +51,11 @@
 	bool SeleItem(QMouseEvent *m);
 	void createContextMenu(PageItem *currItem, double mx, double my);
 
-	int frameResizeHandle;
-	double Mxp, Myp, Dxp, Dyp;
+	int frameResizeHandle {-1};
+	double Mxp {-1.0};
+	double Myp {-1.0};
+	double Dxp {-1.0};
+	double Dyp {-1.0};
 	ScribusMainWindow* m_ScMW;
 };
 

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp	Tue Apr 14 12:20:25 2020
@@ -65,12 +65,6 @@
 {
 	canvasPressCoord.setXY(-1.0, -1.0);
 	mouseGlobalCoord.setXY(-1.0, -1.0);
-	inItemCreation = false;
-	createObjectMode     = 0;
-	createObjectSubMode  = 0;
-	modifiers            = Qt::NoModifier;
-	m_MouseButtonPressed = false;
-	m_createTransaction  = nullptr;
 }
 
 

Modified: trunk/Scribus/scribus/canvasmode_create.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_create.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.h	(original)
+++ trunk/Scribus/scribus/canvasmode_create.h	Tue Apr 14 12:20:25 2020
@@ -74,16 +74,16 @@
 	 */
 	FRect adjustedRect(FPoint &firstPoint, FPoint &secondPoint);
 
-	bool   inItemCreation;
-	bool   m_MouseButtonPressed;
+	FPoint canvasCurrCoord;
+	FPoint canvasPressCoord;
+	FPoint createObjectPos;
 	FPoint mouseGlobalCoord;
-	FPoint canvasPressCoord;
-	FPoint canvasCurrCoord;
-	FPoint createObjectPos;
-	int    createObjectMode;
-	int    createObjectSubMode;
-	Qt::KeyboardModifiers modifiers;
-	UndoTransaction m_createTransaction;
+	Qt::KeyboardModifiers modifiers {Qt::NoModifier};
+	UndoTransaction m_createTransaction {nullptr};
+	bool inItemCreation {false};
+	bool m_MouseButtonPressed {false};
+	int createObjectMode {0};
+	int createObjectSubMode {0};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp	Tue Apr 14 12:20:25 2020
@@ -60,10 +60,6 @@
 
 BezierMode::BezierMode(ScribusView* view) : CanvasMode(view) 
 {
-	m_xp = m_yp = -1;
-	m_inItemCreation = false;
-	m_mouseButtonPressed = false;
-	m_firstPoly = true;
 }
 
 

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_drawbezier.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.h	(original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.h	Tue Apr 14 12:20:25 2020
@@ -52,10 +52,11 @@
 	void finalizeItem(PageItem* item);
 	void selectPage(QMouseEvent *m);
 
-	bool m_inItemCreation;
-	bool m_firstPoly;
-	bool m_mouseButtonPressed;
-	double m_xp, m_yp;
+	bool m_inItemCreation {false};
+	bool m_firstPoly {false};
+	bool m_mouseButtonPressed {false};
+	double m_xp {-1.0};
+	double m_yp {-1.0};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	Tue Apr 14 12:20:25 2020
@@ -44,8 +44,6 @@
 
 CalligraphicMode::CalligraphicMode(ScribusView* view) : CanvasMode(view) 
 {
-	m_xp = m_yp = -1;
-	m_mouseButtonPressed = false;
 }
 
 

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.h	(original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.h	Tue Apr 14 12:20:25 2020
@@ -50,9 +50,10 @@
 	inline bool GetItem(PageItem** pi); 
 	void selectPage(QMouseEvent *m);
 
-	bool   m_mouseButtonPressed;
-	double m_xp, m_yp;
 	FPointArray m_poly;
+	bool m_mouseButtonPressed {false};
+	double m_xp {-1.0};
+	double m_yp {-1.0};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	Tue Apr 14 12:20:25 2020
@@ -41,8 +41,6 @@
 
 FreehandMode::FreehandMode(ScribusView* view) : CanvasMode(view) 
 {
-	m_xp = m_yp = -1;
-	m_mouseButtonPressed = false;
 }
 
 void FreehandMode::drawControls(QPainter* p) 

Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.h	(original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.h	Tue Apr 14 12:20:25 2020
@@ -50,9 +50,10 @@
 	inline bool GetItem(PageItem** pi); 
 	void selectPage(QMouseEvent *m);
 
-	bool   m_mouseButtonPressed;
-	double m_xp, m_yp;
 	FPointArray m_poly;
+	bool m_mouseButtonPressed {false};
+	double m_xp {-1.0};
+	double m_yp {-1.0};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp	Tue Apr 14 12:20:25 2020
@@ -63,18 +63,9 @@
 
 CanvasMode_Edit::CanvasMode_Edit(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	Mxp = Myp = -1;
-	Dxp = Dyp = -1;
-	SeRx = SeRy = -1;
-	oldCp = Cp = -1;
-	frameResizeHandle = -1;
-	m_blinker = new QTimer(view);	
+	m_blinker = new QTimer(view);
 	connect(m_blinker, SIGNAL(timeout()), this, SLOT(blinkTextCursor()));
 	connect(view->horizRuler, SIGNAL(MarkerMoved(double,double)), this, SLOT(rulerPreview(double,double)));
-	mRulerGuide = -1;
-	m_cursorVisible = false;
-	m_longCursorTime = false;
-	m_keyRepeat = false;
 }
 
 inline bool CanvasMode_Edit::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_edit.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_edit.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.h	(original)
+++ trunk/Scribus/scribus/canvasmode_edit.h	Tue Apr 14 12:20:25 2020
@@ -65,17 +65,22 @@
 	bool SeleItem(QMouseEvent *m);
 	void createContextMenu(PageItem *currItem, double mx, double my);
 
-	int  Cp, oldCp;
-	int  frameResizeHandle;
-	double Mxp, Myp, Dxp, Dyp;
-	double SeRx, SeRy;
-	ScribusMainWindow* m_ScMW;
-	bool m_cursorVisible;
 	QElapsedTimer m_blinkTime;
 	QTimer* m_blinker;
-	double mRulerGuide;
-	bool m_longCursorTime;
-	bool m_keyRepeat;
+	ScribusMainWindow* m_ScMW {nullptr};
+	bool m_cursorVisible {false};
+	bool m_keyRepeat {false};
+	bool m_longCursorTime {false};
+	double Dxp {-1};
+	double Dyp {-1};
+	double Mxp {-1};
+	double Myp {-1};
+	double SeRx {-1};
+	double SeRy {-1};
+	double mRulerGuide {-1.0};
+	int Cp {-1};
+	int frameResizeHandle {-1};
+	int oldCp {-1};
 
 private slots:
 	void blinkTextCursor();

Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp	Tue Apr 14 12:20:25 2020
@@ -62,12 +62,6 @@
 
 CanvasMode_EditArc::CanvasMode_EditArc(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	m_Mxp = m_Myp = -1;
-	m_blockUpdateFromItem = 0;
-	m_arcPoint = noPointDefined;
-	m_startAngle = m_endAngle = 0;
-
-	vectorDialog = nullptr;
 }
 
 inline bool CanvasMode_EditArc::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_editarc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editarc.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editarc.h	Tue Apr 14 12:20:25 2020
@@ -70,21 +70,23 @@
 
 	inline bool GetItem(PageItem** pi);
 
-	double m_Mxp, m_Myp;
-	ScribusMainWindow* m_ScMW;
+
+	ArcVectorDialog* vectorDialog {nullptr};
+	QPointF m_centerPoint;
+	QPointF m_endPoint;
+	QPointF m_heightPoint;
 	QPointF m_startPoint;
-	QPointF m_endPoint;
-	QPointF m_centerPoint;
 	QPointF m_widthPoint;
-	QPointF m_heightPoint;
-	double m_startAngle;
-	double m_endAngle;
-	eArcPoint m_arcPoint;
-	ArcVectorDialog* vectorDialog;
+	ScribusMainWindow* m_ScMW {nullptr};
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	double m_endAngle {0.0};
+	double m_startAngle {0.0};
+	eArcPoint m_arcPoint {noPointDefined};
+	int m_blockUpdateFromItem {0};
 
-	int    m_blockUpdateFromItem;
-	void   blockUpdateFromItem(bool block) { if (block) ++m_blockUpdateFromItem; else --m_blockUpdateFromItem; }
-	bool   updateFromItemBlocked() { return (m_blockUpdateFromItem > 0); }
+	void blockUpdateFromItem(bool block) { if (block) ++m_blockUpdateFromItem; else --m_blockUpdateFromItem; }
+	bool updateFromItemBlocked() { return (m_blockUpdateFromItem > 0); }
 
 public slots:
 	void updateFromItem();

Modified: trunk/Scribus/scribus/canvasmode_editgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.cpp	Tue Apr 14 12:20:25 2020
@@ -56,8 +56,7 @@
 
 CanvasMode_EditGradient::CanvasMode_EditGradient(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	m_Mxp = m_Myp = -1;
-	m_gradientPoint = noPointDefined;
+
 }
 
 inline bool CanvasMode_EditGradient::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_editgradient.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editgradient.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.h	Tue Apr 14 12:20:25 2020
@@ -68,40 +68,41 @@
 
 	inline bool GetItem(PageItem** pi);
 
-	double m_Mxp, m_Myp;
-	ScribusMainWindow* m_ScMW;
-	eGradientPoint m_gradientPoint;
 
 	//save of previous state
-	double OldGrStartX;
-	double OldGrStartY;
-	double OldGrEndX;
-	double OldGrEndY;
-	double OldGrFocalX;
-	double OldGrFocalY;
-	double OldGrScale;
-	double OldGrSkew;
 	FPoint OldGrControl1;
 	FPoint OldGrControl2;
 	FPoint OldGrControl3;
 	FPoint OldGrControl4;
 	FPoint OldGrControl5;
-	double OldGrStrokeStartX;
-	double OldGrStrokeStartY;
-	double OldGrStrokeEndX;
-	double OldGrStrokeEndY;
-	double OldGrStrokeFocalX;
-	double OldGrStrokeFocalY;
-	double OldGrStrokeScale;
-	double OldGrStrokeSkew;
-	double OldGrMaskStartX;
-	double OldGrMaskStartY;
-	double OldGrMaskEndX;
-	double OldGrMaskEndY;
-	double OldGrMaskFocalX;
-	double OldGrMaskFocalY;
-	double OldGrMaskScale;
-	double OldGrMaskSkew;
+	ScribusMainWindow* m_ScMW {nullptr};
+	double OldGrEndX {0.0};
+	double OldGrEndY {0.0};
+	double OldGrFocalX {0.0};
+	double OldGrFocalY {0.0};
+	double OldGrMaskEndX {0.0};
+	double OldGrMaskEndY {0.0};
+	double OldGrMaskFocalX {0.0};
+	double OldGrMaskFocalY {0.0};
+	double OldGrMaskScale {0.0};
+	double OldGrMaskSkew {0.0};
+	double OldGrMaskStartX {0.0};
+	double OldGrMaskStartY {0.0};
+	double OldGrScale {0.0};
+	double OldGrSkew {0.0};
+	double OldGrStartX {0.0};
+	double OldGrStartY {0.0};
+	double OldGrStrokeEndX {0.0};
+	double OldGrStrokeEndY {0.0};
+	double OldGrStrokeFocalX {0.0};
+	double OldGrStrokeFocalY {0.0};
+	double OldGrStrokeScale {0.0};
+	double OldGrStrokeSkew {0.0};
+	double OldGrStrokeStartX {0.0};
+	double OldGrStrokeStartY {0.0};
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	eGradientPoint m_gradientPoint {noPointDefined};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	Tue Apr 14 12:20:25 2020
@@ -63,11 +63,7 @@
 
 CanvasMode_EditMeshGradient::CanvasMode_EditMeshGradient(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	m_Mxp = m_Myp = -1;
-	m_selectedMeshPoints.clear();
-	m_gradientPoint = noPointDefined;
 	m_old_mesh = new MeshPoint();
-	m_keyRepeat = false;
 }
 
 CanvasMode_EditMeshGradient::~CanvasMode_EditMeshGradient()

Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.h	Tue Apr 14 12:20:25 2020
@@ -71,12 +71,13 @@
 
 	inline bool GetItem(PageItem** pi);
 
-	MeshPoint *m_old_mesh;
-	double m_Mxp, m_Myp;
-	ScribusMainWindow* m_ScMW;
-	eMGradientPoint m_gradientPoint;
+	MeshPoint *m_old_mesh {nullptr};
 	QList<QPair<int, int> > m_selectedMeshPoints;
-	bool m_keyRepeat;
+	ScribusMainWindow* m_ScMW {nullptr};
+	bool m_keyRepeat {false};
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	eMGradientPoint m_gradientPoint {noPointDefined};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	Tue Apr 14 12:20:25 2020
@@ -64,13 +64,7 @@
 
 CanvasMode_EditMeshPatch::CanvasMode_EditMeshPatch(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW)
 {
-	m_Mxp = m_Myp = -1;
-	m_patchPoint = noPointDefined;
-	m_gradientPoint = noControlPointDefined;
-	m_keyRepeat = false;
-	m_click_count = 0;
 	m_old_mesh = new MeshPoint();
-	m_currItem = nullptr;
 }
 
 CanvasMode_EditMeshPatch::~CanvasMode_EditMeshPatch()

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.h	Tue Apr 14 12:20:25 2020
@@ -83,16 +83,17 @@
 
 	inline bool GetItem(PageItem** pi);
 
-	MeshPoint* m_old_mesh;
-	double m_Mxp, m_Myp;
-	ScribusMainWindow* m_ScMW;
-	eMPatchPoint m_patchPoint;
-	eMGradientPoint m_gradientPoint;
-	bool m_keyRepeat;
-	int m_click_count;
+	MeshPoint* m_old_mesh {nullptr};
+	PageItem *m_currItem {nullptr};
+	QPointF m_currentPoint;
 	QPolygonF m_clickPointPolygon;
-	QPointF m_currentPoint;
-	PageItem *m_currItem;
+	ScribusMainWindow* m_ScMW {nullptr};
+	bool m_keyRepeat {false};
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	eMGradientPoint m_gradientPoint {noControlPointDefined};
+	eMPatchPoint m_patchPoint {noPointDefined};
+	int m_click_count {0};
 };
 
 #endif

Modified: trunk/Scribus/scribus/canvasmode_editpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editpolygon.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editpolygon.cpp	Tue Apr 14 12:20:25 2020
@@ -63,9 +63,6 @@
 
 CanvasMode_EditPolygon::CanvasMode_EditPolygon(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	m_Mxp = m_Myp = -1;
-	m_blockUpdateFromItem = 0;
-	m_polygonPoint = noPointDefined;
 }
 
 inline bool CanvasMode_EditPolygon::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_editpolygon.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editpolygon.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editpolygon.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editpolygon.h	Tue Apr 14 12:20:25 2020
@@ -73,21 +73,22 @@
 	double GetMaxFactor();
 	double getUserValFromFactor(double factor);
 
-	double m_Mxp, m_Myp;
-	ScribusMainWindow* m_ScMW;
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	ScribusMainWindow* m_ScMW {nullptr};
 	QPointF m_startPoint;
 	QPointF m_endPoint;
 	QPointF m_centerPoint;
 	QPointF m_innerCPoint;
 	QPointF m_outerCPoint;
-	int m_polyCorners;
-	bool m_polyUseFactor;
-	double m_polyFactor;
-	double m_polyRotation;
-	double m_polyCurvature;
-	double m_polyInnerRot;
-	double m_polyOuterCurvature;
-	ePolygonPoint m_polygonPoint;
+	int m_polyCorners {0};
+	bool m_polyUseFactor {false};
+	double m_polyFactor {0.0};
+	double m_polyRotation {0.0};
+	double m_polyCurvature {0.0};
+	double m_polyInnerRot {0.0};
+	double m_polyOuterCurvature {0.0};
+	ePolygonPoint m_polygonPoint {noPointDefined};
 	PolyVectorDialog *m_VectorDialog;
 	UndoTransaction m_transaction;
 

Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp	Tue Apr 14 12:20:25 2020
@@ -49,11 +49,6 @@
 
 CanvasMode_EditSpiral::CanvasMode_EditSpiral(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	m_Mxp = m_Myp = -1;
-	m_blockUpdateFromItem = 0;
-	m_startAngle = m_endAngle = 0.0;
-	m_arcPoint = noPointDefined;
-	m_VectorDialog = nullptr;
 }
 
 inline bool CanvasMode_EditSpiral::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_editspiral.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editspiral.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.h	Tue Apr 14 12:20:25 2020
@@ -70,19 +70,20 @@
 	QPointF getSegment(double angle);
 	double computeRealAngle(double angle, bool fromDia);
 
-	double m_Mxp, m_Myp;
-	ScribusMainWindow* m_ScMW;
+	QPointF m_endPoint;
 	QPointF m_startPoint;
-	QPointF m_endPoint;
-	double m_startAngle;
-	double m_endAngle;
-	eSpiralPoint m_arcPoint;
-	SpiralVectorDialog* m_VectorDialog;
+	ScribusMainWindow* m_ScMW {nullptr};
+	SpiralVectorDialog* m_VectorDialog {nullptr};
 	UndoTransaction m_transaction;
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	double m_endAngle {0.0};
+	double m_startAngle {0.0};
+	eSpiralPoint m_arcPoint {noPointDefined};
+	int m_blockUpdateFromItem {0};
 
-	int    m_blockUpdateFromItem;
-	void   blockUpdateFromItem(bool block) { if (block) ++m_blockUpdateFromItem; else --m_blockUpdateFromItem; }
-	bool   updateFromItemBlocked() { return (m_blockUpdateFromItem > 0); }
+	void blockUpdateFromItem(bool block) { if (block) ++m_blockUpdateFromItem; else --m_blockUpdateFromItem; }
+	bool updateFromItemBlocked() { return (m_blockUpdateFromItem > 0); }
 
 public slots:
 	void updateFromItem();

Modified: trunk/Scribus/scribus/canvasmode_edittable.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_edittable.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edittable.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_edittable.cpp	Tue Apr 14 12:20:25 2020
@@ -41,11 +41,7 @@
 #endif
 
 CanvasMode_EditTable::CanvasMode_EditTable(ScribusView* view) : CanvasMode(view),
-	m_table(nullptr),
 	m_canvasUpdateTimer(new QTimer(view)),
-	m_longBlink(false),
-	m_cursorVisible(false),
-	m_lastCursorPos(-1),
 	m_selectRowCursor(IconManager::instance().loadCursor("select_row.png")),
 	m_selectColumnCursor(IconManager::instance().loadCursor("select_column.png")),
 	m_tableResizeGesture(new TableResize(this)),

Modified: trunk/Scribus/scribus/canvasmode_edittable.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_edittable.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edittable.h	(original)
+++ trunk/Scribus/scribus/canvasmode_edittable.h	Tue Apr 14 12:20:25 2020
@@ -75,7 +75,7 @@
 
 private:
 	/// Table being edited.
-	PageItem_Table *m_table;
+	PageItem_Table *m_table {nullptr};
 
 	/// Timer for canvas updates.
 	QTimer* m_canvasUpdateTimer;
@@ -83,12 +83,12 @@
 	/// Time since last text cursor blink.
 	QElapsedTimer m_blinkTime;
 	/// <code>true</code> if the text cursor should make a long blink.
-	bool m_longBlink;
+	bool m_longBlink {false};
 	/// <code>true</code> if the text cursor is visible.
-	bool m_cursorVisible;
+	bool m_cursorVisible {false};
 
 	// Last cursor position pressed with the mouse, or <code>-1</code>.
-	int m_lastCursorPos;
+	int m_lastCursorPos {-1};
 
 	/// The "select row" mouse cursor.
 	QCursor m_selectRowCursor;

Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.cpp	Tue Apr 14 12:20:25 2020
@@ -64,14 +64,7 @@
 
 
 CanvasMode_EditWeldPoint::CanvasMode_EditWeldPoint(ScribusView* view) : CanvasMode(view),
-	m_Mxp(-1.0),
-	m_Myp(1.0),
-	m_selectedPoint(-1),
-	m_ScMW(view->m_ScMW),
-	m_keyRepeat(false),
-	m_currItem(nullptr),
-	m_ModeDialog(nullptr),
-	m_editWeldMode(true)
+	m_ScMW(view->m_ScMW)
 {
 }
 

Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.h	Tue Apr 14 12:20:25 2020
@@ -65,14 +65,16 @@
 
 	inline bool GetItem(PageItem** pi);
 
-	double m_Mxp, m_Myp;
-	int m_selectedPoint;
-	ScribusMainWindow* m_ScMW;
-	bool m_keyRepeat;
-	PageItem *m_currItem;
+	PageItem *m_currItem {nullptr};
 	QList<PageItem*> m_weldToList;
-	WeldEditDialog* m_ModeDialog;
-	bool m_editWeldMode;
+	ScribusMainWindow* m_ScMW {nullptr};
+	WeldEditDialog* m_ModeDialog {nullptr};
+	bool m_editWeldMode {true};
+	bool m_keyRepeat {false};
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	int m_selectedPoint {-1};
+
 private slots:
 	void endEditing(bool active);
 	void endEditing();

Modified: trunk/Scribus/scribus/canvasmode_eyedropper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_eyedropper.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_eyedropper.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_eyedropper.cpp	Tue Apr 14 12:20:25 2020
@@ -42,7 +42,6 @@
 
 CanvasMode_EyeDropper::CanvasMode_EyeDropper(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	m_mouseGrabbed = false;
 }
 
 void CanvasMode_EyeDropper::grabMouse()

Modified: trunk/Scribus/scribus/canvasmode_eyedropper.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_eyedropper.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_eyedropper.h	(original)
+++ trunk/Scribus/scribus/canvasmode_eyedropper.h	Tue Apr 14 12:20:25 2020
@@ -47,8 +47,8 @@
 // 	void setResizeCursor(int);
 
 private:
-	bool m_mouseGrabbed;
-	ScribusMainWindow* m_ScMW;
+	bool m_mouseGrabbed {false};
+	ScribusMainWindow* m_ScMW {nullptr};
 
 	void grabMouse();
 	void releaseMouse();

Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp	Tue Apr 14 12:20:25 2020
@@ -54,8 +54,6 @@
 
 CanvasMode_FrameLinks::CanvasMode_FrameLinks(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	m_Mxp = m_Myp = -1;
-	m_frameResizeHandle = -1;
 }
 
 inline bool CanvasMode_FrameLinks::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_framelinks.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_framelinks.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.h	(original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.h	Tue Apr 14 12:20:25 2020
@@ -63,9 +63,10 @@
 	bool SeleItem(QMouseEvent *m);
 	void createContextMenu(PageItem *currItem, double mx, double my);
 
-	int    m_frameResizeHandle;
-	double m_Mxp, m_Myp;
-	ScribusMainWindow* m_ScMW;
+	int m_frameResizeHandle {-1};
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	ScribusMainWindow* m_ScMW {nullptr};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_imageimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_imageimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_imageimport.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_imageimport.cpp	Tue Apr 14 12:20:25 2020
@@ -39,9 +39,6 @@
 
 CanvasMode_ImageImport::CanvasMode_ImageImport(ScribusView *view) : CanvasMode(view), m_ScMW(view->m_ScMW)
 {
-	m_Mx = 0;
-	m_My = 0;
-	m_keyRepeat = false;
 }
 
 void CanvasMode_ImageImport::setImageList(QStringList l)

Modified: trunk/Scribus/scribus/canvasmode_imageimport.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_imageimport.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_imageimport.h	(original)
+++ trunk/Scribus/scribus/canvasmode_imageimport.h	Tue Apr 14 12:20:25 2020
@@ -55,11 +55,12 @@
 	void updateList();
 
 private:
-	bool m_keyRepeat;
+	bool m_keyRepeat {false};
 	QString m_tipText;
 	QStringList m_imageList;
-	ScribusMainWindow *m_ScMW;
-	double m_Mx, m_My;
+	ScribusMainWindow *m_ScMW {nullptr};
+	double m_Mx {0.0};
+	double m_My {0.0};
 	void newToolTip(const QString& name);
 };
 

Modified: trunk/Scribus/scribus/canvasmode_magnifier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_magnifier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_magnifier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_magnifier.cpp	Tue Apr 14 12:20:25 2020
@@ -53,8 +53,6 @@
 
 CanvasMode_Magnifier::CanvasMode_Magnifier(ScribusView* view) : CanvasMode(view)
 {
-	m_Mxp = m_Myp = -1;
-	m_lastPosWasOverGuide = false;
 }
 
 void CanvasMode_Magnifier::drawControls(QPainter* p)
@@ -65,9 +63,7 @@
 void CanvasMode_Magnifier::enterEvent(QEvent *)
 {
 	if (!m_canvas->m_viewMode.m_MouseButtonPressed)
-	{
 		setModeCursor();
-	}
 }
 
 
@@ -89,9 +85,7 @@
 	m_Mxp = m_Myp = -1;
 	setModeCursor();
 	if (fromGesture)
-	{
 		m_view->update();
-	}
 }
 
 void CanvasMode_Magnifier::deactivate(bool forGesture)
@@ -114,14 +108,13 @@
 	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	
 	m_lastPosWasOverGuide = false;
-	double newX, newY;
 	m->accept();
 	if (commonMouseMove(m))
 		return;
 	if (m_view->moveTimerElapsed() && m_canvas->m_viewMode.m_MouseButtonPressed && (m->buttons() & Qt::LeftButton))
 	{
-		newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
-		newY = qRound(m_Myp + ((m_SeRx - m_Mxp) * m_view->visibleHeight()) / m_view->visibleWidth());
+		double newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
+		double newY = qRound(m_Myp + ((m_SeRx - m_Mxp) * m_view->visibleHeight()) / m_view->visibleWidth());
 		m_SeRx = newX;
 		m_SeRy = newY;
 		QPoint startP = m_canvas->canvasToGlobal(QPointF(m_Mxp, m_Myp));

Modified: trunk/Scribus/scribus/canvasmode_magnifier.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_magnifier.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_magnifier.h	(original)
+++ trunk/Scribus/scribus/canvasmode_magnifier.h	Tue Apr 14 12:20:25 2020
@@ -56,9 +56,11 @@
 
 private:
 
-	double m_Mxp, m_Myp;
-	double m_SeRx, m_SeRy;
-	bool   m_lastPosWasOverGuide;
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
+	double m_SeRx {0.0};
+	double m_SeRy {0.0};
+	bool  m_lastPosWasOverGuide {false};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_measurements.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_measurements.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_measurements.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_measurements.cpp	Tue Apr 14 12:20:25 2020
@@ -33,9 +33,6 @@
 	m_palette->startup();
 	m_palette->hide();
 	connect( m_palette, SIGNAL(paletteShown(bool)), this, SLOT(setActive(bool)));
-	m_active = false;
-	m_startDoc = FPoint(0,0);
-	m_currentDoc = FPoint(0,0);
 }
 
 void MeasurementsMode::enterEvent(QEvent *)

Modified: trunk/Scribus/scribus/canvasmode_measurements.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_measurements.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_measurements.h	(original)
+++ trunk/Scribus/scribus/canvasmode_measurements.h	Tue Apr 14 12:20:25 2020
@@ -54,12 +54,12 @@
 private:
 	void adjustPoint(QPoint point);
 	void showValues();
-	bool m_active;
+	bool m_active {false};
 	QPoint m_start;
 	QPoint m_current;
 	FPoint m_startDoc;
 	FPoint m_currentDoc;
-	Measurements* m_palette;
+	Measurements* m_palette {nullptr};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp	Tue Apr 14 12:20:25 2020
@@ -38,15 +38,8 @@
 #include "undomanager.h"
 #include "util_math.h"
 
-CanvasMode_NodeEdit::CanvasMode_NodeEdit(ScribusView* view) : CanvasMode(view), m_rectangleSelect(nullptr)
-{
-	m_Mxp = -1;  // last mouse position
-	m_Myp = -1;
-	m_Dxp = -1;  // last mouse press position for rectangle select
-	m_Dyp = -1;
-	m_GxM = -1;  // guide position
-	m_GyM = -1;
-	m_MoveGX = m_MoveGY = false;
+CanvasMode_NodeEdit::CanvasMode_NodeEdit(ScribusView* view) : CanvasMode(view)
+{
 	m_ScMW = m_view->m_ScMW;
 }
 

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_nodeedit.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.h	(original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.h	Tue Apr 14 12:20:25 2020
@@ -68,9 +68,15 @@
 	
 	ScribusMainWindow* m_ScMW;
 	
-	RectSelect* m_rectangleSelect;
-	int m_Mxp, m_Myp, m_Dxp, m_Dyp, m_GxM, m_GyM;
-	bool m_MoveGX, m_MoveGY;
+	RectSelect* m_rectangleSelect {nullptr};
+	int m_Mxp {-1}; // last mouse position
+	int m_Myp {-1};
+	int m_Dxp {-1}; // last mouse press position for rectangle select
+	int m_Dyp {-1};
+	int m_GxM {-1}; // guide position
+	int m_GyM {-1};
+	bool m_MoveGX {false};
+	bool m_MoveGY {false};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Tue Apr 14 12:20:25 2020
@@ -73,21 +73,6 @@
 
 CanvasMode_Normal::CanvasMode_Normal(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
 {
-	m_frameResizeHandle = -1;
-	m_dragConstrainInitPtX = 0;
-	m_dragConstrainInitPtY = 0;
-	m_lastPosWasOverGuide = false;
-	m_shiftSelItems = false;
-	m_resizeGesture = nullptr;
-	m_lineMoveGesture  = nullptr;
-	m_guideMoveGesture = nullptr;
-	m_mousePressPoint.setXY(0, 0);
-	m_mouseCurrentPoint.setXY(0, 0);
-	m_mouseSavedPoint.setXY(0, 0);
-	m_objectDeltaPos.setXY(0, 0);
-	ySnap = 0;
-	xSnap = 0;
-	m_hoveredItem = nullptr;
 }
 
 inline bool CanvasMode_Normal::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_normal.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_normal.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.h	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.h	Tue Apr 14 12:20:25 2020
@@ -85,15 +85,16 @@
 	FPoint m_mouseSavedPoint;
 	FPoint m_objectDeltaPos;
 
-	bool m_shiftSelItems;
-	int  m_frameResizeHandle;
-	int  m_dragConstrainInitPtX, m_dragConstrainInitPtY;
-	ScribusMainWindow* m_ScMW;
-	ResizeGesture* m_resizeGesture;
-	LineMove* m_lineMoveGesture;
-	RulerGesture* m_guideMoveGesture;
-	bool m_lastPosWasOverGuide;
-	PageItem* m_hoveredItem;
+	LineMove* m_lineMoveGesture {nullptr};
+	PageItem* m_hoveredItem {nullptr};
+	ResizeGesture* m_resizeGesture {nullptr};
+	RulerGesture* m_guideMoveGesture {nullptr};
+	ScribusMainWindow* m_ScMW {nullptr};
+	bool m_lastPosWasOverGuide {false};
+	bool m_shiftSelItems {false};
+	int m_dragConstrainInitPtX {0};
+	int m_dragConstrainInitPtY {0};
+	int m_frameResizeHandle {-1};
 
 public slots:
 	void importToPage();

Modified: trunk/Scribus/scribus/canvasmode_objimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_objimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_objimport.cpp	Tue Apr 14 12:20:25 2020
@@ -44,9 +44,6 @@
 CanvasMode_ObjImport::CanvasMode_ObjImport(ScribusView* view) :
 	CanvasMode(view)
 {
-	m_Mxp = m_Myp = -1;
-	m_mimeData = nullptr;
-	m_trSettings = nullptr;
 }
 
 CanvasMode_ObjImport::~CanvasMode_ObjImport()

Modified: trunk/Scribus/scribus/canvasmode_objimport.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_objimport.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.h	(original)
+++ trunk/Scribus/scribus/canvasmode_objimport.h	Tue Apr 14 12:20:25 2020
@@ -60,9 +60,10 @@
 // 	void setResizeCursor(int);
 
 private:
-	QMimeData* m_mimeData;
-	TransactionSettings* m_trSettings;
-	double m_Mxp, m_Myp;
+	QMimeData* m_mimeData {nullptr};
+	TransactionSettings* m_trSettings {nullptr};
+	double m_Mxp {-1.0};
+	double m_Myp {-1.0};
 };
 
 

Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp	Tue Apr 14 12:20:25 2020
@@ -41,14 +41,6 @@
 CanvasMode_Rotate::CanvasMode_Rotate(ScribusView* view) : CanvasMode(view)
 {
 	m_canvasPressCoord.setXY(-1.0, -1.0);
-	m_oldRotMode   = 0;
-	m_oldRotCenter = FPoint(0.0, 0.0);
-	m_angleConstrained = false;
-	m_inItemRotation = false;
-
-	m_rotMode    = 0;
-	m_rotCenter  = FPoint(0.0, 0.0);
-	m_startAngle = 0.0;
 }
 
 inline bool CanvasMode_Rotate::GetItem(PageItem** pi)

Modified: trunk/Scribus/scribus/canvasmode_rotate.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/canvasmode_rotate.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.h	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.h	Tue Apr 14 12:20:25 2020
@@ -61,17 +61,15 @@
 	void   getNewItemPosition(PageItem* item, FPoint& pos, double& rotation);
 // 	void   setResizeCursor(int how);
 
-	bool   m_inItemRotation;
-
-	int    m_oldRotMode;
+	FPoint m_canvasCurrCoord;
+	FPoint m_canvasPressCoord;
 	FPoint m_oldRotCenter;
-	FPoint m_canvasPressCoord;
-	FPoint m_canvasCurrCoord;
-	bool   m_angleConstrained;
-
-	int    m_rotMode;
 	FPoint m_rotCenter;
-	double m_startAngle;
+	bool   m_angleConstrained {false};
+	bool   m_inItemRotation {false};
+	double m_startAngle {0.0};
+	int    m_oldRotMode {0};
+	int    m_rotMode {0};
 };
 
 #endif

Modified: trunk/Scribus/scribus/fpoint.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/fpoint.h
==============================================================================
--- trunk/Scribus/scribus/fpoint.h	(original)
+++ trunk/Scribus/scribus/fpoint.h	Tue Apr 14 12:20:25 2020
@@ -43,7 +43,7 @@
 class SCRIBUS_API FPoint
 {
 public: 
-	FPoint() : xp(0), yp(0) {}
+	FPoint() {}
 	FPoint(double x, double y) : xp(x), yp(y) {}
 	FPoint(const QPoint & p) : xp(p.x()), yp(p.y()) {}
 	FPoint(const QPointF & p) : xp(p.x()), yp(p.y()) {}
@@ -77,8 +77,8 @@
 	bool isNull() const;
 
 private:
-	double xp;
-	double yp;
+	double xp {0.0};
+	double yp {0.0};
 };
 
 

Modified: trunk/Scribus/scribus/ui/inspage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/ui/inspage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inspage.cpp	(original)
+++ trunk/Scribus/scribus/ui/inspage.cpp	Tue Apr 14 12:20:25 2020
@@ -63,7 +63,7 @@
 	insWherePageData->setDisabled( true );
 
 	whereLayout->addWidget( insWherePageData, 1, 2 );
-	whereLayout->addItem(new QSpacerItem(insCountLabel->fontMetrics().width( tr( "&Insert" )), 0), 0, 0);
+	whereLayout->addItem(new QSpacerItem(insCountLabel->fontMetrics().horizontalAdvance( tr( "&Insert" )), 0), 0, 0);
 	dialogLayout->addLayout( whereLayout );
 	
 	masterPageLabel = nullptr;

Modified: trunk/Scribus/scribus/ui/measurements.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/ui/measurements.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/measurements.cpp	(original)
+++ trunk/Scribus/scribus/ui/measurements.cpp	Tue Apr 14 12:20:25 2020
@@ -34,7 +34,7 @@
 	angleData->setMinimumSize(textWidth, 12);
 	lengthData->setMinimumSize(textWidth, 12);
 	int maxUindex = unitGetMaxIndex() - 2;
-	textWidth = fontMetrics().width("mmm")+12;
+	textWidth = fontMetrics().horizontalAdvance("mmm")+12;
 	for (int i = 0; i <= maxUindex; ++i)
 		unitSwitch->addItem(unitGetStrFromIndex(i));
 	int minHeight = unitSwitch->minimumSizeHint().height();

Modified: trunk/Scribus/scribus/ui/movepage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/ui/movepage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/movepage.cpp	(original)
+++ trunk/Scribus/scribus/ui/movepage.cpp	Tue Apr 14 12:20:25 2020
@@ -91,7 +91,7 @@
 	mvWherePageData->setSuffix("");
 	mvWherePageData->setDisabled( true );
 	fromToLayout->addWidget( mvWhereData, currentRow, 0 );
-	fromToLayout->addItem(new QSpacerItem(moveLabel->fontMetrics().width( tr( "Move Page(s):" )), 0), currentRow, 1);
+	fromToLayout->addItem(new QSpacerItem(moveLabel->fontMetrics().horizontalAdvance( tr( "Move Page(s):" )), 0), currentRow, 1);
 	fromToLayout->addWidget( mvWherePageData, currentRow, 2 );
 //	fromToLayout->addColumnSpacing(0, moveLabel->fontMetrics().width( tr( "Move Page(s):" )));
 	dialogLayout->addLayout( fromToLayout );

Modified: trunk/Scribus/scribus/ui/pageselector.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/ui/pageselector.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pageselector.cpp	(original)
+++ trunk/Scribus/scribus/ui/pageselector.cpp	Tue Apr 14 12:20:25 2020
@@ -69,7 +69,7 @@
 	for (int i = 0; i < m_lastPage; ++i)
 		m_pageCombo->addItem(QString::number(i+1));
 	m_pageCombo->setValidator(m_validator);
-	m_pageCombo->setMinimumSize(fontMetrics().width( "9999" )+20, 20);
+	m_pageCombo->setMinimumSize(fontMetrics().horizontalAdvance( "9999" )+20, 20);
 	m_pageCombo->setFocusPolicy(Qt::ClickFocus);
 	m_pageCombo->setObjectName("pageCombo");
 	

Modified: trunk/Scribus/scribus/ui/prefs_fonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/ui/prefs_fonts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_fonts.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_fonts.cpp	Tue Apr 14 12:20:25 2020
@@ -51,7 +51,7 @@
 	CurrentPath = "";
 	m_askBeforeSubstitute = true;
 
-	setMinimumSize(fontMetrics().width( tr( "Available Fonts" )+ tr( "Font Substitutions" )+ tr( "Additional Paths" )+ tr( "Rejected Fonts" ))+180, 200);
+	setMinimumSize(fontMetrics().horizontalAdvance( tr( "Available Fonts" )+ tr( "Font Substitutions" )+ tr( "Additional Paths" )+ tr( "Rejected Fonts" ))+180, 200);
 
 	fontListTableView->setModel(new FontListModel(fontListTableView, m_doc, true));
 

Modified: trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp	Tue Apr 14 12:20:25 2020
@@ -65,7 +65,7 @@
 	keyTable->clear();
 	keyMap.clear();
 	keyCode = 0;
-	keyDisplay->setMinimumWidth(fontMetrics().width("CTRL+ALT+SHIFT+W"));
+	keyDisplay->setMinimumWidth(fontMetrics().horizontalAdvance("CTRL+ALT+SHIFT+W"));
 	keyDisplay->setText("");
 	selectedLVI = nullptr;
 

Modified: trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp	Tue Apr 14 12:20:25 2020
@@ -23,10 +23,10 @@
 	m_caption = tr("Tables of Contents");
 	m_icon = "tabtocindex_16.png";
 
-	itemDestFrameComboBox->setMaximumWidth(fontMetrics().width( "This is a very long Name" ));
-	itemAttrComboBox->setMaximumWidth(fontMetrics().width( "This is a very long Name" ));
-	itemNumberPlacementComboBox->setMaximumWidth(fontMetrics().width( "This is a very long Name" ));
-	itemParagraphStyleComboBox->setMaximumWidth(fontMetrics().width( "This is a very long Name" ));
+	itemDestFrameComboBox->setMaximumWidth(fontMetrics().horizontalAdvance( "This is a very long Name" ));
+	itemAttrComboBox->setMaximumWidth(fontMetrics().horizontalAdvance( "This is a very long Name" ));
+	itemNumberPlacementComboBox->setMaximumWidth(fontMetrics().horizontalAdvance( "This is a very long Name" ));
+	itemParagraphStyleComboBox->setMaximumWidth(fontMetrics().horizontalAdvance( "This is a very long Name" ));
 
 	// signals and slots connections
 	//do not connect( tocListBox, SIGNAL( currentRowChanged(int) ), this, SLOT( selectToC(int) ) );

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23612&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp	Tue Apr 14 12:20:25 2020
@@ -127,18 +127,17 @@
 	inRep = false;
 	pmen = new QMenu(this);
 	paraStyleAct = nullptr;
-	setMinimumWidth(fontMetrics().width( tr("No Style") )+30);
+	setMinimumWidth(fontMetrics().horizontalAdvance( tr("No Style") )+30);
 }
 
 void SideBar::setEditor(SEditor* editor)
 {
 	m_editor = editor;
-	if (editor)
-	{
-		QPalette pal;
-		pal.setColor(QPalette::Window, editor->palette().color(QPalette::Base));
-		setPalette(pal);
-	}
+	if (!editor)
+		return;
+	QPalette pal;
+	pal.setColor(QPalette::Window, editor->palette().color(QPalette::Base));
+	setPalette(pal);
 }
 
 void SideBar::mouseReleaseEvent(QMouseEvent *m)




More information about the scribus-commit mailing list