From 99242a2dec07d2b299092354870cae391c80ce95 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 26 Sep 2016 14:22:28 +0200 Subject: syncqt.pl: also allow digits in upper-case macro names The check for Q_... macros used a regex that didn't allow digits; it thus failed to match Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(). Change-Id: I3f9339349aa21e2fea04a7f53d9d8e0903e4c65b Reviewed-by: Marc Mutz Reviewed-by: Oswald Buddenhagen --- bin/syncqt.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/syncqt.pl b/bin/syncqt.pl index 93c962cf90..9dcc7fe4fd 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -224,7 +224,7 @@ sub classNames { } if($line) { $line =~ s,//.*$,,; #remove c++ comments - $line .= ";" if($line =~ m/^Q_[A-Z_]*\(.*\)[\r\n]*$/); #qt macro + $line .= ";" if($line =~ m/^Q_[A-Z_0-9]*\(.*\)[\r\n]*$/); #qt macro $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro $line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE(_[A-Z]+)*[\r\n]*$/); #qt macro $line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro -- cgit v1.2.3 From cf0119bb69592d58ca7e6a75753799ebae61e4b5 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 14 Sep 2016 16:48:10 +0200 Subject: syncqt.pl: fix a few misguided regexes to match .h file names To match correctly (only) .h files, a regex needs to end in \.h$ Some of them missed the \, one missed the $. (The last also had a legitimate .* before its misunescaped .) One pair matched _p.h and _pch.h, which could be combined. Change-Id: I7539a28eb7017cd0f1b36c72e05108e03a68a952 Reviewed-by: Oswald Buddenhagen --- bin/syncqt.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/syncqt.pl b/bin/syncqt.pl index 9dcc7fe4fd..06aff79a3a 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -355,7 +355,7 @@ sub check_header { $include = 0; } if ($include && $public_header) { - print STDERR "$lib: ERROR: $iheader includes private header $include\n" if ($include =~ /_p.h$/); + print STDERR "$lib: ERROR: $iheader includes private header $include\n" if ($include =~ /_p\.h$/); for my $trylib (keys(%modules)) { if (-e "$out_basedir/include/$trylib/$include") { print STDERR "$lib: WARNING: $iheader includes $include when it should include $trylib/$include\n"; @@ -982,7 +982,7 @@ foreach my $lib (@modules_to_sync) { my $header_dirname = ""; foreach my $header (@headers) { my $shadow = ($header =~ s/^\*//); - $header = 0 if($header =~ /^ui_.*.h/); + $header = 0 if ($header =~ /^ui_.*\.h$/); foreach (@ignore_headers) { $header = 0 if($header eq $_); } @@ -994,7 +994,7 @@ foreach my $lib (@modules_to_sync) { if(isQpaHeader($public_header)) { $public_header = 0; $qpa_header = 1; - } elsif($allheadersprivate || $thisprivate || $public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) { + } elsif ($allheadersprivate || $thisprivate || $public_header =~ /_p(ch)?\.h$/) { $public_header = 0; } else { foreach (@ignore_for_master_contents) { -- cgit v1.2.3