Skip to content
Permalink
Browse files

[sipify] fix enum again

  • Loading branch information
3nids committed Jun 9, 2017
1 parent 532b9a1 commit f5c3b8a1f86446d7161d07084c3051a5a6ae87ea
@@ -31,7 +31,7 @@ class QgsLayerTreeModelLegendNode : QObject

enum LegendNodeRoles
{
RuleKeyRole
RuleKeyRole,
ParentRuleKeyRole
};

@@ -21,8 +21,8 @@ class QgsBrowserModel : QAbstractItemModel

enum ItemDataRole
{
PathRole
CommentRole
PathRole,
CommentRole,
};

virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
@@ -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 );
@@ -27,7 +27,7 @@ class QgsMapLayerModel : QAbstractItemModel

enum ItemDataRole
{
LayerIdRole
LayerIdRole,
LayerRole,
EmptyRole,
AdditionalRole,
@@ -161,10 +161,10 @@ class QgsStringUtils

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

static QString capitalize( const QString &string, Capitalization capitalization );
@@ -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");
};

0 comments on commit f5c3b8a

Please sign in to comment.
You can’t perform that action at this time.