Skip to content
Permalink
Browse files
Fix sipify
  • Loading branch information
nyalldawson committed May 20, 2021
1 parent ae87751 commit fc796b4c74071746c5cee22ef3e9b22d6b3fe01b
Showing with 4 additions and 2 deletions.
  1. +1 −1 scripts/sipify.pl
  2. +2 −1 tests/code_layout/sipifyheader.expected.sip
  3. +1 −0 tests/code_layout/sipifyheader.h
@@ -1072,7 +1072,7 @@ sub detect_non_method_member{
next if ($LINE =~ m/^\s*\w+\s*\|/); # multi line declaration as sum of enums

do {no warnings 'uninitialized';
my $enum_decl = $LINE =~ s/^(\s*(?<em>\w+))(\s+SIP_\w+(?:\(\s*(?<compat>[^() ]+)\s*\)\s*)?)?(?:\s*=\s*(?:[\w\s\d|+-]|::|<<)+)?(,?)(:?\s*\/\/!<\s*(?<co>.*)|.*)$/$1$5/r;
my $enum_decl = $LINE =~ s/^(\s*(?<em>\w+))(\s+SIP_PYNAME(?:\(\s*(?<pyname>[^() ]+)\s*\)\s*)?)?(\s+SIP_MONKEY\w+(?:\(\s*(?<compat>[^() ]+)\s*\)\s*)?)?(?:\s*=\s*(?:[\w\s\d|+-]|::|<<)+)?(,?)(:?\s*\/\/!<\s*(?<co>.*)|.*)$/$1$3$7/r;
my $enum_member = $+{em};
my $comment = $+{co};
my $compat_name = $+{compat} ? $+{compat} : $enum_member;
@@ -91,7 +91,8 @@ typedef QtClass<QVariant> QtClassQVariantBase;
ImaginarySuccess,
RecursiveSuccess,
SuccessCombination,
PythonName,
PythonName /PyName=DifferentName/,
MonkeyName,
};
typedef QFlags<QgsSipifyHeader::MyEnum> Flags;

@@ -115,6 +115,7 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
RecursiveSuccess = 1 << 4, //!< Edit operation resulted in an n-dimensional wormhole
SuccessCombination = Success | ImaginarySuccess, //!< Holy Graal
PythonName SIP_PYNAME( DifferentName ), //!< Different python name
MonkeyName SIP_MONKEYPATCH_COMPAT_NAME( MonkeyPatchName ), //!< Monkey patched compatibility name
};
Q_DECLARE_FLAGS( Flags, MyEnum )

0 comments on commit fc796b4

Please sign in to comment.