r20799 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Sat Jan 30 21:03:49 UTC 2016
Author: jghali
Date: Sat Jan 30 21:03:48 2016
New Revision: 20799
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20799
Log:
coverity: "array compared against 0" errors in canvasmode_*.cpp
Modified:
trunk/Scribus/scribus/canvasmode_drawbezier.cpp
trunk/Scribus/scribus/canvasmode_editarc.cpp
trunk/Scribus/scribus/canvasmode_editgradient.cpp
trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
trunk/Scribus/scribus/canvasmode_editpolygon.cpp
trunk/Scribus/scribus/canvasmode_editspiral.cpp
Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20799&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp Sat Jan 30 21:03:48 2016
@@ -157,7 +157,7 @@
if (currItem && UndoManager::undoEnabled())
{
ScItemState<PageItem*> *is = new ScItemState<PageItem*>("Create PageItem");
- is->set("CREATE_ITEM", "create_item");
+ is->set("CREATE_ITEM");
is->setItem(currItem);
//Undo target rests with the Page for object specific undo
UndoObject *target = m_doc->Pages->at(0);
Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20799&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp Sat Jan 30 21:03:48 2016
@@ -257,7 +257,7 @@
if (UndoManager::undoEnabled())
{
ScItemState<QPair<FPointArray, FPointArray> > *ss = new ScItemState<QPair<FPointArray, FPointArray> >(Um::EditArc,"",Um::IPolygon);
- ss->set("ARC","arc");
+ ss->set("ARC");
ss->set("OLD_WIDTH",item->arcWidth);
ss->set("NEW_WIDTH",width);
ss->set("OLD_XPOS",oldX);
Modified: trunk/Scribus/scribus/canvasmode_editgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20799&path=/trunk/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.cpp Sat Jan 30 21:03:48 2016
@@ -934,7 +934,7 @@
if(m_gradientPoint != noPointDefined && UndoManager::undoEnabled()){
QList<FPoint> tmp;
ScItemState<QList<FPoint> > *is = new ScItemState<QList<FPoint> >(Um::GradPos + "i");
- is->set("GRAD_POS","grad_pos");
+ is->set("GRAD_POS");
is->set("OLDSTARTX",OldGrStartX);
is->set("STARTX",currItem->gradientStartX());
is->set("OLDSTARTY",OldGrStartY);
Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20799&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp Sat Jan 30 21:03:48 2016
@@ -975,7 +975,7 @@
if (currItem->selectedMeshPointX >=0 && currItem->selectedMeshPointY >=0 && UndoManager::undoEnabled())
{
ScItemState<QPair<meshPoint,meshPoint> > *ss = new ScItemState<QPair<meshPoint,meshPoint> >(Um::GradPos);
- ss->set("MOVE_MESH_PATCH","move_mesh_patch");
+ ss->set("MOVE_MESH_PATCH");
ss->set("ARRAY",true);
ss->set("X",currItem->selectedMeshPointX);
ss->set("Y",currItem->selectedMeshPointY);
Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20799&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp Sat Jan 30 21:03:48 2016
@@ -974,7 +974,7 @@
if (m_view->editStrokeGradient != 11 && m_currItem->selectedMeshPointX >=0 && m_patchPoint != noPointDefined && UndoManager::undoEnabled())
{
ScItemState<QPair<meshPoint,meshPoint> > *ss = new ScItemState<QPair<meshPoint,meshPoint> >(Um::GradPos);
- ss->set("MOVE_MESH_PATCH","move_mesh_patch");
+ ss->set("MOVE_MESH_PATCH");
ss->set("X",m_currItem->selectedMeshPointX);
ss->set("Y",m_currItem->selectedMeshPointY);
ss->set("ARRAY",false);
Modified: trunk/Scribus/scribus/canvasmode_editpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20799&path=/trunk/Scribus/scribus/canvasmode_editpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editpolygon.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editpolygon.cpp Sat Jan 30 21:03:48 2016
@@ -253,7 +253,7 @@
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::EditPolygon,"",Um::IPolygon);
- ss->set("POLYGON","polygon");
+ ss->set("POLYGON");
ss->set("NEW_CORNER",polyC);
ss->set("NEW_USEFACTOR",polyUseCF);
ss->set("NEW_FACTOR",m_polyFactor);
Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20799&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp Sat Jan 30 21:03:48 2016
@@ -230,7 +230,7 @@
PageItem *currItem = m_doc->m_Selection->itemAt(0);
PageItem_Spiral *item = currItem->asSpiral();
SimpleState *ss = new SimpleState(Um::EditSpiral, "", Um::IPolygon);
- ss->set("SPIRAL","spiral");
+ ss->set("SPIRAL");
ss->set("OLD_START",item->spiralStartAngle);
ss->set("OLD_END",item->spiralEndAngle);
ss->set("OLD_FACTOR",item->spiralFactor);
More information about the scribus-commit
mailing list