Remove duplicated header iteration code
Do not iterate separately over all header files. This removes duplicated header iteration code which already was out of sync. As a side-effect, we do run the header check only on header files that are considered part of the module, if moduleheaders is set in sync.profile. Change-Id: Iec4c8febe9128139d2f377a1da8ce08c24110a77 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
779d2aa5fc
commit
eddb938c39
@ -1004,6 +1004,9 @@ foreach my $lib (@modules_to_sync) {
|
||||
my $clean_header;
|
||||
my $iheader = $subdir . "/" . $header;
|
||||
$iheader =~ s/^\Q$basedir\E/$out_basedir/ if ($shadow);
|
||||
if ($check_includes) {
|
||||
check_header($lib, $header, $iheader, $public_header, !$public_header && !$qpa_header);
|
||||
}
|
||||
my @classes = $public_header && (!$minimal && $is_qt) ? classNames($iheader, \$clean_header) : ();
|
||||
if($showonly) {
|
||||
print "$header [$lib]\n";
|
||||
@ -1201,41 +1204,4 @@ foreach my $lib (@modules_to_sync) {
|
||||
}
|
||||
}
|
||||
|
||||
if($check_includes) {
|
||||
foreach my $lib (@modules_to_sync) {
|
||||
next if ($modules{$lib} =~ /^!/);
|
||||
#calc subdirs
|
||||
my @subdirs = listSubdirs(map { s/^\^//; $_ } split(/;/, $modules{$lib}));
|
||||
|
||||
foreach my $subdir (@subdirs) {
|
||||
my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
|
||||
foreach my $header (@headers) {
|
||||
$header = 0 if($header =~ /^ui_.*.h/);
|
||||
$header = 0 if ($header eq lc($lib)."version.h");
|
||||
foreach (@ignore_headers) {
|
||||
$header = 0 if($header eq $_);
|
||||
}
|
||||
if($header) {
|
||||
# We need both $public_header and $private_header because QPA headers count as neither
|
||||
my $public_header = $header;
|
||||
my $private_header = 0;
|
||||
if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
|
||||
$public_header = 0;
|
||||
$private_header = $header =~ /_p.h$/ && $subdir !~ /3rdparty/
|
||||
} elsif (isQpaHeader($public_header)) {
|
||||
$public_header = 0;
|
||||
} else {
|
||||
foreach (@ignore_for_master_contents) {
|
||||
$public_header = 0 if($header eq $_);
|
||||
}
|
||||
}
|
||||
|
||||
my $iheader = $subdir . "/" . $header;
|
||||
check_header($lib, $header, $iheader, $public_header, $private_header);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
Loading…
Reference in New Issue
Block a user