File indexing completed on 2024-12-08 05:07:04
0001 #!/usr/bin/perl 0002 0003 # David Faure <faure@kde.org> 2007 0004 # Based on script by Laurent Montel <montel@kde.org> 2005 0005 # This script converts KMimeType::pixmap (deprecated) to KIconLoader::loadMimeTypeIcon 0006 # and KDEDesktopMimeType:: to KDesktopFileActions:: 0007 0008 use File::Basename; 0009 use lib dirname( $0 ); 0010 use functionUtilkde; 0011 0012 foreach my $file (@ARGV) { 0013 functionUtilkde::substInFile { 0014 s/(KMimeType::mimeType\([^)]*\))->pixmap\(([^)]*)\)/KIconLoader::global()->loadMimeTypeIcon($1->iconName(),$2)/sg; 0015 # the regexp below is a bit too greedy, it also matches fileitem->pixmap() 0016 #s/(\w*)->pixmap\(([^)]*)\)/KIconLoader::global()->loadMimeTypeIcon($1->iconName(),$2)/sg; 0017 s/KDEDesktopMimeType::/KDesktopFileActions::/g; 0018 s/kdedesktopmimetype\.h/kdesktopfileactions.h/g; 0019 } $file; 0020 } 0021 0022 functionUtilkde::diffFile( @ARGV ); 0023