diff --git a/bin/syncqt.pl b/bin/syncqt.pl index 7793811c9f..3bb4fe1bbc 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -182,8 +182,10 @@ sub shouldMasterInclude { my ($iheader) = @_; return 0 if (basename($iheader) =~ /_/); return 0 if (basename($iheader) =~ /qconfig/); + local $/ = "\x0a"; if (open(F, "<$iheader")) { while () { + s/\x0d?\x0a/\n/; chomp; chop if /\r$/; return 0 if (/^\#pragma qt_no_master_include$/); @@ -215,8 +217,10 @@ sub classNames { my $ihdrbase = basename($iheader); my $parsable = ""; + local $/ = "\x0a"; if(open(F, "<$iheader")) { while() { + s/\x0d?\x0a/\n/; my $line = $_; chomp $line; chop $line if ($line =~ /\r$/); @@ -336,6 +340,7 @@ sub check_header { $header_skip_qt_begin_namespace_test = 1 if ($ignore_for_qt_begin_namespace_check{$header}); } + local $/ = "\x0a"; open(F, "<$iheader") or return; my $qt_begin_namespace_found = 0; my $qt_end_namespace_found = 0; @@ -344,6 +349,7 @@ sub check_header { my $stop_processing = 0; my $we_mean_it = 0; while ($line = ) { + $line =~ s/\x0d?\x0a/\n/; chomp $line; my $output_line = 1; if ($line =~ /^ *\# *pragma (qt_no_included_check|qt_sync_stop_processing)/) { @@ -965,8 +971,10 @@ foreach my $lib (@modules_to_sync) { #push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t"); foreach my $file (@files) { my $remove_file = 0; + local $/ = "\x0a"; if(open(F, "<$file")) { while(my $line = ) { + $line =~ s/\x0d?\x0a/\n/; chomp $line; if($line =~ /^\#include \"([^\"]*)\"$/) { my $include = $1;