File indexing completed on 2025-03-23 08:20:37
0001 #!/usr/bin/perl 0002 0003 # laurent Montel <montel@kde.org> 0004 # This function convert QLatin1String instead of QString::fromLatin1() 0005 # see "qlatin1string.html" "is faster than converting the Latin-1 strings using QString::fromLatin1()." 0006 # TODO: test "QString::fromLatin1(blabla())" 0007 # 0008 use File::Basename; 0009 use lib dirname($0); 0010 use functionUtilkde; 0011 0012 foreach my $file (@ARGV) { 0013 functionUtilkde::substInFile { 0014 if( my ($prefix, $suite, $end) = /(.*)(QString::fromLatin1.*?\))(.*$)/) { 0015 s!QString::fromLatin1!QLatin1String! if $end !~ /(\.arg|\.mid|\.prepend|\.append|\.toLower|\.upper)/; 0016 } 0017 } $file; 0018 } 0019 functionUtilkde::diffFile( @ARGV ); 0020