summaryrefslogtreecommitdiffstats
path: root/bin/syncqt.pl
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-11-27 12:19:33 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-11-27 17:28:47 +0000
commiteddb938c39d03e163ef47c965ea07ab19250eeed (patch)
tree242d8d6167b9bef037dc810aa4b0e5676b1121d0 /bin/syncqt.pl
parent779d2aa5fcd82c4236c1d86a510adcb88e077775 (diff)
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>
Diffstat (limited to 'bin/syncqt.pl')
-rwxr-xr-xbin/syncqt.pl40
1 files changed, 3 insertions, 37 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl
index 6b8d847a78..faa39aa351 100755
--- a/bin/syncqt.pl
+++ b/bin/syncqt.pl
@@ -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;