r20807 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Sat Jan 30 21:32:46 UTC 2016
Author: jghali
Date: Sat Jan 30 21:32:46 2016
New Revision: 20807
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20807
Log:
coverity: "array compared against 0" errors
Modified:
trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
trunk/Scribus/scribus/ui/loremipsum.cpp
trunk/Scribus/scribus/ui/propertiespalette.cpp
trunk/Scribus/scribus/ui/propertiespalette_image.cpp
Modified: trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20807&path=/trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp Sat Jan 30 21:32:46 2016
@@ -145,7 +145,7 @@
if (UndoManager::undoEnabled())
{
ScItemState<QPair<FPointArray,FPointArray> > *is = new ScItemState<QPair<FPointArray,FPointArray> >(Um::ConnectPath);
- is->set("CONNECT_PATH","connect_path");
+ is->set("CONNECT_PATH");
is->set("OLDX", originalXPos);
is->set("OLDY", originalYPos);
is->set("NEWX", m_item1->xPos());
Modified: trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20807&path=/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp Sat Jan 30 21:32:46 2016
@@ -163,7 +163,7 @@
if (UndoManager::undoEnabled())
{
ScItemState<PageItem*> *is = new ScItemState<PageItem*>("Create PageItem");
- is->set("CREATE_ITEM", "create_item");
+ is->set("CREATE_ITEM");
is->setItem(newItem);
UndoObject *target = currDoc->Pages->at(Item1->OwnPage);
undoManager->action(target, is);
@@ -187,7 +187,7 @@
if (UndoManager::undoEnabled())
{
ScItemState<PageItem*> *is = new ScItemState<PageItem*>("Create PageItem");
- is->set("CREATE_ITEM", "create_item");
+ is->set("CREATE_ITEM");
is->setItem(newItem);
UndoObject *target = currDoc->Pages->at(Item1->OwnPage);
undoManager->action(target, is);
@@ -229,7 +229,7 @@
if (UndoManager::undoEnabled())
{
state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);
- state->set("PATH_OPERATION", "path_operation");
+ state->set("PATH_OPERATION");
state->set("PATH_OP_OLD_CLIPEDITED", currItem->ClipEdited);
state->set("PATH_OP_OLD_FRAMETYPE", currItem->FrameType);
state->set("PATH_OP_OLD_OLDB2", currItem->OldB2);
@@ -280,7 +280,7 @@
if (UndoManager::undoEnabled())
{
state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);
- state->set("PATH_OPERATION", "path_operation");
+ state->set("PATH_OPERATION");
state->set("PATH_OP_OLD_CLIPEDITED", Item1->ClipEdited);
state->set("PATH_OP_OLD_FRAMETYPE", Item1->FrameType);
state->set("PATH_OP_OLD_OLDB2", Item1->OldB2);
@@ -321,7 +321,7 @@
if (UndoManager::undoEnabled())
{
state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);
- state->set("PATH_OPERATION", "path_operation");
+ state->set("PATH_OPERATION");
state->set("PATH_OP_OLD_CLIPEDITED", Item2->ClipEdited);
state->set("PATH_OP_OLD_FRAMETYPE", Item2->FrameType);
state->set("PATH_OP_OLD_OLDB2", Item2->OldB2);
Modified: trunk/Scribus/scribus/ui/loremipsum.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20807&path=/trunk/Scribus/scribus/ui/loremipsum.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.cpp (original)
+++ trunk/Scribus/scribus/ui/loremipsum.cpp Sat Jan 30 21:32:46 2016
@@ -326,7 +326,7 @@
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::AddLoremIpsum,"",Um::ICreate);
- ss->set("LOREM_FRAMETEXT", "lorem_frametext");
+ ss->set("LOREM_FRAMETEXT");
ss->set("ETEA", QString("insert_frametext"));
ss->set("TEXT_STR",sampleText);
ss->set("START", i2->itemText.length());
Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20807&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Sat Jan 30 21:32:46 2016
@@ -727,7 +727,7 @@
if (m_item->gradientType() == 13 && UndoManager::undoEnabled())
{
SimpleState *ss= new SimpleState("Refresh");
- ss->set("UNDO_UPDATE_CONICAL","undo_update_conical");
+ ss->set("UNDO_UPDATE_CONICAL");
undoManager->action(m_item,ss);
}
m_item->setGradientStartX(x1 / m_unitRatio);
@@ -747,7 +747,7 @@
{
m_item->createConicalMesh();
SimpleState *ss= new SimpleState("Refresh");
- ss->set("REDO_UPDATE_CONICAL","redo_update_conical");
+ ss->set("REDO_UPDATE_CONICAL");
undoManager->action(m_item,ss);
}
m_item->update();
Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20807&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp Sat Jan 30 21:32:46 2016
@@ -749,9 +749,9 @@
if(UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::PageNmbr.arg(static_cast<int>(imagePageNumber->value())),"",Um::IImageFrame);
- ss->set("IMAGE_NBR","image_nbr");
- ss->set("OLD",m_item->pixm.imgInfo.actualPageNumber);
- ss->set("NEW",imagePageNumber->value());
+ ss->set("IMAGE_NBR");
+ ss->set("OLD", m_item->pixm.imgInfo.actualPageNumber);
+ ss->set("NEW", imagePageNumber->value());
UndoManager::instance()->action(m_item,ss);
}
m_item->pixm.imgInfo.actualPageNumber = static_cast<int>(imagePageNumber->value());
More information about the scribus-commit
mailing list