Skip to content
Permalink
Browse files

Uninitialized variable fixes

  • Loading branch information
nyalldawson committed Feb 10, 2015
1 parent ba7f0c7 commit c253a9f623d01d8c9cd5d0438fb98f8c39bac8c5
Showing with 163 additions and 41 deletions.
  1. +1 −0 src/app/nodetool/qgsvertexentry.cpp
  2. +1 −1 src/app/qgsdecorationnortharrow.h
  3. +1 −0 src/app/qgsdiagramproperties.cpp
  4. +3 −1 src/app/qgsdisplayangle.cpp
  5. +0 −2 src/app/qgsfieldcalculator.h
  6. +5 −1 src/app/qgslabelinggui.cpp
  7. +1 −0 src/app/qgsloadstylefromdbdialog.cpp
  8. +1 −0 src/app/qgsmaptooloffsetcurve.cpp
  9. +8 −4 src/app/qgsmaptoolrotatefeature.cpp
  10. +8 −1 src/app/qgsmaptoolrotatelabel.cpp
  11. +1 −0 src/app/qgsmaptoolselectfreehand.cpp
  12. +1 −0 src/app/qgsmaptoolshowhidelabels.cpp
  13. +1 −0 src/app/qgsmeasuretool.cpp
  14. +8 −2 src/app/qgspointrotationitem.cpp
  15. +1 −0 src/core/dxf/qgsdxfexport.cpp
  16. +19 −2 src/core/pal/feature.cpp
  17. +2 −1 src/core/pal/labelposition.cpp
  18. +0 −3 src/core/pal/pal.h
  19. +1 −1 src/core/qgserror.h
  20. +1 −0 src/core/qgsfeaturerequest.cpp
  21. +1 −0 src/core/qgsmultirenderchecker.cpp
  22. +5 −5 src/core/qgsprojectversion.h
  23. +2 −0 src/core/qgssnapper.cpp
  24. +1 −0 src/core/qgsvectorlayerfeatureiterator.cpp
  25. +0 −1 src/core/qgsvectorlayerrenderer.h
  26. +1 −1 src/core/raster/qgscolorrampshader.h
  27. +1 −0 src/core/raster/qgsrasterbandstats.h
  28. +3 −0 src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp
  29. +15 −3 src/core/symbology-ng/qgsfillsymbollayerv2.cpp
  30. +4 −0 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  31. +1 −0 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
  32. +1 −0 src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
  33. +4 −0 src/core/symbology-ng/qgssymbollayerv2.cpp
  34. +1 −0 src/core/symbology-ng/qgsvectorcolorrampv2.cpp
  35. +1 −0 src/gui/attributetable/qgsfeaturelistview.cpp
  36. +1 −0 src/gui/editorwidgets/qgsdatetimeedit.cpp
  37. +5 −1 src/gui/qgsannotationitem.cpp
  38. +5 −2 src/gui/qgsdetaileditemdata.cpp
  39. +1 −0 src/gui/qgsextentgroupbox.cpp
  40. +1 −0 src/gui/qgsidentifymenu.cpp
  41. +1 −0 src/gui/qgsmapcanvasitem.cpp
  42. +2 −0 src/gui/qgsmaplayeractionregistry.cpp
  43. +7 −1 src/gui/qgsrubberband.cpp
  44. +3 −1 src/gui/symbology-ng/qgscptcitycolorrampv2dialog.cpp
  45. +5 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp
  46. +1 −1 src/plugins/dxf2shp_converter/dxflib/src/dl_entities.h
  47. +6 −1 src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp
  48. +1 −0 src/plugins/offline_editing/offline_editing_progress_dialog.cpp
  49. +1 −0 src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp
  50. +1 −0 src/providers/delimitedtext/qgsdelimitedtextfile.cpp
  51. +5 −0 src/providers/gdal/qgsgdalprovider.cpp
  52. +1 −0 src/providers/mssql/qgsmssqlprovider.cpp
  53. +0 −2 src/providers/mssql/qgsmssqlprovider.h
  54. +1 −0 src/providers/ogr/qgsogrprovider.cpp
  55. +1 −2 src/providers/ogr/qgsogrprovider.h
  56. +1 −0 src/providers/postgres/qgspgsourceselect.cpp
  57. +2 −0 src/providers/postgres/qgspostgresfeatureiterator.cpp
  58. +0 −1 src/providers/postgres/qgspostgresprovider.h
  59. +2 −0 src/providers/wcs/qgswcsprovider.cpp
  60. +2 −0 src/providers/wfs/qgswfsprovider.cpp
  61. +2 −0 tests/bench/qgsbench.cpp
@@ -21,6 +21,7 @@ QgsVertexEntry::QgsVertexEntry( QgsMapCanvas *canvas, QgsMapLayer *layer, QgsPoi
, mEquals( -1 )
, mInRubberBand( false )
, mRubberBandNr( 0 )
, mRubberBandIndex( 0 )
, mPenWidth( penWidth )
, mToolTip( tooltip )
, mType( type )
@@ -62,7 +62,7 @@ class APP_EXPORT QgsDecorationNorthArrow: public QgsDecorationItem

// The amount of rotation for the north arrow
int mRotationInt;
int pluginType;

//! enable or disable the automatic setting of the arrow direction
bool mAutomatic;
// The placement index and translated text
@@ -39,6 +39,7 @@

QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* parent )
: QWidget( parent )
, mAvailableAttributes( 0 )
{
mLayer = layer;

@@ -21,7 +21,9 @@
#include <cmath>

QgsDisplayAngle::QgsDisplayAngle( QgsMapToolMeasureAngle * tool, Qt::WindowFlags f )
: QDialog( tool->canvas()->topLevelWidget(), f ), mTool( tool )
: QDialog( tool->canvas()->topLevelWidget(), f )
, mTool( tool )
, mValue( 0.0 )
{
setupUi( this );
}
@@ -70,8 +70,6 @@ class APP_EXPORT QgsFieldCalculator: public QDialog, private Ui::QgsFieldCalcula

/**idx of changed attribute*/
int mAttributeId;

bool mExpressionValid;
};

#endif // QGSFIELDCALCULATOR_H
@@ -46,7 +46,11 @@


QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, QWidget* parent )
: QWidget( parent ), mLayer( layer ), mMapCanvas( mapCanvas )
: QWidget( parent )
, mLayer( layer )
, mMapCanvas( mapCanvas )
, mMinPixelLimit( 0 )
, mLoadSvgParams( false )
{
if ( !layer )
return;
@@ -16,6 +16,7 @@

QgsLoadStyleFromDBDialog::QgsLoadStyleFromDBDialog( QWidget *parent )
: QDialog( parent )
, mSectionLimit( 0 )
{
setupUi( this );
setWindowTitle( "Load style from database" );
@@ -29,6 +29,7 @@ QgsMapToolOffsetCurve::QgsMapToolOffsetCurve( QgsMapCanvas* canvas )
: QgsMapToolEdit( canvas )
, mRubberBand( 0 )
, mOriginalGeometry( 0 )
, mModifiedFeature( -1 )
, mGeometryModified( false )
, mDistanceItem( 0 )
, mDistanceSpinBox( 0 )
@@ -29,11 +29,15 @@

#define PI 3.14159265

QgsMapToolRotateFeature::QgsMapToolRotateFeature( QgsMapCanvas* canvas ): QgsMapToolEdit( canvas ), mRubberBand( 0 )
QgsMapToolRotateFeature::QgsMapToolRotateFeature( QgsMapCanvas* canvas )
: QgsMapToolEdit( canvas )
, mRubberBand( 0 )
, mRotation( 0 )
, mRotationOffset( 0 )
, mAnchorPoint( 0 )
, mCtrl( false )
{
mRotation = 0;
mAnchorPoint = 0;
mCtrl = false;

}

QgsMapToolRotateFeature::~QgsMapToolRotateFeature()
@@ -27,7 +27,14 @@
#include "qgisapp.h"
#include "qgsapplication.h"

QgsMapToolRotateLabel::QgsMapToolRotateLabel( QgsMapCanvas* canvas ): QgsMapToolLabel( canvas ), mRotationItem( 0 ), mRotationPreviewBox( 0 )
QgsMapToolRotateLabel::QgsMapToolRotateLabel( QgsMapCanvas* canvas )
: QgsMapToolLabel( canvas )
, mStartRotation( 0.0 )
, mCurrentRotation( 0.0 )
, mCurrentMouseAzimuth( 0.0 )
, mRotationItem( 0 )
, mRotationPreviewBox( 0 )
, mCtrlPressed( false )
{
}

@@ -25,6 +25,7 @@ email : jpalmer at linz dot govt dot nz

QgsMapToolSelectFreehand::QgsMapToolSelectFreehand( QgsMapCanvas* canvas )
: QgsMapTool( canvas )
, mDragging( false )
{
mRubberBand = 0;
mCursor = Qt::ArrowCursor;
@@ -29,6 +29,7 @@

QgsMapToolShowHideLabels::QgsMapToolShowHideLabels( QgsMapCanvas* canvas )
: QgsMapToolLabel( canvas )
, mDragging( false )
{
mToolName = tr( "Show/hide labels" );
mRubberBand = 0;
@@ -33,6 +33,7 @@

QgsMeasureTool::QgsMeasureTool( QgsMapCanvas* canvas, bool measureArea )
: QgsMapTool( canvas )
, mWrongProjectProjection( false )
{
mMeasureArea = measureArea;

@@ -17,14 +17,20 @@
#include <QPainter>
#include <cmath>

QgsPointRotationItem::QgsPointRotationItem( QgsMapCanvas* canvas ): QgsMapCanvasItem( canvas ), mOrientation( Clockwise ), mRotation( 0.0 )
QgsPointRotationItem::QgsPointRotationItem( QgsMapCanvas* canvas )
: QgsMapCanvasItem( canvas )
, mOrientation( Clockwise )
, mRotation( 0.0 )
{
//setup font
mFont.setPointSize( 12 );
mFont.setBold( true );
}

QgsPointRotationItem::QgsPointRotationItem(): QgsMapCanvasItem( 0 ), mRotation( 0.0 )
QgsPointRotationItem::QgsPointRotationItem()
: QgsMapCanvasItem( 0 )
, mOrientation( Clockwise )
, mRotation( 0.0 )
{

}
@@ -316,6 +316,7 @@ QgsDxfExport::QgsDxfExport()
}

QgsDxfExport::QgsDxfExport( const QgsDxfExport& dxfExport )
: mModelSpaceBR( 0 )
{
*this = dxfExport;
}
@@ -62,8 +62,25 @@
namespace pal
{
Feature::Feature( Layer* l, const char* geom_id, PalGeometry* userG, double lx, double ly )
: layer( l ), userGeom( userG ), label_x( lx ), label_y( ly ), distlabel( 0 ), labelInfo( NULL ), fixedPos( false ),
quadOffset( false ), offsetPos( false ), fixedRotation( false ), alwaysShow( false )
: layer( l )
, userGeom( userG )
, label_x( lx )
, label_y( ly )
, distlabel( 0 )
, labelInfo( NULL )
, fixedPos( false )
, fixedPosX( 0.0 )
, fixedPosY( 0.0 )
, quadOffset( false )
, quadOffsetX( 0.0 )
, quadOffsetY( 0.0 )
, offsetPos( false )
, offsetPosX( 0.0 )
, offsetPosY( 0.0 )
, fixedRotation( false )
, fixedAngle( 0.0 )
, repeatDist( 0.0 )
, alwaysShow( false )
{
assert( finite( lx ) && finite( ly ) );

@@ -55,7 +55,7 @@
namespace pal
{
LabelPosition::LabelPosition( int id, double x1, double y1, double w, double h, double alpha, double cost, FeaturePart *feature, bool isReversed )
: id( id ), cost( cost ), feature( feature ), nbOverlap( 0 ), alpha( alpha ), w( w ), h( h ), nextPart( NULL ), partId( -1 ), reversed( isReversed ), upsideDown( false )
: id( id ), cost( cost ), feature( feature ), probFeat( 0 ), nbOverlap( 0 ), alpha( alpha ), w( w ), h( h ), nextPart( NULL ), partId( -1 ), reversed( isReversed ), upsideDown( false )
{

// alpha take his value bw 0 and 2*pi rad
@@ -165,6 +165,7 @@ namespace pal
nextPart = NULL;
partId = other.partId;
upsideDown = other.upsideDown;
reversed = other.reversed;
}

bool LabelPosition::isIn( double *bbox )
@@ -133,9 +133,6 @@ namespace pal

SimpleMutex *lyrsMutex;

// TODO remove after tests !!!
clock_t tmpTime;

Units map_unit;

/**
@@ -36,7 +36,7 @@ class CORE_EXPORT QgsErrorMessage
Html
};

QgsErrorMessage() {}
QgsErrorMessage() : mLine( 0 ), mFormat( Text ) {}

/** Constructor.
* @param theMessage error message string
@@ -49,6 +49,7 @@ QgsFeatureRequest::QgsFeatureRequest( const QgsRectangle& rect )

QgsFeatureRequest::QgsFeatureRequest( const QgsExpression& expr )
: mFilter( FilterExpression )
, mFilterFid( -1 )
, mFilterExpression( new QgsExpression( expr.expression() ) )
, mFlags( 0 )
{
@@ -18,6 +18,7 @@
#include <QDebug>

QgsMultiRenderChecker::QgsMultiRenderChecker()
: mColorTolerance( 0 )
{
}

@@ -32,13 +32,13 @@ class CORE_EXPORT QgsProjectVersion

public:

QgsProjectVersion() {};
~QgsProjectVersion() {};
QgsProjectVersion() : mMajor( 0 ), mMinor( 0 ), mSub( 0 ) {}
~QgsProjectVersion() {}
QgsProjectVersion( int major, int minor, int sub, QString name = "" );
QgsProjectVersion( QString string );
int majorVersion() { return mMajor;};
int minorVersion() { return mMinor;};
int subVersion() { return mSub;};
int majorVersion() { return mMajor;}
int minorVersion() { return mMinor;}
int subVersion() { return mSub;}
QString text();

/*! Boolean equal operator
@@ -27,12 +27,14 @@

QgsSnapper::QgsSnapper( QgsMapRenderer* mapRenderer )
: mMapSettings( mapRenderer->mapSettings() )
, mSnapMode( SnapWithOneResult )
{

}

QgsSnapper::QgsSnapper( const QgsMapSettings& mapSettings )
: mMapSettings( mapSettings )
, mSnapMode( SnapWithOneResult )
{
}

@@ -88,6 +88,7 @@ QgsFeatureIterator QgsVectorLayerFeatureSource::getFeatures( const QgsFeatureReq
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator( QgsVectorLayerFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
: QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSource>( source, ownSource, request )
, mEditGeometrySimplifier( 0 )
, mFetchedFid( false )
{

// prepare joins: may add more attributes to fetch (in order to allow join)
@@ -92,7 +92,6 @@ class QgsVectorLayerRenderer : public QgsMapLayerRenderer

QgsFeatureRendererV2 *mRendererV2;

bool mCacheFeatures;
QgsGeometryCache* mCache;

bool mDrawVertexMarkers;
@@ -42,7 +42,7 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
struct ColorRampItem
{
//! default constructor
ColorRampItem() {}
ColorRampItem() : value( 0 ) {}
//! convenience constructor
ColorRampItem( double val, QColor col, QString lbl = QString() ) : label( lbl ), value( val ), color( col ) {}

@@ -59,6 +59,7 @@ class CORE_EXPORT QgsRasterBandStats
elementCount = 0;
width = 0;
height = 0;
bandNumber = 1;
}

/*! Compares region, size etc. not collected statistics */
@@ -31,6 +31,7 @@
#include <QSettings> // for legend

QgsRendererCategoryV2::QgsRendererCategoryV2()
: mRender( true )
{
}

@@ -147,6 +148,8 @@ QgsCategorizedSymbolRendererV2::QgsCategorizedSymbolRendererV2( QString attrName
, mCategories( categories )
, mInvertedColorRamp( false )
, mScaleMethod( DEFAULT_SCALE_METHOD )
, mAttrNum( -1 )
, mCounting( false )
{
for ( int i = 0; i < mCategories.count(); ++i )
{
@@ -1546,7 +1546,11 @@ QgsMapUnitScale QgsShapeburstFillSymbolLayerV2::mapUnitScale() const

//QgsImageFillSymbolLayer

QgsImageFillSymbolLayer::QgsImageFillSymbolLayer(): mOutlineWidth( 0.0 ), mOutlineWidthUnit( QgsSymbolV2::MM ), mOutline( 0 )
QgsImageFillSymbolLayer::QgsImageFillSymbolLayer()
: mNextAngle( 0.0 )
, mOutlineWidth( 0.0 )
, mOutlineWidthUnit( QgsSymbolV2::MM )
, mOutline( 0 )
{
setSubSymbol( new QgsLineSymbolV2() );
}
@@ -2251,8 +2255,16 @@ void QgsSVGFillSymbolLayer::setDefaultSvgParams()
}


QgsLinePatternFillSymbolLayer::QgsLinePatternFillSymbolLayer(): QgsImageFillSymbolLayer(), mDistanceUnit( QgsSymbolV2::MM ), mLineWidthUnit( QgsSymbolV2::MM ),
mOffsetUnit( QgsSymbolV2::MM ), mFillLineSymbol( 0 )
QgsLinePatternFillSymbolLayer::QgsLinePatternFillSymbolLayer()
: QgsImageFillSymbolLayer()
, mDistance( 5.0 )
, mDistanceUnit( QgsSymbolV2::MM )
, mLineWidth( 0 )
, mLineWidthUnit( QgsSymbolV2::MM )
, mLineAngle( 45.0 )
, mOffset( 0.0 )
, mOffsetUnit( QgsSymbolV2::MM )
, mFillLineSymbol( 0 )
{
setSubSymbol( new QgsLineSymbolV2() );
QgsImageFillSymbolLayer::setSubSymbol( 0 ); //no outline
@@ -38,6 +38,7 @@ QgsRendererRangeV2::QgsRendererRangeV2()
, mUpperValue( 0 )
, mSymbol( 0 )
, mLabel()
, mRender( true )
{
}

@@ -284,6 +285,9 @@ QgsGraduatedSymbolRendererV2::QgsGraduatedSymbolRendererV2( QString attrName, Qg
, mMode( Custom )
, mInvertedColorRamp( false )
, mScaleMethod( DEFAULT_SCALE_METHOD )
, mAttrNum( -1 )
, mCounting( false )

{
// TODO: check ranges for sanity (NULL symbols, invalid ranges)
}
@@ -63,6 +63,7 @@ QgsSimpleMarkerSymbolLayerV2::QgsSimpleMarkerSymbolLayerV2( QString name, QColor
mOffsetUnit = QgsSymbolV2::MM;
mAngleExpression = NULL;
mNameExpression = NULL;
mUsingCache = false;
}

QgsSymbolLayerV2* QgsSimpleMarkerSymbolLayerV2::create( const QgsStringMap& props )
@@ -33,6 +33,7 @@ QgsSingleSymbolRendererV2::QgsSingleSymbolRendererV2( QgsSymbolV2* symbol )
: QgsFeatureRendererV2( "singleSymbol" )
, mSymbol( symbol )
, mScaleMethod( DEFAULT_SCALE_METHOD )
, mOrigSize( 0.0 )
{
Q_ASSERT( symbol );
}

0 comments on commit c253a9f

Please sign in to comment.
You can’t perform that action at this time.