r25063 by jghali - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Thu Mar 24 23:20:19 UTC 2022


Author: jghali
Date: Thu Mar 24 23:20:19 2022
New Revision: 25063

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

Modified:
    trunk/Scribus/scribus/canvasmode.cpp
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_create.h
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
    trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/canvasmode_editarc.cpp
    trunk/Scribus/scribus/canvasmode_editgradient.cpp
    trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
    trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
    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_editweldpoint.cpp
    trunk/Scribus/scribus/canvasmode_editweldpoint.h
    trunk/Scribus/scribus/canvasmode_framelinks.cpp
    trunk/Scribus/scribus/canvasmode_imageimport.cpp
    trunk/Scribus/scribus/canvasmode_measurements.cpp
    trunk/Scribus/scribus/canvasmode_measurements.h
    trunk/Scribus/scribus/canvasmode_nodeedit.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/canvasmode_objimport.cpp
    trunk/Scribus/scribus/canvasmode_rotate.cpp
    trunk/Scribus/scribus/canvasmode_rotate.h
    trunk/Scribus/scribus/fpointarray.cpp
    trunk/Scribus/scribus/sccolorengine.cpp
    trunk/Scribus/scribus/sccolorengine.h
    trunk/Scribus/scribus/sclayer.cpp
    trunk/Scribus/scribus/sclayer.h
    trunk/Scribus/scribus/ui/dasheditor.cpp
    trunk/Scribus/scribus/ui/tabruler.cpp

Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode.cpp	Thu Mar 24 23:20:19 2022
@@ -222,12 +222,12 @@
 	m_pen["handle"].setCosmetic(true);
 	m_pen["selection-group-inside"] = QPen(PrefsManager::instance().appPrefs.displayPrefs.frameGroupColor, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["selection-group-inside"].setCosmetic(true);
-	QPen ba = QPen(Qt::white, 3.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	QPen ba(Qt::white, 3.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	ba.setCosmetic(true);
 	double markWidth = 4.0 / m_canvas->scale();
 	if (insideGroup)
 		markWidth /= qMax(sx, sy);
-	QRectF handleRect = QRectF(0, 0, markWidth, markWidth);
+	QRectF handleRect(0, 0, markWidth, markWidth);
 	double x = selectionRect.x();
 	double y = selectionRect.y();
 	double w = selectionRect.width();
@@ -266,9 +266,9 @@
 	m_pen["selection"].setCosmetic(true);
 	m_pen["selection-group-inside"] = QPen(PrefsManager::instance().appPrefs.displayPrefs.frameGroupColor, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	m_pen["selection-group-inside"].setCosmetic(true);
-	QPen ba = QPen(Qt::white, 3.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	QPen ba(Qt::white, 3.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	ba.setCosmetic(true);
-	QPen bb = QPen(Qt::black, 1.0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
+	QPen bb(Qt::black, 1.0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
 	bb.setCosmetic(true);
 	psx->scale(m_canvas->scale(), m_canvas->scale());
 	psx->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
@@ -433,7 +433,7 @@
 					if (currItem->isLine())
 					{
 						const double markWidth = 4.0 / m_canvas->scale();
-						QRectF handleRect = QRectF(0, 0, markWidth, markWidth);
+						QRectF handleRect(0, 0, markWidth, markWidth);
 						psx->setRenderHint(QPainter::Antialiasing);
 						psx->setBrush(Qt::white);
 						psx->setPen(m_pen["handle"]);
@@ -515,7 +515,7 @@
 				p->setClipRect(QRectF(0.0, 0.0, visualWidth, visualHeight));
 				PageItem_Group* gItem = currItem->asGroupFrame();
 				int itemCountG = gItem->groupItemList.count();
-				if (itemCountG < m_canvas->moveWithFullOutlinesThreshold)
+				if (itemCountG < Canvas::moveWithFullOutlinesThreshold)
 				{
 					if (gItem->imageFlippedH())
 					{
@@ -578,7 +578,7 @@
 		double x, y, w, h;
 		m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
 		int docSelectionCount = m_doc->m_Selection->count();
-		if (docSelectionCount < m_canvas->moveWithBoxesOnlyThreshold)
+		if (docSelectionCount < Canvas::moveWithBoxesOnlyThreshold)
 		{
 			PageItem *currItem;
 			for (int i = 0; i < docSelectionCount; ++i)
@@ -596,7 +596,7 @@
 				double matRot = getRotationDFromMatrix(itemTrans);
 
 				p->save();
-				if (docSelectionCount < m_canvas->moveWithFullOutlinesThreshold)
+				if (docSelectionCount < Canvas::moveWithFullOutlinesThreshold)
 				{
 //					QRectF br(currItem->getVisualBoundingRect());
 #ifdef GESTURE_FRAME_PREVIEW

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp	Thu Mar 24 23:20:19 2022
@@ -69,7 +69,7 @@
 
 	QPointF topLeft(createObjectPos.x(), createObjectPos.y());
 	QPointF btRight(canvasCurrCoord.x(), canvasCurrCoord.y());
-	QColor  drawColor = qApp->palette().color(QPalette::Active, QPalette::Highlight);
+	QColor  drawColor = QApplication::palette().color(QPalette::Active, QPalette::Highlight);
 
 	if (createObjectMode != modeDrawLine)
 	{
@@ -129,7 +129,7 @@
 		{
 			FPointArray poly;
 			int valCount = m_doc->ValCount;
-			double *vals = m_doc->ShapeValues;
+			const double *vals = m_doc->ShapeValues;
 			for (int a = 0; a < valCount-3; a += 4)
 			{
 				if (vals[a] < 0)
@@ -138,9 +138,9 @@
 					continue;
 				}
 				double x1 = localRect.width()  * vals[a] / 100.0;
-				double y1 = localRect.height() * vals[a+1] / 100.0;
-				double x2 = localRect.width()  * vals[a+2] / 100.0;
-				double y2 = localRect.height() * vals[a+3] / 100.0;
+				double y1 = localRect.height() * vals[a + 1] / 100.0;
+				double x2 = localRect.width()  * vals[a + 2] / 100.0;
+				double y2 = localRect.height() * vals[a + 3] / 100.0;
 				poly.addPoint(x1, y1);
 				poly.addPoint(x2, y2);
 			}
@@ -497,7 +497,7 @@
 	//#6456 m_view->resetMoveTimer();
 }
 
-void CreateMode::getFrameItemTypes(int& itemType, int& frameType)
+void CreateMode::getFrameItemTypes(int& itemType, int& frameType) const
 {
 	itemType  = (int) PageItem::Polygon;
 	frameType = (int) PageItem::Rectangle;
@@ -928,7 +928,7 @@
 	return doCreate;
 }
 
-FRect CreateMode::adjustedRect(FPoint &firstPoint, FPoint &secondPoint)
+FRect CreateMode::adjustedRect(const FPoint &firstPoint, const FPoint &secondPoint)
 {
 	// Lock to grid.
 	FPoint first = m_doc->ApplyGridF(firstPoint);

Modified: trunk/Scribus/scribus/canvasmode_create.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_create.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.h	(original)
+++ trunk/Scribus/scribus/canvasmode_create.h	Thu Mar 24 23:20:19 2022
@@ -64,7 +64,7 @@
 
 	// We do not use PageItem::ItemType and PageItem::FrameType here
 	// for the pure sake of not including pageitem.h
-	void getFrameItemTypes(int& itemType, int& frameType);
+	void getFrameItemTypes(int& itemType, int& frameType) const;
 
 	/**
 	 * Convenience function which given two points calculates and returns the
@@ -74,7 +74,7 @@
 	 * @param secondPoint the second point
 	 * @return a normalized rectangle adjusted to grid and guides
 	 */
-	FRect adjustedRect(FPoint &firstPoint, FPoint &secondPoint);
+	FRect adjustedRect(const FPoint &firstPoint, const FPoint &secondPoint);
 
 	FPoint canvasCurrCoord;
 	FPoint canvasPressCoord;

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	Thu Mar 24 23:20:19 2022
@@ -117,8 +117,8 @@
 	
 	if (m_mouseButtonPressed && (m_doc->appMode == modeDrawCalligraphicLine))
 	{
-		double newXF = mousePointDoc.x(); //m_view->translateToDoc(m->x(), m->y()).x();
-		double newYF = mousePointDoc.y(); //m_view->translateToDoc(m->x(), m->y()).y();
+		double newXF = mousePointDoc.x();
+		double newYF = mousePointDoc.y();
 		if (!m_poly.empty())
 		{
 			if (FPoint(newXF, newYF) != m_poly.point(m_poly.size()-1))

Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	Thu Mar 24 23:20:19 2022
@@ -196,8 +196,8 @@
 	}
 	m_poly.resize(0);
 	m_view->deselectItems(false);
-	m_xp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
-	m_yp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
+	m_xp = mousePointDoc.x();
+	m_yp = mousePointDoc.y();
 	m_canvas->setRenderModeFillBuffer();
 	undoManager->setUndoEnabled(false);
 }
@@ -322,7 +322,7 @@
 		return;
 
 	uint docCurrPageNo = m_doc->currentPageNumber();
-	uint j=static_cast<uint>(i);
+	uint j = static_cast<uint>(i);
 	if (docCurrPageNo != j)
 	{
 		m_doc->setCurrentPage(m_doc->Pages->at(j));

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp	Thu Mar 24 23:20:19 2022
@@ -80,7 +80,7 @@
 	PageItem* currItem;
 	if (m_doc->appMode == modeEdit && GetItem(&currItem))
 	{
-		QRectF brect = QRectF(0, 0, currItem->width(), currItem->height());
+		QRectF brect(0, 0, currItem->width(), currItem->height());
 		QTransform m = currItem->getTransform();
 		brect = m.mapRect(brect);
 		m_canvas->update(QRectF(m_canvas->canvasToLocal(brect.topLeft()), QSizeF(brect.width(),brect.height())*m_canvas->scale()).toRect());
@@ -177,7 +177,7 @@
 	PageItem* currItem;
 	if (GetItem(&currItem))
 	{
-		QPen pp = QPen(Qt::blue, 1.0 / m_canvas->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+		QPen pp(Qt::blue, 1.0 / m_canvas->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 		pp.setCosmetic(true);
 		PageItem_TextFrame* textframe = currItem->asTextFrame();
 		if (textframe)
@@ -221,7 +221,7 @@
 			p->drawRect(0, 0, currItem->OrigW*currItem->imageXScale(), currItem->OrigH*currItem->imageYScale());
 			p->translate(currItem->OrigW*currItem->imageXScale() / 2, currItem->OrigH*currItem->imageYScale() / 2);
 			p->scale(1.0 / m_canvas->scale(), 1.0 / m_canvas->scale());
-			QPen pps = QPen(Qt::blue, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+			QPen pps(Qt::blue, 1.0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			pps.setCosmetic(true);
 			p->setPen(pps);
 			p->drawLine(-10, 0, 10, 0);
@@ -236,8 +236,8 @@
 
 void CanvasMode_Edit::drawTextCursor ( QPainter *p, PageItem_TextFrame* textframe )
 {
-	if ((!m_longCursorTime && m_blinkTime.elapsed() > qApp->cursorFlashTime() / 2 ) ||
-		(m_longCursorTime && m_blinkTime.elapsed() > qApp->cursorFlashTime() )
+	if ((!m_longCursorTime && m_blinkTime.elapsed() > QApplication::cursorFlashTime() / 2 ) ||
+		(m_longCursorTime && m_blinkTime.elapsed() > QApplication::cursorFlashTime() )
 		)
 	{
 		m_cursorVisible = !m_cursorVisible;
@@ -323,7 +323,7 @@
 		//CB if annotation, open the annotation dialog
 		if (currItem->isAnnotation())
 		{
-		//	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+		//	QApplication::changeOverrideCursor(QCursor(Qt::ArrowCursor));
 			m_view->requestMode(submodeAnnotProps);
 		}
 		//otherwise, select between the whitespace
@@ -1076,7 +1076,7 @@
 	m_view->setObjectUndoMode();
 	Mxp = mx;
 	Myp = my;
-	if (currItem!=nullptr)
+	if (currItem != nullptr)
 		cmen = new ContextMenu(*(m_doc->m_Selection), m_ScMW, m_doc);
 	else
 		cmen = new ContextMenu(m_ScMW, m_doc, mx, my);

Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp	Thu Mar 24 23:20:19 2022
@@ -98,7 +98,7 @@
 	psx->setPen(p1b);
 	psx->setBrush(Qt::NoBrush);
 	QPainterPath pp;
-	PageItem_Arc* item = currItem->asArc();
+	const PageItem_Arc* item = currItem->asArc();
 	QPointF mPoint = item->PoLine.pointQF(0);
 	double nWidth = mPoint.x() - m_widthPoint.x();
 	double nHeight = mPoint.y() - m_heightPoint.y();
@@ -170,8 +170,8 @@
 	m_heightPoint = QPointF(m_centerPoint.x(), m_centerPoint.y() - item->arcHeight / 2.0);
 	m_startAngle = item->arcStartAngle;
 	m_endAngle = m_startAngle + item->arcSweepAngle;
-	QLineF res = QLineF(m_centerPoint, m_startPoint);
-	QLineF swe = QLineF(m_centerPoint, m_endPoint);
+	QLineF res(m_centerPoint, m_startPoint);
+	QLineF swe(m_centerPoint, m_endPoint);
 	vectorDialog->setValues(res.angle(), swe.angle(), item->arcHeight, item->arcWidth);
 	vectorDialog->unitChange(m_doc->unitIndex());
 	vectorDialog->show();
@@ -212,8 +212,8 @@
 	m_heightPoint = QPointF(m_centerPoint.x(), m_centerPoint.y() - item->arcHeight / 2.0);
 	m_startAngle = item->arcStartAngle;
 	m_endAngle = m_startAngle + item->arcSweepAngle;
-	QLineF res = QLineF(m_centerPoint, m_startPoint);
-	QLineF swe = QLineF(m_centerPoint, m_endPoint);
+	QLineF res(m_centerPoint, m_startPoint);
+	QLineF swe(m_centerPoint, m_endPoint);
 	vectorDialog->setValues(res.angle(), swe.angle(), item->arcHeight, item->arcWidth);
 	m_view->update();
 }
@@ -236,7 +236,7 @@
 	PageItem_Arc *item = currItem->asArc();
 	QTransform bb;
 	bb.scale(height / width, 1.0);
-	QLineF inp = QLineF(QPointF(width / 2.0, height / 2.0), QPointF(width, height / 2.0));
+	QLineF inp(QPointF(width / 2.0, height / 2.0), QPointF(width, height / 2.0));
 	inp.setAngle(start);
 	QLineF res = bb.map(inp);
 	inp.setAngle(end);
@@ -328,8 +328,8 @@
 		QTransform itemMatrix = currItem->getTransform();
 		QPointF sPoint = currItem->PoLine.pointQF(0);
 		QPointF smPoint = itemMatrix.map(sPoint);
-		QLineF stLinA = QLineF(smPoint, QPointF(m_Mxp, m_Myp));
-		QLineF stLinM = QLineF(smPoint, QPointF(newX, newY));
+		QLineF stLinA(smPoint, QPointF(m_Mxp, m_Myp));
+		QLineF stLinM(smPoint, QPointF(newX, newY));
 		double deltaAngle = stLinM.angle() - stLinA.angle();
 		QPainterPath pp;
 		if (m_arcPoint == useControlStart)
@@ -355,17 +355,17 @@
 			if (m_arcPoint == useControlStart)
 			{
 				m_startPoint = ar.pointQF(2);
-				QLineF stLinA = QLineF(smPoint, itemMatrix.map(m_startPoint));
+				QLineF stLinA(smPoint, itemMatrix.map(m_startPoint));
 				m_canvas->displayRotHUD(m->globalPosition(), 360.0 - stLinA.angle());
 			}
 			else if (m_arcPoint == useControlSweep)
 			{
 				m_endPoint = ar.pointQF(ar.size() - 4);
-				QLineF stLinA = QLineF(smPoint, itemMatrix.map(m_endPoint));
+				QLineF stLinA(smPoint, itemMatrix.map(m_endPoint));
 				m_canvas->displayRotHUD(m->globalPosition(), 360.0 - stLinA.angle());
 			}
-			QLineF res = QLineF(m_centerPoint, m_startPoint);
-			QLineF swe = QLineF(m_centerPoint, m_endPoint);
+			QLineF res(m_centerPoint, m_startPoint);
+			QLineF swe(m_centerPoint, m_endPoint);
 			vectorDialog->setValues(res.angle(), swe.angle(), nHeight * 2, nWidth * 2);
 			blockUpdateFromItem(true);
 			currItem->update();
@@ -435,7 +435,7 @@
 	{
 		QTransform bb;
 		bb.scale(item->arcHeight / item->arcWidth, 1.0);
-		QLineF inp = QLineF(QPointF(item->arcWidth / 2.0, item->arcHeight / 2.0), QPointF(item->arcWidth, item->arcHeight / 2.0));
+		QLineF inp(QPointF(item->arcWidth / 2.0, item->arcHeight / 2.0), QPointF(item->arcWidth, item->arcHeight / 2.0));
 		double start = inp.angleTo(QLineF(QPointF(item->arcWidth / 2.0, item->arcHeight / 2.0),m_startPoint));
 		inp.setAngle(start);
 		double end = inp.angleTo(QLineF(QPointF(item->arcWidth / 2.0, item->arcHeight / 2.0),m_endPoint));

Modified: trunk/Scribus/scribus/canvasmode_editgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.cpp	Thu Mar 24 23:20:19 2022
@@ -324,16 +324,16 @@
 	if (m_canvas->m_viewMode.m_MouseButtonPressed)
 	{
 		PageItem *currItem = m_doc->m_Selection->itemAt(0);
-		double newX = mousePointDoc.x(); //m->x();
-		double newY = mousePointDoc.y(); //m->y();
+		double newX = mousePointDoc.x();
+		double newY = mousePointDoc.y();
 		FPoint npx(m_Mxp - newX, m_Myp - newY, 0, 0, currItem->rotation(), 1, 1, true);
-		QPointF np = QPointF(npx.x(), npx.y());
+		QPointF np(npx.x(), npx.y());
 		if (m_view->editStrokeGradient == 1)
 		{
 			if (m_gradientPoint == useGradientStart)
 			{
-				currItem->GrStrokeStartX -= np.x(); // (Mxp - newX); // / m_canvas->scale();
-				currItem->GrStrokeStartY -= np.y(); // (Myp - newY); // / m_canvas->scale();
+				currItem->GrStrokeStartX -= np.x();
+				currItem->GrStrokeStartY -= np.y();
 				currItem->GrStrokeFocalX -= np.x();
 				currItem->GrStrokeFocalY -= np.y();
 				if (currItem->strokeGradientType() == 7)
@@ -342,10 +342,10 @@
 					double radFoc = distance(currItem->GrStrokeFocalX - currItem->GrStrokeStartX, currItem->GrStrokeFocalY - currItem->GrStrokeStartY);
 					if (radFoc >= radEnd)
 					{
-						currItem->GrStrokeStartX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrStrokeStartY += np.y(); // (Myp - newY); // / m_canvas->scale();
-						currItem->GrStrokeFocalX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrStrokeFocalY += np.y(); // (Myp - newY); // / m_canvas->scale();
+						currItem->GrStrokeStartX += np.x();
+						currItem->GrStrokeStartY += np.y();
+						currItem->GrStrokeFocalX += np.x();
+						currItem->GrStrokeFocalY += np.y();
 					}
 				}
 			}
@@ -399,7 +399,7 @@
 				m.rotate(currItem->GrStrokeSkew);
 				m.translate(radEnd * currItem->GrStrokeScale, 0);
 				QPointF shP = m.map(QPointF(0,0));
-				QPointF shR = QPointF(shP.x() -np.x(), shP.y() - np.y());
+				QPointF shR(shP.x() -np.x(), shP.y() - np.y());
 				double radNew = distance(shR.x() - currItem->GrStrokeStartX, shR.y() - currItem->GrStrokeStartY);
 				double rotNew = xy2Deg(shR.x() - currItem->GrStrokeStartX, shR.y() - currItem->GrStrokeStartY) + 90;
 				currItem->GrStrokeSkew = rotNew - rotEnd;
@@ -409,16 +409,16 @@
 			}
 			if (m_gradientPoint == useGradientEnd)
 			{
-				currItem->GrStrokeEndX -= np.x(); // (Mxp - newX); // / m_canvas->scale();
-				currItem->GrStrokeEndY -= np.y(); // (Myp - newY); // / m_canvas->scale();
+				currItem->GrStrokeEndX -= np.x();
+				currItem->GrStrokeEndY -= np.y();
 				if (currItem->strokeGradientType() == 7)
 				{
 					double radEnd = distance(currItem->GrStrokeEndX - currItem->GrStrokeStartX, currItem->GrStrokeEndY - currItem->GrStrokeStartY);
 					double radFoc = distance(currItem->GrStrokeFocalX - currItem->GrStrokeStartX, currItem->GrStrokeFocalY - currItem->GrStrokeStartY);
 					if (radFoc >= radEnd)
 					{
-						currItem->GrStrokeEndX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrStrokeEndY += np.y(); // (Myp - newY); // / m_canvas->scale();
+						currItem->GrStrokeEndX += np.x();
+						currItem->GrStrokeEndY += np.y();
 					}
 				}
 			}
@@ -437,10 +437,10 @@
 					double radFoc = distance(currItem->GrMaskFocalX - currItem->GrMaskStartX, currItem->GrMaskFocalY - currItem->GrMaskStartY);
 					if (radFoc >= radEnd)
 					{
-						currItem->GrMaskStartX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrMaskStartY += np.y(); // (Myp - newY); // / m_canvas->scale();
-						currItem->GrMaskFocalX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrMaskFocalY += np.y(); // (Myp - newY); // / m_canvas->scale();
+						currItem->GrMaskStartX += np.x();
+						currItem->GrMaskStartY += np.y();
+						currItem->GrMaskFocalX += np.x();
+						currItem->GrMaskFocalY += np.y();
 					}
 				}
 			}
@@ -494,7 +494,7 @@
 				m.rotate(currItem->GrMaskSkew);
 				m.translate(radEnd * currItem->GrMaskScale, 0);
 				QPointF shP = m.map(QPointF(0,0));
-				QPointF shR = QPointF(shP.x() -np.x(), shP.y() - np.y());
+				QPointF shR(shP.x() -np.x(), shP.y() - np.y());
 				double radNew = distance(shR.x() - currItem->GrMaskStartX, shR.y() - currItem->GrMaskStartY);
 				double rotNew = xy2Deg(shR.x() - currItem->GrMaskStartX, shR.y() - currItem->GrMaskStartY) + 90;
 				currItem->GrMaskSkew = rotNew - rotEnd;
@@ -512,8 +512,8 @@
 					double radFoc = distance(currItem->GrMaskFocalX - currItem->GrMaskStartX, currItem->GrMaskFocalY - currItem->GrMaskStartY);
 					if (radFoc >= radEnd)
 					{
-						currItem->GrMaskEndX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrMaskEndY += np.y(); // (Myp - newY); // / m_canvas->scale();
+						currItem->GrMaskEndX += np.x();
+						currItem->GrMaskEndY += np.y();
 					}
 				}
 			}
@@ -532,10 +532,10 @@
 					double radFoc = distance(currItem->GrFocalX - currItem->GrStartX, currItem->GrFocalY - currItem->GrStartY);
 					if (radFoc >= radEnd)
 					{
-						currItem->GrStartX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrStartY += np.y(); // (Myp - newY); // / m_canvas->scale();
-						currItem->GrFocalX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrFocalY += np.y(); // (Myp - newY); // / m_canvas->scale();
+						currItem->GrStartX += np.x();
+						currItem->GrStartY += np.y();
+						currItem->GrFocalX += np.x();
+						currItem->GrFocalY += np.y();
 					}
 				}
 			}
@@ -593,7 +593,7 @@
 					m.rotate(currItem->GrSkew);
 				m.translate(radEnd * currItem->GrScale, 0);
 				QPointF shP = m.map(QPointF(0,0));
-				QPointF shR = QPointF(shP.x() -np.x(), shP.y() - np.y());
+				QPointF shR(shP.x() -np.x(), shP.y() - np.y());
 				double radNew = distance(shR.x() - currItem->GrStartX, shR.y() - currItem->GrStartY);
 				double rotNew = xy2Deg(shR.x() - currItem->GrStartX, shR.y() - currItem->GrStartY) + 90;
 				if (currItem->GrType != Gradient_Conical)
@@ -614,8 +614,8 @@
 					double radFoc = distance(currItem->GrFocalX - currItem->GrStartX, currItem->GrFocalY - currItem->GrStartY);
 					if (radFoc >= radEnd)
 					{
-						currItem->GrEndX += np.x(); // (Mxp - newX); // / m_canvas->scale();
-						currItem->GrEndY += np.y(); // (Myp - newY); // / m_canvas->scale();
+						currItem->GrEndX += np.x();
+						currItem->GrEndY += np.y();
 					}
 				}
 			}

Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	Thu Mar 24 23:20:19 2022
@@ -662,7 +662,7 @@
 			for (int gcol = 0; gcol < currItem->meshGradientArray[grow].count(); gcol++)
 			{
 				MeshPoint mp = currItem->meshGradientArray[grow][gcol];
-				QPointF gradientPoint = QPointF(mp.gridPoint.x(), mp.gridPoint.y());
+				QPointF gradientPoint(mp.gridPoint.x(), mp.gridPoint.y());
 				gradientPoint = itemMatrix.map(gradientPoint);
 				if (m_canvas->hitsCanvasPoint(mousePointDoc, gradientPoint))
 				{
@@ -686,9 +686,9 @@
 			for (int gcol = 0; gcol < currItem->meshGradientArray[grow].count(); gcol++)
 			{
 				MeshPoint mp = currItem->meshGradientArray[grow][gcol];
-				QPointF gradientPoint = QPointF(mp.gridPoint.x(), mp.gridPoint.y());
+				QPointF gradientPoint(mp.gridPoint.x(), mp.gridPoint.y());
 				gradientPoint = itemMatrix.map(gradientPoint);
-				QPointF gradientColorPoint = QPointF(mp.controlColor.x(), mp.controlColor.y());
+				QPointF gradientColorPoint(mp.controlColor.x(), mp.controlColor.y());
 				gradientColorPoint = itemMatrix.map(gradientColorPoint);
 				if (m_canvas->hitsCanvasPoint(mousePointDoc, gradientPoint) || m_canvas->hitsCanvasPoint(mousePointDoc, gradientColorPoint))
 				{
@@ -911,7 +911,7 @@
 				for (int gcol = 0; gcol < currItem->meshGradientArray[grow].count(); gcol++)
 				{
 					MeshPoint mp = currItem->meshGradientArray[grow][gcol];
-					QPointF gradientPoint = QPointF(mp.gridPoint.x(), mp.gridPoint.y());
+					QPointF gradientPoint(mp.gridPoint.x(), mp.gridPoint.y());
 					gradientPoint = itemMatrix.map(gradientPoint);
 					if (m_canvas->hitsCanvasPoint(mousePointDoc, gradientPoint))
 					{

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	Thu Mar 24 23:20:19 2022
@@ -982,7 +982,7 @@
 				if ((*m_old_mesh) == m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TL)
 				{
 					delete ss;
-					ss=nullptr;
+					ss = nullptr;
 				}
 				else
 					ss->setItem(qMakePair(*m_old_mesh,m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TL));
@@ -991,7 +991,7 @@
 				if ((*m_old_mesh) == m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TR)
 				{
 					delete ss;
-					ss=nullptr;
+					ss = nullptr;
 				}
 				else
 					ss->setItem(qMakePair(*m_old_mesh,m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TR));
@@ -1000,7 +1000,7 @@
 				if ((*m_old_mesh) == m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BR)
 				{
 					delete ss;
-					ss=nullptr;
+					ss = nullptr;
 				}
 				else
 					ss->setItem(qMakePair(*m_old_mesh,m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BR));
@@ -1009,7 +1009,7 @@
 				if ((*m_old_mesh) == m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BL)
 				{
 					delete ss;
-					ss=nullptr;
+					ss = nullptr;
 				}
 				else
 					ss->setItem(qMakePair(*m_old_mesh,m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BL));

Modified: trunk/Scribus/scribus/canvasmode_editpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editpolygon.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editpolygon.cpp	Thu Mar 24 23:20:19 2022
@@ -162,11 +162,11 @@
 	uint cx = m_polyUseFactor ? m_polyCorners * 2 : m_polyCorners;
 	double seg = 360.0 / cx;
 	double trueLength = sqrt(pow(sin(seg / 180.0 * M_PI) * (item->width() / 2.0), 2) + pow(cos(seg / 180.0 * M_PI) * (item->height() / 2.0) + (item->height()/2.0) - item->height(), 2));
-	QLineF innerLine = QLineF(m_endPoint, m_centerPoint);
+	QLineF innerLine(m_endPoint, m_centerPoint);
 	innerLine.setAngle(innerLine.angle() + 90);
 	innerLine.setLength(trueLength * m_polyCurvature);
 	m_innerCPoint = innerLine.p2();
-	QLineF outerLine = QLineF(m_startPoint, currItem->PoLine.pointQF(6));
+	QLineF outerLine(m_startPoint, currItem->PoLine.pointQF(6));
 	outerLine.setLength(outerLine.length() * m_polyOuterCurvature);
 	m_outerCPoint = outerLine.p2();
 	m_view->update();
@@ -202,11 +202,11 @@
 	uint cx = m_polyUseFactor ? m_polyCorners * 2 : m_polyCorners;
 	double seg = 360.0 / cx;
 	double trueLength = sqrt(pow(sin(seg / 180.0 * M_PI) * (item->width() / 2.0), 2) + pow(cos(seg / 180.0 * M_PI) * (item->height() / 2.0) + (item->height()/2.0) - item->height(), 2));
-	QLineF innerLine = QLineF(m_endPoint, m_centerPoint);
+	QLineF innerLine(m_endPoint, m_centerPoint);
 	innerLine.setAngle(innerLine.angle() + 90);
 	innerLine.setLength(trueLength * m_polyCurvature);
 	m_innerCPoint = innerLine.p2();
-	QLineF outerLine = QLineF(m_startPoint, currItem->PoLine.pointQF(6));
+	QLineF outerLine(m_startPoint, currItem->PoLine.pointQF(6));
 	outerLine.setLength(outerLine.length() * m_polyOuterCurvature);
 	m_outerCPoint = outerLine.p2();
 	setModeCursor();
@@ -300,14 +300,14 @@
 	return userVal;
 }
 
-double CanvasMode_EditPolygon::GetZeroFactor()
-{
-	return sqrt(pow(1.0,2.0)-pow(((sin((360.0/(m_polyCorners*2))/180* M_PI)* 2.0)/2.0),2.0));
-}
-
-double CanvasMode_EditPolygon::GetMaxFactor()
-{
-	double win = (360.0/(m_polyCorners*2)) / 180.0 * M_PI;
+double CanvasMode_EditPolygon::GetZeroFactor() const
+{
+	return sqrt(pow(1.0, 2.0) - pow(((sin((360.0 / (m_polyCorners * 2)) / 180 *  M_PI) * 2.0) / 2.0), 2.0));
+}
+
+double CanvasMode_EditPolygon::GetMaxFactor() const
+{
+	double win = (360.0 / (m_polyCorners * 2)) / 180.0 * M_PI;
 	double ret;
 	if ((360.0/(m_polyCorners*2)) > 45)
 		ret = 1/sin(win);
@@ -345,7 +345,7 @@
 		PageItem *currItem = m_doc->m_Selection->itemAt(0);
 		QTransform itemMatrix = currItem->getTransform();
 		QPointF cPoint = itemMatrix.map(m_centerPoint);
-		QLineF stLinA = QLineF(cPoint, QPointF(newX, newY));
+		QLineF stLinA(cPoint, QPointF(newX, newY));
 		
 		uint cx = m_polyUseFactor ? m_polyCorners * 2 : m_polyCorners;
 		double seg = 360.0 / cx;
@@ -370,15 +370,15 @@
 		if (m_polygonPoint == useControlInnerCurve)
 		{
 			QPointF ePoint = itemMatrix.map(m_endPoint);
-			QLineF stLinC = QLineF(ePoint, QPointF(newX, newY));
+			QLineF stLinC(ePoint, QPointF(newX, newY));
 			m_polyCurvature = stLinC.length() / trueLength;
 		}
 		if (m_polygonPoint == useControlOuterCurve)
 		{
 			QPointF sPoint = itemMatrix.map(m_startPoint);
 			QPointF sPoint2 = itemMatrix.map(currItem->PoLine.pointQF(6));
-			QLineF stLinCo = QLineF(sPoint, QPointF(newX, newY));
-			QLineF stLinCo2 = QLineF(sPoint, sPoint2);
+			QLineF stLinCo(sPoint, QPointF(newX, newY));
+			QLineF stLinCo2(sPoint, sPoint2);
 			m_polyOuterCurvature = stLinCo.length() / stLinCo2.length();
 		}
 		QPainterPath path = regularPolygonPath(currItem->width(), currItem->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature);
@@ -386,11 +386,11 @@
 		ar.fromQPainterPath(path);
 		m_endPoint = ar.pointQF(2);
 		m_startPoint = ar.pointQF(0);
-		QLineF innerLine = QLineF(m_endPoint, m_centerPoint);
+		QLineF innerLine(m_endPoint, m_centerPoint);
 		innerLine.setAngle(innerLine.angle() + 90);
 		innerLine.setLength(trueLength * m_polyCurvature);
 		m_innerCPoint = innerLine.p2();
-		QLineF outerLine = QLineF(m_startPoint, ar.pointQF(6));
+		QLineF outerLine(m_startPoint, ar.pointQF(6));
 		outerLine.setLength(outerLine.length() * m_polyOuterCurvature);
 		m_outerCPoint = outerLine.p2();
 		m_VectorDialog->setValues(m_polyCorners, m_polyFactor, m_polyUseFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature);
@@ -504,15 +504,15 @@
 		if (m_polygonPoint == useControlInnerCurve)
 		{
 			QPointF ePoint = itemMatrix.map(m_endPoint);
-			QLineF stLinC = QLineF(ePoint, QPointF(newX, newY));
+			QLineF stLinC(ePoint, QPointF(newX, newY));
 			m_polyCurvature = stLinC.length() / trueLength;
 		}
 		if (m_polygonPoint == useControlOuterCurve)
 		{
 			QPointF sPoint = itemMatrix.map(m_startPoint);
 			QPointF sPoint2 = itemMatrix.map(currItem->PoLine.pointQF(6));
-			QLineF stLinCo = QLineF(sPoint, QPointF(newX, newY));
-			QLineF stLinCo2 = QLineF(sPoint, sPoint2);
+			QLineF stLinCo(sPoint, QPointF(newX, newY));
+			QLineF stLinCo2(sPoint, sPoint2);
 			m_polyOuterCurvature = stLinCo.length() / stLinCo2.length();
 		}
 		item->polyFactor = m_polyFactor;

Modified: trunk/Scribus/scribus/canvasmode_editpolygon.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editpolygon.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editpolygon.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editpolygon.h	Thu Mar 24 23:20:19 2022
@@ -71,8 +71,8 @@
 	} ePolygonPoint;
 
 	inline bool GetItem(PageItem** pi);
-	double GetZeroFactor();
-	double GetMaxFactor();
+	double GetZeroFactor() const;
+	double GetMaxFactor() const;
 	double getUserValFromFactor(double factor);
 
 	PolyVectorDialog *m_VectorDialog {nullptr};

Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp	Thu Mar 24 23:20:19 2022
@@ -75,7 +75,7 @@
 	p->restore();
 }
 
-void CanvasMode_EditSpiral::drawControlsSpiral(QPainter* psx, PageItem* currItem)
+void CanvasMode_EditSpiral::drawControlsSpiral(QPainter* psx, const PageItem* currItem)
 {
 	QPen p8b = QPen(Qt::blue, 8.0 / m_canvas->m_viewMode.scale, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin);
 	QPen p8r = QPen(Qt::red, 8.0 / m_canvas->m_viewMode.scale, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin);
@@ -192,7 +192,7 @@
 		return ret;
 	while (true)
 	{
-		QLineF lin = QLineF(QPointF(wws, hh), QPointF(wwn, hh));
+		QLineF lin(QPointF(wws, hh), QPointF(wwn, hh));
 		if ((angle <= segEnd) && (angle >= segStart))
 		{
 			ret = lin.pointAt(0.5);
@@ -213,13 +213,13 @@
 
 double CanvasMode_EditSpiral::computeRealAngle(double angle, bool fromDia)
 {
-	PageItem *currItem = m_doc->m_Selection->itemAt(0);
+	const PageItem *currItem = m_doc->m_Selection->itemAt(0);
 	double ret = angle;
 	int rev = static_cast<int>(angle / 360.0);
 	double part = angle - (rev * 360);
 	QTransform bb;
 	bb.scale(currItem->width() / currItem->height(), 1.0);
-	QLineF inp = QLineF(QPointF(currItem->width() / 2.0, currItem->height() / 2.0), QPointF(currItem->width(), currItem->height() / 2.0));
+	QLineF inp(QPointF(currItem->width() / 2.0, currItem->height() / 2.0), QPointF(currItem->width(), currItem->height() / 2.0));
 	inp.setAngle(part);
 	if (fromDia)
 	{
@@ -296,8 +296,8 @@
 		else if (m_arcPoint == useControlEnd)
 			sPoint = getSegment(m_endAngle);
 		QPointF smPoint = itemMatrix.map(sPoint);
-		QLineF stLinA = QLineF(smPoint, QPointF(m_Mxp, m_Myp));
-		QLineF stLinM = QLineF(smPoint, QPointF(newX, newY));
+		QLineF stLinA(smPoint, QPointF(m_Mxp, m_Myp));
+		QLineF stLinM(smPoint, QPointF(newX, newY));
 		double deltaAngle = stLinM.angle() - stLinA.angle();
 		if (deltaAngle < -180)
 			deltaAngle = deltaAngle + 360;

Modified: trunk/Scribus/scribus/canvasmode_editspiral.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editspiral.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.h	Thu Mar 24 23:20:19 2022
@@ -57,7 +57,7 @@
 	void mouseMoveEvent(QMouseEvent *m) override;
 	void mousePressEvent(QMouseEvent *m) override;
 	void drawControls(QPainter* p) override;
-	void drawControlsSpiral(QPainter* psx, PageItem* currItem);
+	void drawControlsSpiral(QPainter* psx, const PageItem* currItem);
 
 private:
 

Modified: trunk/Scribus/scribus/canvasmode_edittable.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_edittable.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edittable.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_edittable.cpp	Thu Mar 24 23:20:19 2022
@@ -455,8 +455,8 @@
 
 void CanvasMode_EditTable::drawTextCursor(QPainter* p)
 {
-	if ((!m_longBlink && m_blinkTime.elapsed() > qApp->cursorFlashTime() / 2)
-		|| (m_longBlink && m_blinkTime.elapsed() > qApp->cursorFlashTime()))
+	if ((!m_longBlink && m_blinkTime.elapsed() > QApplication::cursorFlashTime() / 2)
+		|| (m_longBlink && m_blinkTime.elapsed() > QApplication::cursorFlashTime()))
 	{
 		// Reset blink timer
 		m_blinkTime.restart();

Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.cpp	Thu Mar 24 23:20:19 2022
@@ -92,7 +92,7 @@
 	p->restore();
 }
 
-void CanvasMode_EditWeldPoint::drawControlsWeldPoint(QPainter* psx, PageItem* currItem)
+void CanvasMode_EditWeldPoint::drawControlsWeldPoint(QPainter* psx, const PageItem* currItem)
 {
 	psx->translate(static_cast<int>(currItem->xPos()), static_cast<int>(currItem->yPos()));
 	psx->rotate(currItem->rotation());
@@ -352,7 +352,7 @@
 	else
 		npfN = FPoint(nx, ny);
 	m_currItem = m_doc->m_Selection->itemAt(0);
-	FPoint npf = FPoint(npfN.x(), npfN.y(), m_currItem->xPos(), m_currItem->yPos(), m_currItem->rotation(), 1, 1, true);
+	FPoint npf(npfN.x(), npfN.y(), m_currItem->xPos(), m_currItem->yPos(), m_currItem->rotation(), 1, 1, true);
 	FPoint npx(m_Mxp - npfN.x(), m_Myp - npfN.y(), 0, 0, m_currItem->rotation(), 1, 1, true);
 	m_canvas->displayXYHUD(m->globalPosition(), npf.x(), npf.y());
 	if (m_canvas->m_viewMode.m_MouseButtonPressed && m_view->moveTimerElapsed())

Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.h	(original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.h	Thu Mar 24 23:20:19 2022
@@ -56,7 +56,7 @@
 	void mousePressEvent(QMouseEvent *m) override;
 	void keyPressEvent(QKeyEvent *e) override;
 	void drawControls(QPainter* p) override;
-	void drawControlsWeldPoint(QPainter* psx, PageItem* currItem);
+	void drawControlsWeldPoint(QPainter* psx, const PageItem* currItem);
 
 private:
 	void snapToEdgePoints(double &x, double &y);

Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp	Thu Mar 24 23:20:19 2022
@@ -372,10 +372,10 @@
 	if (!m_doc->masterPageMode())
 	{
 		int i = m_doc->OnPage(m_Mxp, m_Myp);
-		if (i!=-1)
-		{
-			uint docCurrPageNo=m_doc->currentPageNumber();
-			uint j=static_cast<uint>(i);
+		if (i != -1)
+		{
+			uint docCurrPageNo = m_doc->currentPageNumber();
+			uint j = static_cast<uint>(i);
 			if (docCurrPageNo != j)
 			{
 				m_doc->setCurrentPage(m_doc->Pages->at(j));

Modified: trunk/Scribus/scribus/canvasmode_imageimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_imageimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_imageimport.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_imageimport.cpp	Thu Mar 24 23:20:19 2022
@@ -62,9 +62,10 @@
 
 void CanvasMode_ImageImport::newToolTip(const QString& name)
 {
+	QImage pm(80, 80, QImage::Format_ARGB32_Premultiplied);
+	QBrush b(QColor(205,205,205), IconManager::instance().loadPixmap("testfill.png"));
+	
 	QPainter p;
-	QImage pm = QImage(80, 80, QImage::Format_ARGB32_Premultiplied);
-	QBrush b(QColor(205,205,205), IconManager::instance().loadPixmap("testfill.png"));
 	p.begin(&pm);
 	p.fillRect(QRectF(0, 0, 80, 80), b);
 	QImage thumb;

Modified: trunk/Scribus/scribus/canvasmode_measurements.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_measurements.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_measurements.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_measurements.cpp	Thu Mar 24 23:20:19 2022
@@ -1,78 +1,78 @@
-/*
- For general Scribus (>=1.3.2) copyright and licensing information please refer
- to the COPYING file provided with the program. Following this notice may exist
- a copyright and/or license notice that predates the release of Scribus 1.3.2
- for which a new license (GPL+exception) is in place.
- */
-/***************************************************************************
-*                                                                         *
-*   This program is free software; you can redistribute it and/or modify  *
-*   it under the terms of the GNU General Public License as published by  *
-*   the Free Software Foundation; either version 2 of the License, or     *
-*   (at your option) any later version.                                   *
-*                                                                         *
-***************************************************************************/
-
-#include "canvasmode_measurements.h"
-
-#include <QApplication>
-#include <QPainter>
-#include <QPen>
-
-#include "appmodes.h"
-#include "canvas.h"
-#include "scribusdoc.h"
-#include "scribusview.h"
-#include "ui/measurements.h"
-#include "util_math.h"
-
-
-MeasurementsMode::MeasurementsMode(ScribusView* view) : CanvasMode(view), m_start(0,0), m_current(0,0)
-{
-	m_palette = new Measurements(m_view);
-	m_palette->startup();
-	m_palette->hide();
-	connect( m_palette, SIGNAL(paletteShown(bool)), this, SLOT(setActive(bool)));
-}
-
-void MeasurementsMode::enterEvent(QEvent *e)
-{
-	m_view->setCursor(QCursor(Qt::CrossCursor));
-}
-
-void MeasurementsMode::leaveEvent(QEvent *e)
-{
-}
-
-void MeasurementsMode::setActive(bool active)
-{
-	if (!active)
-		m_view->requestMode(modeNormal);
-}
-
-
-void MeasurementsMode::activate(bool fromGesture)
-{
-	CanvasMode::activate(fromGesture);
-	m_palette->show();
-}
-
-void MeasurementsMode::deactivate(bool forGesture)
-{
-	m_palette->hide();
-	CanvasMode::deactivate(forGesture);
-}
-
-void MeasurementsMode::drawControls(QPainter* p)
-{
-	p->save();
-	p->setRenderHint(QPainter::Antialiasing);
-	p->setBrush(Qt::NoBrush);
-	p->setPen(QPen(Qt::black, 1.0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin));
-	p->drawLine(m_start, m_current);
-	p->restore();
-}
-
+/*
+ For general Scribus (>=1.3.2) copyright and licensing information please refer
+ to the COPYING file provided with the program. Following this notice may exist
+ a copyright and/or license notice that predates the release of Scribus 1.3.2
+ for which a new license (GPL+exception) is in place.
+ */
+/***************************************************************************
+*                                                                         *
+*   This program is free software; you can redistribute it and/or modify  *
+*   it under the terms of the GNU General Public License as published by  *
+*   the Free Software Foundation; either version 2 of the License, or     *
+*   (at your option) any later version.                                   *
+*                                                                         *
+***************************************************************************/
+
+#include "canvasmode_measurements.h"
+
+#include <QApplication>
+#include <QPainter>
+#include <QPen>
+
+#include "appmodes.h"
+#include "canvas.h"
+#include "scribusdoc.h"
+#include "scribusview.h"
+#include "ui/measurements.h"
+#include "util_math.h"
+
+
+MeasurementsMode::MeasurementsMode(ScribusView* view) : CanvasMode(view)
+{
+	m_palette = new Measurements(m_view);
+	m_palette->startup();
+	m_palette->hide();
+	connect( m_palette, SIGNAL(paletteShown(bool)), this, SLOT(setActive(bool)));
+}
+
+void MeasurementsMode::enterEvent(QEvent *e)
+{
+	m_view->setCursor(QCursor(Qt::CrossCursor));
+}
+
+void MeasurementsMode::leaveEvent(QEvent *e)
+{
+	// Nothing to do
+}
+
+void MeasurementsMode::setActive(bool active)
+{
+	if (!active)
+		m_view->requestMode(modeNormal);
+}
+
+void MeasurementsMode::activate(bool fromGesture)
+{
+	CanvasMode::activate(fromGesture);
+	m_palette->show();
+}
+
+void MeasurementsMode::deactivate(bool forGesture)
+{
+	m_palette->hide();
+	CanvasMode::deactivate(forGesture);
+}
+
+void MeasurementsMode::drawControls(QPainter* p)
+{
+	p->save();
+	p->setRenderHint(QPainter::Antialiasing);
+	p->setBrush(Qt::NoBrush);
+	p->setPen(QPen(Qt::black, 1.0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin));
+	p->drawLine(m_start, m_current);
+	p->restore();
+}
+
 void MeasurementsMode::keyPressEvent(QKeyEvent *e)
 {
 	commonkeyPressEvent_Default(e);
@@ -81,56 +81,56 @@
 void MeasurementsMode::keyReleaseEvent(QKeyEvent *e)
 {
 	commonkeyReleaseEvent(e);
-}
-
-void MeasurementsMode::mouseReleaseEvent(QMouseEvent *m)
-{
-	if (m_active)
-	{
-		m->accept();
-		adjustPoint(m->globalPosition());		
-	}
-	m_active = false;
-	showValues();
-}
-
-void MeasurementsMode::mouseMoveEvent(QMouseEvent *m)
-{
-	if (m_active)
-	{
-		m->accept();
-		adjustPoint(m->globalPosition());
-		showValues();
-	}
-	else
-	{
-		FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
-		m_canvas->displayCorrectedXYHUD(m->globalPosition(), mousePointDoc.x(), mousePointDoc.y());
-	}
-}
-
-void MeasurementsMode::mousePressEvent(QMouseEvent *m)
-{
-	m->accept();
-	m_active = true;
-	adjustPoint(m->globalPosition());
-	m_start = m_current;
-	m_startDoc = m_currentDoc;
-	showValues();
-}
-
-void MeasurementsMode::adjustPoint(QPointF globalPoint)
-{
-	QPointF point = globalPoint - (m_canvas->mapToParent(QPointF(0, 0)) + m_canvas->parentWidget()->mapToGlobal(QPointF(0, 0)));
-	m_canvas->update(QRect(m_start.toPoint(), m_current.toPoint()).normalized().adjusted(-1, -1, 1, 1));
-	m_current = point;
-	m_currentDoc = m_canvas->localToCanvas(m_current) - FPoint(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
-}
-
-void MeasurementsMode::showValues()
-{
-	double dx = m_currentDoc.x() - m_startDoc.x();
-	double dy = m_currentDoc.y() - m_startDoc.y();
-	m_palette->setValues(m_startDoc.x(), m_startDoc.y(), m_currentDoc.x(), m_currentDoc.y(), -xy2Deg(dx, dy), sqrt(dx * dx + dy * dy));
-	m_canvas->update(QRect(m_start.toPoint(), m_current.toPoint()).normalized());
-}
+}
+
+void MeasurementsMode::mouseReleaseEvent(QMouseEvent *m)
+{
+	if (m_active)
+	{
+		m->accept();
+		adjustPoint(m->globalPosition());		
+	}
+	m_active = false;
+	showValues();
+}
+
+void MeasurementsMode::mouseMoveEvent(QMouseEvent *m)
+{
+	if (m_active)
+	{
+		m->accept();
+		adjustPoint(m->globalPosition());
+		showValues();
+	}
+	else
+	{
+		FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
+		m_canvas->displayCorrectedXYHUD(m->globalPosition(), mousePointDoc.x(), mousePointDoc.y());
+	}
+}
+
+void MeasurementsMode::mousePressEvent(QMouseEvent *m)
+{
+	m->accept();
+	m_active = true;
+	adjustPoint(m->globalPosition());
+	m_start = m_current;
+	m_startDoc = m_currentDoc;
+	showValues();
+}
+
+void MeasurementsMode::adjustPoint(QPointF globalPoint)
+{
+	QPointF point = globalPoint - (m_canvas->mapToParent(QPointF(0, 0)) + m_canvas->parentWidget()->mapToGlobal(QPointF(0, 0)));
+	m_canvas->update(QRect(m_start.toPoint(), m_current.toPoint()).normalized().adjusted(-1, -1, 1, 1));
+	m_current = point;
+	m_currentDoc = m_canvas->localToCanvas(m_current) - FPoint(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
+}
+
+void MeasurementsMode::showValues()
+{
+	double dx = m_currentDoc.x() - m_startDoc.x();
+	double dy = m_currentDoc.y() - m_startDoc.y();
+	m_palette->setValues(m_startDoc.x(), m_startDoc.y(), m_currentDoc.x(), m_currentDoc.y(), -xy2Deg(dx, dy), sqrt(dx * dx + dy * dy));
+	m_canvas->update(QRect(m_start.toPoint(), m_current.toPoint()).normalized());
+}

Modified: trunk/Scribus/scribus/canvasmode_measurements.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_measurements.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_measurements.h	(original)
+++ trunk/Scribus/scribus/canvasmode_measurements.h	Thu Mar 24 23:20:19 2022
@@ -56,6 +56,7 @@
 private:
 	void adjustPoint(QPointF point);
 	void showValues();
+
 	bool m_active {false};
 	QPointF m_start;
 	QPointF m_current;

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp	Thu Mar 24 23:20:19 2022
@@ -582,10 +582,10 @@
 			bool foundP = false;
 			int seg = 0;
 			double absDist = 9999999999.9;
-			FPoint point = FPoint(0, 0);
-			FPoint normal = FPoint(0, 0);
-			FPoint tangent = FPoint(0, 0);
-			FPoint nearPoint = FPoint(0, 0);
+			FPoint point(0, 0);
+			FPoint normal(0, 0);
+			FPoint tangent(0, 0);
+			FPoint nearPoint(0, 0);
 			double nearT = 0.0;
 			QRect mpo2(0, 0, m_doc->guidesPrefs().grabRadius*3, m_doc->guidesPrefs().grabRadius*3);
 			mpo2.moveCenter(QPoint(qRound(npf2.x()), qRound(npf2.y())));
@@ -834,10 +834,10 @@
 		bool foundP = false;
 		uint seg = 0;
 		double absDist = 9999999999.9;
-		FPoint point = FPoint(0, 0);
-		FPoint normal = FPoint(0, 0);
-		FPoint tangent = FPoint(0, 0);
-		FPoint nearPoint = FPoint(0, 0);
+		FPoint point(0, 0);
+		FPoint normal(0, 0);
+		FPoint tangent(0, 0);
+		FPoint nearPoint(0, 0);
 		double nearT = 0.0;
 		QRect mpo2(0, 0, m_doc->guidesPrefs().grabRadius * 3, m_doc->guidesPrefs().grabRadius * 3);
 		mpo2.moveCenter(QPoint(qRound(npf2.x()), qRound(npf2.y())));

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Thu Mar 24 23:20:19 2022
@@ -759,7 +759,7 @@
 				QTransform p;
 				m_canvas->Transform(currItem, p);
 				QPoint mouseMoint = m->position().toPoint();
-				QRect mpo = QRect(mouseMoint.x() - m_doc->guidesPrefs().grabRadius, mouseMoint.y() - m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius * 2, m_doc->guidesPrefs().grabRadius * 2);
+				QRect mpo(mouseMoint.x() - m_doc->guidesPrefs().grabRadius, mouseMoint.y() - m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius * 2, m_doc->guidesPrefs().grabRadius * 2);
 				if (QRegion(p.map(QPolygon(QRect(-3, -3, static_cast<int>(currItem->width() + 6), static_cast<int>(currItem->height() + 6))))).contains(mpo))
 				{
 					QRect tx = p.mapRect(QRect(0, 0, static_cast<int>(currItem->width()), static_cast<int>(currItem->height())));
@@ -1811,7 +1811,7 @@
 			int en = fmt->filter.indexOf(")");
 			while (an != -1)
 			{
-				allFormats += fmt->filter.mid(an+1, en-an-1)+" ";
+				allFormats += fmt->filter.mid(an + 1, en - an - 1)+" ";
 				an = fmt->filter.indexOf("(", en);
 				en = fmt->filter.indexOf(")", an);
 			}

Modified: trunk/Scribus/scribus/canvasmode_objimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_objimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_objimport.cpp	Thu Mar 24 23:20:19 2022
@@ -142,8 +142,6 @@
 
 void CanvasMode_ObjImport::mousePressEvent(QMouseEvent *m)
 {
-// 	const double mouseX = m->globalX();
-// 	const double mouseY = m->globalY();
 	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 
 	m_canvas->PaintSizeRect(QRect());

Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp	Thu Mar 24 23:20:19 2022
@@ -67,7 +67,7 @@
 	/*p->scale(m_canvas->scale(), m_canvas->scale());
 	p->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());*/
 
-	QColor  drawColor = qApp->palette().color(QPalette::Active, QPalette::Highlight);
+	QColor  drawColor = QApplication::palette().color(QPalette::Active, QPalette::Highlight);
 	p->setRenderHint(QPainter::Antialiasing);
 	p->setBrush(Qt::NoBrush);
 	p->setPen(QPen(drawColor, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
@@ -87,7 +87,7 @@
 	p->restore();
 }
 
-void CanvasMode_Rotate::getNewItemPosition(PageItem* item, FPoint& pos, double& rotation)
+void CanvasMode_Rotate::getNewItemPosition(const PageItem* item, FPoint& pos, double& rotation)
 {
 	double newAngle = xy2Deg(m_canvasCurrCoord.x() - m_rotCenter.x(), m_canvasCurrCoord.y() - m_rotCenter.y());
 	if (m_angleConstrained)
@@ -316,7 +316,7 @@
 			m_view->startGroupTransaction(Um::Rotate, "", Um::IRotate);
 		}
 		double angle = 0;
-		double newW  = xy2Deg(mousePointDoc.x() - m_view->RCenter.x(), mousePointDoc.y() - m_view->RCenter.y()); //xy2Deg(m->x()/sc - m_view->RCenter.x(), m->y()/sc - m_view->RCenter.y());
+		double newW  = xy2Deg(mousePointDoc.x() - m_view->RCenter.x(), mousePointDoc.y() - m_view->RCenter.y());
 		if (m->modifiers() & Qt::ControlModifier)
 		{
 			newW = constrainAngle(newW, m_doc->opToolPrefs().constrain);

Modified: trunk/Scribus/scribus/canvasmode_rotate.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/canvasmode_rotate.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.h	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.h	Thu Mar 24 23:20:19 2022
@@ -57,8 +57,7 @@
 
 		void   createContextMenu(PageItem *currItem, double mx, double my);
 		void   drawItemOutlines(QPainter*);
-		void   getNewItemPosition(PageItem* item, FPoint& pos, double& rotation);
-		// 	void   setResizeCursor(int how);
+		void   getNewItemPosition(const PageItem* item, FPoint& pos, double& rotation);
 
 		FPoint m_canvasCurrCoord;
 		FPoint m_canvasPressCoord;

Modified: trunk/Scribus/scribus/fpointarray.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/fpointarray.cpp
==============================================================================
--- trunk/Scribus/scribus/fpointarray.cpp	(original)
+++ trunk/Scribus/scribus/fpointarray.cpp	Thu Mar 24 23:20:19 2022
@@ -268,26 +268,26 @@
 
 void FPointArray::setMarker()
 {
-	double maxVal = std::numeric_limits<double>::max() / 2.0;
+	constexpr double maxVal = std::numeric_limits<double>::max() / 2.0;
 	addQuadPoint(maxVal, maxVal, maxVal, maxVal, maxVal, maxVal, maxVal, maxVal);
 }
 
 bool FPointArray::isMarker(int pos) const
 {
-	double maxVal = std::numeric_limits<double>::max() / 3.0;
+	constexpr double maxVal = std::numeric_limits<double>::max() / 3.0;
 	const FPoint& p = QVector<FPoint>::at(pos);
 	return ((p.x() >= maxVal) && (p.y() >= maxVal));
 }
 
 bool FPointArray::isMarkerI(ConstIterator p) const
 {
-	double maxVal = std::numeric_limits<double>::max() / 3.0;
+	constexpr double maxVal = std::numeric_limits<double>::max() / 3.0;
 	return ((p->xp >= maxVal) && (p->yp >= maxVal));
 }
 
 bool FPointArray::isMarkerD(double x, double y) const
 {
-	double maxVal = std::numeric_limits<double>::max() / 3.0;
+	constexpr double maxVal = std::numeric_limits<double>::max() / 3.0;
 	return ((x >= maxVal) && (y >= maxVal));
 }
 
@@ -933,6 +933,7 @@
 			}
 		case 'm':
 			relative = true;
+			[[fallthrough]];
 		case 'M':
 			{
 				ptr = getCoord(ptr, tox);
@@ -946,6 +947,7 @@
 			}
 		case 'l':
 			relative = true;
+			[[fallthrough]];
 		case 'L':
 			{
 				ptr = getCoord(ptr, tox);
@@ -993,6 +995,7 @@
 			}
 		case 'c':
 			relative = true;
+			[[fallthrough]];
 		case 'C':
 			{
 				ptr = getCoord(ptr, x1);
@@ -1016,6 +1019,7 @@
 			}
 		case 's':
 			relative = true;
+			[[fallthrough]];
 		case 'S':
 			{
 				ptr = getCoord(ptr, x2);
@@ -1037,6 +1041,7 @@
 			}
 		case 'q':
 			relative = true;
+			[[fallthrough]];
 		case 'Q':
 			{
 				ptr = getCoord(ptr, x1);
@@ -1058,6 +1063,7 @@
 			}
 		case 't':
 			relative = true;
+			[[fallthrough]];
 		case 'T':
 			{
 				ptr = getCoord(ptr, tox);
@@ -1079,6 +1085,7 @@
 			}
 		case 'a':
 			relative = true;
+			[[fallthrough]];
 		case 'A':
 			{
 				bool largeArc, sweep;

Modified: trunk/Scribus/scribus/sccolorengine.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/sccolorengine.cpp
==============================================================================
--- trunk/Scribus/scribus/sccolorengine.cpp	(original)
+++ trunk/Scribus/scribus/sccolorengine.cpp	Thu Mar 24 23:20:19 2022
@@ -840,7 +840,7 @@
 	return tmp;
 }
 
-QColor ScColorEngine::getColorProof(RGBColor& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck)
+QColor ScColorEngine::getColorProof(const RGBColor& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck)
 {
 	unsigned short inC[4];
 	unsigned short outC[4];
@@ -874,7 +874,7 @@
 	return QColor(r, g, b);
 }
 
-QColor ScColorEngine::getColorProof(RGBColorF& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck)
+QColor ScColorEngine::getColorProof(const RGBColorF& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck)
 {
 	unsigned short inC[4];
 	unsigned short outC[4];
@@ -910,7 +910,7 @@
 	return QColor(r, g, b);
 }
 
-QColor ScColorEngine::getColorProof(CMYKColor& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck)
+QColor ScColorEngine::getColorProof(const CMYKColor& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck)
 {
 	int  r = 0, g = 0, b = 0;
 	unsigned short inC[4];
@@ -951,7 +951,7 @@
 	return QColor(r, g, b);
 }
 
-QColor ScColorEngine::getColorProof(CMYKColorF& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck)
+QColor ScColorEngine::getColorProof(const CMYKColorF& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck)
 {
 	int  r = 0, g = 0, b = 0;
 	unsigned short inC[4];
@@ -992,7 +992,7 @@
 	return QColor(r, g, b);
 }
 
-QColor ScColorEngine::getDisplayColor(RGBColor& rgb, const ScribusDoc* doc, bool spot)
+QColor ScColorEngine::getDisplayColor(const RGBColor& rgb, const ScribusDoc* doc, bool spot)
 {
 	unsigned short inC[4];
 	unsigned short outC[4];
@@ -1013,7 +1013,7 @@
 	return QColor(r, g, b);
 }
 
-QColor ScColorEngine::getDisplayColor(RGBColorF& rgb, const ScribusDoc* doc, bool spot)
+QColor ScColorEngine::getDisplayColor(const RGBColorF& rgb, const ScribusDoc* doc, bool spot)
 {
 	unsigned short inC[4];
 	unsigned short outC[4];
@@ -1034,7 +1034,7 @@
 	return QColor(r, g, b);
 }
 
-QColor ScColorEngine::getDisplayColor(CMYKColor& cmyk, const ScribusDoc* doc, bool spot)
+QColor ScColorEngine::getDisplayColor(const CMYKColor& cmyk, const ScribusDoc* doc, bool spot)
 {
 	int  r = 0, g = 0, b = 0;
 	unsigned short inC[4];
@@ -1060,7 +1060,7 @@
 	return QColor(r, g, b);
 }
 
-QColor ScColorEngine::getDisplayColor(CMYKColorF& cmyk, const ScribusDoc* doc, bool spot)
+QColor ScColorEngine::getDisplayColor(const CMYKColorF& cmyk, const ScribusDoc* doc, bool spot)
 {
 	int  r = 0, g = 0, b = 0;
 	unsigned short inC[4];

Modified: trunk/Scribus/scribus/sccolorengine.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/sccolorengine.h
==============================================================================
--- trunk/Scribus/scribus/sccolorengine.h	(original)
+++ trunk/Scribus/scribus/sccolorengine.h	Thu Mar 24 23:20:19 2022
@@ -87,35 +87,35 @@
 
 	/** \brief Return a proofed QColor from a rgb color.
 	* If color management is enabled, returned value use the monitor color space. */
-	static QColor getColorProof(RGBColor& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck);
+	static QColor getColorProof(const RGBColor& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck);
 
 	/** \brief Return a proofed QColor from a rgb color.
 	* If color management is enabled, returned value use the monitor color space. */
-	static QColor getColorProof(RGBColorF& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck);
+	static QColor getColorProof(const RGBColorF& rgb, const ScribusDoc* doc, bool spot, bool gamutCkeck);
 
 	/** \brief Return a proofed QColor from a cmyk color.
 	* If color management is enabled, returned value use the monitor color space. */
-	static QColor getColorProof(CMYKColor& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck);
+	static QColor getColorProof(const CMYKColor& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck);
 
 	/** \brief Return a proofed QColor from a cmyk color.
 	* If color management is enabled, returned value use the monitor color space. */
-	static QColor getColorProof(CMYKColorF& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck);
+	static QColor getColorProof(const CMYKColorF& cmyk, const ScribusDoc* doc, bool spot, bool gamutCkeck);
 
 	/** \brief Return a QColor from a rgb color using doc rgb color space as input.
 	* If color management is enabled, returned value use the monitor rgb color space. */
-	static QColor getDisplayColor(RGBColor& rgb, const ScribusDoc* doc, bool spot);
+	static QColor getDisplayColor(const RGBColor& rgb, const ScribusDoc* doc, bool spot);
 
 	/** \brief Return a QColor from a rgb color using doc rgb color space as input.
 	* If color management is enabled, returned value use the monitor rgb color space. */
-	static QColor getDisplayColor(RGBColorF& rgb, const ScribusDoc* doc, bool spot);
+	static QColor getDisplayColor(const RGBColorF& rgb, const ScribusDoc* doc, bool spot);
 
 	/** \brief Return a QColor from a cmyk color using doc cmyk color space as input.
 	* If color management is enabled, returned value use the monitor rgb color space. */
-	static QColor getDisplayColor(CMYKColor& cmyk, const ScribusDoc* doc, bool spot);
+	static QColor getDisplayColor(const CMYKColor& cmyk, const ScribusDoc* doc, bool spot);
 
 	/** \brief Return a QColor from a cmyk color using doc cmyk color space as input.
 	* If color management is enabled, returned value use the monitor rgb color space. */
-	static QColor getDisplayColor(CMYKColorF& cmyk, const ScribusDoc* doc, bool spot);
+	static QColor getDisplayColor(const CMYKColorF& cmyk, const ScribusDoc* doc, bool spot);
 
 	/** \brief Check if a color is inside document output color space gamut. */
 	static bool isOutOfGamut(const ScColor& color, const ScribusDoc* doc);

Modified: trunk/Scribus/scribus/sclayer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/sclayer.cpp
==============================================================================
--- trunk/Scribus/scribus/sclayer.cpp	(original)
+++ trunk/Scribus/scribus/sclayer.cpp	Thu Mar 24 23:20:19 2022
@@ -70,7 +70,7 @@
 		blendMode == other.blendMode;
 }
 
-int ScLayers::getMaxID()
+int ScLayers::getMaxID() const
 {
 	int maxNr = -1;
 	for (int i = 0; i < this->count(); ++i)

Modified: trunk/Scribus/scribus/sclayer.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/sclayer.h
==============================================================================
--- trunk/Scribus/scribus/sclayer.h	(original)
+++ trunk/Scribus/scribus/sclayer.h	Thu Mar 24 23:20:19 2022
@@ -43,7 +43,7 @@
 	 * @brief  Get layer max identifier
 	 * @return Layer max identifier or -1 is list is empty
 	 */
-	int getMaxID(void);
+	int getMaxID(void) const;
 
 	/**
 	 * @brief  Get bottom layer

Modified: trunk/Scribus/scribus/ui/dasheditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/ui/dasheditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/dasheditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/dasheditor.cpp	Thu Mar 24 23:20:19 2022
@@ -120,7 +120,7 @@
 	m_currentStop = -1;
 
 	m->accept();
-	qApp->setOverrideCursor(QCursor(Qt::ArrowCursor));
+	QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
 
 	for (int i = 0; i < m_stops.count(); ++i)
 	{
@@ -138,7 +138,7 @@
 void DashPreview::mouseReleaseEvent(QMouseEvent *m)
 {
 	m->accept();
-	qApp->restoreOverrideCursor();
+	QApplication::restoreOverrideCursor();
 	QPointF mousePos = m->position();
 	if ((m_mousePressed) && (m_stops.count() > 2) && (m_outside || mousePos.y() > 30))
 	{
@@ -223,7 +223,7 @@
 	}
 	if ((m_mousePressed) && (mousePos.y() < height()) && (mousePos.y() > 16) && (mousePos.x() > 9) && (mousePos.x() < width() - 9) && (m_currentStop != -1))
 	{
-		qApp->changeOverrideCursor(QCursor(Qt::SizeHorCursor));
+		QApplication::changeOverrideCursor(QCursor(Qt::SizeHorCursor));
 		if (m_currentStop > 1)
 		{
 			if (static_cast<int>(m_stops[m_currentStop - 1] + 10) + 2 >= mousePos.x())
@@ -253,7 +253,7 @@
 		emit currStep(m_stops[m_currentStop] / 10.0 - startX);
 	}
 	if ((m_mousePressed) && (m_outside || mousePos.y() > 30) && (m_currentStop >= 0) && (m_stops.count() > 2))
-		qApp->changeOverrideCursor(IconManager::instance().loadCursor("DelPoint.png", 1, 1));
+		QApplication::changeOverrideCursor(IconManager::instance().loadCursor("DelPoint.png", 1, 1));
 }
 
 void DashPreview::leaveEvent(QEvent*)
@@ -261,9 +261,9 @@
 	if (m_mousePressed)
 	{
 		if ((m_currentStop >= 0) && (m_stops.count() > 2))
-			qApp->changeOverrideCursor(IconManager::instance().loadCursor("DelPoint.png", 1, 1));
-		else
-			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+			QApplication::changeOverrideCursor(IconManager::instance().loadCursor("DelPoint.png", 1, 1));
+		else
+			QApplication::changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
 	m_outside = true;
 }

Modified: trunk/Scribus/scribus/ui/tabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25063&path=/trunk/Scribus/scribus/ui/tabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/tabruler.cpp	Thu Mar 24 23:20:19 2022
@@ -174,7 +174,7 @@
 	mousePressed = true;
 	int mPosX = m->position().x();
 	int mPosY = m->position().y();
-	qApp->setOverrideCursor(QCursor(Qt::ArrowCursor));
+	QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
 	rulerCode = 0;
 	if (haveInd)
 	{
@@ -225,7 +225,7 @@
 		emit typeChanged(tabValues[actTab].tabType);
 		emit tabMoved(tabValues[actTab].tabPosition);
 		emit fillCharChanged(tabValues[actTab].tabFillChar);
-		qApp->changeOverrideCursor(QCursor(Qt::SizeHorCursor));
+		QApplication::changeOverrideCursor(QCursor(Qt::SizeHorCursor));
 	}
 	mouseX = mPosX;
 }
@@ -233,7 +233,7 @@
 void RulerT::mouseReleaseEvent(QMouseEvent *m)
 {
 	mousePressed = false;
-	qApp->restoreOverrideCursor();
+	QApplication::restoreOverrideCursor();
 	int mPosY = m->position().y();
 	if ((mPosY < height()) && (mPosY > 0))
 	{
@@ -278,7 +278,7 @@
 	int mPosY = m->position().y();
 	if ((mousePressed) && (mPosY < height()) && (mPosY > 0) && (mPosX > 0) && (mPosX < width()))
 	{
-		qApp->changeOverrideCursor(QCursor(Qt::SizeHorCursor));
+		QApplication::changeOverrideCursor(QCursor(Qt::SizeHorCursor));
 		switch (rulerCode)
 		{
 			case 1:
@@ -350,7 +350,7 @@
 		}
 	}
 	if ((mousePressed) && ((mPosY > height()) || (mPosY < 0) || (mPosX < 0) || (mPosX > width())))
-		qApp->changeOverrideCursor(IconManager::instance().loadCursor("DelPoint.png", 1, 1));
+		QApplication::changeOverrideCursor(IconManager::instance().loadCursor("DelPoint.png", 1, 1));
 }
 
 void RulerT::leaveEvent(QEvent*)
@@ -358,9 +358,9 @@
 	if (mousePressed)
 	{
 		if (rulerCode == 3)
-			qApp->changeOverrideCursor(IconManager::instance().loadCursor("DelPoint.png", 1, 1));
+			QApplication::changeOverrideCursor(IconManager::instance().loadCursor("DelPoint.png", 1, 1));
 		else
-			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+			QApplication::changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
 }
 




More information about the scribus-commit mailing list