File indexing completed on 2025-02-16 05:14:04
0001 #!/usr/bin/perl 0002 0003 # laurent Montel <montel@kde.org> 0004 # This function convert killTimers to qt4 function 0005 0006 use File::Basename; 0007 use lib dirname( $0 ); 0008 use functionUtilkde; 0009 open(my $F, "-|", qw(find . -type f)); 0010 my $file; 0011 while ($file = <$F>) { 0012 chomp $file; 0013 next if functionUtilkde::excludeFile( $file); 0014 0015 my $modified; 0016 0017 open(my $FILE, $file) or warn "We can't open file $$!\n"; 0018 my @l = map { 0019 my $orig = $_; 0020 0021 #TODO fix for killTimers with arguments 0022 s!killTimers\s*\(\s*\);!QAbstractEventDispatcher::instance()->unregisterTimers(this);!; 0023 $modified ||= $orig ne $_; 0024 $_; 0025 } <$FILE>; 0026 0027 if ($modified) { 0028 my $OUT; 0029 open ($OUT, ">", $file); 0030 print $OUT @l; 0031 close ($OUT); 0032 # necessary to gave complete url 0033 my $newUrl = $ENV{PWD} . "/" . $file; 0034 $newUrl =~ s!\./!!; 0035 functionUtilkde::addIncludeInFile( $newUrl, "QAbstractEventDispatcher"); 0036 } 0037 } 0038 functionUtilkde::diffFile( <$F> ); 0039