r17294 by jghali - more code cleanups
scribus-commit
scribus-commit at lists.scribus.net
Sat Feb 11 18:24:23 UTC 2012
Author: jghali
Date: Sat Feb 11 18:24:23 2012
New Revision: 17294
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17294
Log:
more code cleanups
Modified:
branches/Version14x/Scribus/scribus/pdflib_core.cpp
branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp
branches/Version14x/Scribus/scribus/scribusXml.cpp
branches/Version14x/Scribus/scribus/shortcutwidget.cpp
branches/Version14x/Scribus/scribus/tabkeyboardshortcutswidget.cpp
Modified: branches/Version14x/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17294&path=/branches/Version14x/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pdflib_core.cpp (original)
+++ branches/Version14x/Scribus/scribus/pdflib_core.cpp Sat Feb 11 18:24:23 2012
@@ -7584,7 +7584,7 @@
PutDoc(" /F "+QString::number(threadObj + 1)+" 0 R\n");
PutDoc(">>\nendobj\n");
Beads[0].Prev = fir + Beads.count()-1;
- Beads[Beads.count()-1].Next = fir;
+ Beads.last().Next = fir;
}
for (int beac = 0; beac < Beads.count(); ++beac)
{
Modified: branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17294&path=/branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp Sat Feb 11 18:24:23 2012
@@ -1157,7 +1157,7 @@
}
else
{
- ite = m_Doc->Items->at(m_Doc->Items->count()-1);
+ ite = m_Doc->Items->last();
ite->PoLine.setMarker();
Coords.translate(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
ite->PoLine.putPoints(ite->PoLine.size(), Coords.size(), Coords);
@@ -1178,7 +1178,7 @@
else if (command == "*U")
{
WasU = false;
- ite = m_Doc->Items->at(m_Doc->Items->count()-1);
+ ite = m_Doc->Items->last();
FPoint wh = getMaxClipF(&ite->PoLine);
ite->setWidthHeight(wh.x(),wh.y());
m_Doc->AdjustItemSize(ite);
@@ -1328,7 +1328,7 @@
if (itemRendered)
{
gradientMode = false;
- ite = m_Doc->Items->at(m_Doc->Items->count()-1);
+ ite = m_Doc->Items->last();
ite->fill_gradient = m_gradients[currentGradientName];
if (ite->fill_gradient.type() == 0)
ite->GrType = 6;
@@ -1969,7 +1969,7 @@
{
Cdata = da[a];
QStringList da2 = Cdata.split(" ", QString::SkipEmptyParts);
- command = da2[da2.count()-1];
+ command = da2.last();
if (command == "Bd")
{
QString tmpS = Cdata;
@@ -2144,7 +2144,7 @@
QString Cdata = "";
QStringList da;
getCommands(cumulated, da);
- Cdata = da[da.count()-1];
+ Cdata = da.last();
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
gVals >> m1 >> m2 >> m3 >> m4 >> m5 >> m6 >> x1 >> y1 >> x2 >> y2 >> w >> h >> bits >> type >> alpha >> dummy >> bin;
// qDebug() << QString("Matrix: %1 %2 %3 %4 %5 %6").arg(m1).arg(m2).arg(m3).arg(m4).arg(m5).arg(m6);
Modified: branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17294&path=/branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp Sat Feb 11 18:24:23 2012
@@ -612,7 +612,7 @@
neu->Clip = FlattenPath(neu->PoLine, neu->Segments);
neu->Groups.push(m_Doc->GroupCounter);
neu->isGroupControl = true;
- neu->groupsLastItem = cElements.at(cElements.count()-1);
+ neu->groupsLastItem = cElements.last();
if( !e.attribute("id").isEmpty() )
neu->setItemName(e.attribute("id"));
else
Modified: branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17294&path=/branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/svg/svgplugin.cpp Sat Feb 11 18:24:23 2012
@@ -1009,7 +1009,7 @@
neu->Clip = FlattenPath(neu->PoLine, neu->Segments);
neu->Groups.push(m_Doc->GroupCounter);
neu->isGroupControl = true;
- neu->groupsLastItem = gElements.at(gElements.count()-1);
+ neu->groupsLastItem = gElements.last();
if( !e.attribute("id").isEmpty() )
neu->setItemName(e.attribute("id"));
else
Modified: branches/Version14x/Scribus/scribus/scribusXml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17294&path=/branches/Version14x/Scribus/scribus/scribusXml.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusXml.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribusXml.cpp Sat Feb 11 18:24:23 2012
@@ -1392,7 +1392,7 @@
{
LastStyles lastStyle;
view->PasteItem(&OB, true, true, false);
- PageItem* Neu = doc->Items->at(doc->Items->count()-1);
+ PageItem* Neu = doc->Items->last();
Neu->doOverprint = doOverprint;
storyText.setDefaultStyle(Neu->itemText.defaultStyle());
if (Neu->asLatexFrame())
@@ -1694,7 +1694,7 @@
{
LastStyles lastStyle;
view->PasteItem(&OB, true, true, false);
- PageItem* Neu = doc->Items->at(doc->Items->count()-1);
+ PageItem* Neu = doc->Items->last();
Neu->setXYPos(Neu->xPos() - doc->currentPage()->xOffset(), Neu->yPos() - doc->currentPage()->yOffset(), true);
storyText.setDefaultStyle(Neu->itemText.defaultStyle());
Neu->itemText = storyText;
Modified: branches/Version14x/Scribus/scribus/shortcutwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17294&path=/branches/Version14x/Scribus/scribus/shortcutwidget.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/shortcutwidget.cpp (original)
+++ branches/Version14x/Scribus/scribus/shortcutwidget.cpp Sat Feb 11 18:24:23 2012
@@ -65,7 +65,7 @@
if (!keyDisplay->text().isEmpty())
{
tl = keyDisplay->text().split("+", QString::SkipEmptyParts);
- Part4 = tl[tl.count()-1];
+ Part4 = tl.last();
if (Part4 == tr("Alt") || Part4 == tr("Ctrl") || Part4 == tr("Shift") || Part4 == tr("Meta"))
Part4 = "";
}
@@ -112,7 +112,7 @@
{
QStringList tl;
tl = keyDisplay->text().split("+", QString::SkipEmptyParts);
- Part4 = tl[tl.count()-1];
+ Part4 = tl.last();
if (Part4 == tr("Alt") || Part4 == tr("Ctrl") || Part4 == tr("Shift") || Part4 == tr("Meta"))
Part4 = "";
}
Modified: branches/Version14x/Scribus/scribus/tabkeyboardshortcutswidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17294&path=/branches/Version14x/Scribus/scribus/tabkeyboardshortcutswidget.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/tabkeyboardshortcutswidget.cpp (original)
+++ branches/Version14x/Scribus/scribus/tabkeyboardshortcutswidget.cpp Sat Feb 11 18:24:23 2012
@@ -493,7 +493,7 @@
tl = keyDisplay->text().split("+", QString::SkipEmptyParts);
if (tl.count() > 0)
{
- Part4 = tl[tl.count()-1];
+ Part4 = tl.last();
if (Part4 == tr("Alt") || Part4 == tr("Ctrl") || Part4 == tr("Shift") || Part4 == tr("Meta"))
Part4 = "";
}
@@ -553,7 +553,7 @@
tl = keyDisplay->text().split("+", QString::SkipEmptyParts);
if (tl.count() > 0)
{
- Part4 = tl[tl.count()-1];
+ Part4 = tl.last();
if (Part4 == tr("Alt") || Part4 == tr("Ctrl") || Part4 == tr("Shift") || Part4 == tr("Meta"))
Part4 = "";
}
More information about the scribus-commit
mailing list