[QGIS Commit] r15857 - in trunk/qgis/src: analysis/raster app
app/ogr core core/composer core/gps core/pal gui mapserver
plugins/dxf2shp_converter/dxflib/src plugins/grass
plugins/grass/qtermwidget plugins/raster_terrain_analysis
providers/grass
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Apr 30 08:09:19 EDT 2011
Author: jef
Date: 2011-04-30 05:09:19 -0700 (Sat, 30 Apr 2011)
New Revision: 15857
Modified:
trunk/qgis/src/analysis/raster/qgsrastercalculator.cpp
trunk/qgis/src/app/ogr/qgsopenvectorlayerdialog.cpp
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgsattributetypedialog.cpp
trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp
trunk/qgis/src/app/qgslabelpropertydialog.cpp
trunk/qgis/src/app/qgsrasterlayerproperties.cpp
trunk/qgis/src/core/composer/qgscomposeritem.cpp
trunk/qgis/src/core/composer/qgscomposerscalebar.cpp
trunk/qgis/src/core/gps/gmath.c
trunk/qgis/src/core/pal/feature.cpp
trunk/qgis/src/core/pal/pointset.cpp
trunk/qgis/src/core/pal/problem.cpp
trunk/qgis/src/core/qgsgeometry.cpp
trunk/qgis/src/core/qgsmaprenderer.cpp
trunk/qgis/src/core/qgsvectorlayer.cpp
trunk/qgis/src/gui/qgsannotationitem.cpp
trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
trunk/qgis/src/gui/qgsquickprint.cpp
trunk/qgis/src/mapserver/qgssldparser.cpp
trunk/qgis/src/mapserver/qgssoaprequesthandler.cpp
trunk/qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp
trunk/qgis/src/plugins/grass/qgsgrassbrowser.cpp
trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp
trunk/qgis/src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp
trunk/qgis/src/providers/grass/qgis.d.rast.c
Log:
fix gcc 4.6 warnings
Modified: trunk/qgis/src/analysis/raster/qgsrastercalculator.cpp
===================================================================
--- trunk/qgis/src/analysis/raster/qgsrastercalculator.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/analysis/raster/qgsrastercalculator.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -120,9 +120,7 @@
{
char* crsWKT = 0;
OGRSpatialReferenceH ogrSRS = OSRNewSpatialReference( NULL );
- const QgsCoordinateReferenceSystem& outputCrs = rl->crs();
- int epsgCode = outputCrs.epsg();
- if ( epsgCode > 0 && OSRImportFromEPSG( ogrSRS, epsgCode ) == CE_None )
+ if ( OSRSetFromUserInput( ogrSRS, rl->crs().authid().toUtf8().constData() ) == OGRERR_NONE )
{
OSRExportToWkt( ogrSRS, &crsWKT );
GDALSetProjection( outputDataset, crsWKT );
Modified: trunk/qgis/src/app/ogr/qgsopenvectorlayerdialog.cpp
===================================================================
--- trunk/qgis/src/app/ogr/qgsopenvectorlayerdialog.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/app/ogr/qgsopenvectorlayerdialog.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -240,12 +240,10 @@
QSettings settings;
QString toSelect = settings.value( "/ogr/connections/selectedtype" ).toString();
- bool set = false;
for ( int i = 0; i < cmbDatabaseTypes->count(); ++i )
if ( cmbDatabaseTypes->itemText( i ) == toSelect )
{
cmbDatabaseTypes->setCurrentIndex( i );
- set = true;
break;
}
}
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/app/qgisapp.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -3877,8 +3877,6 @@
}
//make a first geometry union and notify the user straight away if the union geometry type does not match the layer one
- QGis::WkbType originalType = vl->wkbType();
- QGis::WkbType newType = unionGeom->wkbType();
if ( providerChecksTypeStrictly && unionGeom->wkbType() != vl->wkbType() )
{
QMessageBox::critical( 0, tr( "Union operation canceled" ), tr( "The union operation would result in a geometry type that is not compatible with the current layer and therefore is canceled" ) );
@@ -3918,8 +3916,6 @@
return;
}
- originalType = vl->wkbType();
- newType = unionGeom->wkbType();
if ( providerChecksTypeStrictly && unionGeom->wkbType() != vl->wkbType() )
{
QMessageBox::critical( 0, "Union operation canceled", tr( "The union operation would result in a geometry type that is not compatible with the current layer and therefore is canceled" ) );
Modified: trunk/qgis/src/app/qgsattributetypedialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributetypedialog.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/app/qgsattributetypedialog.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -86,7 +86,6 @@
void QgsAttributeTypeDialog::removeSelectedButtonPushed()
{
QList<QTableWidgetItem *> list = tableWidget->selectedItems();
- QList<QTableWidgetItem *>::iterator it = list.begin();
QSet<int> rowsToRemove;
int removed = 0;
int i = 0;
Modified: trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -157,8 +157,6 @@
show();
return;
}
-
- std::map < QString, int >::iterator iter = mFieldMap.find( fieldstring );
}
void QgsGraduatedSymbolDialog::apply()
Modified: trunk/qgis/src/app/qgslabelpropertydialog.cpp
===================================================================
--- trunk/qgis/src/app/qgslabelpropertydialog.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/app/qgslabelpropertydialog.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -55,7 +55,6 @@
return;
}
const QgsAttributeMap& attributeValues = f.attributeMap();
- QgsAttributeMap::const_iterator attIt = attributeValues.constBegin();
//get layerproperties. Problem: only for pallabeling...
QgsPalLabeling* lbl = dynamic_cast<QgsPalLabeling*>( mMapRenderer->labelingEngine() );
Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -1886,8 +1886,6 @@
// and max - scaled to image height. 1 line drawn per selected band
//
const int BINCOUNT = 255;
- enum GRAPH_TYPE { BAR_CHART, LINE_CHART } myGraphType;
- myGraphType = BAR_CHART;
bool myIgnoreOutOfRangeFlag = true;
bool myThoroughBandScanFlag = false;
int myBandCountInt = mRasterLayer->bandCount();
Modified: trunk/qgis/src/core/composer/qgscomposeritem.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposeritem.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/composer/qgscomposeritem.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -958,7 +958,6 @@
//assume points 1 and 3 are on the rectangle boundaries. Calculate 2 and 4.
double distM1 = sqrt(( x1 - midX ) * ( x1 - midX ) + ( y1 - midY ) * ( y1 - midY ) );
QPointF p2 = pointOnLineWithDistance( QPointF( midX, midY ), QPointF( x2, y2 ), distM1 );
- QPointF p4 = pointOnLineWithDistance( QPointF( midX, midY ), QPointF( x4, y4 ), distM1 );
if ( p2.x() < width && p2.x() > 0 && p2.y() < height && p2.y() > 0 )
{
Modified: trunk/qgis/src/core/composer/qgscomposerscalebar.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposerscalebar.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/composer/qgscomposerscalebar.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -138,7 +138,6 @@
if ( mComposerMap )
{
//calculate mNumUnitsPerSegment
- QRectF composerItemRect = mComposerMap->rect();
QgsRectangle composerMapRect = mComposerMap->extent();
double proposedScaleBarLength = composerMapRect.width() / 4;
Modified: trunk/qgis/src/core/gps/gmath.c
===================================================================
--- trunk/qgis/src/core/gps/gmath.c 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/gps/gmath.c 2011-04-30 12:09:19 UTC (rev 15857)
@@ -163,14 +163,13 @@
while (( delta_lambda > 1e-12 ) && ( remaining_steps > 0 ) )
{ /* Iterate */
/* Variables */
- double tmp1, tmp2, tan_sigma, sin_alpha, cos_alpha, C, lambda_prev;
+ double tmp1, tmp2, sin_alpha, cos_alpha, C, lambda_prev;
/* Calculation */
tmp1 = cos_U2 * sin_lambda;
tmp2 = cos_U1 * sin_U2 - sin_U1 * cos_U2 * cos_lambda;
sin_sigma = sqrt( tmp1 * tmp1 + tmp2 * tmp2 );
cos_sigma = sin_U1 * sin_U2 + cos_U1 * cos_U2 * cos_lambda;
- tan_sigma = sin_sigma / cos_sigma;
sin_alpha = cos_U1 * cos_U2 * sin_lambda / sin_sigma;
cos_alpha = cos( asin( sin_alpha ) );
sqr_cos_alpha = cos_alpha * cos_alpha;
@@ -261,7 +260,7 @@
/* Variables */
double f, a, b, sqr_a, sqr_b;
double phi1, tan_U1, sin_U1, cos_U1, s, alpha1, sin_alpha1, cos_alpha1;
- double tan_sigma1, sigma1, sin_alpha, cos_alpha, sqr_cos_alpha, sqr_u, A, B;
+ double sigma1, sin_alpha, sqr_cos_alpha, sqr_u, A, B;
double sigma_initial, sigma, sigma_prev, sin_sigma, cos_sigma, cos_2_sigmam, sqr_cos_2_sigmam, delta_sigma;
int remaining_steps;
double tmp1, phi2, lambda, C, L;
@@ -293,11 +292,9 @@
alpha1 = azimuth;
sin_alpha1 = sin( alpha1 );
cos_alpha1 = cos( alpha1 );
- tan_sigma1 = tan_U1 / cos_alpha1;
sigma1 = atan2( tan_U1, cos_alpha1 );
sin_alpha = cos_U1 * sin_alpha1;
sqr_cos_alpha = 1 - sin_alpha * sin_alpha;
- cos_alpha = sqrt( sqr_cos_alpha );
sqr_u = sqr_cos_alpha * ( sqr_a - sqr_b ) / sqr_b;
A = 1 + sqr_u / 16384 * ( 4096 + sqr_u * ( -768 + sqr_u * ( 320 - 175 * sqr_u ) ) );
B = sqr_u / 1024 * ( 256 + sqr_u * ( -128 + sqr_u * ( 74 - 47 * sqr_u ) ) );
Modified: trunk/qgis/src/core/pal/feature.cpp
===================================================================
--- trunk/qgis/src/core/pal/feature.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/pal/feature.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -1010,7 +1010,6 @@
if ( shapes_final->size() > 0 )
{
LinkedList<LabelPosition*> *positions = new LinkedList<LabelPosition*> ( ptrLPosCompare );
- int it;
int id = 0; // ids for candidates
double dlx, dly; // delta from label center and bottom-left corner
@@ -1037,7 +1036,6 @@
j++;
}
- it = 0;
dx = dy = min( yrm, xrm ) / 2;
int num_try = 0;
Modified: trunk/qgis/src/core/pal/pointset.cpp
===================================================================
--- trunk/qgis/src/core/pal/pointset.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/pal/pointset.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -611,7 +611,6 @@
double cp;
double best_cp;
double distNearestPoint;
- int nearestPoint;
double area;
double width;
@@ -689,14 +688,12 @@
alpha_seg = (( i / 4 > 0 ? ( i / 4 ) - 1 : 3 ) ) * M_PI / 2 + alpha;
best_cp = DBL_MAX;
- nearestPoint = -1;
for ( j = 0; j < nbPoints; j++ )
{
cp = cross_product( bb[i+2], bb[i+3], bb[i], bb[i+1], x[cHull[j]], y[cHull[j]] );
if ( cp < best_cp )
{
best_cp = cp;
- nearestPoint = cHull[j];
}
}
Modified: trunk/qgis/src/core/pal/problem.cpp
===================================================================
--- trunk/qgis/src/core/pal/problem.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/pal/problem.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -2138,7 +2138,6 @@
double initial_cost;
double cur_cost = 0;
double best_cost = 0;
- double bestChain;
int nbOverlap = 0;
@@ -2166,7 +2165,6 @@
int tenure = pal->tenure;
- int itBest = -1;
//int deltaIt = 0;
Triple **candidates = new Triple*[probSize];
@@ -2208,10 +2206,7 @@
sort(( void** ) candidates, probSize, decreaseCost );
- int validCandidateId = -1;
-
int candidateListSize;
- int seedSh;
candidateListSize = int ( pal->candListSize * ( double ) probSize + 0.5 );
if ( candidateListSize > probSize )
@@ -2226,8 +2221,6 @@
while ( it < stop_it )
{
retainedChain = NULL;
- bestChain = DBL_MAX;
- validCandidateId = -1;
#ifdef _DEBUG_FULL_
std::cout << std::endl << std::endl << candidateListSize << std::endl;
@@ -2235,7 +2228,6 @@
for ( itC = 0; itC < candidateListSize; itC++ )
{
seed = candidates[itC]->feat_id;
- seedSh = seed - borderSize;
#ifdef _DEBUG_FULL_
std::cout << "new candidates:" << std::endl;
@@ -2253,7 +2245,6 @@
if ( !retainedChain )
{
retainedChain = current_chain;
- bestChain = current_chain->delta;
#ifdef _DEBUG_FULL_
std::cout << "New chain, delta = " << current_chain->delta << std::endl;
#endif
@@ -2262,7 +2253,6 @@
{
delete_chain( retainedChain );
retainedChain = current_chain;
- bestChain = current_chain->delta;
#ifdef _DEBUG_FULL_
std::cout << "New best chain, delta = " << current_chain->delta << std::endl;
#endif
@@ -2355,8 +2345,6 @@
best_cost = cur_cost;
memcpy( best_sol, sol, sizeof( int ) *subSize );
- itBest = it;
-
stop_it = ( it + itwimp > maxit ? maxit : it + itwimp );
}
sort(( void** ) candidates, probSize, decreaseCost );
Modified: trunk/qgis/src/core/qgsgeometry.cpp
===================================================================
--- trunk/qgis/src/core/qgsgeometry.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/qgsgeometry.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -3443,7 +3443,6 @@
int numLineStrings;
int idx, jdx, kdx;
unsigned char *ptr;
- char lsb;
QgsPoint pt;
QGis::WkbType wkbType;
bool hasZValue = false;
@@ -3568,7 +3567,6 @@
for ( jdx = 0; jdx < numLineStrings; jdx++ )
{
// each of these is a wbklinestring so must handle as such
- lsb = *ptr;
ptr += 5; // skip type since we know its 2
nPoints = ( int * ) ptr;
ptr += sizeof( int );
@@ -4135,7 +4133,6 @@
int numLineStrings;
int idx, jdx, kdx;
unsigned char *ptr;
- char lsb;
QgsPoint pt;
QGis::WkbType wkbtype;
bool hasZValue = false;
@@ -4226,7 +4223,6 @@
QgsPolyline sequence;
// each of these is a wbklinestring so must handle as such
- lsb = *ptr;
ptr += 5; // skip type since we know its 2
nPoints = ( int * ) ptr;
ptr += sizeof( int );
@@ -5165,7 +5161,6 @@
}
GEOSGeometry** newInnerRings = new GEOSGeometry*[ringList.size()];
- QList<GEOSGeometry*>::const_iterator it = ringList.constBegin();
for ( int i = 0; i < ringList.size(); ++i )
{
newInnerRings[i] = ringList.at( i );
Modified: trunk/qgis/src/core/qgsmaprenderer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/qgsmaprenderer.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -320,13 +320,8 @@
}
}
- bool placeOverlays = false;
QgsOverlayObjectPositionManager* overlayManager = overlayManagerFromSettings();
QList<QgsVectorOverlay*> allOverlayList; //list of all overlays, used to draw them after layers have been rendered
- if ( overlayManager )
- {
- placeOverlays = true;
- }
// render all layers in the stack, starting at the base
QListIterator<QString> li( mLayerSet );
Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -4214,8 +4214,10 @@
// used in all cases of the statement (otherwise they may get
// executed, but never used, in a bit of code where performance is
// critical).
- if ( ! fet.isValid() ) { return; }
- bool needToTrim = false;
+ if ( ! fet.isValid() )
+ {
+ return;
+ }
QgsGeometry* geom = fet.geometry();
if ( !geom )
@@ -4283,10 +4285,8 @@
//QPointF pt( x, y );
// Work around a +/- 32768 limitation on coordinates
- if ( qAbs( x ) > QgsClipper::MAX_X ||
- qAbs( y ) > QgsClipper::MAX_Y )
- needToTrim = true;
- else
+ if ( qAbs( x ) <= QgsClipper::MAX_X &&
+ qAbs( y ) <= QgsClipper::MAX_Y )
p->drawImage( pt, *marker );
}
p->restore();
Modified: trunk/qgis/src/gui/qgsannotationitem.cpp
===================================================================
--- trunk/qgis/src/gui/qgsannotationitem.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/gui/qgsannotationitem.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -216,7 +216,6 @@
return;
}
- QPointF canvasPoint = toCanvasCoordinates( mMapPosition );
if ( mMarkerSymbol )
{
mMarkerSymbol->startRender( renderContext );
Modified: trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -240,7 +240,6 @@
{
// if (mPanningWidget->isHidden())
// return;
- QSize size = mPanningWidget->size();
mPanningWidget->move( pos.x() - mPanningCursorOffset.x(), pos.y() - mPanningCursorOffset.y() );
}
Modified: trunk/qgis/src/gui/qgsquickprint.cpp
===================================================================
--- trunk/qgis/src/gui/qgsquickprint.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/gui/qgsquickprint.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -247,11 +247,6 @@
#endif
QString myFontFamily = "Arial";
- // Background color for pixmaps
- QColor myLegendBackgroundColor = Qt::white;
- //QColor myMapBackgroundColor = "#98dbf9"; // nice blue color
-
-
//
// Draw the PageBorder
//
Modified: trunk/qgis/src/mapserver/qgssldparser.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgssldparser.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/mapserver/qgssldparser.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -767,7 +767,6 @@
{
if ( !labelBufferElementList.item( 0 ).toElement().isNull() )
{
- double radius = 5.0;
QDomNodeList cssNodes = labelBufferElementList.item( 0 ).toElement().elementsByTagName( "CssParameter" );
QString cssName;
QDomElement currentElement;
@@ -833,6 +832,13 @@
}
}
}
+
+ //QgsMapServerLogger::instance()->printMessage("radius " + QString::number(radius));
+ myLabelAttributes->setBufferEnabled( true );
+ myLabelAttributes->setBufferColor( QColor( polyColorRed, polyColorGreen, polyColorBlue, opacity ) );
+
+#if 0
+ double radius = 5.0;
QDomElement radiusElement = labelBufferElementList.item( 0 ).toElement().elementsByTagName( "Radius" ).item( 0 ).toElement();
if ( !radiusElement.isNull() )
{
@@ -843,10 +849,8 @@
radius = 5.0;
}
}
- //QgsMapServerLogger::instance()->printMessage("radius " + QString::number(radius));
- myLabelAttributes->setBufferEnabled( true );
- myLabelAttributes->setBufferColor( QColor( polyColorRed, polyColorGreen, polyColorBlue, opacity ) );
- //myLabelAttributes->setBufferSize(radius, QgsLabelAttributes::PointUnits);
+ myLabelAttributes->setBufferSize( radius, QgsLabelAttributes::PointUnits );
+#endif
// ******** BUG ************ see why setting buffersize dows not work (is a problem in QGIS vector layer rendering)
@@ -1397,14 +1401,12 @@
/* -------------------------------------------------------------------- */
/* Invoke. */
/* -------------------------------------------------------------------- */
- CPLErr eErr;
+ GDALContourGenerate( hBand, dfInterval, dfOffset,
+ nFixedLevelCount, adfFixedLevels,
+ bNoDataSet, dfNoData,
+ hLayer, 0, nElevField,
+ GDALTermProgress, NULL );
- eErr = GDALContourGenerate( hBand, dfInterval, dfOffset,
- nFixedLevelCount, adfFixedLevels,
- bNoDataSet, dfNoData,
- hLayer, 0, nElevField,
- GDALTermProgress, NULL );
-
delete adfFixedLevels;
OGR_DS_Destroy( hDS );
Modified: trunk/qgis/src/mapserver/qgssoaprequesthandler.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgssoaprequesthandler.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/mapserver/qgssoaprequesthandler.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -102,11 +102,6 @@
}
// if xml reading was successfull, save the inputXML in a file
- time_t t;
- struct tm *currentTime;
- time( &t );
- currentTime = localtime( &t );
-
QFile soapFile;
QTextStream soapStream;
Modified: trunk/qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -1483,9 +1483,6 @@
*/
bool DL_Dxf::handleHatchData( DL_CreationInterface* /*creationInterface*/ )
{
-
- static int firstPolylineStatus = 0;
-
// Allocate hatch loops (group code 91):
if ( groupCode == 91 && toInt( groupValue ) > 0 )
{
@@ -1552,16 +1549,13 @@
dropEdges = false;
hatchLoopIndex++;
- hatchLoops[hatchLoopIndex]
- = DL_HatchLoopData( toInt( groupValue ) );
+ hatchLoops[hatchLoopIndex] = DL_HatchLoopData( toInt( groupValue ) );
maxHatchEdges[hatchLoopIndex] = toInt( groupValue );
hatchEdgeIndex[hatchLoopIndex] = -1;
- hatchEdges[hatchLoopIndex]
- = new DL_HatchEdgeData[toInt( groupValue )];
+ hatchEdges[hatchLoopIndex] = new DL_HatchEdgeData[toInt( groupValue )];
// QgsDebugMsg(QString("hatchEdges[%1] = new %2").arg(hatchLoopIndex).arg(toInt(groupValue)));
- firstPolylineStatus = 0;
}
else
{
Modified: trunk/qgis/src/plugins/grass/qgsgrassbrowser.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassbrowser.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/plugins/grass/qgsgrassbrowser.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -137,7 +137,6 @@
QgsDebugMsg( "entered." );
QModelIndexList indexes = mTree->selectionModel()->selectedIndexes();
- bool mapSelected = false;
QList<QModelIndex>::const_iterator it = indexes.begin();
for ( ; it != indexes.end(); ++it )
@@ -152,7 +151,6 @@
//mIface->addRasterLayer( uri, map );
mIface->addRasterLayer( uri, map, "grassraster", QStringList(), QStringList(),
QString(), QString() );
- mapSelected = true;
}
else if ( type == QgsGrassModel::Vector )
{
@@ -177,7 +175,6 @@
map, layer, list.size() );
mIface->addVectorLayer( uri, name, "grass" );
- mapSelected = true;
}
else if ( type == QgsGrassModel::Region )
{
Modified: trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassedit.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/plugins/grass/qgsgrassedit.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -1463,12 +1463,6 @@
}
else
{
- int size;
- if ( atts->size() < ( int ) cols->size() )
- size = atts->size();
- else
- size = cols->size();
-
for ( unsigned int j = 0; j < cols->size(); j++ )
{
QgsField col = ( *cols )[j];
Modified: trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -1147,7 +1147,6 @@
QDir d( locationPath );
// Add all subdirs containing WIND
- QTreeWidgetItem *lvi;
for ( unsigned int i = 0; i < d.count(); i++ )
{
if ( d[i] == "." || d[i] == ".." ) continue;
@@ -1158,7 +1157,7 @@
if ( QFile::exists( windPath ) )
{
- lvi = new QTreeWidgetItem( mMapsetsListView, QStringList() << d[i] << mapsetInfo.owner() );
+ new QTreeWidgetItem( mMapsetsListView, QStringList() << d[i] << mapsetInfo.owner() );
}
}
}
Modified: trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/plugins/grass/qtermwidget/TerminalDisplay.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -1747,7 +1747,6 @@
// this widget.
// Adjust position within text area bounds. See FIXME above.
- QPoint oldpos = pos;
if ( pos.x() < tLx + _leftMargin )
pos.setX( tLx + _leftMargin );
if ( pos.x() > tLx + _leftMargin + _usedColumns*_fontWidth - 1 )
Modified: trunk/qgis/src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp 2011-04-30 12:09:19 UTC (rev 15857)
@@ -82,7 +82,6 @@
QString analysisMethod = d.selectedAnalysisMethod();
QString selectedFormat = d.selectedDriverKey();
QString outputFile = d.selectedOuputFilePath();
- int returnValue;
QgsNineCellFilter* filter = 0;
if ( d.selectedAnalysisMethod() == tr( "Slope" ) )
@@ -106,7 +105,7 @@
{
QProgressDialog p( tr( "Calculating " ) + d.selectedAnalysisMethod() + "...", tr( "Abort..." ), 0, 0 );
p.setWindowModality( Qt::WindowModal );
- returnValue = filter->processRaster( &p );
+ filter->processRaster( &p );
delete filter;
if ( d.addLayerToProject() )
{
Modified: trunk/qgis/src/providers/grass/qgis.d.rast.c
===================================================================
--- trunk/qgis/src/providers/grass/qgis.d.rast.c 2011-04-30 06:47:46 UTC (rev 15856)
+++ trunk/qgis/src/providers/grass/qgis.d.rast.c 2011-04-30 12:09:19 UTC (rev 15857)
@@ -27,7 +27,6 @@
{
char *mapset;
char *name;
- int fp;
struct GModule *module;
struct Option *map;
struct Option *win;
@@ -81,14 +80,7 @@
G_set_window( &window );
raster_type = G_raster_map_type( name, "" );
- fp = G_raster_map_is_fp( name, mapset );
- /* use DCELL even if the map is FCELL */
- // Why? It would break dataType in provider.
- //if ( fp )
- // display( name, mapset, DCELL_TYPE, format->answer );
- //else
- // display( name, mapset, CELL_TYPE, format->answer );
display( name, mapset, raster_type, format->answer );
exit( EXIT_SUCCESS );
@@ -198,9 +190,6 @@
}
else
{
- int *val;
- val = ( int* )( ptr );
- //G_debug ( 0, "val = %d", *val );
if ( data_type == CELL_TYPE )
{
//G_debug ( 0, "valx = %d", *((CELL *) ptr));
More information about the QGIS-commit
mailing list