mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fix 'redundantCondition' cppcheck warnings
This commit is contained in:
parent
21bc22fdbc
commit
64808101da
@ -808,7 +808,7 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexe
|
||||
{
|
||||
index = vlayer->fields().lookupField( prop.field() );
|
||||
}
|
||||
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty || ( prop.propertyType() == QgsProperty::ExpressionBasedProperty && overwriteExpression ) )
|
||||
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty || overwriteExpression )
|
||||
{
|
||||
index = QgsAuxiliaryLayer::createProperty( p, vlayer );
|
||||
changed = true;
|
||||
@ -860,7 +860,7 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIn
|
||||
{
|
||||
index = vlayer->fields().lookupField( prop.field() );
|
||||
}
|
||||
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty || ( prop.propertyType() == QgsProperty::ExpressionBasedProperty && overwriteExpression ) )
|
||||
else if ( prop.propertyType() != QgsProperty::ExpressionBasedProperty || overwriteExpression )
|
||||
{
|
||||
index = QgsAuxiliaryLayer::createProperty( p, vlayer );
|
||||
changed = true;
|
||||
|
@ -79,7 +79,7 @@ void QgsAttributeTableDialog::updateMultiEditButtonState()
|
||||
|
||||
mActionToggleMultiEdit->setEnabled( mLayer->isEditable() );
|
||||
|
||||
if ( !mLayer->isEditable() || ( mLayer->isEditable() && mMainView->view() != QgsDualView::AttributeEditor ) )
|
||||
if ( !mLayer->isEditable() || mMainView->view() != QgsDualView::AttributeEditor )
|
||||
{
|
||||
mActionToggleMultiEdit->setChecked( false );
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ QgsVectorLayerFeatureCounter *QgsVectorLayer::countSymbolFeatures( bool storeSym
|
||||
return mFeatureCounter;
|
||||
}
|
||||
|
||||
if ( !mFeatureCounter || ( mFeatureCounter && ( storeSymbolFids && mSymbolFeatureIdMap.isEmpty() ) ) )
|
||||
if ( !mFeatureCounter || ( storeSymbolFids && mSymbolFeatureIdMap.isEmpty() ) )
|
||||
{
|
||||
mFeatureCounter = new QgsVectorLayerFeatureCounter( this, QgsExpressionContext(), storeSymbolFids );
|
||||
connect( mFeatureCounter, &QgsTask::taskCompleted, this, &QgsVectorLayer::onFeatureCounterCompleted, Qt::UniqueConnection );
|
||||
|
@ -1825,7 +1825,7 @@ void TerminalDisplay::mousePressEvent( QMouseEvent *ev )
|
||||
}
|
||||
else if ( ev->button() == Qt::MidButton )
|
||||
{
|
||||
if ( _mouseMarks || ( !_mouseMarks && ( ev->modifiers() & Qt::ShiftModifier ) ) )
|
||||
if ( _mouseMarks || ( ev->modifiers() & Qt::ShiftModifier ) )
|
||||
emitSelection( true, ev->modifiers() & Qt::ControlModifier );
|
||||
else
|
||||
emit mouseSignal( 1, charColumn + 1, charLine + 1 + _scrollBar->value() - _scrollBar->maximum(), 0 );
|
||||
|
@ -1015,7 +1015,7 @@ void QgsSpatiaLiteProvider::insertDefaultValue( int fieldIndex, QString defaultV
|
||||
{
|
||||
QVariant defaultVariant = defaultVal;
|
||||
|
||||
if ( mAttributeFields.at( fieldIndex ).name() != mPrimaryKey || ( mAttributeFields.at( fieldIndex ).name() == mPrimaryKey && !mPrimaryKeyAutoIncrement ) )
|
||||
if ( mAttributeFields.at( fieldIndex ).name() != mPrimaryKey || !mPrimaryKeyAutoIncrement )
|
||||
{
|
||||
bool ok;
|
||||
switch ( mAttributeFields.at( fieldIndex ).type() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user