Skip to content

Commit

Permalink
Windows: Avoid syncqt needlessly re-generating headers
Browse files Browse the repository at this point in the history
Normalize newlines so that headers on Windows are not
always treated as outdated.

This amends 108fb2f.

Task-number: QTBUG-86121
Change-Id: I46ddb3c5b42852bff75fd56ca224c555ac0bae94
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
kkoehne committed Aug 19, 2020
1 parent 5f729da commit 29bd0b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/syncqt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 29bd0b7

Please sign in to comment.