From bd0927fb02aeaa6ee6923d0b841d86c148d6ef86 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 21 Jan 2017 18:59:08 -0800 Subject: [PATCH] Also protect static methods in mustHaveApp classes --- etgtools/sip_generator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etgtools/sip_generator.py b/etgtools/sip_generator.py index ea7e69ac..333bca2f 100644 --- a/etgtools/sip_generator.py +++ b/etgtools/sip_generator.py @@ -428,10 +428,11 @@ from .%s import * if klass.ignored: return - # Propagate mustHaveApp setting to the ctors + # Propagate mustHaveApp setting to the ctors and static methods if klass.mustHaveAppFlag: for item in klass.allItems(): - if isinstance(item, extractors.MethodDef) and item.isCtor: + if isinstance(item, extractors.MethodDef) and \ + (item.isCtor or item.isStatic): item.mustHaveApp(True) # write the class header