mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix some valgrind issues
This commit is contained in:
parent
e55fbebf68
commit
7aa4fa090b
@ -3348,9 +3348,6 @@ void QgisApp::initLayerTreeView()
|
||||
actionCollapseAll->setToolTip( tr( "Collapse All" ) );
|
||||
connect( actionCollapseAll, &QAction::triggered, mLayerTreeView, &QgsLayerTreeView::collapseAllNodes );
|
||||
|
||||
QWidget *spacer = new QWidget();
|
||||
spacer->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
|
||||
QToolBar *toolbar = new QToolBar();
|
||||
toolbar->setIconSize( QSize( 16, 16 ) );
|
||||
toolbar->addAction( mActionStyleDock );
|
||||
|
@ -455,7 +455,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
mWMSPrecisionSpinBox->setValue( WMSprecision );
|
||||
}
|
||||
|
||||
bool ok;
|
||||
bool ok = false;
|
||||
QStringList values;
|
||||
|
||||
mWMSExtMinX->setValidator( new QDoubleValidator( mWMSExtMinX ) );
|
||||
|
@ -66,6 +66,7 @@ void QgsGlowEffect::draw( QgsRenderContext &context )
|
||||
QImage im = sourceAsImage( context )->copy();
|
||||
|
||||
QgsColorRamp *ramp = nullptr;
|
||||
std::unique_ptr< QgsGradientColorRamp > tempRamp;
|
||||
if ( mColorType == ColorRamp && mRamp )
|
||||
{
|
||||
ramp = mRamp;
|
||||
@ -75,7 +76,8 @@ void QgsGlowEffect::draw( QgsRenderContext &context )
|
||||
//create a temporary ramp
|
||||
QColor transparentColor = mColor;
|
||||
transparentColor.setAlpha( 0 );
|
||||
ramp = new QgsGradientColorRamp( mColor, transparentColor );
|
||||
tempRamp.reset( new QgsGradientColorRamp( mColor, transparentColor ) );
|
||||
ramp = tempRamp.get();
|
||||
}
|
||||
|
||||
QgsImageOperation::DistanceTransformProperties dtProps;
|
||||
@ -107,12 +109,6 @@ void QgsGlowEffect::draw( QgsRenderContext &context )
|
||||
painter->setCompositionMode( mBlendMode );
|
||||
painter->drawImage( imageOffset( context ), im );
|
||||
painter->restore();
|
||||
|
||||
if ( !mRamp )
|
||||
{
|
||||
//delete temporary ramp
|
||||
delete ramp;
|
||||
}
|
||||
}
|
||||
|
||||
QgsStringMap QgsGlowEffect::properties() const
|
||||
|
@ -745,6 +745,7 @@ bool QgsStyle::runEmptyQuery( char *query, bool freeQuery )
|
||||
if ( nErr != SQLITE_OK )
|
||||
{
|
||||
QgsDebugMsg( zErr );
|
||||
sqlite3_free( zErr );
|
||||
}
|
||||
|
||||
return zErr == SQLITE_OK;
|
||||
|
@ -498,7 +498,8 @@ void QgsColorRampButton::setRandomColorRamp()
|
||||
{
|
||||
if ( !isRandomColorRamp() )
|
||||
{
|
||||
setColorRamp( new QgsRandomColorRamp() );
|
||||
std::unique_ptr< QgsRandomColorRamp > newRamp( new QgsRandomColorRamp() );
|
||||
setColorRamp( newRamp.get() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,8 @@ void QgsOptionsDialogBase::warnAboutMissingObjects()
|
||||
|
||||
|
||||
QgsSearchHighlightOptionWidget::QgsSearchHighlightOptionWidget( QWidget *widget )
|
||||
: mWidget( widget )
|
||||
: QObject( widget )
|
||||
, mWidget( widget )
|
||||
, mStyleSheet( QString() )
|
||||
, mValid( true )
|
||||
, mChangedStyle( false )
|
||||
|
@ -756,7 +756,7 @@ void QgsCategorizedSymbolRendererWidget::applyColorRamp()
|
||||
{
|
||||
if ( !btnColorRamp->isNull() )
|
||||
{
|
||||
mRenderer->updateColorRamp( btnColorRamp->colorRamp()->clone() );
|
||||
mRenderer->updateColorRamp( btnColorRamp->colorRamp() );
|
||||
}
|
||||
mModel->updateSymbology();
|
||||
}
|
||||
|
@ -508,7 +508,7 @@ QgsGraduatedSymbolRendererWidget::QgsGraduatedSymbolRendererWidget( QgsVectorLay
|
||||
updateUiFromRenderer();
|
||||
|
||||
// menus for data-defined rotation/size
|
||||
QMenu *advMenu = new QMenu;
|
||||
QMenu *advMenu = new QMenu( this );
|
||||
|
||||
advMenu->addAction( tr( "Symbol levels..." ), this, SLOT( showSymbolLevels() ) );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user