diff options
author | Neil <nyamatongwe@gmail.com> | 2019-06-18 13:21:05 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-06-18 13:21:05 +1000 |
commit | ab38beeb9a31a5df65b6e2a41251ca36574065f3 (patch) | |
tree | 12f052b289b42751c2f4aa93e52e85fd35ad9569 /qt/ScintillaEdit/WidgetGen.py | |
parent | ef5c1c95756e22cd8244c04f90d388fd122e76d6 (diff) | |
download | scintilla-mirror-ab38beeb9a31a5df65b6e2a41251ca36574065f3.tar.gz |
Feature [feature-requests:#1297] 6: Support enumerated types in APIs.
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 |