Skip to content
Permalink
Browse files

Minor Coverity fixes (null dereference, uninitialised members)

  • Loading branch information
nyalldawson committed Feb 14, 2015
1 parent 0080f9e commit f69e0bbf54a302e8a68bb5c46e08cde5f0cdb405
@@ -109,11 +109,11 @@ QgsComposerLegendWidget::QgsComposerLegendWidget( QgsComposerLegend* legend )
mainLayout->addWidget( itemPropertiesWidget );

mItemTreeView->setHeaderHidden( true );
mItemTreeView->setModel( legend->modelV2() );
mItemTreeView->setMenuProvider( new QgsComposerLegendMenuProvider( mItemTreeView, this ) );

if ( legend )
{
mItemTreeView->setModel( legend->modelV2() );
mItemTreeView->setMenuProvider( new QgsComposerLegendMenuProvider( mItemTreeView, this ) );
connect( legend, SIGNAL( itemChanged() ), this, SLOT( setGuiElements() ) );
mWrapCharLineEdit->setText( legend->wrapChar() );
}
@@ -49,8 +49,6 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap )
{
setupUi( this );

mLabel->setText( tr( "Map %1" ).arg( composerMap->id() ) );

//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerMap );
mainLayout->addWidget( itemPropertiesWidget );
@@ -135,6 +133,8 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap )

if ( composerMap )
{
mLabel->setText( tr( "Map %1" ).arg( composerMap->id() ) );

connect( composerMap, SIGNAL( itemChanged() ), this, SLOT( setGuiElementValues() ) );

QgsAtlasComposition* atlas = atlasComposition();
@@ -49,6 +49,14 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
: QWidget( parent )
, mLayer( layer )
, mMapCanvas( mapCanvas )
, mCharDlg( 0 )
, mQuadrantBtnGrp( 0 )
, mDirectSymbBtnGrp( 0 )
, mUpsidedownBtnGrp( 0 )
, mPlacePointBtnGrp( 0 )
, mPlaceLineBtnGrp( 0 )
, mPlacePolygonBtnGrp( 0 )
, mPreviewSize( 24 )
, mMinPixelLimit( 0 )
, mLoadSvgParams( false )
{
@@ -81,7 +89,6 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
mCharDlg = new QgsCharacterSelectorDialog( this );

mRefFont = lblFontPreview->font();
mPreviewSize = 24;

// main layer label-enabling connections
connect( chkEnableLabeling, SIGNAL( toggled( bool ) ), mFieldExpressionWidget, SLOT( setEnabled( bool ) ) );
@@ -92,6 +92,7 @@ QgsComposerHtml::QgsComposerHtml()
, mLoaded( false )
, mHtmlUnitsToMM( 1.0 )
, mRenderedPage( 0 )
, mEvaluateExpressions( true )
, mUseSmartBreaks( true )
, mMaxBreakDistance( 10 )
, mExpressionFeature( 0 )

0 comments on commit f69e0bb

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