r24574 by jghali - Code style fixes

scribus-commit scribus-commit at lists.scribus.net
Fri Mar 19 22:58:28 UTC 2021


Author: jghali
Date: Fri Mar 19 22:58:28 2021
New Revision: 24574

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

Modified:
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24574&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Fri Mar 19 22:58:28 2021
@@ -776,7 +776,7 @@
 	m_doc->m_Selection->delaySignalsOn();
 	for (int i = m_doc->Items->count() - 1; i >= 0 ; --i)
 	{
-		if (m_doc->Items->at(i)->m_layerID==m_doc->activeLayer())
+		if (m_doc->Items->at(i)->m_layerID == m_doc->activeLayer())
 		{
 			if (m_canvas->frameHitTest(dropPosDocQ, m_doc->Items->at(i)) >= Canvas::INSIDE)
 			{
@@ -1204,7 +1204,7 @@
 					}
 					re = pmen->actions().indexOf(pmen->exec(QCursor::pos()));
 					delete pmen;
-					pmen=nullptr;
+					pmen = nullptr;
 				}
 				else
 					re = 1;
@@ -1223,14 +1223,14 @@
 					}
 					Selection tmpSelection(this, false);
 					tmpSelection.copy(*m_doc->m_Selection, true);
-					for (int dre=0; dre<m_doc->DragElements.count(); ++dre)
+					for (int i = 0; i < m_doc->DragElements.count(); ++i)
 					{
-						tmpSelection.addItem(m_doc->DragElements[dre], true);
+						tmpSelection.addItem(m_doc->DragElements[i], true);
 					}
 					m_doc->m_Selection->copy(tmpSelection, false);
 					PageItem* bb;
 					int fin;
-					for (int i=0; i<m_doc->DragElements.count(); ++i)
+					for (int i = 0; i < m_doc->DragElements.count(); ++i)
 					{
 						bb = pasted.at(i);
 						currItem = m_doc->m_Selection->itemAt(i);
@@ -1299,9 +1299,9 @@
 			m_doc->ApplyGuides(&nx, &ny,true);
 			m_doc->moveGroup(nx - (gx + gw), ny - (gy + gh));
 			m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
-			for (int a = 0; a < m_doc->m_Selection->count(); ++a)
+			for (int i = 0; i < m_doc->m_Selection->count(); ++i)
 			{
-				PageItem *currItem = m_doc->m_Selection->itemAt(a);
+				PageItem *currItem = m_doc->m_Selection->itemAt(i);
 				currItem->m_layerID = m_doc->activeLayer();
 				currItem->gXpos = currItem->xPos() - gx;
 				currItem->gYpos = currItem->yPos() - gy;
@@ -1337,8 +1337,8 @@
 	}
 	if (!m_doc->masterPageMode())
 	{
-		int docPagesCount=m_doc->Pages->count();
-		int docCurrPageNo=m_doc->currentPageNumber();
+		int docPagesCount = m_doc->Pages->count();
+		int docCurrPageNo = m_doc->currentPageNumber();
 		for (int i = 0; i < docPagesCount; ++i)
 		{
 			double x = m_doc->Pages->at(i)->xOffset();
@@ -1416,9 +1416,9 @@
 	{
 		an = Start.y() > End.y() ? End : Start;
 		en = an == End ? Start : End;
-		for (int a=an.y(); a<en.y(); ++a)
-		{
-			if (MArea.contains(an.x(), a))
+		for (int i = an.y(); i < en.y(); ++i)
+		{
+			if (MArea.contains(an.x(), i))
 				return true;
 		}
 	}
@@ -1426,9 +1426,9 @@
 	{
 		an = Start.x() > End.x() ? End : Start;
 		en = an == End ? Start : End;
-		for (int a=an.x(); a<en.x(); ++a)
-		{
-			if (MArea.contains(a, an.y()))
+		for (int i = an.x(); i < en.x(); ++i)
+		{
+			if (MArea.contains(i, an.y()))
 				return true;
 		}
 	}
@@ -1437,9 +1437,9 @@
 		an = Start.x() > End.x() ? End : Start;
 		en = an == End ? Start : End;
 		double stg = (en.y() - an.y()) / static_cast<double>((en.x() - an.x()));
-		for (int a = an.x(); a < en.x(); ++a)
-		{
-			if (MArea.contains(a, an.y()+qRound((a-an.x())*stg)))
+		for (int i = an.x(); i < en.x(); ++i)
+		{
+			if (MArea.contains(i, an.y() + qRound((i - an.x()) * stg)))
 				return true;
 		}
 	}
@@ -1448,9 +1448,9 @@
 		an = Start.y() > End.y() ? End : Start;
 		en = an == End ? Start : End;
 		double stg = (en.x() - an.x()) / static_cast<double>((en.y() - an.y()));
-		for (int a = an.y(); a < en.y(); ++a)
-		{
-			if (MArea.contains(an.x()+qRound((a-an.y())*stg), a))
+		for (int i = an.y(); i < en.y(); ++i)
+		{
+			if (MArea.contains(an.x() + qRound((i - an.y()) * stg), i))
 				return true;
 		}
 	}




More information about the scribus-commit mailing list