]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/dlg/checkinitorder.pl
KDE formprint patch
[lyx.git] / src / frontends / kde / dlg / checkinitorder.pl
1 #! /usr/bin/perl -w
2
3 # this is a corny script to check that qtarch hasn't fscked up
4 # the initialisation order of the widgets. perl hackers are free
5 # to improve this
6
7 # usage: dlg/checkinitorder.pl *data.C
8
9 $found{"this"} = 1;
10 while (<>) {
11         if (/new/ && ! /Layout/) {
12                 ( $varname, $parent) = split('=');
13                 $varname =~ s/^\s*//;
14                 $varname =~ s/\s*$//;
15                 $found{$varname} = 1;
16                 $parent =~ s/^.*\(\s*//;
17                 $parent =~ s/\s*,.*$//;
18                 chomp($parent);
19                 if (!defined($found{$parent})) {
20                         print "Widget $varname constructed with ",
21                               "uninitialised parent $parent !\n";
22                 }
23         }
24 };