]> git.proxmox.com Git - mirror_qemu.git/blob - scripts/coccinelle/qobject.cocci
coccinelle: Add script to remove useless QObject casts
[mirror_qemu.git] / scripts / coccinelle / qobject.cocci
1 // Use QDict macros where they make sense
2 @@
3 expression Obj, Key, E;
4 @@
5 - qdict_put_obj(Obj, Key, QOBJECT(E));
6 + qdict_put(Obj, Key, E);
7
8 // Use QList macros where they make sense
9 @@
10 expression Obj, E;
11 @@
12 - qlist_append_obj(Obj, QOBJECT(E));
13 + qlist_append(Obj, E);