summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/syncqt28
1 files changed, 5 insertions, 23 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 3e7aea96a5..3cf0e5688b 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -771,7 +771,6 @@ my $class_lib_map_contents = "";
our @ignore_headers = ();
our @ignore_for_master_contents = ();
our @ignore_for_include_check = ();
-our @ignore_for_qt_begin_header_check = ();
our @ignore_for_qt_begin_namespace_check = ();
our @ignore_for_qt_module_check = ();
our %inject_headers = ();
@@ -1137,7 +1136,6 @@ if($check_includes) {
foreach my $subdir (@subdirs) {
my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
foreach my $header (@headers) {
- my $header_skip_qt_begin_header_test = 0;
my $header_skip_qt_begin_namespace_test = 0;
$header = 0 if($header =~ /^ui_.*.h/);
foreach (@ignore_headers) {
@@ -1157,9 +1155,6 @@ if($check_includes) {
foreach (@ignore_for_include_check) {
$public_header = 0 if($header eq $_);
}
- foreach(@ignore_for_qt_begin_header_check) {
- $header_skip_qt_begin_header_test = 1 if ($header eq $_);
- }
foreach(@ignore_for_qt_begin_namespace_check) {
$header_skip_qt_begin_namespace_test = 1 if ($header eq $_);
}
@@ -1169,10 +1164,9 @@ if($check_includes) {
my $iheader = $subdir . "/" . $header;
if($public_header) {
if(open(F, "<$iheader")) {
- my $qt_begin_header_found = 0;
- my $qt_end_header_found = 0;
my $qt_begin_namespace_found = 0;
my $qt_end_namespace_found = 0;
+ my $qt_namespace_suffix = "";
my $line;
my $stop_processing = 0;
while($line = <F>) {
@@ -1197,25 +1191,13 @@ if($check_includes) {
}
}
}
- } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_BEGIN_HEADER\s*$/) {
- $qt_begin_header_found = 1;
- } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_END_HEADER\s*$/) {
- $qt_end_header_found = 1;
- } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE\s*$/) {
+ } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE(_[A-Z_]+)?\s*$/) {
+ $qt_namespace_suffix = $1 // "";
$qt_begin_namespace_found = 1;
- } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE\s*$/) {
+ } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE$qt_namespace_suffix\s*$/) {
$qt_end_namespace_found = 1;
}
}
- if ($header_skip_qt_begin_header_test == 0 and $stop_processing == 0) {
- if ($qt_begin_header_found == 0) {
- print "$lib: WARNING: $iheader does not include QT_BEGIN_HEADER\n";
- }
-
- if ($qt_begin_header_found && $qt_end_header_found == 0) {
- print "$lib: WARNING: $iheader has QT_BEGIN_HEADER but no QT_END_HEADER\n";
- }
- }
if ($header_skip_qt_begin_namespace_test == 0 and $stop_processing == 0) {
if ($qt_begin_namespace_found == 0) {
@@ -1223,7 +1205,7 @@ if($check_includes) {
}
if ($qt_begin_namespace_found && $qt_end_namespace_found == 0) {
- print "$lib: WARNING: $iheader has QT_BEGIN_NAMESPACE but no QT_END_NAMESPACE\n";
+ print "$lib: WARNING: $iheader has QT_BEGIN_NAMESPACE$qt_namespace_suffix but no QT_END_NAMESPACE$qt_namespace_suffix\n";
}
}