diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-02-27 19:11:52 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-02-28 18:15:56 +0000 |
commit | 592b0a37f5daa236f8848608350328230f491e16 (patch) | |
tree | 450d120fd78feab20c4d99960428ba6c916ed4ff /bin | |
parent | 3a32ad7859cf77f4d630fcc7b7429cc17a9c8449 (diff) | |
download | qtbase-592b0a37f5daa236f8848608350328230f491e16.tar.gz |
syncqt: remove 'descend' parameter from findFiles()
that parameter is never set, and if it was, it wouldn't work: the
recursively found files were not qualified with the subdirectory.
Change-Id: I24a3f74de3545c19bcd175c24ad1daf2af77a720
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt.pl | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl index c9374c4a6d..ff4cafa7b9 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -592,21 +592,18 @@ sub copyFile } ###################################################################### -# Syntax: findFiles(dir, match, descend) +# Syntax: findFiles(dir, match) # Params: dir, string, directory to search for name # match, string, regular expression to match in dir -# descend, integer, 0 = non-recursive search -# 1 = recurse search into subdirectories # # Purpose: Finds files matching a regular expression. # Returns: List of matching files. # -# Examples: -# findFiles("/usr","\.cpp$",1) - finds .cpp files in /usr and below -# findFiles("/tmp","^#",0) - finds #* files in /tmp +# Example: +# findFiles("/tmp", "^#") - finds #* files in /tmp ###################################################################### sub findFiles { - my ($dir,$match,$descend) = @_; + my ($dir, $match) = @_; my ($file,$p,@files); local(*D); normalizePath(\$dir); @@ -621,9 +618,6 @@ sub findFiles { next if ( $file =~ /^\.\.?$/ ); $p = $file; ($file =~ /$match/) && (push @files, $p); - if ( $descend && -d $p && ! -l $p ) { - push @files, &findFiles($p,$match,$descend); - } } closedir(D); } @@ -1018,7 +1012,7 @@ foreach my $lib (@modules_to_sync) { #calc files and "copy" them foreach my $subdir (@subdirs) { - my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0); + my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$"); @headers = grep(!/^qt[a-z0-9]+-config(_p)?\.h$/, @headers); if (defined $inject_headers{$subdir}) { foreach my $if (@{$inject_headers{$subdir}}) { |