r19694 by jghali - refactoring of ShadeButton::setValue()

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 27 21:08:35 UTC 2014


Author: jghali
Date: Sat Dec 27 21:08:35 2014
New Revision: 19694

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19694
Log:
refactoring of ShadeButton::setValue()

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

Modified: trunk/Scribus/scribus/ui/shadebutton.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19694&path=/trunk/Scribus/scribus/ui/shadebutton.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/shadebutton.cpp (original)
+++ trunk/Scribus/scribus/ui/shadebutton.cpp Sat Dec 27 21:08:35 2014
@@ -71,14 +71,15 @@
 
 void ShadeButton::setValue(int val)
 {
-	for (int a = 0; a < FillSh->actions().count(); ++a)
+	QList<QAction*> fillActions = FillSh->actions();
+	for (int a = 0; a < fillActions.count(); ++a)
 	{
-		FillSh->actions()[a]->setChecked(false);
+		fillActions[a]->setChecked(false);
 	}
 	if ((val % 10) == 0)
-		FillSh->actions()[val/10+1]->setChecked(true);
+		fillActions[val / 10 + 1]->setChecked(true);
 	else
-		FillSh->actions()[0]->setChecked(true);
+		fillActions[0]->setChecked(true);
 	setText(QString::number(val)+" %");
 }
 




More information about the scribus-commit mailing list