Skip to content

Commit d3c8837

Browse files
committed
Fix uninitialized members
1 parent 2d8feeb commit d3c8837

File tree

4 files changed

+98
-6
lines changed

4 files changed

+98
-6
lines changed

src/app/qgisapp.cpp

+26-1
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
503503
, mToolPopupOverviews( 0 )
504504
, mToolPopupDisplay( 0 )
505505
, mLayerTreeCanvasBridge( 0 )
506-
, mPreviousNonZoomMapTool( 0 )
507506
, mSplash( splash )
508507
, mMousePrecisionDecimalPlaces( 0 )
509508
, mInternalClipboard( 0 )
@@ -841,6 +840,31 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
841840

842841
QgisApp::QgisApp()
843842
: QMainWindow( 0, 0 )
843+
, mNonEditMapTool( 0 )
844+
, mScaleLabel( 0 )
845+
, mScaleEdit( 0 )
846+
, mScaleEditValidator( 0 )
847+
, mCoordsLabel( 0 )
848+
, mCoordsEdit( 0 )
849+
, mCoordsEditValidator( 0 )
850+
, mRotationLabel( 0 )
851+
, mRotationEdit( 0 )
852+
, mRotationEditValidator( 0 )
853+
, mProgressBar( 0 )
854+
, mRenderSuppressionCBox( 0 )
855+
, mToggleExtentsViewButton( 0 )
856+
, mOnTheFlyProjectionStatusLabel( 0 )
857+
, mOnTheFlyProjectionStatusButton( 0 )
858+
, mMessageButton( 0 )
859+
, mFeatureActionMenu( 0 )
860+
, mPopupMenu( 0 )
861+
, mDatabaseMenu( 0 )
862+
, mWebMenu( 0 )
863+
, mToolPopupOverviews( 0 )
864+
, mToolPopupDisplay( 0 )
865+
, mMapCanvas( 0 )
866+
, mLayerTreeView( 0 )
867+
, mLayerTreeCanvasBridge( 0 )
844868
, mMapLayerOrder( 0 )
845869
, mOverviewMapCursor( 0 )
846870
, mMapWindow( 0 )
@@ -863,6 +887,7 @@ QgisApp::QgisApp()
863887
, mSnappingDialog( 0 )
864888
, mPluginManager( 0 )
865889
, mComposerManager( 0 )
890+
, mpTileScaleWidget( 0 )
866891
, mLastComposerId( 0 )
867892
, mpGpsWidget( 0 )
868893
, mLastMapToolMessage( 0 )

src/app/qgisapp.h

+48-2
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,54 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
13951395
class Tools
13961396
{
13971397
public:
1398+
1399+
Tools()
1400+
: mZoomIn( 0 )
1401+
, mZoomOut( 0 )
1402+
, mPan( 0 )
1403+
#ifdef HAVE_TOUCH
1404+
, mTouch( 0 )
1405+
#endif
1406+
, mIdentify( 0 )
1407+
, mFeatureAction( 0 )
1408+
, mMeasureDist( 0 )
1409+
, mMeasureArea( 0 )
1410+
, mMeasureAngle( 0 )
1411+
, mAddFeature( 0 )
1412+
, mMoveFeature( 0 )
1413+
, mOffsetCurve( 0 )
1414+
, mReshapeFeatures( 0 )
1415+
, mSplitFeatures( 0 )
1416+
, mSplitParts( 0 )
1417+
, mSelect( 0 )
1418+
, mSelectFeatures( 0 )
1419+
, mSelectPolygon( 0 )
1420+
, mSelectFreehand( 0 )
1421+
, mSelectRadius( 0 )
1422+
, mVertexAdd( 0 )
1423+
, mVertexMove( 0 )
1424+
, mVertexDelete( 0 )
1425+
, mAddRing( 0 )
1426+
, mFillRing( 0 )
1427+
, mAddPart( 0 )
1428+
, mSimplifyFeature( 0 )
1429+
, mDeleteRing( 0 )
1430+
, mDeletePart( 0 )
1431+
, mNodeTool( 0 )
1432+
, mRotatePointSymbolsTool( 0 )
1433+
, mAnnotation( 0 )
1434+
, mFormAnnotation( 0 )
1435+
, mHtmlAnnotation( 0 )
1436+
, mSvgAnnotation( 0 )
1437+
, mTextAnnotation( 0 )
1438+
, mPinLabels( 0 )
1439+
, mShowHideLabels( 0 )
1440+
, mMoveLabel( 0 )
1441+
, mRotateFeature( 0 )
1442+
, mRotateLabel( 0 )
1443+
, mChangeLabelProperties( 0 )
1444+
{}
1445+
13981446
QgsMapTool *mZoomIn;
13991447
QgsMapTool *mZoomOut;
14001448
QgsMapTool *mPan;
@@ -1496,8 +1544,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
14961544
QCursor *mOverviewMapCursor;
14971545
//! Current map window extent in real-world coordinates
14981546
QRect *mMapWindow;
1499-
//! The previously selected non zoom map tool.
1500-
int mPreviousNonZoomMapTool;
15011547
QString mStartupPath;
15021548
//! full path name of the current map file (if it has been saved or loaded)
15031549
QString mFullPathName;

src/plugins/grass/qgsgrassedit.cpp

+23-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,32 @@ QgsGrassEdit::QgsGrassEdit( QgisInterface *iface, QgsMapLayer *layer, bool newMa
147147
QWidget *parent, Qt::WindowFlags f )
148148
: QMainWindow( parent, f )
149149
, QgsGrassEditBase()
150+
, mLayer( 0 )
151+
, mToolBar( 0 )
152+
, mSize( 0 )
150153
, mValid( false )
151154
, mInited( false )
152155
, mIface( iface )
156+
, mCanvas( 0 )
157+
, mProvider( 0 )
158+
, mTool( QgsGrassEdit::NONE )
159+
, mSuspend( false )
160+
, mEditPoints( 0 )
161+
, mPoints( 0 )
162+
, mCats( 0 )
163+
, mPixmap( 0 )
164+
, mTransform( 0 )
165+
, mSelectedLine( 0 )
166+
, mSelectedPart( 0 )
167+
, mAddVertexEnd( false )
168+
, mLineWidth( 0 )
169+
, mMarkerSize( 0 )
170+
, mAttributes( 0 )
171+
, mNewMap( newMap )
172+
, mNewPointAction( 0 )
173+
, mNewLineAction( 0 )
174+
, mNewBoundaryAction( 0 )
175+
, mNewCentroidAction( 0 )
153176
, mMoveVertexAction( 0 )
154177
, mAddVertexAction( 0 )
155178
, mDeleteVertexAction( 0 )
@@ -168,9 +191,6 @@ QgsGrassEdit::QgsGrassEdit( QgisInterface *iface, QgsMapLayer *layer, bool newMa
168191
setupUi( this );
169192

170193
mRunning = true;
171-
mTool = QgsGrassEdit::NONE;
172-
mSuspend = false;
173-
mNewMap = newMap;
174194

175195
mProjectionEnabled = ( QgsProject::instance()->readNumEntry( "SpatialRefSys", "/ProjectionsEnabled", 0 ) != 0 );
176196

src/providers/postgres/qgspostgresprovider.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri )
5353
, mShared( new QgsPostgresSharedData )
5454
, mUseEstimatedMetadata( false )
5555
, mSelectAtIdDisabled( false )
56+
, mEnabledCapabilities( 0 )
5657
, mConnectionRO( 0 )
5758
, mConnectionRW( 0 )
5859
, mTransaction( 0 )

0 commit comments

Comments
 (0)