From cf0119bb69592d58ca7e6a75753799ebae61e4b5 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 14 Sep 2016 16:48:10 +0200 Subject: [PATCH] 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(-) 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) {