diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2016-09-14 16:48:10 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-09-28 04:56:56 +0000 |
commit | cf0119bb69592d58ca7e6a75753799ebae61e4b5 (patch) | |
tree | d63abe64b970681a5ffef135331467b30aaf47f9 /bin | |
parent | da2c73ad2b84ef9d58a23fa880c05ca33a0053e5 (diff) |
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 <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt.pl | 6 |
1 files 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) { |