diff --git a/src/app/main.cpp b/src/app/main.cpp index 8ac4335877d..8e88f53e717 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -251,6 +251,8 @@ static void dumpBacktrace( unsigned int depth ) } qgsFree( symbol ); +#else + Q_UNUSED( depth ); #endif } diff --git a/src/plugins/compass/qgscompassplugin.cpp b/src/plugins/compass/qgscompassplugin.cpp index d28e2eaed50..ed3c37b4b30 100644 --- a/src/plugins/compass/qgscompassplugin.cpp +++ b/src/plugins/compass/qgscompassplugin.cpp @@ -48,9 +48,11 @@ static const QString sPluginIcon = ":/compass.svn"; QgsCompassPlugin::QgsCompassPlugin( QgisInterface *themQGisIface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) , mQGisIface( themQGisIface ) + , mActionRunCompass( 0 ) + , mActionAboutCompass( 0 ) + , mQgsCompassPluginGui( 0 ) + , mDock( 0 ) { - /** Initialize the plugin */ - mDock = NULL; } QgsCompassPlugin::~QgsCompassPlugin() diff --git a/src/plugins/compass/qgscompassplugin.h b/src/plugins/compass/qgscompassplugin.h index b9dc642c917..4b3ba80dde2 100644 --- a/src/plugins/compass/qgscompassplugin.h +++ b/src/plugins/compass/qgscompassplugin.h @@ -85,8 +85,6 @@ class QgsCompassPlugin: public QObject, public QgisPlugin, private Ui::QgsCompas QString pluginDescriptionQString; //! Category of the plugin QString pluginCategoryQString; - //! Plugin type as defined in Plugin::PLUGINTYPE - int pluginType; //! Pointer to the QGIS interface object QgisInterface *mQGisIface; //! Pointer to the QAction object used in the menu and toolbar diff --git a/src/plugins/coordinate_capture/coordinatecapture.cpp b/src/plugins/coordinate_capture/coordinatecapture.cpp index 5f05d42b69c..ce9c99c8121 100644 --- a/src/plugins/coordinate_capture/coordinatecapture.cpp +++ b/src/plugins/coordinate_capture/coordinatecapture.cpp @@ -75,6 +75,7 @@ CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface ) , mypCRSLabel( NULL ) , mCanvasDisplayPrecision( 5 ) , mQGisIface( theQgisInterface ) + , mUserCrsDisplayPrecision( 5 ) , mQActionPointer( NULL ) { } diff --git a/src/plugins/dxf2shp_converter/builder.cpp b/src/plugins/dxf2shp_converter/builder.cpp index 54326c155dc..6ba5c36d5cd 100644 --- a/src/plugins/dxf2shp_converter/builder.cpp +++ b/src/plugins/dxf2shp_converter/builder.cpp @@ -43,7 +43,12 @@ Builder::Builder( std::string theFname, , fetchedprims( 0 ) , fetchedtexts( 0 ) , ignoringBlock( false ) + , current_polyline_willclose( false ) + , store_next_vertex_for_polyline_close( false ) , current_polyline_pointcount( 0 ) + , closePolyX( 0.0 ) + , closePolyY( 0.0 ) + , closePolyZ( 0.0 ) , currentBlockX( 0.0 ) , currentBlockY( 0.0 ) { diff --git a/src/plugins/dxf2shp_converter/dxf2shpconverter.h b/src/plugins/dxf2shp_converter/dxf2shpconverter.h index f2c7171cff6..ec58a27779c 100644 --- a/src/plugins/dxf2shp_converter/dxf2shpconverter.h +++ b/src/plugins/dxf2shp_converter/dxf2shpconverter.h @@ -73,7 +73,6 @@ class dxf2shpConverter: public QObject, public QgisPlugin // //////////////////////////////////////////////////////////////////// - int mPluginType; //! Pointer to the QGIS interface object QgisInterface *mQGisIface; //!pointer to the qaction for this plugin diff --git a/src/plugins/georeferencer/qgsgeorefplugin.h b/src/plugins/georeferencer/qgsgeorefplugin.h index f00af4ea759..374d0293ba9 100644 --- a/src/plugins/georeferencer/qgsgeorefplugin.h +++ b/src/plugins/georeferencer/qgsgeorefplugin.h @@ -103,7 +103,6 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin // //////////////////////////////////////////////////////////////////// - int mPluginType; //! Pointer to the QGIS interface object QgisInterface *mQGisIface; //!pointer to the qaction for this plugin diff --git a/src/plugins/georeferencer/qgsgeoreftransform.cpp b/src/plugins/georeferencer/qgsgeoreftransform.cpp index 937d6607198..6ed6e9cadc9 100644 --- a/src/plugins/georeferencer/qgsgeoreftransform.cpp +++ b/src/plugins/georeferencer/qgsgeoreftransform.cpp @@ -35,7 +35,7 @@ using std::pow; class QgsLinearGeorefTransform : public QgsGeorefTransformInterface { public: - QgsLinearGeorefTransform() {} + QgsLinearGeorefTransform() : mParameters() {} ~QgsLinearGeorefTransform() {} bool getOriginScale( QgsPoint &origin, double &scaleX, double &scaleY ) const; @@ -62,7 +62,7 @@ class QgsLinearGeorefTransform : public QgsGeorefTransformInterface class QgsHelmertGeorefTransform : public QgsGeorefTransformInterface { public: - QgsHelmertGeorefTransform() {} + QgsHelmertGeorefTransform() : mHelmertParameters() {} struct HelmertParameters { QgsPoint origin; @@ -115,7 +115,7 @@ class QgsGDALGeorefTransform : public QgsGeorefTransformInterface class QgsProjectiveGeorefTransform : public QgsGeorefTransformInterface { public: - QgsProjectiveGeorefTransform() {} + QgsProjectiveGeorefTransform() : mParameters() {} ~QgsProjectiveGeorefTransform() {} bool updateParametersFromGCPs( const std::vector &mapCoords, const std::vector &pixelCoords ) override; diff --git a/src/plugins/georeferencer/qgsrasterchangecoords.cpp b/src/plugins/georeferencer/qgsrasterchangecoords.cpp index b75375b3bea..6391beea68f 100644 --- a/src/plugins/georeferencer/qgsrasterchangecoords.cpp +++ b/src/plugins/georeferencer/qgsrasterchangecoords.cpp @@ -27,8 +27,12 @@ #endif QgsRasterChangeCoords::QgsRasterChangeCoords() + : mHasCrs( false ) + , mUL_X( 0. ) + , mUL_Y( 0. ) + , mResX( 1. ) + , mResY( 1. ) { - mHasCrs = false; } void QgsRasterChangeCoords::setRaster( const QString &fileRaster ) diff --git a/src/plugins/globe/globe_plugin.cpp b/src/plugins/globe/globe_plugin.cpp index 5b00bcc1669..33aa4595e22 100644 --- a/src/plugins/globe/globe_plugin.cpp +++ b/src/plugins/globe/globe_plugin.cpp @@ -128,6 +128,11 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface ) , mTileSource( 0 ) , mElevationManager( 0 ) , mObjectPlacer( 0 ) + , mControlCanvas( 0 ) + , mSelectedLat( 0. ) + , mSelectedLon( 0. ) + , mSelectedElevation( 0. ) + , mRootNode( 0 ) { mIsGlobeRunning = false; //needed to be "seen" by other plugins by doing diff --git a/src/plugins/globe/globe_plugin.h b/src/plugins/globe/globe_plugin.h index bf63e933394..9f52d1a09f6 100644 --- a/src/plugins/globe/globe_plugin.h +++ b/src/plugins/globe/globe_plugin.h @@ -135,7 +135,6 @@ class GlobePlugin : public QObject, public QgisPlugin void setupControls(); private://! Checks if the globe is open - int mPluginType; //! Pointer to the QGIS interface object QgisInterface *mQGisIface; //!pointer to the qaction for this plugin diff --git a/src/plugins/grass/qgsgrassmapcalc.cpp b/src/plugins/grass/qgsgrassmapcalc.cpp index e5e273c2f7e..4d32aa8d5ed 100644 --- a/src/plugins/grass/qgsgrassmapcalc.cpp +++ b/src/plugins/grass/qgsgrassmapcalc.cpp @@ -64,17 +64,17 @@ QgsGrassMapcalc::QgsGrassMapcalc( QGridLayout *layout = new QGridLayout( mViewFrame ); layout->addWidget( mView, 0, 0 ); - mCanvas = new QGraphicsScene( 0, 0, 400, 300 ); - mCanvas->setBackgroundBrush( QColor( 180, 180, 180 ) ); + mCanvasScene = new QGraphicsScene( 0, 0, 400, 300 ); + mCanvasScene->setBackgroundBrush( QColor( 180, 180, 180 ) ); mPaper = new QGraphicsRectItem(); - mCanvas->addItem( mPaper ); + mCanvasScene->addItem( mPaper ); mPaper->setBrush( QBrush( QColor( 255, 255, 255 ) ) ); mPaper->show(); resizeCanvas( 400, 300 ); - mView->setScene( mCanvas ); + mView->setScene( mCanvasScene ); QActionGroup *ag = new QActionGroup( this ); @@ -211,9 +211,9 @@ QgsGrassMapcalc::QgsGrassMapcalc( mOutput = new QgsGrassMapcalcObject( QgsGrassMapcalcObject::Output ); mOutput->setId( nextId() ); mOutput->setValue( tr( "Output" ) ); - mCanvas->addItem( mOutput ); - mOutput->setCenter(( int )( mCanvas->width() - mOutput->rect().width() ), ( int )( mCanvas->height() / 2 ) ); - mCanvas->update(); + mCanvasScene->addItem( mOutput ); + mOutput->setCenter(( int )( mCanvasScene->width() - mOutput->rect().width() ), ( int )( mCanvasScene->height() / 2 ) ); + mCanvasScene->update(); mOutput->QGraphicsRectItem::show(); // Set default tool @@ -272,7 +272,7 @@ void QgsGrassMapcalc::mousePressEvent( QMouseEvent* e ) showOptions( Select ); QRectF r( p.x() - 5, p.y() - 5, 10, 10 ); - QList l = mCanvas->items( r ); + QList l = mCanvasScene->items( r ); // Connector precedence (reverse order - connectors are under objects) QList::const_iterator it = l.constEnd(); @@ -331,7 +331,7 @@ void QgsGrassMapcalc::mousePressEvent( QMouseEvent* e ) setOption(); break; } - mCanvas->update(); + mCanvasScene->update(); mLastPoint = p; mStartMovePoint = p; } @@ -396,7 +396,7 @@ void QgsGrassMapcalc::mouseMoveEvent( QMouseEvent* e ) break; } - mCanvas->update(); + mCanvasScene->update(); mLastPoint = p; } @@ -431,7 +431,7 @@ void QgsGrassMapcalc::mouseReleaseEvent( QMouseEvent* e ) break; } autoGrow(); - mCanvas->update(); + mCanvasScene->update(); mLastPoint = p; } @@ -479,7 +479,7 @@ QStringList QgsGrassMapcalc::checkRegion() QgsDebugMsg( "entered." ); QStringList list; - QList l = mCanvas->items(); + QList l = mCanvasScene->items(); struct Cell_head currentWindow; if ( !QgsGrass::region( QgsGrass::getDefaultGisdbase(), @@ -545,7 +545,7 @@ bool QgsGrassMapcalc::inputRegion( struct Cell_head *window, QgsCoordinateRefere return false; } - QList l = mCanvas->items(); + QList l = mCanvasScene->items(); int count = 0; QList::const_iterator it = l.constEnd(); @@ -706,7 +706,7 @@ void QgsGrassMapcalc::setTool( int tool ) delete mObject; if ( mConnector ) delete mConnector; - mCanvas->update(); + mCanvasScene->update(); } mObject = 0; mConnector = 0; @@ -727,7 +727,7 @@ void QgsGrassMapcalc::setTool( int tool ) mMapComboBox->currentText() ); mObject->setCenter( mLastPoint.x(), mLastPoint.y() ); - mCanvas->addItem( mObject ); + mCanvasScene->addItem( mObject ); mObject->QGraphicsRectItem::show(); mActionAddMap->setChecked( true ); mView->viewport()->setMouseTracking( true ); @@ -739,7 +739,7 @@ void QgsGrassMapcalc::setTool( int tool ) mObject->setId( nextId() ); mObject->setValue( mConstantLineEdit->text() ); mObject->setCenter( mLastPoint.x(), mLastPoint.y() ); - mCanvas->addItem( mObject ); + mCanvasScene->addItem( mObject ); mObject->QGraphicsRectItem::show(); mActionAddConstant->setChecked( true ); mView->viewport()->setMouseTracking( true ); @@ -752,7 +752,7 @@ void QgsGrassMapcalc::setTool( int tool ) //mObject->setValue ( mFunctionComboBox->currentText() ); mObject->setFunction( mFunctions[ mFunctionComboBox->currentIndex()] ); mObject->setCenter( mLastPoint.x(), mLastPoint.y() ); - mCanvas->addItem( mObject ); + mCanvasScene->addItem( mObject ); mObject->QGraphicsRectItem::show(); mActionAddFunction->setChecked( true ); mView->viewport()->setMouseTracking( true ); @@ -760,9 +760,9 @@ void QgsGrassMapcalc::setTool( int tool ) break; case AddConnector: - mConnector = new QgsGrassMapcalcConnector( mCanvas ); + mConnector = new QgsGrassMapcalcConnector( mCanvasScene ); mConnector->setId( nextId() ); - mCanvas->addItem( mConnector ); + mCanvasScene->addItem( mConnector ); mConnector->QGraphicsLineItem::show(); mActionAddConnection->setChecked( true ); mView->setCursor( QCursor( Qt::CrossCursor ) ); @@ -772,7 +772,7 @@ void QgsGrassMapcalc::setTool( int tool ) showOptions( mTool ); setToolActionsOff(); mActionDeleteItem->setEnabled( false ); - mCanvas->update(); + mCanvasScene->update(); } void QgsGrassMapcalc::addMap() @@ -824,7 +824,7 @@ void QgsGrassMapcalc::deleteItem() mObject = 0; } mActionDeleteItem->setEnabled( false ); - mCanvas->update(); + mCanvasScene->update(); } void QgsGrassMapcalc::keyPressEvent( QKeyEvent * e ) @@ -927,7 +927,7 @@ void QgsGrassMapcalc::mapChanged() mObject->setValue( mMaps[mMapComboBox->currentIndex()], mMapComboBox->currentText() ); - mCanvas->update(); + mCanvasScene->update(); } void QgsGrassMapcalc::constantChanged() @@ -940,7 +940,7 @@ void QgsGrassMapcalc::constantChanged() return; mObject->setValue( mConstantLineEdit->text() ); - mCanvas->update(); + mCanvasScene->update(); } void QgsGrassMapcalc::functionChanged() @@ -953,7 +953,7 @@ void QgsGrassMapcalc::functionChanged() return; mObject->setFunction( mFunctions[ mFunctionComboBox->currentIndex()] ); - mCanvas->update(); + mCanvasScene->update(); } void QgsGrassMapcalc::limit( QPoint *point ) @@ -962,17 +962,17 @@ void QgsGrassMapcalc::limit( QPoint *point ) point->setX( 0 ); if ( point->y() < 0 ) point->setY( 0 ); - if ( point->x() > mCanvas->width() ) - point->setX( mCanvas->width() ); - if ( point->y() > mCanvas->height() ) - point->setY( mCanvas->height() ); + if ( point->x() > mCanvasScene->width() ) + point->setX( mCanvasScene->width() ); + if ( point->y() > mCanvasScene->height() ) + point->setY( mCanvasScene->height() ); } void QgsGrassMapcalc::resizeCanvas( int width, int height ) { - mCanvas->setSceneRect( 0, 0, width, height ); + mCanvasScene->setSceneRect( 0, 0, width, height ); mPaper->setRect( 0, 0, width, height ); - mCanvas->update(); + mCanvasScene->update(); } void QgsGrassMapcalc::growCanvas( int left, int right, int top, int bottom ) @@ -980,11 +980,11 @@ void QgsGrassMapcalc::growCanvas( int left, int right, int top, int bottom ) QgsDebugMsg( "entered." ); QgsDebugMsg( QString( "left = %1 right = %2 top = %3 bottom = %4" ).arg( left ).arg( right ).arg( top ).arg( bottom ) ); - int width = mCanvas->width() + left + right; - int height = mCanvas->height() + top + bottom; + int width = mCanvasScene->width() + left + right; + int height = mCanvasScene->height() + top + bottom; resizeCanvas( width, height ); - QList l = mCanvas->items(); + QList l = mCanvasScene->items(); QList::const_iterator it = l.constEnd(); while ( it != l.constBegin() ) @@ -1012,7 +1012,7 @@ void QgsGrassMapcalc::growCanvas( int left, int right, int top, int bottom ) } } - mCanvas->update(); + mCanvasScene->update(); } void QgsGrassMapcalc::autoGrow() @@ -1022,12 +1022,12 @@ void QgsGrassMapcalc::autoGrow() int thresh = 15; int left = 0; - int right = mCanvas->width(); + int right = mCanvasScene->width(); int top = 0; - int bottom = mCanvas->height(); + int bottom = mCanvasScene->height(); QgsDebugMsg( QString( "left = %1 right = %2 top = %3 bottom = %4" ).arg( left ).arg( right ).arg( top ).arg( bottom ) ); - QList l = mCanvas->items(); + QList l = mCanvasScene->items(); QList::const_iterator it = l.constEnd(); while ( it != l.constBegin() ) @@ -1056,9 +1056,9 @@ void QgsGrassMapcalc::autoGrow() QgsDebugMsg( QString( "left = %1 right = %2 top = %3 bottom = %4" ).arg( left ).arg( right ).arg( top ).arg( bottom ) ); } left = -left; - right = right - mCanvas->width(); + right = right - mCanvasScene->width(); top = -top; - bottom = bottom - mCanvas->height(); + bottom = bottom - mCanvasScene->height(); growCanvas( left, right, top, bottom ); } @@ -1151,11 +1151,11 @@ void QgsGrassMapcalc::save() QTextStream stream( &out ); stream << "\n"; - stream << " width() ) - + "\" height=\"" + QString::number( mCanvas->height() ) + stream << " width() ) + + "\" height=\"" + QString::number( mCanvasScene->height() ) + "\"/>\n"; - QList l = mCanvas->items(); + QList l = mCanvasScene->items(); QList::const_iterator it = l.constEnd(); while ( it != l.constBegin() ) @@ -1352,7 +1352,7 @@ void QgsGrassMapcalc::load() obj->setId( id ); obj->setValue( value ); obj->setCenter( x, y ); - mCanvas->addItem( obj ); + mCanvasScene->addItem( obj ); obj->show(); switch ( type ) @@ -1406,10 +1406,10 @@ void QgsGrassMapcalc::load() if ( id >= mNextId ) mNextId = id + 1; - QgsGrassMapcalcConnector *con = new QgsGrassMapcalcConnector( mCanvas ); + QgsGrassMapcalcConnector *con = new QgsGrassMapcalcConnector( mCanvasScene ); con->setId( id ); - mCanvas->addItem( con ); + mCanvasScene->addItem( con ); con->show(); QDomNodeList endNodes = e.elementsByTagName( "end" ); @@ -1455,7 +1455,7 @@ void QgsGrassMapcalc::load() mFileName = sel->map; mActionSave->setEnabled( true ); - mCanvas->update(); + mCanvasScene->update(); } void QgsGrassMapcalc::clear() @@ -1464,7 +1464,7 @@ void QgsGrassMapcalc::clear() setTool( Select ); - QList l = mCanvas->items(); + QList l = mCanvasScene->items(); QList::const_iterator it = l.constEnd(); while ( it != l.constBegin() ) @@ -1479,7 +1479,9 @@ void QgsGrassMapcalc::clear() } /******************** CANVAS ITEMS ******************************/ -QgsGrassMapcalcItem::QgsGrassMapcalcItem() : mSelected( false ) +QgsGrassMapcalcItem::QgsGrassMapcalcItem() + : mSelected( false ) + , mId( -1 ) { QgsDebugMsg( "entered." ); } @@ -1488,16 +1490,6 @@ QgsGrassMapcalcItem::~QgsGrassMapcalcItem() { } -void QgsGrassMapcalcItem::setSelected( bool s ) -{ - mSelected = s; -} - -bool QgsGrassMapcalcItem::selected() -{ - return mSelected; -} - /**************************** OBJECT ************************/ QgsGrassMapcalcObject::QgsGrassMapcalcObject( int type ) : QGraphicsRectItem( -1000, -1000, 50, 20, 0 ) @@ -1661,10 +1653,10 @@ void QgsGrassMapcalcObject::resetSize() { for ( int i = 0; i < mFunction.inputLabels().size(); i++ ) { - /* - QStringList::Iterator it = mFunction.inputLabels().at(i); +#if 0 + QStringList::Iterator it = mFunction.inputLabels().at( i ); QString l = *it; - */ +#endif QString l = mFunction.inputLabels().at( i ); int len = metrics.width( l ); if ( len > mInputTextWidth ) diff --git a/src/plugins/grass/qgsgrassmapcalc.h b/src/plugins/grass/qgsgrassmapcalc.h index 5a170831eb1..d56fefb59a4 100644 --- a/src/plugins/grass/qgsgrassmapcalc.h +++ b/src/plugins/grass/qgsgrassmapcalc.h @@ -152,7 +152,7 @@ class QgsGrassMapcalc: public QMainWindow, private Ui::QgsGrassMapcalcBase, QgsGrassMapcalcView *mView; // Canvas - QGraphicsScene *mCanvas; + QGraphicsScene *mCanvasScene; // Tool int mTool; @@ -269,8 +269,8 @@ class QgsGrassMapcalcItem QgsGrassMapcalcItem(); virtual ~QgsGrassMapcalcItem(); - virtual void setSelected( bool s ); - bool selected( void ); + virtual void setSelected( bool s ) { mSelected = s; } + bool selected( void ) { return mSelected; } // virtual void paint ( QPainter * painter, // const QStyleOptionGraphicsItem * option, QWidget * widget ); // diff --git a/src/plugins/grass/qgsgrassmodel.cpp b/src/plugins/grass/qgsgrassmodel.cpp index c5cd2d52f4a..9a8a65152e3 100644 --- a/src/plugins/grass/qgsgrassmodel.cpp +++ b/src/plugins/grass/qgsgrassmodel.cpp @@ -77,6 +77,7 @@ QgsGrassModelItem::QgsGrassModelItem() : mParent( 0 ) , mType( QgsGrassModel::None ) , mPopulated( false ) + , mModel( 0 ) { } diff --git a/src/plugins/grass/qgsgrassmodule.cpp b/src/plugins/grass/qgsgrassmodule.cpp index 36fec906749..9dcc0a3cebc 100644 --- a/src/plugins/grass/qgsgrassmodule.cpp +++ b/src/plugins/grass/qgsgrassmodule.cpp @@ -287,6 +287,8 @@ QgsGrassModuleOptions::QgsGrassModuleOptions( , mTools( tools ) , mModule( module ) , mDirect( direct ) + , mParent( 0 ) + , mRegionModeComboBox( 0 ) { QgsDebugMsg( "called." ); @@ -309,8 +311,8 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions( QgisInterface *iface, QString xname, QDomElement qDocElem, bool direct, QWidget * parent, Qt::WindowFlags f ) - : QWidget( parent, f ), - QgsGrassModuleOptions( tools, module, iface, direct ) + : QWidget( parent, f ) + , QgsGrassModuleOptions( tools, module, iface, direct ) { //QgsDebugMsg( "called." ); QgsDebugMsg( QString( "PATH = %1" ).arg( getenv( "PATH" ) ) ); diff --git a/src/plugins/grass/qgsgrassplugin.cpp b/src/plugins/grass/qgsgrassplugin.cpp index a4850b1921e..4313b156d3a 100644 --- a/src/plugins/grass/qgsgrassplugin.cpp +++ b/src/plugins/grass/qgsgrassplugin.cpp @@ -62,9 +62,24 @@ QgsGrassPlugin::QgsGrassPlugin( QgisInterface * theQgisInterFace ) , pluginVersionQString( tr( "0.1" ) ) , pluginDescriptionQString( tr( "GRASS layer" ) ) , pluginCategoryQString( tr( "Plugins" ) ) + , mToolBarPointer( 0 ) , qGisInterface( theQgisInterFace ) + , mCanvas( 0 ) + , mRegionAction( 0 ) + , mRegion( 0 ) + , mRegionBand( 0 ) , mTools( 0 ) + , mNewMapset( 0 ) , mEdit( 0 ) + , mOpenMapsetAction( 0 ) + , mNewMapsetAction( 0 ) + , mCloseMapsetAction( 0 ) + , mAddVectorAction( 0 ) + , mAddRasterAction( 0 ) + , mOpenToolsAction( 0 ) + , mEditRegionAction( 0 ) + , mEditAction( 0 ) + , mNewVectorAction( 0 ) { } @@ -113,7 +128,7 @@ int QgsGrassPlugin::type() */ void QgsGrassPlugin::initGui() { - toolBarPointer = 0; + mToolBarPointer = 0; mTools = 0; mNewMapset = 0; mRegion = 0; @@ -190,21 +205,21 @@ void QgsGrassPlugin::initGui() qGisInterface->addPluginToMenu( tr( "&GRASS" ), mEditRegionAction ); // Add the toolbar to the main window - toolBarPointer = qGisInterface->addToolBar( tr( "GRASS" ) ); - toolBarPointer->setObjectName( "GRASS" ); + mToolBarPointer = qGisInterface->addToolBar( tr( "GRASS" ) ); + mToolBarPointer->setObjectName( "GRASS" ); // Add to the toolbar - toolBarPointer->addAction( mOpenMapsetAction ); - toolBarPointer->addAction( mNewMapsetAction ); - toolBarPointer->addAction( mCloseMapsetAction ); - toolBarPointer->addSeparator(); - toolBarPointer->addAction( mAddVectorAction ); - toolBarPointer->addAction( mAddRasterAction ); - toolBarPointer->addAction( mNewVectorAction ); - toolBarPointer->addAction( mEditAction ); - toolBarPointer->addAction( mOpenToolsAction ); - toolBarPointer->addAction( mRegionAction ); - toolBarPointer->addAction( mEditRegionAction ); + mToolBarPointer->addAction( mOpenMapsetAction ); + mToolBarPointer->addAction( mNewMapsetAction ); + mToolBarPointer->addAction( mCloseMapsetAction ); + mToolBarPointer->addSeparator(); + mToolBarPointer->addAction( mAddVectorAction ); + mToolBarPointer->addAction( mAddRasterAction ); + mToolBarPointer->addAction( mNewVectorAction ); + mToolBarPointer->addAction( mEditAction ); + mToolBarPointer->addAction( mOpenToolsAction ); + mToolBarPointer->addAction( mRegionAction ); + mToolBarPointer->addAction( mEditRegionAction ); // Set icons to current theme setCurrentTheme( "" ); @@ -867,10 +882,10 @@ void QgsGrassPlugin::unload() delete mEditAction; delete mNewVectorAction; - if ( toolBarPointer ) + if ( mToolBarPointer ) { - delete toolBarPointer; - toolBarPointer = 0; + delete mToolBarPointer; + mToolBarPointer = 0; } // disconnect slots of QgsGrassPlugin so they're not fired also after unload @@ -887,7 +902,7 @@ void QgsGrassPlugin::unload() void QgsGrassPlugin::setCurrentTheme( QString theThemeName ) { Q_UNUSED( theThemeName ); - if ( toolBarPointer ) + if ( mToolBarPointer ) { mOpenMapsetAction->setIcon( getThemeIcon( "grass_open_mapset.png" ) ); mNewMapsetAction->setIcon( getThemeIcon( "grass_new_mapset.png" ) ); diff --git a/src/plugins/grass/qgsgrassplugin.h b/src/plugins/grass/qgsgrassplugin.h index 58ba97a8dc0..ff0692a7bd5 100644 --- a/src/plugins/grass/qgsgrassplugin.h +++ b/src/plugins/grass/qgsgrassplugin.h @@ -144,10 +144,8 @@ class QgsGrassPlugin : public QObject, public QgisPlugin QString pluginDescriptionQString; //! Category of the plugin QString pluginCategoryQString; - //! Plugin type as defined in QgisPlugin::PLUGINTYPE - int pluginType; //! Pointer to our toolbar - QToolBar *toolBarPointer; + QToolBar *mToolBarPointer; //! Pointer to the QGIS interface object QgisInterface *qGisInterface; //! Pointer to canvas diff --git a/src/plugins/grass/qgsgrassutils.cpp b/src/plugins/grass/qgsgrassutils.cpp index 1bc1d88da36..45469f009c2 100644 --- a/src/plugins/grass/qgsgrassutils.cpp +++ b/src/plugins/grass/qgsgrassutils.cpp @@ -65,7 +65,15 @@ bool QgsGrassUtils::itemExists( QString element, QString item ) return fi.exists(); } -QgsGrassElementDialog::QgsGrassElementDialog( QWidget *parent ) : QObject(), mParent( parent ) +QgsGrassElementDialog::QgsGrassElementDialog( QWidget *parent ) + : QObject() + , mParent( parent ) + , mDialog( 0 ) + , mLineEdit( 0 ) + , mLabel( 0 ) + , mErrorLabel( 0 ) + , mOkButton( 0 ) + , mCancelButton( 0 ) { } diff --git a/src/plugins/heatmap/heatmap.cpp b/src/plugins/heatmap/heatmap.cpp index c1fe459884a..53f8800e683 100644 --- a/src/plugins/heatmap/heatmap.cpp +++ b/src/plugins/heatmap/heatmap.cpp @@ -69,6 +69,7 @@ static const QString sPluginIcon = ":/heatmap/heatmap.png"; Heatmap::Heatmap( QgisInterface * theQgisInterface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) , mQGisIface( theQgisInterface ) + , mDecay( 1. ) , mQActionPointer( 0 ) { } diff --git a/src/plugins/heatmap/heatmap.h b/src/plugins/heatmap/heatmap.h index 50d521913f5..43eb2d96d3b 100644 --- a/src/plugins/heatmap/heatmap.h +++ b/src/plugins/heatmap/heatmap.h @@ -121,7 +121,6 @@ class Heatmap: public QObject, public QgisPlugin // MANDATORY PLUGIN PROPERTY DECLARATIONS ..... - int mPluginType; //! Pointer to the QGIS interface object QgisInterface *mQGisIface; //!pointer to the qaction for this plugin diff --git a/src/plugins/heatmap/heatmapgui.cpp b/src/plugins/heatmap/heatmapgui.cpp index eaf94ca9dfe..cd1671b14f8 100644 --- a/src/plugins/heatmap/heatmapgui.cpp +++ b/src/plugins/heatmap/heatmapgui.cpp @@ -37,8 +37,8 @@ //standard includes HeatmapGui::HeatmapGui( QWidget* parent, Qt::WindowFlags fl, QMap* temporarySettings ) - : QDialog( parent, fl ), - mRows( 500 ) + : QDialog( parent, fl ) + , mRows( 500 ) { setupUi( this ); diff --git a/src/plugins/offline_editing/offline_editing_plugin.h b/src/plugins/offline_editing/offline_editing_plugin.h index 5c0727febe0..ebab857d5a8 100644 --- a/src/plugins/offline_editing/offline_editing_plugin.h +++ b/src/plugins/offline_editing/offline_editing_plugin.h @@ -47,7 +47,6 @@ class QgsOfflineEditingPlugin : public QObject, public QgisPlugin void help(); private: - int mPluginType; //! Pointer to the QGIS interface object QgisInterface* mQGisIface; //!pointer to the qaction for this plugin diff --git a/src/plugins/roadgraph/roadgraphplugin.cpp b/src/plugins/roadgraph/roadgraphplugin.cpp index ee1ba5448e0..9b05df9dca2 100644 --- a/src/plugins/roadgraph/roadgraphplugin.cpp +++ b/src/plugins/roadgraph/roadgraphplugin.cpp @@ -77,9 +77,9 @@ static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI; RoadGraphPlugin::RoadGraphPlugin( QgisInterface * theQgisInterface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) , mQGisIface( theQgisInterface ) + , mQSettingsAction( 0 ) + , mQShortestPathDock( 0 ) { - - mQShortestPathDock = NULL; mSettings = new RgLineVectorLayerSettings(); mTimeUnitName = "h"; mDistanceUnitName = "km"; diff --git a/src/plugins/roadgraph/roadgraphplugin.h b/src/plugins/roadgraph/roadgraphplugin.h index 9a2cb825f80..784e27bce42 100644 --- a/src/plugins/roadgraph/roadgraphplugin.h +++ b/src/plugins/roadgraph/roadgraphplugin.h @@ -114,7 +114,6 @@ class RoadGraphPlugin: public QObject, public QgisPlugin // MANDATORY PLUGIN PROPERTY DECLARATIONS ..... // //////////////////////////////////////////////////////////////////// - int mPluginType; //! Pointer to the QGIS interface object QgisInterface *mQGisIface; diff --git a/src/plugins/spit/qgsspit.h b/src/plugins/spit/qgsspit.h index a3822547aa2..e9542c55f2f 100644 --- a/src/plugins/spit/qgsspit.h +++ b/src/plugins/spit/qgsspit.h @@ -145,7 +145,6 @@ class ShapefileTableDelegate : public QItemDelegate private: QStringList mSchemaList; - int mCurrentIndex; }; #endif diff --git a/src/plugins/spit/qgsspitplugin.h b/src/plugins/spit/qgsspitplugin.h index 668118f7b94..092a2264eae 100644 --- a/src/plugins/spit/qgsspitplugin.h +++ b/src/plugins/spit/qgsspitplugin.h @@ -62,8 +62,6 @@ class QgsSpitPlugin: public QObject, public QgisPlugin QString pDescription; //! Category of the plugin QString pCategory; - //! Plugin type as defined in QgisPlugin::PLUGINTYPE - int ptype; //! Pionter to QGIS main application object QWidget *qgisMainWindow; //! Pointer to the QGIS interface object diff --git a/src/plugins/topology/topol.h b/src/plugins/topology/topol.h index e0cab3da431..038daf5ca86 100644 --- a/src/plugins/topology/topol.h +++ b/src/plugins/topology/topol.h @@ -94,7 +94,6 @@ class Topol: public QObject, public QgisPlugin // //////////////////////////////////////////////////////////////////// - int mPluginType; //! Pointer to the QGIS interface object QgisInterface *mQGisIface; //!pointer to the qaction for this plugin diff --git a/src/providers/gpx/gpsdata.cpp b/src/providers/gpx/gpsdata.cpp index e6ccf118d46..12b96145938 100644 --- a/src/providers/gpx/gpsdata.cpp +++ b/src/providers/gpx/gpsdata.cpp @@ -60,6 +60,8 @@ void QgsGPSObject::writeXML( QTextStream& stream ) QgsGPSPoint::QgsGPSPoint() + : lat( 0. ) + , lon( 0. ) { ele = -std::numeric_limits::max(); } diff --git a/src/providers/grass/qgsgrassgislib.h b/src/providers/grass/qgsgrassgislib.h index 0c96eb0ec7b..679c64467f6 100644 --- a/src/providers/grass/qgsgrassgislib.h +++ b/src/providers/grass/qgsgrassgislib.h @@ -65,8 +65,17 @@ class GRASS_LIB_EXPORT QgsGrassGisLib QgsRasterInterface *input; int band; int row; // next row to be written - Raster() : provider( 0 ), projector( 0 ), input( 0 ), band( 1 ), row( 0 ) {} double noDataValue; // output no data value + + Raster() + : provider( 0 ) + , projector( 0 ) + , input( 0 ) + , band( 1 ) + , row( 0 ) + , fd( -1 ) + , noDataValue( -1 ) + {} }; static QgsGrassGisLib* instance(); diff --git a/src/providers/mssql/qgsmssqldataitems.cpp b/src/providers/mssql/qgsmssqldataitems.cpp index 659603b67f7..b2eb44165f7 100644 --- a/src/providers/mssql/qgsmssqldataitems.cpp +++ b/src/providers/mssql/qgsmssqldataitems.cpp @@ -35,6 +35,9 @@ // --------------------------------------------------------------------------- QgsMssqlConnectionItem::QgsMssqlConnectionItem( QgsDataItem* parent, QString name, QString path ) : QgsDataCollectionItem( parent, name, path ) + , mUseGeometryColumns( false ) + , mUseEstimatedMetadata( false ) + , mAllowGeometrylessTables( true ) { mCapabilities |= Fast; mIconName = "mIconConnect.png"; diff --git a/src/providers/oracle/ocispatial/qsql_ocispatial.cpp b/src/providers/oracle/ocispatial/qsql_ocispatial.cpp index bb4f7223bef..1402b6b6ff2 100644 --- a/src/providers/oracle/ocispatial/qsql_ocispatial.cpp +++ b/src/providers/oracle/ocispatial/qsql_ocispatial.cpp @@ -2896,6 +2896,8 @@ QOCISpatialResultPrivate::QOCISpatialResultPrivate( QOCISpatialResult *result, c , err( 0 ) , svc( const_cast( driver->svc ) ) , sql( 0 ) + , sdoobj( 0 ) + , sdoind( 0 ) , transaction( driver->transaction ) , serverVersion( driver->serverVersion ) , prefetchRows( driver->prefetchRows ) diff --git a/src/providers/postgres/qgscolumntypethread.cpp b/src/providers/postgres/qgscolumntypethread.cpp index b9695a2e93c..6495d37f340 100644 --- a/src/providers/postgres/qgscolumntypethread.cpp +++ b/src/providers/postgres/qgscolumntypethread.cpp @@ -27,6 +27,7 @@ QgsGeomColumnTypeThread::QgsGeomColumnTypeThread( QString name, bool useEstimate , mName( name ) , mUseEstimatedMetadata( useEstimatedMetaData ) , mAllowGeometrylessTables( allowGeometrylessTables ) + , mStopped( false ) { qRegisterMetaType( "QgsPostgresLayerProperty" ); } diff --git a/src/providers/wcs/qgswcscapabilities.cpp b/src/providers/wcs/qgswcscapabilities.cpp index e549e0ddf28..79108630d19 100644 --- a/src/providers/wcs/qgswcscapabilities.cpp +++ b/src/providers/wcs/qgswcscapabilities.cpp @@ -76,7 +76,8 @@ QgsWcsCapabilities::QgsWcsCapabilities( QgsDataSourceURI const &theUri ) } QgsWcsCapabilities::QgsWcsCapabilities() - : mCapabilitiesReply( NULL ) + : mCapabilities() + , mCapabilitiesReply( NULL ) , mCoverageCount( 0 ) { } diff --git a/src/providers/wms/qgswmscapabilities.cpp b/src/providers/wms/qgswmscapabilities.cpp index a49bbaaed34..b13b4dcdec9 100644 --- a/src/providers/wms/qgswmscapabilities.cpp +++ b/src/providers/wms/qgswmscapabilities.cpp @@ -108,6 +108,7 @@ bool QgsWmsSettings::parseUri( QString uriString ) QgsWmsCapabilities::QgsWmsCapabilities() : mValid( false ) , mLayerCount( -1 ) + , mCapabilities() { } diff --git a/src/server/qgsrequesthandler.h b/src/server/qgsrequesthandler.h index 522548c2909..310c33101d7 100644 --- a/src/server/qgsrequesthandler.h +++ b/src/server/qgsrequesthandler.h @@ -44,7 +44,10 @@ class QgsRequestHandler public: - QgsRequestHandler() {} + QgsRequestHandler() + : mHeadersSent( false ) + , mException( 0 ) + {} virtual ~QgsRequestHandler() {} /**Parses the input and creates a request neutral Parameter/Value map*/ virtual void parseInput() = 0; diff --git a/src/server/qgswfsserver.cpp b/src/server/qgswfsserver.cpp index 1f50dcdec28..5aa1aec50fa 100644 --- a/src/server/qgswfsserver.cpp +++ b/src/server/qgswfsserver.cpp @@ -65,7 +65,10 @@ static const QString OGC_NAMESPACE = "http://www.opengis.net/ogc"; static const QString QGS_NAMESPACE = "http://www.qgis.org/gml"; QgsWFSServer::QgsWFSServer( const QString& configFilePath, QMap ¶meters, QgsWFSProjectParser* cp, - QgsRequestHandler* rh ): QgsOWSServer( configFilePath, parameters, rh ), mConfigParser( cp ) + QgsRequestHandler* rh ) + : QgsOWSServer( configFilePath, parameters, rh ) + , mWithGeom( true ) + , mConfigParser( cp ) { } diff --git a/src/server/qgswmsserver.cpp b/src/server/qgswmsserver.cpp index 0997cb1c743..e0df605d6bd 100644 --- a/src/server/qgswmsserver.cpp +++ b/src/server/qgswmsserver.cpp @@ -68,6 +68,8 @@ QgsWMSServer::QgsWMSServer( const QString& configFilePath, QMap