diff options
Diffstat (limited to 'qt/ScintillaEdit/WidgetGen.py')
-rw-r--r-- | qt/ScintillaEdit/WidgetGen.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/qt/ScintillaEdit/WidgetGen.py b/qt/ScintillaEdit/WidgetGen.py index 2fa63279e..44349a90b 100644 --- a/qt/ScintillaEdit/WidgetGen.py +++ b/qt/ScintillaEdit/WidgetGen.py @@ -51,21 +51,26 @@ typeAliases = { def cppAlias(s): if s in typeAliases: return typeAliases[s] + elif Face.IsEnumeration(s): + return "int" else: return s understoodTypes = ["", "void", "int", "bool", "position", "line", "pointer", "colour", "keymod", "string", "stringresult", "cells"] +def understoodType(t): + return t in understoodTypes or Face.IsEnumeration(t) + def checkTypes(name, v): understandAllTypes = True - if v["ReturnType"] not in understoodTypes: + if not understoodType(v["ReturnType"]): #~ print("Do not understand", v["ReturnType"], "for", name) understandAllTypes = False - if v["Param1Type"] not in understoodTypes: + if not understoodType(v["Param1Type"]): #~ print("Do not understand", v["Param1Type"], "for", name) understandAllTypes = False - if v["Param2Type"] not in understoodTypes: + if not understoodType(v["Param2Type"]): #~ print("Do not understand", v["Param2Type"], "for", name) understandAllTypes = False return understandAllTypes |