Skip to content
Permalink
Browse files
Rename method which causes spell check issues
  • Loading branch information
nyalldawson committed Jan 23, 2017
1 parent 5f04a2a commit f3ac8bc2ebe77290405f5a463e60b9bb60f5a037
Showing with 55 additions and 55 deletions.
  1. +3 −3 python/core/qgspropertycollection.sip
  2. +20 −20 src/core/qgspropertycollection.cpp
  3. +7 −7 src/core/qgspropertycollection.h
  4. +25 −25 tests/src/core/testqgsproperty.cpp
@@ -51,7 +51,7 @@ class QgsAbstractPropertyCollection

virtual bool hasActiveProperties() const = 0;

virtual bool hasActiveDynamicProperties() const = 0;
virtual bool hasDynamicProperties() const = 0;

virtual bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertiesDefinition& definitions ) const = 0;

@@ -87,7 +87,7 @@ class QgsPropertyCollection : QgsAbstractPropertyCollection
QSet< QString > referencedFields( const QgsExpressionContext& context = QgsExpressionContext() ) const;
bool isActive( int key ) const;
bool hasActiveProperties() const;
bool hasActiveDynamicProperties() const;
bool hasDynamicProperties() const;
bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertiesDefinition& definitions ) const;
bool readXml( const QDomElement& collectionElem, const QDomDocument& doc, const QgsPropertiesDefinition& definitions );

@@ -123,7 +123,7 @@ class QgsPropertyCollectionStack : QgsAbstractPropertyCollection

bool hasActiveProperties() const;

bool hasActiveDynamicProperties() const;
bool hasDynamicProperties() const;

bool isActive( int key ) const;

@@ -93,7 +93,7 @@ QgsPropertyCollection::QgsPropertyCollection( const QString& name )
: QgsAbstractPropertyCollection( name )
, mDirty( false )
, mHasActiveProperties( false )
, mHasActiveDynamicProperties( false )
, mHasDynamicProperties( false )
{}

int QgsPropertyCollection::count() const
@@ -122,7 +122,7 @@ void QgsPropertyCollection::clear()
mProperties.clear();
mDirty = false;
mHasActiveProperties = false;
mHasActiveDynamicProperties = false;
mHasDynamicProperties = false;
}

void QgsPropertyCollection::setProperty( int key, const QgsProperty& property )
@@ -214,7 +214,7 @@ bool QgsPropertyCollection::isActive( int key ) const
void QgsPropertyCollection::rescan() const
{
mHasActiveProperties = false;
mHasActiveDynamicProperties = false;
mHasDynamicProperties = false;
mCount = 0;
if ( !mProperties.isEmpty() )
{
@@ -226,7 +226,7 @@ void QgsPropertyCollection::rescan() const
mHasActiveProperties = true;
if ( it.value().propertyType() != QgsProperty::StaticProperty )
{
mHasActiveDynamicProperties = true;
mHasDynamicProperties = true;
break;
}
}
@@ -245,12 +245,12 @@ bool QgsPropertyCollection::hasActiveProperties() const
return mHasActiveProperties;
}

bool QgsPropertyCollection::hasActiveDynamicProperties() const
bool QgsPropertyCollection::hasDynamicProperties() const
{
if ( mDirty )
rescan();

return mHasActiveDynamicProperties;
return mHasDynamicProperties;
}

bool QgsPropertyCollection::writeXml( QDomElement &collectionElem, QDomDocument &doc, const QgsPropertiesDefinition& definitions ) const
@@ -309,10 +309,10 @@ bool QgsPropertyCollection::readXml( const QDomElement &collectionElem, const QD

mCount++;
mHasActiveProperties = mHasActiveProperties || prop.isActive();
mHasActiveDynamicProperties = mHasActiveDynamicProperties ||
( prop.isActive() &&
( prop.propertyType() == QgsProperty::FieldBasedProperty ||
prop.propertyType() == QgsProperty::ExpressionBasedProperty ) );
mHasDynamicProperties = mHasDynamicProperties ||
( prop.isActive() &&
( prop.propertyType() == QgsProperty::FieldBasedProperty ||
prop.propertyType() == QgsProperty::ExpressionBasedProperty ) );
}
return true;
}
@@ -324,7 +324,7 @@ bool QgsPropertyCollection::readXml( const QDomElement &collectionElem, const QD
QgsPropertyCollectionStack::QgsPropertyCollectionStack()
: mDirty( false )
, mHasActiveProperties( false )
, mHasActiveDynamicProperties( false )
, mhasDynamicProperties( false )
{

}
@@ -338,15 +338,15 @@ QgsPropertyCollectionStack::QgsPropertyCollectionStack( const QgsPropertyCollect
: QgsAbstractPropertyCollection( other )
, mDirty( false )
, mHasActiveProperties( false )
, mHasActiveDynamicProperties( false )
, mhasDynamicProperties( false )
{
clear();

Q_FOREACH ( QgsPropertyCollection* collection, other.mStack )
{
mStack << new QgsPropertyCollection( *collection );
mHasActiveProperties |= collection->hasActiveProperties();
mHasActiveDynamicProperties |= collection->hasActiveDynamicProperties();
mhasDynamicProperties |= collection->hasDynamicProperties();
}
}

@@ -359,7 +359,7 @@ QgsPropertyCollectionStack &QgsPropertyCollectionStack::operator=( const QgsProp
{
mStack << new QgsPropertyCollection( *collection );
mHasActiveProperties |= collection->hasActiveProperties();
mHasActiveDynamicProperties |= collection->hasActiveDynamicProperties();
mhasDynamicProperties |= collection->hasDynamicProperties();
}

return *this;
@@ -375,7 +375,7 @@ void QgsPropertyCollectionStack::clear()
qDeleteAll( mStack );
mStack.clear();
mHasActiveProperties = false;
mHasActiveDynamicProperties = false;
mhasDynamicProperties = false;
mDirty = false;
}

@@ -415,12 +415,12 @@ bool QgsPropertyCollectionStack::hasActiveProperties() const
return mHasActiveProperties;
}

bool QgsPropertyCollectionStack::hasActiveDynamicProperties() const
bool QgsPropertyCollectionStack::hasDynamicProperties() const
{
if ( mDirty )
rescan();

return mHasActiveDynamicProperties;
return mhasDynamicProperties;
}

bool QgsPropertyCollectionStack::isActive( int key ) const
@@ -531,12 +531,12 @@ bool QgsPropertyCollectionStack::readXml( const QDomElement& collectionElem, con
void QgsPropertyCollectionStack::rescan() const
{
mHasActiveProperties = false;
mHasActiveDynamicProperties = false;
mhasDynamicProperties = false;
Q_FOREACH ( const QgsPropertyCollection* collection, mStack )
{
mHasActiveProperties |= collection->hasActiveProperties();
mHasActiveDynamicProperties |= collection->hasActiveDynamicProperties();
if ( mHasActiveProperties && mHasActiveDynamicProperties )
mhasDynamicProperties |= collection->hasDynamicProperties();
if ( mHasActiveProperties && mhasDynamicProperties )
break;
}
mDirty = false;
@@ -205,7 +205,7 @@ class CORE_EXPORT QgsAbstractPropertyCollection
/**
* Returns true if the collection has any active properties, or false if all properties
* within the collection are deactivated.
* @see hasActiveDynamicProperties()
* @see hasDynamicProperties()
*/
virtual bool hasActiveProperties() const = 0;

@@ -214,7 +214,7 @@ class CORE_EXPORT QgsAbstractPropertyCollection
* within the collection are deactivated or if the collection only contains static properties.
* @see hasActiveProperties()
*/
virtual bool hasActiveDynamicProperties() const = 0;
virtual bool hasDynamicProperties() const = 0;

/**
* Writes the current state of the property collection into an XML element
@@ -284,7 +284,7 @@ class CORE_EXPORT QgsPropertyCollection : public QgsAbstractPropertyCollection
QSet< QString > referencedFields( const QgsExpressionContext& context = QgsExpressionContext() ) const override;
bool isActive( int key ) const override;
bool hasActiveProperties() const override;
bool hasActiveDynamicProperties() const override;
bool hasDynamicProperties() const override;
bool writeXml( QDomElement& collectionElem, QDomDocument& doc, const QgsPropertiesDefinition& definitions ) const override;
bool readXml( const QDomElement& collectionElem, const QDomDocument& doc, const QgsPropertiesDefinition& definitions ) override;

@@ -313,7 +313,7 @@ class CORE_EXPORT QgsPropertyCollection : public QgsAbstractPropertyCollection

mutable bool mDirty;
mutable bool mHasActiveProperties;
mutable bool mHasActiveDynamicProperties;
mutable bool mHasDynamicProperties;
mutable int mCount = 0;

//! Scans through properties and updates cached values
@@ -384,7 +384,7 @@ class CORE_EXPORT QgsPropertyCollectionStack : public QgsAbstractPropertyCollect
* Returns true if the collection has any active properties, or false if all properties
* within the collection are deactivated.
* @see isActive()
* @see hasActiveDynamicProperties()
* @see hasDynamicProperties()
*/
bool hasActiveProperties() const override;

@@ -393,7 +393,7 @@ class CORE_EXPORT QgsPropertyCollectionStack : public QgsAbstractPropertyCollect
* within the collection are deactivated or if the collection only contains static properties.
* @see hasActiveProperties()
*/
bool hasActiveDynamicProperties() const override;
bool hasDynamicProperties() const override;

/**
* Returns true if the stack contains an active property with the specified key.
@@ -441,7 +441,7 @@ class CORE_EXPORT QgsPropertyCollectionStack : public QgsAbstractPropertyCollect

mutable bool mDirty;
mutable bool mHasActiveProperties;
mutable bool mHasActiveDynamicProperties;
mutable bool mhasDynamicProperties;

//! Scans through properties and updates cached values
void rescan() const;

0 comments on commit f3ac8bc

Please sign in to comment.