Skip to content

Commit 0d9b223

Browse files
committed
Fix unused variable warning
1 parent f3ac8bc commit 0d9b223

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎python/core/qgsproperty.sip‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ class QgsPropertyDefinition
5454

5555
DataType dataType() const;
5656

57+
StandardPropertyTemplate standardTemplate() const;
58+
5759
};
5860

5961
class QgsProperty

‎src/core/qgsproperty.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ QgsPropertyDefinition::QgsPropertyDefinition( const QString& name, const QString
3232
, mDescription( description )
3333
, mStandardType( type )
3434
{
35-
switch ( type )
35+
switch ( mStandardType )
3636
{
3737
case Boolean:
3838
mTypes = DataTypeBoolean;

‎src/core/qgsproperty.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ class CORE_EXPORT QgsPropertyDefinition
141141
*/
142142
DataType dataType() const { return mTypes; }
143143

144+
/**
145+
* Returns the property's standard template, if applicable. Non standard
146+
* types will return the Custom template.
147+
*/
148+
StandardPropertyTemplate standardTemplate() const { return mStandardType; }
149+
144150
private:
145151

146152
QString mName;

0 commit comments

Comments
 (0)