Skip to content
Permalink
Browse files
Fix some failing tests
  • Loading branch information
nyalldawson committed Jan 23, 2017
1 parent f1b2940 commit 17d4d3a8a4fa0c06e656abe3a43aeb66068824ff
@@ -222,17 +222,16 @@ void QgsPropertyCollection::rescan() const
QHash<int, QgsProperty>::const_iterator it = mProperties.constBegin();
for ( ; it != mProperties.constEnd(); ++it )
{
if ( it.value() )
mCount++;
if ( it.value().isActive() )
{
mHasActiveProperties = true;
if ( it.value().propertyType() != QgsProperty::StaticProperty )
{
mHasDynamicProperties = true;
break;
}
}
if ( it.value() )
mCount++;
}
}
mDirty = false;
@@ -2818,6 +2818,7 @@ QgsLinePatternFillSymbolLayer* QgsLinePatternFillSymbolLayer::clone() const
clonedLayer->setSubSymbol( mFillLineSymbol->clone() );
}
copyPaintEffect( clonedLayer );
copyDataDefinedProperties( clonedLayer );
return clonedLayer;
}

@@ -3227,6 +3228,7 @@ QgsPointPatternFillSymbolLayer* QgsPointPatternFillSymbolLayer::clone() const
{
clonedLayer->setSubSymbol( mMarkerSymbol->clone() );
}
copyDataDefinedProperties( clonedLayer );
copyPaintEffect( clonedLayer );
return clonedLayer;
}
@@ -1596,6 +1596,7 @@ QgsFilledMarkerSymbolLayer *QgsFilledMarkerSymbolLayer::clone() const
{
QgsFilledMarkerSymbolLayer* m = static_cast< QgsFilledMarkerSymbolLayer* >( QgsFilledMarkerSymbolLayer::create( properties() ) );
copyPaintEffect( m );
copyDataDefinedProperties( m );
m->setSubSymbol( mFill->clone() );
return m;
}
@@ -210,6 +210,7 @@ void TestQgsComposerScaleBar::dataDefined()
QCOMPARE( mComposerScaleBar->pen().color().name(), QColor( 255, 255, 0 ).name() );
QCOMPARE( mComposerScaleBar->pen().widthF(), 1.2 );
mComposerScaleBar->setDataDefinedProperties( QgsPropertyCollection() );
mComposerScaleBar->setLineWidth( 1.0 );
}

QGSTEST_MAIN( TestQgsComposerScaleBar )
@@ -890,6 +890,7 @@ void TestQgsProperty::propertyCollection()
collection.setProperty( Property2, QgsProperty::fromValue( "v2", false ) );
collection.setProperty( Property3, QgsProperty::fromField( "field1", true ) );
collection.setProperty( Property4, QgsProperty::fromExpression( "\"field1\" + \"field2\"", true ) );
QCOMPARE( collection.count(), 4 );

// test referenced fields
QCOMPARE( collection.referencedFields( context ).count(), 2 );
@@ -1041,7 +1042,7 @@ void TestQgsProperty::collectionStack()

//now add a property to the collection
QgsProperty property = QgsProperty::fromValue( "value", true );
collection->setProperty( Property1, property );
stack.at( 0 )->setProperty( Property1, property );
QVERIFY( stack.isActive( Property1 ) );
QCOMPARE( stack.property( Property1 ).value( context ), property.value( context ) );
QCOMPARE( stack.value( Property1, context ), property.value( context ) );

0 comments on commit 17d4d3a

Please sign in to comment.