Skip to content

Commit 6a312be

Browse files
committed
fixed grass and browser coverity warnings
1 parent 536135a commit 6a312be

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/app/qgsbrowserdockwidget.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( QString name, QWidget * parent ) :
438438
, mModel( 0 )
439439
, mProxyModel( 0 )
440440
, mPropertiesWidgetEnabled( false )
441+
, mPropertiesWidgetHeight( 0 )
441442
{
442443
setupUi( this );
443444

src/plugins/grass/qgsgrassbrowser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ void QgsGrassBrowser::deleteMap()
452452
continue; // should not happen
453453
}
454454

455-
QgsGrassObject::Type mapType;
455+
QgsGrassObject::Type mapType = QgsGrassObject::None;
456456
if ( type == QgsGrassModel::Raster )
457457
mapType = QgsGrassObject::Raster;
458458
else if ( type == QgsGrassModel::Vector )

src/providers/grass/qgsgrass.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class GRASS_LIB_EXPORT QgsGrassObject
6868
//! Element type
6969
enum Type { None, Raster, Vector, Region };
7070

71-
QgsGrassObject() {}
71+
QgsGrassObject() : mType( None ) {}
7272
QgsGrassObject( const QString& gisdbase, const QString& location = QString::null,
7373
const QString& mapset = QString::null, const QString& name = QString::null,
7474
Type type = None );

src/providers/grass/qgsgrassprovidermodule.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ void QgsGrassVectorItem::deleteGrassObject()
234234
QgsGrassVectorLayerItem::QgsGrassVectorLayerItem( QgsDataItem* parent, QgsGrassObject grassObject, QString layerName,
235235
QString path, QString uri,
236236
LayerType layerType, bool singleLayer )
237-
: QgsGrassObjectItem( parent, grassObject, layerName, path, uri, layerType, "grass", singleLayer )
237+
: QgsGrassObjectItem( parent, grassObject, layerName, path, uri, layerType, "grass" )
238+
, mSingleLayer( singleLayer )
238239
{
239240
}
240241

0 commit comments

Comments
 (0)