r24910 by jghali - Qt6: code style fixes

scribus-commit scribus-commit at lists.scribus.net
Fri Feb 4 23:33:24 UTC 2022


Author: jghali
Date: Fri Feb  4 23:33:24 2022
New Revision: 24910

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

Modified:
    trunk/Scribus/scribus/ui/hruler.cpp

Modified: trunk/Scribus/scribus/ui/hruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24910&path=/trunk/Scribus/scribus/ui/hruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/hruler.cpp	Fri Feb  4 23:33:24 2022
@@ -315,21 +315,21 @@
 		return;
 	if (m_textEditMode)
 	{
+		int colStart, colEnd;
 		double colWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
-		int ColEnd, ColStart;
 		double oldInd;
 		if (m_rulerCode == rc_leftFrameDist || m_rulerCode == rc_rightFrameDist)
 		{
-			ColStart = 0; //textPosToLocal(0);
-			ColEnd   = width(); //textPosToLocal(textWidth());
+			colStart = 0; //textPosToLocal(0);
+			colEnd   = width(); //textPosToLocal(textWidth());
 		}
 		else
 		{
-			ColStart = textPosToLocal((colWidth + m_colGap) * (m_currCol- 1));
-			ColEnd   = textPosToLocal((colWidth + m_colGap) * (m_currCol- 1) + colWidth);
+			colStart = textPosToLocal((colWidth + m_colGap) * (m_currCol- 1));
+			colEnd   = textPosToLocal((colWidth + m_colGap) * (m_currCol- 1) + colWidth);
 		}
 		QPointF mousePos = m->position();
-		if ((m_mousePressed) && (mousePos.y() < height()) && (mousePos.y() > 0) && (mousePos.x() > ColStart - m_doc->guidesPrefs().grabRadius) && (mousePos.x() < ColEnd + m_doc->guidesPrefs().grabRadius))
+		if ((m_mousePressed) && (mousePos.y() < height()) && (mousePos.y() > 0) && (mousePos.x() > colStart - m_doc->guidesPrefs().grabRadius) && (mousePos.x() < colEnd + m_doc->guidesPrefs().grabRadius))
 		{
 			qApp->changeOverrideCursor(QCursor(Qt::SizeHorCursor));
 			double toplimit = textWidth() + m_distRight - (m_colGap * (m_cols - 1)) - 1;
@@ -399,7 +399,7 @@
 			m_mouseX = mousePos.x();
 			return;
 		}
-		if ((!m_mousePressed) && (m->y() < height()) && (m->y() > 0) && (m->x() > ColStart - 2*m_doc->guidesPrefs().grabRadius) && (m->x() < ColEnd + 2*m_doc->guidesPrefs().grabRadius))
+		if ((!m_mousePressed) && (m->y() < height()) && (m->y() > 0) && (m->x() > colStart - 2*m_doc->guidesPrefs().grabRadius) && (m->x() < colEnd + 2*m_doc->guidesPrefs().grabRadius))
 		{
 			setCursor(IconManager::instance().loadCursor("tab.png", 3));
 			switch (findRulerHandle(m->pos(), m_doc->guidesPrefs().grabRadius))




More information about the scribus-commit mailing list