r17037 by jghali - fix warnings reported by gcc (round 3)
scribus-commit
scribus-commit at lists.scribus.net
Sun Nov 27 14:15:21 UTC 2011
Author: jghali
Date: Sun Nov 27 14:15:21 2011
New Revision: 17037
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17037
Log:
fix warnings reported by gcc (round 3)
Modified:
trunk/Scribus/scribus/canvasmode_drawfreehand.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_editspiral.cpp
trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
trunk/Scribus/scribus/canvasmode_nodeedit.cpp
trunk/Scribus/scribus/pageitem_pathtext.cpp
trunk/Scribus/scribus/pslib.cpp
trunk/Scribus/scribus/scpageoutput.cpp
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp Sun Nov 27 14:15:21 2011
@@ -176,8 +176,6 @@
const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
double Rxp = 0;
double Ryp = 0;
- double Rxpd = 0;
- double Rypd = 0;
FPoint npf, npf2;
QRect tx;
QTransform pm;
@@ -192,10 +190,8 @@
Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
Rxp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).x();
- Rxpd = Mxp - Rxp;
Mxp = qRound(Rxp);
Ryp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).y();
- Rypd = Myp - Ryp;
Myp = qRound(Ryp);
SeRx = Mxp;
SeRy = Myp;
@@ -224,7 +220,6 @@
void FreehandMode::mouseReleaseEvent(QMouseEvent *m)
{
- const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
PageItem *currItem;
m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp Sun Nov 27 14:15:21 2011
@@ -383,7 +383,6 @@
void CanvasMode_EditArc::mouseReleaseEvent(QMouseEvent *m)
{
- const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m->accept();
Modified: trunk/Scribus/scribus/canvasmode_editgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.cpp Sun Nov 27 14:15:21 2011
@@ -897,7 +897,6 @@
#ifdef GESTURE_FRAME_PREVIEW
clearPixmapCache();
#endif // GESTURE_FRAME_PREVIEW
- const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m->accept();
Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp Sun Nov 27 14:15:21 2011
@@ -970,7 +970,6 @@
void CanvasMode_EditMeshGradient::mouseReleaseEvent(QMouseEvent *m)
{
- const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m->accept();
Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp Sun Nov 27 14:15:21 2011
@@ -950,7 +950,6 @@
void CanvasMode_EditMeshPatch::mouseReleaseEvent(QMouseEvent *m)
{
- const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m->accept();
Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp Sun Nov 27 14:15:21 2011
@@ -228,7 +228,6 @@
{
PageItem *currItem = m_doc->m_Selection->itemAt(0);
PageItem_Spiral *item = currItem->asSpiral();
- QPointF mPoint = item->PoLine.pointQF(0);
item->spiralStartAngle = computeRealAngle(start, true);
item->spiralEndAngle = computeRealAngle(end, true);
item->spiralFactor = factor;
Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.cpp Sun Nov 27 14:15:21 2011
@@ -427,7 +427,6 @@
void CanvasMode_EditWeldPoint::mouseReleaseEvent(QMouseEvent *m)
{
- const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->resetRenderMode();
m->accept();
Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp Sun Nov 27 14:15:21 2011
@@ -1007,7 +1007,6 @@
(m_doc->nodeEdit.submode == NodeEditContext::MOVE_POINT) ||
(m_doc->nodeEdit.submode == NodeEditContext::SPLIT_PATH && m_doc->nodeEdit.EdPoints))
{
- FPoint mousePoint = m_canvas->globalToCanvas(m->globalPos());
for (uint poi=0; poi<Clip.size()-3; poi += 4)
{
// create bezier curve in canvas coords
Modified: trunk/Scribus/scribus/pageitem_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/pageitem_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.cpp (original)
+++ trunk/Scribus/scribus/pageitem_pathtext.cpp Sun Nov 27 14:15:21 2011
@@ -82,7 +82,6 @@
double dx;
FPoint point = FPoint(0, 0);
FPoint tangent = FPoint(0, 0);
- uint seg = 0;
QColor tmp;
CurX = Extra;
QString cachedStroke = "";
Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Sun Nov 27 14:15:21 2011
@@ -4787,7 +4787,6 @@
int tabCc = 0;
int savedOwnPage = ite->OwnPage;
double tabDist = ite->textToFrameDistLeft();
- double colLeft = 0.0;
QList<ParagraphStyle::TabRecord> tTabValues;
ite->OwnPage = argh;
@@ -4799,7 +4798,6 @@
for (uint ll=0; ll < ite->itemText.lines(); ++ll) {
LineSpec ls = ite->itemText.line(ll);
- colLeft = ls.colLeft;
tabDist = ls.x;
double CurX = ls.x;
Modified: trunk/Scribus/scribus/scpageoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.cpp (original)
+++ trunk/Scribus/scribus/scpageoutput.cpp Sun Nov 27 14:15:21 2011
@@ -902,7 +902,6 @@
ScText *hl;
FPoint point = FPoint(0, 0);
FPoint tangent = FPoint(0, 0);
- uint seg = 0;
double CurX = item->textToFrameDistLeft(); // item->CurX = item->textToFrameDistLeft()
QString actFill, actStroke;
double actFillShade, actStrokeShade, dx;
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17037&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sun Nov 27 14:15:21 2011
@@ -5785,15 +5785,13 @@
int ScribusDoc::getSectionKeyForPageIndex(const uint pageIndex) const
{
- bool found=false;
- int retVal=-1;
+ int retVal = -1;
DocumentSectionMap::ConstIterator it = docPrefsData.docSectionMap.begin();
- for (; it!= docPrefsData.docSectionMap.end(); ++it)
- {
- if (pageIndex>=it.value().fromindex && pageIndex<=it.value().toindex)
- {
- found=true;
- retVal=it.key();
+ for (; it != docPrefsData.docSectionMap.end(); ++it)
+ {
+ if (pageIndex >= it.value().fromindex && pageIndex <= it.value().toindex)
+ {
+ retVal = it.key();
break;
}
}
More information about the scribus-commit
mailing list