r17031 by jghali - fix a few warnings reported by gcc
scribus-commit
scribus-commit at lists.scribus.net
Sat Nov 26 17:44:49 UTC 2011
Author: jghali
Date: Sat Nov 26 17:44:49 2011
New Revision: 17031
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17031
Log:
fix a few warnings reported by gcc
Modified:
trunk/Scribus/scribus/canvasmode_edit.cpp
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
trunk/Scribus/scribus/plugins/import/idml/importidmlimpl.cpp
trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
trunk/Scribus/scribus/scimagecacheproxy.cpp
trunk/Scribus/scribus/scimgdataloader_pdf.cpp
trunk/Scribus/scribus/ui/charselectenhanced.cpp
trunk/Scribus/scribus/ui/curvewidget.cpp
trunk/Scribus/scribus/ui/prefs_guides.cpp
Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Sat Nov 26 17:44:49 2011
@@ -522,11 +522,6 @@
const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
bool inText;
- double Rxp = 0;
- double Ryp = 0;
-// Not used said gcc
-// double Rxpd = 0;
-// double Rypd = 0;
PageItem *currItem;
m_canvas->PaintSizeRect(QRect());
FPoint npf, npf2;
@@ -543,8 +538,6 @@
Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
// QRect mpo(m->x()-m_doc->guidesPrefs().grabRad, m->y()-m_doc->guidesPrefs().grabRad, m_doc->guidesPrefs().grabRad*2, m_doc->guidesPrefs().grabRad*2);
// mpo.moveBy(qRound(m_doc->minCanvasCoordinate.x() * m_canvas->scale()), qRound(m_doc->minCanvasCoordinate.y() * m_canvas->scale()));
- Ryp = Myp;
- Rxp = Mxp;
SeRx = Mxp;
SeRy = Myp;
if (m->button() == Qt::MidButton)
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Sat Nov 26 17:44:49 2011
@@ -10072,7 +10072,6 @@
QString tmp;
int ResO;
BookMItem* ip;
- QTreeWidgetItem* pp;
QString Inhal = "";
QMap<int,QString> Inha;
if ((Bvie->topLevelItemCount() != 0) && (Options.Bookmarks) && (BookMinUse))
@@ -10080,7 +10079,6 @@
int Basis = ObjCounter - 1;
Outlines.Count = Bvie->topLevelItemCount();
ip = (BookMItem*)Bvie->topLevelItem(0);
- pp = Bvie->topLevelItem(0);
Outlines.First = ip->ItemNr+Basis;
Outlines.Last = ((BookMItem*) Bvie->topLevelItem(Outlines.Count - 1))->ItemNr+Basis;
QTreeWidgetItemIterator it(Bvie);
Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp Sat Nov 26 17:44:49 2011
@@ -132,7 +132,7 @@
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
cancel = false;
- double x, y, b, h;
+ double b, h;
bool ret = false;
CustColors.clear();
QFileInfo fi = QFileInfo(fName);
@@ -162,8 +162,6 @@
else
progressDialog = NULL;
/* Set default Page to size defined in Preferences */
- x = 0.0;
- y = 0.0;
b = 0.0;
h = 0.0;
if (progressDialog)
Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp Sat Nov 26 17:44:49 2011
@@ -128,7 +128,7 @@
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
cancel = false;
- double x, y, b, h;
+ double b, h;
bool ret = false;
CustColors.clear();
QFileInfo fi = QFileInfo(fName);
@@ -158,8 +158,6 @@
else
progressDialog = NULL;
/* Set default Page to size defined in Preferences */
- x = 0.0;
- y = 0.0;
b = 0.0;
h = 0.0;
if (progressDialog)
Modified: trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp Sat Nov 26 17:44:49 2011
@@ -145,7 +145,7 @@
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
cancel = false;
- double x, y, b, h;
+ double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
if ( !ScCore->usingGUI() )
@@ -174,8 +174,6 @@
else
progressDialog = NULL;
/* Set default Page to size defined in Preferences */
- x = 0.0;
- y = 0.0;
b = 0.0;
h = 0.0;
if (progressDialog)
Modified: trunk/Scribus/scribus/plugins/import/idml/importidmlimpl.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/plugins/import/idml/importidmlimpl.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidmlimpl.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidmlimpl.cpp Sat Nov 26 17:44:49 2011
@@ -70,18 +70,12 @@
// bool success = false;
bool showProgress;
//cancel = false;
- double x,y,b,h;
// bool ret = false;
QFileInfo fi = QFileInfo(fnameIn);
baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
if(!ScCore->usingGUI())
- showProgress=false;
+ showProgress = false;
/* Implement Progress Dialog Later */
-
- x = 0.0;
- y = 0.0;
- b = 0.0;
- h = 0.0;
/**
Here, first we parse the idml document, in the order designmap.xml,preferences.xml, fonts.xml, styles.xml, gradiant.xml, all the stories will be transformed into Story Objects, and finally all the master spreads and spreads.
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp Sat Nov 26 17:44:49 2011
@@ -22,16 +22,12 @@
#include <cstdlib>
#include "commonstrings.h"
-#include "ui/customfdialog.h"
#include "loadsaveplugin.h"
-#include "ui/missing.h"
-#include "ui/multiprogressdialog.h"
#include "pagesize.h"
#include "prefscontext.h"
#include "prefsfile.h"
#include "prefsmanager.h"
#include "prefstable.h"
-#include "ui/propertiespalette.h"
#include "rawimage.h"
#include "scclocale.h"
#include "sccolorengine.h"
@@ -50,6 +46,10 @@
#include "util_icon.h"
#include "util_math.h"
+#include "ui/customfdialog.h"
+#include "ui/missing.h"
+#include "ui/multiprogressdialog.h"
+#include "ui/propertiespalette.h"
PdfPlug::PdfPlug(ScribusDoc* doc, int flags)
{
Modified: trunk/Scribus/scribus/scimagecacheproxy.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/scimagecacheproxy.cpp
==============================================================================
--- trunk/Scribus/scribus/scimagecacheproxy.cpp (original)
+++ trunk/Scribus/scribus/scimagecacheproxy.cpp Sat Nov 26 17:44:49 2011
@@ -422,7 +422,6 @@
QString oldBase;
QString oldRefName;
QString oldImgName;
- bool haveOldMeta = false;
bool haveOldRef = false;
ScLockedFileRW meta(absolutePath(metaName()));
@@ -463,7 +462,6 @@
return false;
}
- haveOldMeta = true;
oldRefName = oldBase + "." + referenceSuffix;
oldImgName = oldBase + "." + imageSuffix;
Modified: trunk/Scribus/scribus/scimgdataloader_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/scimgdataloader_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/scimgdataloader_pdf.cpp (original)
+++ trunk/Scribus/scribus/scimgdataloader_pdf.cpp Sat Nov 26 17:44:49 2011
@@ -116,7 +116,6 @@
bool ScImgDataLoader_PDF::preloadAlphaChannel(const QString& fn, int page, int gsRes, bool& hasAlpha)
{
- float xres, yres;
// short resolutionunit = 0;
initialize();
@@ -130,8 +129,6 @@
QString tmpFile = QDir::toNativeSeparators(ScPaths::getTempFileDir() + "sc.png");
QString picFile = QDir::toNativeSeparators(fn);
QStringList args;
- xres = gsRes;
- yres = gsRes;
args.append("-r"+QString::number(gsRes));
// args.append("-sOutputFile=\""+tmpFile + "\"");
args.append("-sOutputFile="+tmpFile);
Modified: trunk/Scribus/scribus/ui/charselectenhanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/ui/charselectenhanced.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/charselectenhanced.cpp (original)
+++ trunk/Scribus/scribus/ui/charselectenhanced.cpp Sat Nov 26 17:44:49 2011
@@ -70,7 +70,6 @@
{
// tDebug("scanFont start");
uint charcode;
- uint gindex;
QString gname;
allClasses.clear();
charactersFull.clear();
@@ -107,7 +106,6 @@
it != glyphs.end(); ++it)
{
charcode = it.value().first.unicode();
- gindex = it.key();
gname = it.value().second;
charactersFull.append(charcode);
if ((charcode >= 0x0020) && (charcode <= 0x007F))
Modified: trunk/Scribus/scribus/ui/curvewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/ui/curvewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/curvewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/curvewidget.cpp Sat Nov 26 17:44:49 2011
@@ -52,11 +52,9 @@
void KCurve::paintEvent(QPaintEvent *)
{
- int x, y;
+ int x = 0;
int wWidth = width() - 1;
int wHeight = height() - 1;
- x = 0;
- y = 0;
// Drawing selection or all histogram values.
QPainter p1;
p1.begin(this);
Modified: trunk/Scribus/scribus/ui/prefs_guides.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17031&path=/trunk/Scribus/scribus/ui/prefs_guides.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_guides.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_guides.cpp Sat Nov 26 17:44:49 2011
@@ -104,7 +104,7 @@
int renderStackCount = renderStackOrder.count();
for (int r = renderStackCount - 1; r > -1; r--)
{
- QListWidgetItem *item;
+ QListWidgetItem *item(0);
int it = renderStackOrder[r];
if (it == 4)
item = new QListWidgetItem( tr("Content Objects"), guidePlacementListBox);
@@ -116,8 +116,11 @@
item = new QListWidgetItem( tr("BaselineGrid"), guidePlacementListBox);
else if (it == 0)
item = new QListWidgetItem( tr("Margins"), guidePlacementListBox);
- item->setData(Qt::UserRole, it);
- item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+ if (item)
+ {
+ item->setData(Qt::UserRole, it);
+ item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+ }
}
guideSnapDistanceSpinBox->setValue(prefsData->guidesPrefs.guideRad);
guideGrabRadiusSpinBox->setValue(prefsData->guidesPrefs.grabRadius);
More information about the scribus-commit
mailing list