Skip to content

Commit

Permalink
[sipify] fix enum again
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 9, 2017
1 parent 532b9a1 commit f5c3b8a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion python/core/layertree/qgslayertreemodellegendnode.sip
Expand Up @@ -31,7 +31,7 @@ class QgsLayerTreeModelLegendNode : QObject

enum LegendNodeRoles
{
RuleKeyRole
RuleKeyRole,
ParentRuleKeyRole
};

Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsbrowsermodel.sip
Expand Up @@ -21,8 +21,8 @@ class QgsBrowserModel : QAbstractItemModel

enum ItemDataRole
{
PathRole
CommentRole
PathRole,
CommentRole,
};

virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
Expand Down
16 changes: 8 additions & 8 deletions python/core/qgsfieldmodel.sip
Expand Up @@ -27,14 +27,14 @@ class QgsFieldModel : QAbstractItemModel

enum FieldRoles
{
FieldNameRole
FieldIndexRole
ExpressionRole
IsExpressionRole
ExpressionValidityRole
FieldTypeRole
FieldOriginRole
IsEmptyRole
FieldNameRole,
FieldIndexRole,
ExpressionRole,
IsExpressionRole,
ExpressionValidityRole,
FieldTypeRole,
FieldOriginRole,
IsEmptyRole,
};

explicit QgsFieldModel( QObject *parent /TransferThis/ = 0 );
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmaplayermodel.sip
Expand Up @@ -27,7 +27,7 @@ class QgsMapLayerModel : QAbstractItemModel

enum ItemDataRole
{
LayerIdRole
LayerIdRole,
LayerRole,
EmptyRole,
AdditionalRole,
Expand Down
8 changes: 4 additions & 4 deletions python/core/qgsstringutils.sip
Expand Up @@ -161,10 +161,10 @@ class QgsStringUtils

enum Capitalization
{
MixedCase
AllUppercase
AllLowercase
ForceFirstLetterToCapital
MixedCase,
AllUppercase,
AllLowercase,
ForceFirstLetterToCapital,
};

static QString capitalize( const QString &string, Capitalization capitalization );
Expand Down
2 changes: 1 addition & 1 deletion scripts/sipify.pl
Expand Up @@ -622,7 +622,7 @@ sub detect_comment_block{
last;
}
do {no warnings 'uninitialized';
my $enum_decl = $LINE =~ s/(\s*\w+)(\s+SIP_\w+(?:\([^()]+\))?)?(?:\s*=\s*[\w\s\d<|-]+.*?)?(,?).*$/$1$2$3/r;
my $enum_decl = $LINE =~ s/(\s*\w+)(\s+SIP_\w+(?:\([^()]+\))?)?(?:\s*=\s*(?:[\w\s\d|+-]|::|<<)+.*?)?(,?).*$/$1$2$3/r;
$enum_decl = fix_annotations($enum_decl);
write_output("ENU3", "$enum_decl\n");
};
Expand Down

0 comments on commit f5c3b8a

Please sign in to comment.