1a2f3453eSEric Blake// Use QDict macros where they make sense 2a2f3453eSEric Blake@@ 3a2f3453eSEric Blakeexpression Obj, Key, E; 4a2f3453eSEric Blake@@ 5a92c2159SEric Blake( 6*cb3e7f08SMarc-André Lureau- qobject_ref(QOBJECT(E)); 7*cb3e7f08SMarc-André Lureau+ qobject_ref(E); 88a4613a0SEric Blake| 9*cb3e7f08SMarc-André Lureau- qobject_unref(QOBJECT(E)); 10*cb3e7f08SMarc-André Lureau+ qobject_unref(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); 230f9afc2aSMarc-André Lureau| 240f9afc2aSMarc-André Lureau- qdict_put(Obj, Key, qnull()); 250f9afc2aSMarc-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); 44254bf807SMax Reitz| 45254bf807SMax Reitz- qlist_append(Obj, qnull()); 46254bf807SMax Reitz+ qlist_append_null(Obj); 47a92c2159SEric Blake) 48