1a2f3453eSEric Blake// Use QDict macros where they make sense
2a2f3453eSEric Blake@@
3a2f3453eSEric Blakeexpression Obj, Key, E;
4a2f3453eSEric Blake@@
5a92c2159SEric Blake(
68a4613a0SEric Blake- qobject_incref(QOBJECT(E));
78a4613a0SEric Blake+ QINCREF(E);
88a4613a0SEric Blake|
98a4613a0SEric Blake- qobject_decref(QOBJECT(E));
108a4613a0SEric Blake+ QDECREF(E);
118a4613a0SEric Blake|
12a2f3453eSEric Blake- qdict_put_obj(Obj, Key, QOBJECT(E));
13a2f3453eSEric Blake+ qdict_put(Obj, Key, E);
14a92c2159SEric Blake|
1501b2ffceSMarc-André Lureau- qdict_put(Obj, Key, qnum_from_int(E));
16a92c2159SEric Blake+ qdict_put_int(Obj, Key, E);
17a92c2159SEric Blake|
18a92c2159SEric Blake- qdict_put(Obj, Key, qbool_from_bool(E));
19a92c2159SEric Blake+ qdict_put_bool(Obj, Key, E);
20a92c2159SEric Blake|
21a92c2159SEric Blake- qdict_put(Obj, Key, qstring_from_str(E));
22a92c2159SEric Blake+ qdict_put_str(Obj, Key, E);
23*0f9afc2aSMarc-André Lureau|
24*0f9afc2aSMarc-André Lureau- qdict_put(Obj, Key, qnull());
25*0f9afc2aSMarc-André Lureau+ qdict_put_null(Obj, Key);
26a92c2159SEric Blake)
27a2f3453eSEric Blake
28a2f3453eSEric Blake// Use QList macros where they make sense
29a2f3453eSEric Blake@@
30a2f3453eSEric Blakeexpression Obj, E;
31a2f3453eSEric Blake@@
32a92c2159SEric Blake(
33a2f3453eSEric Blake- qlist_append_obj(Obj, QOBJECT(E));
34a2f3453eSEric Blake+ qlist_append(Obj, E);
35a92c2159SEric Blake|
3601b2ffceSMarc-André Lureau- qlist_append(Obj, qnum_from_int(E));
37a92c2159SEric Blake+ qlist_append_int(Obj, E);
38a92c2159SEric Blake|
39a92c2159SEric Blake- qlist_append(Obj, qbool_from_bool(E));
40a92c2159SEric Blake+ qlist_append_bool(Obj, E);
41a92c2159SEric Blake|
42a92c2159SEric Blake- qlist_append(Obj, qstring_from_str(E));
43a92c2159SEric Blake+ qlist_append_str(Obj, E);
44a92c2159SEric Blake)
45