Skip to content

Commit

Permalink
Fix uninitialized members
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 16, 2015
1 parent 2d8feeb commit d3c8837
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 6 deletions.
27 changes: 26 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -503,7 +503,6 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
, mToolPopupOverviews( 0 )
, mToolPopupDisplay( 0 )
, mLayerTreeCanvasBridge( 0 )
, mPreviousNonZoomMapTool( 0 )
, mSplash( splash )
, mMousePrecisionDecimalPlaces( 0 )
, mInternalClipboard( 0 )
Expand Down Expand Up @@ -841,6 +840,31 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,

QgisApp::QgisApp()
: QMainWindow( 0, 0 )
, mNonEditMapTool( 0 )
, mScaleLabel( 0 )
, mScaleEdit( 0 )
, mScaleEditValidator( 0 )
, mCoordsLabel( 0 )
, mCoordsEdit( 0 )
, mCoordsEditValidator( 0 )
, mRotationLabel( 0 )
, mRotationEdit( 0 )
, mRotationEditValidator( 0 )
, mProgressBar( 0 )
, mRenderSuppressionCBox( 0 )
, mToggleExtentsViewButton( 0 )
, mOnTheFlyProjectionStatusLabel( 0 )
, mOnTheFlyProjectionStatusButton( 0 )
, mMessageButton( 0 )
, mFeatureActionMenu( 0 )
, mPopupMenu( 0 )
, mDatabaseMenu( 0 )
, mWebMenu( 0 )
, mToolPopupOverviews( 0 )
, mToolPopupDisplay( 0 )
, mMapCanvas( 0 )
, mLayerTreeView( 0 )
, mLayerTreeCanvasBridge( 0 )
, mMapLayerOrder( 0 )
, mOverviewMapCursor( 0 )
, mMapWindow( 0 )
Expand All @@ -863,6 +887,7 @@ QgisApp::QgisApp()
, mSnappingDialog( 0 )
, mPluginManager( 0 )
, mComposerManager( 0 )
, mpTileScaleWidget( 0 )
, mLastComposerId( 0 )
, mpGpsWidget( 0 )
, mLastMapToolMessage( 0 )
Expand Down
50 changes: 48 additions & 2 deletions src/app/qgisapp.h
Expand Up @@ -1395,6 +1395,54 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
class Tools
{
public:

Tools()
: mZoomIn( 0 )
, mZoomOut( 0 )
, mPan( 0 )
#ifdef HAVE_TOUCH
, mTouch( 0 )
#endif
, mIdentify( 0 )
, mFeatureAction( 0 )
, mMeasureDist( 0 )
, mMeasureArea( 0 )
, mMeasureAngle( 0 )
, mAddFeature( 0 )
, mMoveFeature( 0 )
, mOffsetCurve( 0 )
, mReshapeFeatures( 0 )
, mSplitFeatures( 0 )
, mSplitParts( 0 )
, mSelect( 0 )
, mSelectFeatures( 0 )
, mSelectPolygon( 0 )
, mSelectFreehand( 0 )
, mSelectRadius( 0 )
, mVertexAdd( 0 )
, mVertexMove( 0 )
, mVertexDelete( 0 )
, mAddRing( 0 )
, mFillRing( 0 )
, mAddPart( 0 )
, mSimplifyFeature( 0 )
, mDeleteRing( 0 )
, mDeletePart( 0 )
, mNodeTool( 0 )
, mRotatePointSymbolsTool( 0 )
, mAnnotation( 0 )
, mFormAnnotation( 0 )
, mHtmlAnnotation( 0 )
, mSvgAnnotation( 0 )
, mTextAnnotation( 0 )
, mPinLabels( 0 )
, mShowHideLabels( 0 )
, mMoveLabel( 0 )
, mRotateFeature( 0 )
, mRotateLabel( 0 )
, mChangeLabelProperties( 0 )
{}

QgsMapTool *mZoomIn;
QgsMapTool *mZoomOut;
QgsMapTool *mPan;
Expand Down Expand Up @@ -1496,8 +1544,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QCursor *mOverviewMapCursor;
//! Current map window extent in real-world coordinates
QRect *mMapWindow;
//! The previously selected non zoom map tool.
int mPreviousNonZoomMapTool;
QString mStartupPath;
//! full path name of the current map file (if it has been saved or loaded)
QString mFullPathName;
Expand Down
26 changes: 23 additions & 3 deletions src/plugins/grass/qgsgrassedit.cpp
Expand Up @@ -147,9 +147,32 @@ QgsGrassEdit::QgsGrassEdit( QgisInterface *iface, QgsMapLayer *layer, bool newMa
QWidget *parent, Qt::WindowFlags f )
: QMainWindow( parent, f )
, QgsGrassEditBase()
, mLayer( 0 )
, mToolBar( 0 )
, mSize( 0 )
, mValid( false )
, mInited( false )
, mIface( iface )
, mCanvas( 0 )
, mProvider( 0 )
, mTool( QgsGrassEdit::NONE )
, mSuspend( false )
, mEditPoints( 0 )
, mPoints( 0 )
, mCats( 0 )
, mPixmap( 0 )
, mTransform( 0 )
, mSelectedLine( 0 )
, mSelectedPart( 0 )
, mAddVertexEnd( false )
, mLineWidth( 0 )
, mMarkerSize( 0 )
, mAttributes( 0 )
, mNewMap( newMap )
, mNewPointAction( 0 )
, mNewLineAction( 0 )
, mNewBoundaryAction( 0 )
, mNewCentroidAction( 0 )
, mMoveVertexAction( 0 )
, mAddVertexAction( 0 )
, mDeleteVertexAction( 0 )
Expand All @@ -168,9 +191,6 @@ QgsGrassEdit::QgsGrassEdit( QgisInterface *iface, QgsMapLayer *layer, bool newMa
setupUi( this );

mRunning = true;
mTool = QgsGrassEdit::NONE;
mSuspend = false;
mNewMap = newMap;

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

Expand Down
1 change: 1 addition & 0 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -53,6 +53,7 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri )
, mShared( new QgsPostgresSharedData )
, mUseEstimatedMetadata( false )
, mSelectAtIdDisabled( false )
, mEnabledCapabilities( 0 )
, mConnectionRO( 0 )
, mConnectionRW( 0 )
, mTransaction( 0 )
Expand Down

0 comments on commit d3c8837

Please sign in to comment.