View Issue Details

IDProjectCategoryView StatusLast Update
0017193ScribusGeneralpublic2024-09-16 20:54
Reporterale Assigned Toale  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.7.0.svn 
Fixed in Version1.6.2.svn 
Summary0017193: SVGPlug::parseColor should return fNam
Descriptionit's not necessary to define ret
TagsNo tags attached.
PatchYes

Activities

ale

2024-04-09 14:54

manager  

no-None-return.diff (807 bytes)   
diff --git a/scribus/plugins/import/svg/svgplugin.cpp b/scribus/plugins/import/svg/svgplugin.cpp
index fa729ac5d..f25177c5c 100644
--- a/scribus/plugins/import/svg/svgplugin.cpp
+++ b/scribus/plugins/import/svg/svgplugin.cpp
@@ -2350,7 +2350,6 @@ const char * SVGPlug::getCoord(const char *ptr, double &number) const
 QString SVGPlug::parseColor(const QString &s)
 {
 	QColor c;
-	QString ret = CommonStrings::None;
 	if (s.length() > 11) // icc-color()
 	{
 		int iccColorIndex  = s.indexOf("icc-color");
@@ -2396,8 +2395,7 @@ QString SVGPlug::parseColor(const QString &s)
 	QString fNam = m_Doc->PageColors.tryAddColor(newColorName, tmp);
 	if (fNam == newColorName)
 		importedColors.append(newColorName);
-	ret = fNam;
-	return ret;
+	return fNam;
 }
 
 QString SVGPlug::parseIccColor(const QString &s)
no-None-return.diff (807 bytes)   

jghali

2024-04-10 20:50

administrator   ~0051091

Applied, thanks! I also took the opportunity to switch fNam variable name to English.

Issue History

Date Modified Username Field Change
2024-04-09 14:54 ale New Issue
2024-04-09 14:54 ale File Added: no-None-return.diff
2024-04-10 20:45 jghali Summary [PATCH] SVGPlug::parseColor always reteturns fNam => [PATCH] SVGPlug::parseColor always returns fNam
2024-04-10 20:49 jghali Summary [PATCH] SVGPlug::parseColor always returns fNam => SVGPlug::parseColor should return fNam
2024-04-10 20:50 jghali Assigned To => jghali
2024-04-10 20:50 jghali Status new => resolved
2024-04-10 20:50 jghali Resolution open => fixed
2024-04-10 20:50 jghali Fixed in Version => 1.6.2.svn
2024-04-10 20:50 jghali Note Added: 0051091
2024-04-10 20:50 jghali Assigned To jghali => ale
2024-09-16 20:54 cbradney Status resolved => closed