diff options
author | Kai Koehne <kai.koehne@qt.io> | 2020-08-19 09:45:37 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2020-08-19 12:46:09 +0200 |
commit | 29bd0b781a117574c621bbf279b35fa99fb6adf0 (patch) | |
tree | 886632f8a06023b614c03e098f031f345e827c74 /bin | |
parent | CMake: Implement configure -qreal <type> (diff) | |
download | qtbase-29bd0b781a117574c621bbf279b35fa99fb6adf0.tar.xz qtbase-29bd0b781a117574c621bbf279b35fa99fb6adf0.zip |
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 <joerg.bornemann@qt.io>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl index c472ab5a12..3c8ccf9374 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; |