summaryrefslogtreecommitdiffstats
path: root/admin/searchmetaob.sh
blob: 7d1f0ac00beb13dcbca8da9053960735e63c1767 (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 "Q_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