summaryrefslogtreecommitdiffstats
path: root/admin/searchmetaob.sh
diff options
context:
space:
mode:
Diffstat (limited to 'admin/searchmetaob.sh')
-rwxr-xr-xadmin/searchmetaob.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/admin/searchmetaob.sh b/admin/searchmetaob.sh
new file mode 100755
index 00000000..7d1f0ac0
--- /dev/null
+++ b/admin/searchmetaob.sh
@@ -0,0 +1,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