File indexing completed on 2024-04-21 05:41:56

0001 #!/usr/bin/perl
0002 
0003 # Laurent Montel <montel@kde.org> 2007 GPL
0004 # This script ports everything in the current directory (and recursively) to the Qt4 API,
0005 # for things that can be done automatically.
0006 # This script must be launch after that kdDebug was convert to kDebug etc.
0007 
0008 use File::Basename;
0009 use lib dirname( $0 );
0010 use functionUtilkde;
0011 use strict;
0012 
0013 open(my $F, "-|", qw(find . -type f));
0014 my $file;
0015 my $warning;
0016 my @files = ();
0017 while ($file = <$F>) {
0018     chomp $file;
0019     next if functionUtilkde::excludeFile( $file);
0020     if (functionUtilkde::substInFile {
0021 
0022     if( $_ =~ /kDebug/ ) {
0023         s!\s*\<\<\s*endl\s*;!;!;
0024     }
0025         if( $_ =~ /kWarning/ ) {
0026         s!\s*\<\<\s*endl\s*;!;!;
0027         }
0028         if( $_ =~ /kFatal/ ) {
0029         s!\s*\<\<\s*endl\s*;!;!;
0030         }
0031 
0032     } $file) { push(@files,$file); }
0033 }
0034 functionUtilkde::diffFile( @files );
0035 warn "Warning: $warning\n" if ($warning != "");