Fix unused variable warning

This commit is contained in:
Nyall Dawson 2017-01-20 07:48:43 +10:00
parent f3ac8bc2eb
commit 0d9b223856
3 changed files with 9 additions and 1 deletions

View File

@ -54,6 +54,8 @@ class QgsPropertyDefinition
DataType dataType() const;
StandardPropertyTemplate standardTemplate() const;
};
class QgsProperty

View File

@ -32,7 +32,7 @@ QgsPropertyDefinition::QgsPropertyDefinition( const QString& name, const QString
, mDescription( description )
, mStandardType( type )
{
switch ( type )
switch ( mStandardType )
{
case Boolean:
mTypes = DataTypeBoolean;

View File

@ -141,6 +141,12 @@ class CORE_EXPORT QgsPropertyDefinition
*/
DataType dataType() const { return mTypes; }
/**
* Returns the property's standard template, if applicable. Non standard
* types will return the Custom template.
*/
StandardPropertyTemplate standardTemplate() const { return mStandardType; }
private:
QString mName;