diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
commit | 99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch) | |
tree | eff34cf0762227f6baf2a93e8fef48d4bed2651c /scripts/includemocs | |
parent | 1c104292188541106338d4940b0f04beeb4301a0 (diff) | |
download | tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip |
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'scripts/includemocs')
-rwxr-xr-x | scripts/includemocs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/includemocs b/scripts/includemocs index 32df1b20..18453453 100755 --- a/scripts/includemocs +++ b/scripts/includemocs @@ -32,7 +32,7 @@ sub checkdir($) my $srcs=$dir2files{$dir}->{sources}; foreach my $h (keys %$hdrs) { (my $name=$h) =~ s/\.[^.]+$//; - my @answer = `grep -l "^#include[ ]*.$name\.moc." $cppFiles 2> /dev/null`; + my @answer = `grep -l "^#include[ ]*.$name\.tqmoc." $cppFiles 2> /dev/null`; if (@answer == 0) { my $s; foreach my $e (split(/\s+/, $cppExt)) { @@ -42,7 +42,7 @@ sub checkdir($) } if ($s) { print "echo >> $s ;\n"; - print "echo '#include \"$name.moc\"' >> $s ;\n"; + print "echo '#include \"$name.tqmoc\"' >> $s ;\n"; } else { print "echo \"can't guess a C++ file for $dir/$h\" ;\n"; } @@ -50,7 +50,7 @@ sub checkdir($) } } -find (\&collectthing, cwd()); +tqfind (\&collectthing, cwd()); foreach my $k (keys %dir2files) { print STDERR "Directory $k:\n headers=["; @@ -63,23 +63,23 @@ foreach my $k (keys %dir2files) { =head1 NAME -includemocs -- handle mocifyable headers, whose .moc file is nowhere included. +includetqmocs -- handle tqmocifyable headers, whose .tqmoc file is nowhere included. =head1 SYNOPSIS - includemocs + includetqmocs =head1 DESCRIPTION -Header files declaring a QObject descendant have to be run through moc to -produce a .moc file. This .moc file has to be compiled, for which two +Header files declaring a QObject descendant have to be run through tqmoc to +produce a .tqmoc file. This .tqmoc file has to be compiled, for which two possibilities exists: compile it separately, or #include it in the C++ file implementing that above mentioned class. The latter is more efficient in term of compilation speed. This script searches in the current directory and its subdirs for header files declaring a QObject descendant class. If it finds some, it looks, if there is -a C++ file containing an '#include' for the generated .moc file. If thats not +a C++ file containing an '#include' for the generated .tqmoc file. If thats not the case, it tries to guess into which C++ file that '#include' is placed best (based on the filename). If it fails to guess a proper place, it mentions that. @@ -91,8 +91,8 @@ On stderr some informational messages are printed. =head1 EXAMPLES - cd kdebase ; includemocs - cd kdebase ; `eval includemocs 2> /dev/null` + cd kdebase ; includetqmocs + cd kdebase ; `eval includetqmocs 2> /dev/null` =head1 AUTHOR |