From 29bd0b781a117574c621bbf279b35fa99fb6adf0 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 19 Aug 2020 09:45:37 +0200 Subject: [PATCH] Windows: Avoid syncqt needlessly re-generating headers Normalize newlines so that headers on Windows are not always treated as outdated. This amends 108fb2f1973f191. Task-number: QTBUG-86121 Change-Id: I46ddb3c5b42852bff75fd56ca224c555ac0bae94 Reviewed-by: Joerg Bornemann --- bin/syncqt.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/syncqt.pl b/bin/syncqt.pl index c472ab5a12c..3c8ccf9374d 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -435,8 +435,9 @@ sub syncHeader { # If remove_stale option is on, make sure to overwrite the # forwarding header contents if the file already exists and its # content is different from what we will generate. - if ($remove_stale) { + if ($forwarding_header_exists && $remove_stale) { my $existing_forwarding_header_content = fileContents($header); + $existing_forwarding_header_content =~ s/\r//g; # remove \r's , so comparison is ok on all platforms my $header_content_is_different = $new_forwarding_header_content ne $existing_forwarding_header_content; $update_forwarding_header ||= $header_content_is_different;