summaryrefslogtreecommitdiffstats
path: root/admin/searchmetaob.sh
blob: 9e21340d4f8e1b9da6c199a79297f89bf0260d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

DIRS=`find ../src/modules/ -type d -maxdepth 1`

HERE=`pwd`

echo "Looking for unregistered meta objects"

for adir in $DIRS; do

	cd $HERE
	cd $adir

	THEFILES=`ls | grep "\.h"`

	if test -n "$THEFILES"; then

		echo "Checking dir $adir"

		OBJECTS=`grep -h -B 4 "TQ_OBJECT" *.h | grep "class" | grep ":" | sed -e 's/class[ ]*//g' | sed -e 's/[ ]*:[A-Za-z0-9 ,]*//g'`

		for aob in $OBJECTS; do
			META=`grep "unregisterMetaObject(\"$aob\")" *.cpp`
			if test -z "$META"; then
				echo "Class $aob is NOT UNREGISTERED in $adir"
			fi
		done

	fi

done