Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename method which causes spell check issues
  • Loading branch information
nyalldawson committed Jan 23, 2017
1 parent 5f04a2a commit f3ac8bc
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 55 deletions.
6 changes: 3 additions & 3 deletions python/core/qgspropertycollection.sip
Expand Up @@ -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;

Expand Down Expand Up @@ -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 );

Expand Down Expand Up @@ -123,7 +123,7 @@ class QgsPropertyCollectionStack : QgsAbstractPropertyCollection

bool hasActiveProperties() const;

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

bool isActive( int key ) const;

Expand Down
40 changes: 20 additions & 20 deletions src/core/qgspropertycollection.cpp
Expand Up @@ -93,7 +93,7 @@ QgsPropertyCollection::QgsPropertyCollection( const QString& name )
: QgsAbstractPropertyCollection( name )
, mDirty( false )
, mHasActiveProperties( false )
, mHasActiveDynamicProperties( false )
, mHasDynamicProperties( false )
{}

int QgsPropertyCollection::count() const
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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() )
{
Expand All @@ -226,7 +226,7 @@ void QgsPropertyCollection::rescan() const
mHasActiveProperties = true;
if ( it.value().propertyType() != QgsProperty::StaticProperty )
{
mHasActiveDynamicProperties = true;
mHasDynamicProperties = true;
break;
}
}
Expand All @@ -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
Expand Down Expand Up @@ -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;
}
Expand All @@ -324,7 +324,7 @@ bool QgsPropertyCollection::readXml( const QDomElement &collectionElem, const QD
QgsPropertyCollectionStack::QgsPropertyCollectionStack()
: mDirty( false )
, mHasActiveProperties( false )
, mHasActiveDynamicProperties( false )
, mhasDynamicProperties( false )
{

}
Expand All @@ -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();
}
}

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

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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/core/qgspropertycollection.h
Expand Up @@ -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;

Expand All @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f3ac8bc

Please sign in to comment.