[sipify] fix QMap/Qlist with init in header

This commit is contained in:
Denis Rouzaud 2018-02-03 14:55:24 -04:00
parent 70f9c228d7
commit a09b9e7af9

View File

@ -405,9 +405,9 @@ sub detect_comment_block{
}
# Detect if line is a non method member declaration
# https://regex101.com/r/gUBZUk/10
# https://regex101.com/r/gUBZUk/13
sub detect_non_method_member{
return 1 if $LINE =~ m/^\s*(?:template\s*<\w+>\s+)?(?:(const|mutable|static|friend|unsigned)\s+)*\w+(::\w+)?(<([\w<> *&,()]|::)+>)?(,?\s+\*?\w+( = (-?\d+(\.\d+)?|(\w+::)*\w+(\([^()]+\))?)|\[\d+\])?)+;/;
return 1 if $LINE =~ m/^\s*(?:template\s*<\w+>\s+)?(?:(const|mutable|static|friend|unsigned)\s+)*\w+(::\w+)?(<([\w<> *&,()]|::)+>)?(,?\s+\*?\w+( = (-?\d+(\.\d+)?|((QMap|QList)<[^()]+>\(\))|(\w+::)*\w+(\([^()]+\))?)|\[\d+\])?)+;/;
return 0;
}