r22371 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Mon Feb 5 17:27:03 UTC 2018
Author: jghali
Date: Mon Feb 5 17:27:03 2018
New Revision: 22371
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22371
Log:
fix a few signed/unsigned comparison warnings
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/undomanager.cpp
trunk/Scribus/scribus/undomanager.h
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22371&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Mon Feb 5 17:27:03 2018
@@ -7948,15 +7948,15 @@
if (selectedItemCount > 1 && UndoManager::undoEnabled())
activeTransaction = m_undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::SetLineColor, farbe, Um::IFill);
- PageItem *i;
- for (uint a = 0; a < selectedItemCount; ++a)
- {
- i = m_Selection->itemAt(a);
- if ((i->asLine()) && (farbe == CommonStrings::None))
+ PageItem *currItem;
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ currItem = m_Selection->itemAt(i);
+ if ((currItem->asLine()) && (farbe == CommonStrings::None))
continue;
- i->setLineColor(farbe);
- i->update();
+ currItem->setLineColor(farbe);
+ currItem->update();
}
if (activeTransaction)
activeTransaction.commit();
@@ -8094,9 +8094,9 @@
activeTransaction = m_undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::SetFill, farbe, Um::IFill);
PageItem *currItem;
- for (uint a = 0; a < selectedItemCount; ++a)
- {
- currItem = m_Selection->itemAt(a);
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ currItem = m_Selection->itemAt(i);
currItem->setFillColor(farbe);
currItem->update();
}
@@ -8238,9 +8238,9 @@
PageItem *currItem;
if (UndoManager::undoEnabled())
trans = m_undoManager->beginTransaction(Um::Selection,Um::IPolygon,Um::SetFill,"",Um::IFill);
- for (uint a = 0; a < selectedItemCount; ++a)
- {
- currItem = m_Selection->itemAt(a);
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ currItem = m_Selection->itemAt(i);
currItem->setGradientType(typ);
switch (currItem->gradientType())
{
@@ -10630,10 +10630,10 @@
else
activeTransaction = m_undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::SizeLock, 0, Um::ILock);
}
- for (uint a = 0; a < selectedItemCount; ++a)
- {
- m_Selection->itemAt(a)->toggleSizeLock();
- m_Selection->itemAt(a)->update();
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ m_Selection->itemAt(i)->toggleSizeLock();
+ m_Selection->itemAt(i)->update();
}
if (activeTransaction)
activeTransaction.commit();
@@ -11458,7 +11458,7 @@
Um::Delete, tooltip, Um::IDelete);
selectedItemCount = delItems.count();
- for (uint de = 0; de < selectedItemCount; ++de)
+ for (int de = 0; de < selectedItemCount; ++de)
{
currItem = delItems.at(selectedItemCount - (de + 1));
itemList = GroupOfItem(Items, currItem);
@@ -11745,7 +11745,7 @@
int selectedItemCount = m_Selection->count();
if (selectedItemCount == 0)
return;
- for (uint i = 0; i < selectedItemCount; ++i)
+ for (int i = 0; i < selectedItemCount; ++i)
{
PageItem *currItem = m_Selection->itemAt(i);
docHyphenator->slotDeHyphenate(currItem);
@@ -11766,9 +11766,9 @@
QString tooltip = Um::ItemsInvolved + "\n";
if (selectedItemCount > Um::ItemsInvolvedLimit)
tooltip = Um::ItemsInvolved2 + "\n";
- for (uint a = 0; a < selectedItemCount; ++a)
- {
- PageItem *currItem = m_Selection->itemAt(a);
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ PageItem *currItem = m_Selection->itemAt(i);
currItem->setLayer(layerID);
if (selectedItemCount <= Um::ItemsInvolvedLimit)
tooltip += "\t" + currItem->getUName() + "\n";
@@ -11805,7 +11805,7 @@
{
Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
assert(itemSelection!=0);
- uint selectedItemCount=itemSelection->count();
+ int selectedItemCount = itemSelection->count();
if (selectedItemCount != 0)
{
UndoTransaction activeTransaction;
@@ -11815,9 +11815,9 @@
QString tooltip = Um::ItemsInvolved + "\n";
if (selectedItemCount > Um::ItemsInvolvedLimit)
tooltip = Um::ItemsInvolved2 + "\n";
- for (uint a = 0; a < selectedItemCount; ++a)
- {
- PageItem *currItem = itemSelection->itemAt(a);
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ PageItem *currItem = itemSelection->itemAt(i);
currItem->setImageXYOffset(x, y);
if (currItem->imageClip.size() != 0)
{
@@ -11849,7 +11849,7 @@
{
Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
assert(itemSelection!=0);
- uint selectedItemCount=itemSelection->count();
+ int selectedItemCount = itemSelection->count();
if (selectedItemCount != 0)
{
UndoTransaction activeTransaction;
@@ -12048,7 +12048,7 @@
m_alignTransaction = m_undoManager->beginTransaction(Um::Selection, 0, Um::AlignDistribute, targetTooltip, Um::IAlignDistribute);
if (oneLocked && (t == 0))
{
- for (uint i = 0; i < alignObjectsCount; ++i)
+ for (int i = 0; i < alignObjectsCount; ++i)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->setLocked(false);
@@ -14994,15 +14994,15 @@
activeTransaction = m_undoManager->beginTransaction(Um::Selection, Um::IGroup, Um::Group, "", Um::IGroup);
QList<PageItem*> selectedItems = itemSelection->items();
qStableSort(selectedItems.begin(), selectedItems.end(), compareItemLevel);
- uint selectedItemCount = selectedItems.count();
+ int selectedItemCount = selectedItems.count();
QString tooltip = Um::ItemsInvolved + "\n";
if (selectedItemCount > Um::ItemsInvolvedLimit)
tooltip = Um::ItemsInvolved2 + "\n";
if (changeLock)
{
- for (uint c=0; c < selectedItemCount; ++c)
- {
- currItem = selectedItems.at(c);
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ currItem = selectedItems.at(i);
currItem->setLocked(lock);
if (selectedItemCount <= Um::ItemsInvolvedLimit)
tooltip += "\t" + currItem->getUName() + "\n";
@@ -15010,9 +15010,9 @@
}
itemSelection->getVisualGroupRect(&x, &y, &w, &h);
int lowestItem = std::numeric_limits<int>::max();
- for (uint a=0; a < selectedItemCount; ++a)
- {
- currItem = selectedItems.at(a);
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ currItem = selectedItems.at(i);
currItem->gXpos = currItem->xPos() - x;
currItem->gYpos = currItem->yPos() - y;
currItem->gWidth = w;
@@ -15023,9 +15023,9 @@
double miny = std::numeric_limits<double>::max();
double maxx = -std::numeric_limits<double>::max();
double maxy = -std::numeric_limits<double>::max();
- for (uint ep = 0; ep < selectedItemCount; ++ep)
- {
- PageItem* currItem = selectedItems.at(ep);
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ PageItem* currItem = selectedItems.at(i);
double x1, x2, y1, y2;
currItem->getVisualBoundingRect(&x1, &y1, &x2, &y2);
minx = qMin(minx, x1);
@@ -15047,9 +15047,9 @@
groupItem->groupHeight = gh;
groupItem->LayerID = objectsLayer;
m_undoManager->setUndoEnabled(true);
- for (uint c = 0; c < selectedItemCount; ++c)
- {
- currItem = selectedItems.at(c);
+ for (int i = 0; i < selectedItemCount; ++i)
+ {
+ currItem = selectedItems.at(i);
int d = Items->indexOf(currItem);
groupItem->groupItemList.append(Items->takeAt(d));
currItem->Parent = groupItem;
Modified: trunk/Scribus/scribus/undomanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22371&path=/trunk/Scribus/scribus/undomanager.cpp
==============================================================================
--- trunk/Scribus/scribus/undomanager.cpp (original)
+++ trunk/Scribus/scribus/undomanager.cpp Mon Feb 5 17:27:03 2018
@@ -901,7 +901,7 @@
QString UndoManager::AlignDistribute = "";
QString UndoManager::ItemsInvolved = "";
QString UndoManager::ItemsInvolved2 = "";
-uint UndoManager::ItemsInvolvedLimit = 20;
+int UndoManager::ItemsInvolvedLimit = 20;
QString UndoManager::Cancel = "";
QString UndoManager::TextFrameDist = "";
QString UndoManager::SetFill = "";
Modified: trunk/Scribus/scribus/undomanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22371&path=/trunk/Scribus/scribus/undomanager.h
==============================================================================
--- trunk/Scribus/scribus/undomanager.h (original)
+++ trunk/Scribus/scribus/undomanager.h Mon Feb 5 17:27:03 2018
@@ -393,7 +393,7 @@
static QString AlignDistribute;
static QString ItemsInvolved;
static QString ItemsInvolved2;
- static uint ItemsInvolvedLimit;
+ static int ItemsInvolvedLimit;
static QString Cancel;
static QString SetFill;
static QString ColorFromTo;
More information about the scribus-commit
mailing list