Skip to content

Commit

Permalink
syncqt.pl: fix a few misguided regexes to match .h file names
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ediosyncratic authored and marc-kdab committed Sep 28, 2016
1 parent da2c73a commit cf0119b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/syncqt.pl
Expand Up @@ -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";
Expand Down Expand Up @@ -982,7 +982,7 @@ sub isQpaHeader
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 $_);
}
Expand All @@ -994,7 +994,7 @@ sub isQpaHeader
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) {
Expand Down

0 comments on commit cf0119b

Please sign in to comment.