Skip to content

Commit b45469f

Browse files
sikmirm-kuhn
authored andcommitted
Fix some errors/typos
1 parent ff8d912 commit b45469f

11 files changed

Lines changed: 15 additions & 14 deletions

‎src/app/qgsmaptoolmeasureangle.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ QgsMapToolMeasureAngle::~QgsMapToolMeasureAngle()
4444

4545
void QgsMapToolMeasureAngle::canvasMoveEvent( QgsMapMouseEvent* e )
4646
{
47-
if ( !mRubberBand || mAnglePoints.size() < 1 || mAnglePoints.size() > 2 || !mRubberBand )
47+
if ( !mRubberBand || mAnglePoints.size() < 1 || mAnglePoints.size() > 2 )
4848
{
4949
return;
5050
}

‎src/app/qgsmaptooloffsetcurve.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ QgsGeometry QgsMapToolOffsetCurve::linestringFromPolygon( const QgsGeometry& fea
418418
else if ( geomType == QgsWkbTypes::MultiPolygon || geomType == QgsWkbTypes::MultiPolygon25D )
419419
{
420420
//iterate all polygons / rings
421-
QgsMultiPolygon multiPoly = featureGeom.asMultiPolygon();
421+
multiPoly = featureGeom.asMultiPolygon();
422422
}
423423
else
424424
{

‎src/core/auth/qgsauthmethodregistry.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ QString QgsAuthMethodRegistry::pluginList( bool asHtml ) const
228228

229229
if ( asHtml )
230230
{
231-
list + "<br></li>";
231+
list += "<br></li>";
232232
}
233233
else
234234
{

‎src/core/composer/qgsatlascomposition.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,10 @@ bool QgsAtlasComposition::setFilenamePattern( const QString& pattern )
683683
QgsExpressionContext QgsAtlasComposition::createExpressionContext()
684684
{
685685
QgsExpressionContext expressionContext;
686-
expressionContext << QgsExpressionContextUtils::globalScope()
687-
<< QgsExpressionContextUtils::projectScope( mComposition->project() );
686+
expressionContext << QgsExpressionContextUtils::globalScope();
688687
if ( mComposition )
689-
expressionContext << QgsExpressionContextUtils::compositionScope( mComposition );
688+
expressionContext << QgsExpressionContextUtils::projectScope( mComposition->project() )
689+
<< QgsExpressionContextUtils::compositionScope( mComposition );
690690

691691
expressionContext.appendScope( QgsExpressionContextUtils::atlasScope( this ) );
692692
if ( mCoverageLayer )

‎src/core/composer/qgscomposerattributetablev2.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ bool QgsComposerAttributeTableV2::getTableContents( QgsComposerTableContents &co
508508
expression->prepare( &context );
509509
QVariant value = expression->evaluate( &context );
510510
currentRow << value;
511+
delete expression;
511512
}
512513
}
513514

‎src/core/dxf/qgsdxfexport.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3653,7 +3653,7 @@ void QgsDxfExport::addFeature( QgsSymbolRenderContext& ctx, const QgsCoordinateT
36533653

36543654
QColor penColor;
36553655
QColor brushColor;
3656-
if ( mSymbologyExport != NoSymbology )
3656+
if ( mSymbologyExport != NoSymbology && symbolLayer )
36573657
{
36583658
penColor = colorFromSymbolLayer( symbolLayer, ctx );
36593659
brushColor = symbolLayer->dxfBrushColor( ctx );

‎src/core/qgseditformconfig.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ void QgsEditFormConfig::readXml( const QDomNode& node )
272272
}
273273

274274
QDomNode editFormInitCodeSourceNode = node.namedItem( QStringLiteral( "editforminitcodesource" ) );
275-
if ( !editFormInitCodeSourceNode.isNull() || ( !editFormInitCodeSourceNode.isNull() && !editFormInitCodeSourceNode.toElement().text().isEmpty() ) )
275+
if ( !editFormInitCodeSourceNode.isNull() && !editFormInitCodeSourceNode.toElement().text().isEmpty() )
276276
{
277277
setInitCodeSource( static_cast< QgsEditFormConfig::PythonInitCodeSource >( editFormInitCodeSourceNode.toElement().text().toInt() ) );
278278
}
@@ -297,7 +297,7 @@ void QgsEditFormConfig::readXml( const QDomNode& node )
297297
}
298298

299299
QDomNode editFormInitFilePathNode = node.namedItem( QStringLiteral( "editforminitfilepath" ) );
300-
if ( !editFormInitFilePathNode.isNull() || ( !editFormInitFilePathNode.isNull() && !editFormInitFilePathNode.toElement().text().isEmpty() ) )
300+
if ( !editFormInitFilePathNode.isNull() && !editFormInitFilePathNode.toElement().text().isEmpty() )
301301
{
302302
setInitFilePath( QgsProject::instance()->readPath( editFormInitFilePathNode.toElement().text() ) );
303303
}

‎src/core/qgsproviderregistry.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ QString QgsProviderRegistry::pluginList( bool asHTML ) const
308308
list += it->second->description();
309309

310310
if ( asHTML )
311-
list + "<br></li>";
311+
list += "<br></li>";
312312
else
313313
list += '\n';
314314

‎src/core/qgstaskmanager.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ void QgsTaskManager::layersWillBeRemoved( const QStringList& layerIds )
669669
}
670670

671671
QgsTask* dependentTask = task( it.key() );
672-
if ( dependentTask && ( dependentTask->status() != QgsTask::Complete || dependentTask->status() != QgsTask::Terminated ) )
672+
if ( dependentTask && ( dependentTask->status() != QgsTask::Complete && dependentTask->status() != QgsTask::Terminated ) )
673673
{
674674
// incomplete task is dependent on this layer!
675675
dependentTask->cancel();
@@ -706,7 +706,7 @@ bool QgsTaskManager::cleanupAndDeleteTask( QgsTask *task )
706706
mTasks.remove( id );
707707
mLayerDependencies.remove( id );
708708

709-
if ( task->status() != QgsTask::Complete || task->status() != QgsTask::Terminated )
709+
if ( task->status() != QgsTask::Complete && task->status() != QgsTask::Terminated )
710710
{
711711
if ( isParent )
712712
{

‎src/plugins/georeferencer/qgsgcpcanvasitem.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void QgsGCPCanvasItem::paint( QPainter* p )
7171
}
7272
else if ( showIDs )
7373
{
74-
msg = msg = QString::number( id );
74+
msg = QString::number( id );
7575
}
7676
else if ( showCoords )
7777
{

0 commit comments

Comments
 (0)