Skip to content
Permalink
Browse files
Apply warnings for unused vars patch from karl
[ 1325870 ] removing trivial warnings (unused variables)


git-svn-id: http://svn.osgeo.org/qgis/trunk@4088 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 16, 2005
1 parent fdd8974 commit 76694f5de75602fbc1c2a3ed67f9307e0ccd32a3
@@ -1,5 +1,11 @@
/* ChangeLog,v 1.214 2004/11/12 00:42:21 gsherman Exp */
------------------------------------------------------------------------------
Version 0.8 'Joesephine' .... development version
2005-10-13 [timlinux] 0.7.9
** Added capability to generate point and polygon based graticules to the
grid_maker plugin


Version 0.6 'Simon' .... development version
QGIS Change Log
2005-07-03 [morb_au] 0.7.devel2
@@ -166,7 +166,6 @@ void QgsCopyrightLabelPlugin::renderLabel(QPainter * theQPainter)
if (mEnable)
{
//@todo softcode this!myQSimpleText.height()
int myRotationInt = 90;
// need width/height of paint device
QPaintDeviceMetrics myMetrics( theQPainter->device() );
int myHeight = myMetrics.height();
@@ -103,7 +103,6 @@ void QgsDelimitedTextPluginGui::updateFieldLists()
//
// We don't know anything about a text based field other
// than its name. All fields are assumed to be text
int fieldPos = 0;
for ( QStringList::Iterator it = fieldList.begin(); it != fieldList.end(); ++it ) {
// add item to both drop-downs (X field and Y field)
if((*it).length() > 0)
@@ -314,8 +314,6 @@ bool QgsNorthArrowPlugin::calculateNorthDirection()
QgsMapLayer& mapLayer = *(mapCanvas.getZpos(0));
QgsSpatialRefSys& outputSRS = mapLayer.coordinateTransform()->destSRS();

bool yy = outputSRS.geographicFlag();

if (outputSRS.isValid() && !outputSRS.geographicFlag())
{
// Use a geographic SRS to get lat/long to work out direction
@@ -210,7 +210,6 @@ void QgsScaleBarPlugin::renderScaleBar(QPainter * theQPainter)
// Hard coded sizes
int myMajorTickSize=8;
int myTextOffsetX=3;
int myTextOffsetY=3;
double myActualSize=mPreferredSize;
int myMargin=20;

@@ -277,7 +277,6 @@ bool QgsGPXProvider::getNextFeature(QgsFeature* feature,

if (rte->points.size() == 0)
continue;
const Routepoint& rtept(rte->points[0]);
const QgsRect& b(*mSelectionRectangle);
if ((rte->xMax >= b.xMin()) && (rte->xMin <= b.xMax()) &&
(rte->yMax >= b.yMin()) && (rte->yMin <= b.yMax())) {
@@ -337,7 +336,6 @@ bool QgsGPXProvider::getNextFeature(QgsFeature* feature,
continue;
if (trk->segments[0].points.size() == 0)
continue;
const Trackpoint& trkpt(trk->segments[0].points[0]);
const QgsRect& b(*mSelectionRectangle);
if ((trk->xMax >= b.xMin()) && (trk->xMin <= b.xMax()) &&
(trk->yMax >= b.yMin()) && (trk->yMin <= b.yMax())) {
@@ -127,8 +127,8 @@ QgsOgrProvider::QgsOgrProvider(QString const & uri)
#endif
} else {
std::cerr << "Data source is invalid" << std::endl;
const char *er = CPLGetLastErrorMsg();
#ifdef QGISDEBUG
const char *er = CPLGetLastErrorMsg();
std::cerr << er << std::endl;
#endif
valid = false;
@@ -1395,14 +1395,14 @@ const std::list<std::pair<QString, QString> >& attributes)

OGRDataSource::DestroyDataSource(dataSource);

//qWarning("GDAL Version number is: "+QString::number(GDAL_VERSION_NUM));
//#if GDAL_VERSION_NUM >= 1310
//if(reference)
//{
//reference->Release();
//}
//#endif //GDAL_VERSION_NUM
//return true;
qWarning("GDAL Version number is: "+QString::number(GDAL_VERSION_NUM));
#if GDAL_VERSION_NUM >= 1310
if(reference)
{
reference->Release();
}
#endif //GDAL_VERSION_NUM
return true;
}


@@ -138,8 +138,6 @@ void QgsLegend::contentsMousePressEvent(QMouseEvent * e)
#endif
if (e->button() == Qt::LeftButton || e->button() == Qt::MidButton)
{
QPoint p(contentsToViewport(e->pos()));
QListViewItem *i = itemAt(p);
mLastPressPos = e->pos();
mMousePressedFlag = true;
}
@@ -216,7 +214,6 @@ void QgsLegend::contentsMouseReleaseEvent(QMouseEvent * e)

if (mItemBeingMoved)
{
QListViewItem *item = itemAt(mLastPressPos);
QListViewItem *destItem = itemAt(e->pos());

QgsLegendItem* origin = dynamic_cast<QgsLegendItem*>(mItemBeingMoved);
@@ -369,7 +369,7 @@ void OmgGdal::buildSupportedRasterFileFilter(QString & theFileFiltersString)
const QString OmgGdal::contour(const QString theInputFile)
{
GDALDatasetH hSrcDS;
int i, b3D = FALSE, bNoDataSet = FALSE, bIgnoreNoData = FALSE;
int b3D = FALSE, bNoDataSet = FALSE;
int myBandNumber = 1;
double dfInterval = 1.0;
double dfNoData = 0.0;
@@ -377,7 +377,6 @@ QgisApp::QgisApp(QWidget * parent, const char *name, WFlags fl)
}
QGridLayout *canvasLegendLayout = new QGridLayout(frameMain, 1, 1, 4, 6, "canvasLegendLayout");
QSplitter *canvasLegendSplit = new QSplitter(frameMain);
QGridLayout *legendOverviewLayout = new QGridLayout(canvasLegendSplit, 1, 2, 4, 6, "canvasLegendLayout");
QSplitter *legendOverviewSplit = new QSplitter(Qt::Vertical,canvasLegendSplit);

mMapLegend = new QgsLegend(this,legendOverviewSplit, "theMapLegend");
@@ -34,7 +34,6 @@ void QgsAbout::init()
if ( file.open( IO_ReadOnly ) ) {
QTextStream stream( &file );
QString line;
int i = 1;
while ( !stream.atEnd() )
{
line = stream.readLine(); // line of text excluding '\n'
@@ -41,7 +41,6 @@ QgsBookmarkItem::~QgsBookmarkItem()
// the record using the parameters set in the constructor

sqlite3 *db;
char *zErrMsg = 0;
int rc;
#ifdef QGISDEBUG
std::cout << "Opening user database: " << mUserDbPath.local8Bit() << std::endl;
@@ -58,7 +57,6 @@ QgsBookmarkItem::~QgsBookmarkItem()
// prepare the sql statement
const char *pzTail;
sqlite3_stmt *ppStmt;
char *pzErrmsg;
QString sql;
QTextOStream sqlStream(&sql);
sqlStream << "insert into tbl_bookmarks values(null,'" <<
@@ -75,7 +75,6 @@ void QgsBookmarks::initialise()
// prepare the sql statement
const char *pzTail;
sqlite3_stmt *ppStmt;
char *pzErrmsg;
QString sql = "select * from tbl_bookmarks";

rc = sqlite3_prepare(db, (const char *)sql, sql.length(), &ppStmt, &pzTail);
@@ -244,7 +243,6 @@ void QgsBookmarks::zoomToBookmark()
int QgsBookmarks::connectDb()
{

char *zErrMsg = 0;
int rc;
rc = sqlite3_open(mUserDbPath, &db);
if(rc)
@@ -642,9 +642,6 @@ void QgsComposer::svg(void)

QRect br = pic.boundingRect();

int width = (int) ( mComposition->paperWidth() * mComposition->scale() );
int height = (int) ( mComposition->paperHeight() * mComposition->scale() );

pic.save ( myOutputFileNameQString, "svg" );
}

@@ -249,7 +249,6 @@ QRect QgsComposerLabel::boundingRect ( void ) const
int h = metrics.height() ;

int buf = 0;
int width;

if ( mBox ) {
buf = (int) ( size / 10 * mComposition->scale() + 2 ); // 2 is for line width
@@ -420,9 +420,6 @@ void QgsComposerPicture::pictureChanged ( )

mPicturePath = mPictureLineEdit->text();

int w = mWidth;
int h = mHeight;

loadPicture();

if ( !mPictureValid ) {
@@ -656,8 +656,6 @@ void QgsComposerVectorLegend::recalculate ( void )
std::cout << "mMargin = " << mMargin << " mSymbolHeight = " << mSymbolHeight
<< "mSymbolWidth = " << mSymbolWidth << " mSymbolSpace = " << mSymbolSpace << std::endl;

int nlayers = mMapCanvas->layerCount();

QRect r = render(0);

QCanvasRectangle::setSize ( r.width(), r.height() );
@@ -131,7 +131,6 @@ void QgsCustomProjectionDialog::getProjList ()
// Populate the projection combo
//
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -167,7 +166,6 @@ void QgsCustomProjectionDialog::getEllipsoidList()
// Populate the ellipsoid combo
//
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -214,7 +212,6 @@ void QgsCustomProjectionDialog::pbnDelete_clicked()
}

sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -275,7 +272,6 @@ void QgsCustomProjectionDialog::pbnClose_clicked()
long QgsCustomProjectionDialog::getRecordCount()
{
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -309,7 +305,6 @@ long QgsCustomProjectionDialog::getRecordCount()
QString QgsCustomProjectionDialog::getProjectionFamilyName(QString theProjectionFamilyAcronym)
{
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -341,7 +336,6 @@ QString QgsCustomProjectionDialog::getProjectionFamilyName(QString theProjection
QString QgsCustomProjectionDialog::getEllipsoidName(QString theEllipsoidAcronym)
{
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -373,7 +367,6 @@ QString QgsCustomProjectionDialog::getEllipsoidName(QString theEllipsoidAcronym)
QString QgsCustomProjectionDialog::getProjectionFamilyAcronym(QString theProjectionFamilyName)
{
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -405,7 +398,6 @@ QString QgsCustomProjectionDialog::getProjectionFamilyAcronym(QString theProject
QString QgsCustomProjectionDialog::getEllipsoidAcronym(QString theEllipsoidName)
{
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -441,7 +433,6 @@ void QgsCustomProjectionDialog::pbnFirst_clicked()
std::cout << "QgsCustomProjectionDialog::pbnFirst_clicked()" << std::endl;
#endif
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -510,7 +501,6 @@ void QgsCustomProjectionDialog::pbnPrevious_clicked()
return;
}
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -588,7 +578,6 @@ void QgsCustomProjectionDialog::pbnNext_clicked()
return;
}
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -662,7 +651,6 @@ void QgsCustomProjectionDialog::pbnLast_clicked()
std::cout << "QgsCustomProjectionDialog::pbnLast_clicked()" << std::endl;
#endif
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -841,7 +829,6 @@ void QgsCustomProjectionDialog::pbnSave_clicked()
;
}
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -893,7 +880,6 @@ void QgsCustomProjectionDialog::cboProjectionFamily_highlighted( const QString &
//search the sqlite user projections db for the projection entry
//and display its parameters
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -73,7 +73,6 @@ bool QgsDistanceArea::setEllipsoid(const QString& ellipsoid)
//
QString mQGisSettingsDir = QDir::homeDirPath () + "/.qgis/";
sqlite3 *myDatabase;
char *myErrorMessage = 0;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
int myResult;
@@ -175,7 +174,6 @@ bool QgsDistanceArea::setDefaultEllipsoid()

double QgsDistanceArea::measure(QgsGeometry* geometry)
{
size_t size = geometry->wkbSize();
unsigned char* wkb = geometry->wkbBuffer();
unsigned char* ptr;
unsigned int wkbType;
@@ -305,7 +303,6 @@ unsigned char* QgsDistanceArea::measurePolygon(unsigned char* feature, double* a

if (points.size() > 2)
{
bool clockWise = true;
areaTmp = computePolygonArea(points);
if (idx == 0)
*area += areaTmp; // exterior ring
@@ -780,7 +780,6 @@ bool QgsGeometry::vertexAt(double &x, double &y,
{
unsigned char *ptr;
int *nPoints;
int idx;

// get number of points in the line
ptr = mGeometry + 5; // now at mGeometry.numPoints
@@ -988,7 +987,6 @@ QgsPoint QgsGeometry::closestSegmentWithContext(QgsPoint& point,
QgsPoint minDistPoint;

int wkbType;
double x,y;
double *thisx,*thisy;
double *prevx,*prevy;
double testdist;
@@ -1091,13 +1089,11 @@ QgsRect QgsGeometry::boundingBox() const
int *nPoints;
int *numRings;
int *numPolygons;
int numPoints;
int numLineStrings;
int idx, jdx, kdx;
unsigned char *ptr;
char lsb;
QgsPoint pt;
QPointArray *pa;
int wkbType;

if(mGeometry)
@@ -1614,13 +1610,11 @@ geos::Geometry* QgsGeometry::geosGeometry() const
int *nPoints;
int *numRings;
int *numPolygons;
int numPoints;
int numLineStrings;
int idx, jdx, kdx;
unsigned char *ptr;
char lsb;
QgsPoint pt;
QPointArray *pa;
int wkbtype;

// // TODO: Make this a static member - save generating for every geometry
@@ -487,7 +487,7 @@ QgsPoint QgsLabel::labelPoint ( QgsFeature *feature )
{
double sx, sy;
unsigned char *ptr;
int idx, jdx, kdx;
int idx, kdx;
int *numPolygons, *numRings;

// get the number of polygons

0 comments on commit 76694f5

Please sign in to comment.