r23614 by jghali - Add const qualifier to CanvasMode's handleKeyEvents()

scribus-commit scribus-commit at lists.scribus.net
Tue Apr 14 16:12:31 UTC 2020


Author: jghali
Date: Tue Apr 14 16:12:31 2020
New Revision: 23614

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23614
Log:
Add const qualifier to CanvasMode's handleKeyEvents()

Modified:
    trunk/Scribus/scribus/canvasgesture_cellselect.h
    trunk/Scribus/scribus/canvasgesture_columnresize.h
    trunk/Scribus/scribus/canvasgesture_rowresize.h
    trunk/Scribus/scribus/canvasgesture_rulermove.h
    trunk/Scribus/scribus/canvasgesture_tableresize.h
    trunk/Scribus/scribus/canvasmode.h
    trunk/Scribus/scribus/canvasmode_edit.h
    trunk/Scribus/scribus/canvasmode_editmeshgradient.h
    trunk/Scribus/scribus/canvasmode_editmeshpatch.h
    trunk/Scribus/scribus/canvasmode_edittable.h
    trunk/Scribus/scribus/canvasmode_editweldpoint.h
    trunk/Scribus/scribus/canvasmode_imageimport.h
    trunk/Scribus/scribus/canvasmode_nodeedit.h
    trunk/Scribus/scribus/canvasmode_normal.h
    trunk/Scribus/scribus/canvasmode_rotate.h

Modified: trunk/Scribus/scribus/canvasgesture_cellselect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasgesture_cellselect.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_cellselect.h	(original)
+++ trunk/Scribus/scribus/canvasgesture_cellselect.h	Tue Apr 14 16:12:31 2020
@@ -42,7 +42,7 @@
 	void mousePressEvent(QMouseEvent* event) override;
 	void mouseReleaseEvent(QMouseEvent* event) override;
 	void mouseMoveEvent(QMouseEvent* event) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void drawControls(QPainter* p) override;
 
 	/// Sets up this gesture to select cells in @a table, starting with @a cell.

Modified: trunk/Scribus/scribus/canvasgesture_columnresize.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasgesture_columnresize.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_columnresize.h	(original)
+++ trunk/Scribus/scribus/canvasgesture_columnresize.h	Tue Apr 14 16:12:31 2020
@@ -38,7 +38,7 @@
 	void keyReleaseEvent(QKeyEvent* event) override;
 	void mouseReleaseEvent(QMouseEvent* event) override;
 	void mouseMoveEvent(QMouseEvent* event) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void drawControls(QPainter* p) override;
 
 	/// Sets up this column resize gesture to resize @a column in @a table.

Modified: trunk/Scribus/scribus/canvasgesture_rowresize.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasgesture_rowresize.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_rowresize.h	(original)
+++ trunk/Scribus/scribus/canvasgesture_rowresize.h	Tue Apr 14 16:12:31 2020
@@ -38,7 +38,7 @@
 	void keyReleaseEvent(QKeyEvent* event) override;
 	void mouseReleaseEvent(QMouseEvent* event) override;
 	void mouseMoveEvent(QMouseEvent* event) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void drawControls(QPainter* p) override;
 
 	/// Sets up this row resize gesture to resize @a row in @a table.

Modified: trunk/Scribus/scribus/canvasgesture_rulermove.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasgesture_rulermove.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_rulermove.h	(original)
+++ trunk/Scribus/scribus/canvasgesture_rulermove.h	Tue Apr 14 16:12:31 2020
@@ -61,7 +61,7 @@
 		void drawControls(QPainter* p) override;
 		void activate(bool) override;
 		void deactivate(bool) override;
-		bool handleKeyEvents() override { return true; }
+		bool handleKeyEvents() const override { return true; }
 		void keyPressEvent(QKeyEvent* event) override;
 		void mouseReleaseEvent(QMouseEvent *m) override;
 		void mouseMoveEvent(QMouseEvent *m) override;

Modified: trunk/Scribus/scribus/canvasgesture_tableresize.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasgesture_tableresize.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_tableresize.h	(original)
+++ trunk/Scribus/scribus/canvasgesture_tableresize.h	Tue Apr 14 16:12:31 2020
@@ -37,7 +37,7 @@
 	void keyPressEvent(QKeyEvent* event) override;
 	void mouseReleaseEvent(QMouseEvent* event) override;
 	void mouseMoveEvent(QMouseEvent* event) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void drawControls(QPainter* p) override;
 
 	/// Sets up this table resize gesture to resize @a table.

Modified: trunk/Scribus/scribus/canvasmode.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode.h	(original)
+++ trunk/Scribus/scribus/canvasmode.h	Tue Apr 14 16:12:31 2020
@@ -112,7 +112,7 @@
 	virtual void keyReleaseEvent(QKeyEvent *e) {}
 	virtual void inputMethodEvent(QInputMethodEvent *e) {}
 
-	virtual bool handleKeyEvents() { return false; }
+	virtual bool handleKeyEvents() const { return false; }
 
 	/**
 		Sets appropriate values for this canvas mode

Modified: trunk/Scribus/scribus/canvasmode_edit.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_edit.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.h	(original)
+++ trunk/Scribus/scribus/canvasmode_edit.h	Tue Apr 14 16:12:31 2020
@@ -51,7 +51,7 @@
 	void mouseMoveEvent(QMouseEvent *m) override;
 	void mousePressEvent(QMouseEvent *m) override;
 	
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void keyPressEvent(QKeyEvent *e) override;
 
 	void drawControls(QPainter* p) override;

Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.h	Tue Apr 14 16:12:31 2020
@@ -54,7 +54,7 @@
 	void mouseMoveEvent(QMouseEvent *m) override;
 	void mousePressEvent(QMouseEvent *m) override;
 	void keyPressEvent(QKeyEvent *e) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void drawControls(QPainter* p) override;
 	void drawControlsMeshGradient(QPainter* psx, PageItem* currItem);
 

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.h	Tue Apr 14 16:12:31 2020
@@ -55,7 +55,7 @@
 	void mouseMoveEvent(QMouseEvent *m) override;
 	void mousePressEvent(QMouseEvent *m) override;
 	void keyPressEvent(QKeyEvent *e) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void drawControls(QPainter* p) override;
 	void drawControlsMeshPoint(QPainter* psx, const MeshPoint& mp, bool isSelected);
 	void drawControlsMeshPatch(QPainter* psx, PageItem* currItem);

Modified: trunk/Scribus/scribus/canvasmode_edittable.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_edittable.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edittable.h	(original)
+++ trunk/Scribus/scribus/canvasmode_edittable.h	Tue Apr 14 16:12:31 2020
@@ -41,7 +41,7 @@
 
 	void activate(bool fromGesture) override;
 	void deactivate(bool forGesture) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void keyPressEvent(QKeyEvent* event) override;
 	void mouseMoveEvent(QMouseEvent* event) override;
 	void mousePressEvent(QMouseEvent* event) override;

Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.h	Tue Apr 14 16:12:31 2020
@@ -55,7 +55,7 @@
 	void mouseMoveEvent(QMouseEvent *m) override;
 	void mousePressEvent(QMouseEvent *m) override;
 	void keyPressEvent(QKeyEvent *e) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void drawControls(QPainter* p) override;
 	void drawControlsWeldPoint(QPainter* psx, PageItem* currItem);
 

Modified: trunk/Scribus/scribus/canvasmode_imageimport.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_imageimport.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_imageimport.h	(original)
+++ trunk/Scribus/scribus/canvasmode_imageimport.h	Tue Apr 14 16:12:31 2020
@@ -43,7 +43,7 @@
 	void activate(bool) override;
 	void deactivate(bool) override;
 	void keyPressEvent(QKeyEvent *e) override;
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 	void mouseDoubleClickEvent(QMouseEvent *m) override;
 	void mouseReleaseEvent(QMouseEvent *m) override;
 	void mouseMoveEvent(QMouseEvent *m) override;

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_nodeedit.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.h	(original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.h	Tue Apr 14 16:12:31 2020
@@ -33,6 +33,7 @@
 {
 public:
 	explicit CanvasMode_NodeEdit (ScribusView* view);
+	~CanvasMode_NodeEdit() override = default;
 	
 	void activate(bool fromgesture) override;
 	void deactivate(bool forGesture) override;
@@ -48,17 +49,12 @@
 	void keyPressEvent(QKeyEvent *e) override;
 	void keyReleaseEvent(QKeyEvent *e) override;
 
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 
-	
 	/**
 		Draws the controls for this mode
 	 */
 	void drawControls(QPainter* p) override;
-	
-	
-	~CanvasMode_NodeEdit() override = default;
-	
 	
 private:
 	inline bool GetItem(PageItem** pi); 

Modified: trunk/Scribus/scribus/canvasmode_normal.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_normal.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.h	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.h	Tue Apr 14 16:12:31 2020
@@ -56,7 +56,7 @@
 	void keyPressEvent(QKeyEvent *e) override;
 	void keyReleaseEvent(QKeyEvent *e) override;
 
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 
 private:
 	const unsigned SELECT_IN_GROUP { Qt::AltModifier }; // Qt::MetaModifier;

Modified: trunk/Scribus/scribus/canvasmode_rotate.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23614&path=/trunk/Scribus/scribus/canvasmode_rotate.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.h	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.h	Tue Apr 14 16:12:31 2020
@@ -51,7 +51,7 @@
 	void keyReleaseEvent(QKeyEvent *e) override;
 	void keyPressEvent(QKeyEvent *e) override;
 
-	bool handleKeyEvents() override { return true; }
+	bool handleKeyEvents() const override { return true; }
 
 private:
 	inline bool GetItem(PageItem** pi);




More information about the scribus-commit mailing list