r24143 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 31 23:54:19 UTC 2020


Author: jghali
Date: Sat Oct 31 23:54:19 2020
New Revision: 24143

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24143
Log: (empty)

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
    trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdutil.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24143&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp	Sat Oct 31 23:54:19 2020
@@ -64,10 +64,10 @@
 {
 	if (!Name.isEmpty())
 	{
-		for (int a = 0; a < ScCore->primaryMainWindow()->doc->Items->count(); a++)
+		for (int i = 0; i < ScCore->primaryMainWindow()->doc->Items->count(); i++)
 		{
-			if (ScCore->primaryMainWindow()->doc->Items->at(a)->itemName() == Name)
-				return ScCore->primaryMainWindow()->doc->Items->at(a);
+			if (ScCore->primaryMainWindow()->doc->Items->at(i)->itemName() == Name)
+				return ScCore->primaryMainWindow()->doc->Items->at(i);
 		}
 	}
 	else

Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdutil.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24143&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdutil.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdutil.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdutil.cpp	Sat Oct 31 23:54:19 2020
@@ -64,10 +64,10 @@
 {
 	if (!Name.isEmpty())
 	{
-		for (int a = 0; a < ScCore->primaryMainWindow()->doc->Items->count(); a++)
+		for (int i = 0; i < ScCore->primaryMainWindow()->doc->Items->count(); i++)
 		{
-			if (ScCore->primaryMainWindow()->doc->Items->at(a)->itemName() == Name)
-				return ScCore->primaryMainWindow()->doc->Items->at(a);
+			if (ScCore->primaryMainWindow()->doc->Items->at(i)->itemName() == Name)
+				return ScCore->primaryMainWindow()->doc->Items->at(i);
 		}
 	}
 	else
@@ -118,9 +118,9 @@
 		PyErr_SetString(PyExc_ValueError, QString("Cannot accept empty name for pageitem").toLocal8Bit().constData());
 		return nullptr;
 	}
-	for (int i = 0; i<ScCore->primaryMainWindow()->doc->Items->count(); i++)
-	{
-		if (name==ScCore->primaryMainWindow()->doc->Items->at(i)->itemName())
+	for (int i = 0; i < ScCore->primaryMainWindow()->doc->Items->count(); i++)
+	{
+		if (name == ScCore->primaryMainWindow()->doc->Items->at(i)->itemName())
 			return ScCore->primaryMainWindow()->doc->Items->at(i);
 	} // for items
 	PyErr_SetString(NoValidObjectError, QString("Object not found").toLocal8Bit().constData());
@@ -137,9 +137,9 @@
 {
 	if (name.length() == 0)
 		return false;
-	for (int i = 0; i<ScCore->primaryMainWindow()->doc->Items->count(); i++)
-	{
-		if (name==ScCore->primaryMainWindow()->doc->Items->at(i)->itemName())
+	for (int i = 0; i < ScCore->primaryMainWindow()->doc->Items->count(); i++)
+	{
+		if (name == ScCore->primaryMainWindow()->doc->Items->at(i)->itemName())
 			return true;
 	} // for items
 	return false;




More information about the scribus-commit mailing list