File indexing completed on 2024-12-08 05:07:04
0001 #!/usr/bin/perl 0002 0003 # laurent Montel <montel@kde.org> 2006 GPL 0004 # Script to use Qt macros: Q_SLOTS/Q_SIGNALS 0005 # Becarefull use this script on lib not on all files 0006 # 0007 use File::Basename; 0008 use lib dirname( $0 ); 0009 use functionUtilkde; 0010 use strict; 0011 0012 open(my $F, "-|", qw(find . -type f)); 0013 my $file; 0014 while ($file = <$F>) { 0015 chomp $file; 0016 next if functionUtilkde::excludeFile( $file); 0017 0018 my $modified; 0019 open(my $FILE, "<", $file) or warn "We can't open file $file:$!\n"; 0020 my @l = map { 0021 my $orig = $_; 0022 0023 if ( $_ !~ /k_dcop_signals:/ ) { 0024 $_ =~ s/signals:/Q_SIGNALS:/; 0025 } 0026 $_ =~ s/slots:/Q_SLOTS:/; 0027 $modified ||= $orig ne $_; 0028 $_; 0029 } <$FILE>; 0030 0031 if ($modified) { 0032 open (my $OUT, ">", $file); 0033 print $OUT @l; 0034 } 0035 0036 } 0037 functionUtilkde::diffFile( <$F> ); 0038