dom: Use pref macro for IDL conditional guards.

This commit is contained in:
Josh Matthews 2020-07-09 20:01:01 -04:00
parent 714acb942c
commit aa80f91399
38 changed files with 8 additions and 109 deletions

View file

@ -2662,7 +2662,7 @@ class CGConstructorEnabled(CGAbstractMethod):
pref = iface.getExtendedAttribute("Pref")
if pref:
assert isinstance(pref, list) and len(pref) == 1
conditions.append('prefs::pref_map().get("%s").as_bool().unwrap_or(false)' % pref[0])
conditions.append('pref!(%s)' % pref[0])
func = iface.getExtendedAttribute("Func")
if func: