r23025 by craig - Remove unnecessary const

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 12 21:32:13 UTC 2019


Author: craig
Date: Wed Jun 12 21:32:13 2019
New Revision: 23025

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23025
Log:
Remove unnecessary const

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem.h

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23025&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Wed Jun 12 21:32:13 2019
@@ -999,7 +999,7 @@
 	checkChanges();
 }
 
-void PageItem::setWidth(const double newWidth)
+void PageItem::setWidth(double newWidth)
 {
 	m_width = newWidth;
 	updateConstants();
@@ -1008,7 +1008,7 @@
 	checkChanges();
 }
 
-void PageItem::setHeight(const double newHeight)
+void PageItem::setHeight(double newHeight)
 {
 	m_height = newHeight;
 	updateConstants();
@@ -1017,7 +1017,7 @@
 	checkChanges();
 }
 
-void PageItem::setWidthHeight(const double newWidth, const double newHeight, bool drawingOnly)
+void PageItem::setWidthHeight(double newWidth, double newHeight, bool drawingOnly)
 {
 	m_width = newWidth;
 	m_height = newHeight;
@@ -9262,14 +9262,13 @@
 	return itemRect.contains(x, y);
 }
 
-bool PageItem::mouseWithinItem(const int x, const int y, double scale) const
+bool PageItem::mouseWithinItem(int x, int y, double scale) const
 {
 	QTransform p;
-	QRectF transRect;
 	p.translate(m_xPos*scale, m_yPos*scale);
 	p.scale(scale, scale);
 	p.rotate(rotation());
-	transRect = p.mapRect(QRectF(0.0, 0.0, width(), height()));
+	QRectF transRect(p.mapRect(QRectF(0.0, 0.0, width(), height())));
 	return transRect.contains(x, y);
 }
 
@@ -9890,7 +9889,7 @@
 	return last;
 }
 
-QRect PageItem::getRedrawBounding(const double viewScale) const
+QRect PageItem::getRedrawBounding(double viewScale) const
 {
 	int x = qRound(floor(BoundingX - Oldm_lineWidth / 2.0 - 5) * viewScale);
 	int y = qRound(floor(BoundingY - Oldm_lineWidth / 2.0 - 5) * viewScale);

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23025&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h	(original)
+++ trunk/Scribus/scribus/pageitem.h	Wed Jun 12 21:32:13 2019
@@ -292,7 +292,7 @@
 	/**
 	 * @brief Set or get the redraw bounding box of the item, moved from the View
 	 */
-	QRect getRedrawBounding(const double viewScale) const;
+	QRect getRedrawBounding(double viewScale) const;
 	void setRedrawBounding();
 	void setPolyClip(int up, int down = 0);
 	void updatePolyClip();
@@ -342,7 +342,7 @@
 		  @param scale scale of the vport
 	   * @return bool true if the x, y is in the bounds
 	   */
-	bool mouseWithinItem(const int x, const int y, double scale) const;
+	bool mouseWithinItem(int x, int y, double scale) const;
 
 	virtual void handleModeEditKey(QKeyEvent *k, bool &keyRepeat);
 
@@ -471,7 +471,7 @@
 	void setSampleItem(bool b) {m_sampleItem=b;}
 	const QVector<double>& dashes() const { return DashValues; }
 	QVector<double>& dashes() { return DashValues; }
-	void setDashes(QVector<double> val) { DashValues = val; }
+	void setDashes(const QVector<double>& val) { DashValues = val; }
 	double dashOffset() const { return DashOffset; }
 	void setDashOffset(double val) { DashOffset = val; }
 
@@ -497,11 +497,11 @@
 	double visualWidth() const;
 	double visualHeight() const;
 	double visualLineWidth() const;
-	void setWidth(const double);
-	void setHeight(const double);
+	void setWidth(double);
+	void setHeight(double);
 	void setWidthHeight(double, double, bool drawingOnly);
 	void setWidthHeight(double, double);
-	void resizeBy(const double, double);
+	void resizeBy(double, double);
 	//Rotation
 	double rotation() const { return m_rotation; }
 	void setRotation(double, bool drawingOnly);




More information about the scribus-commit mailing list