aboutsummaryrefslogtreecommitdiff
path: root/find-modules/sip_generator.py
AgeCommit message (Collapse)Author
2017-02-05Revert "Automatically mark classes with pure virtual functions as /Abstract/."Stephen Kelly
With some combination of PyQt/compiler this breaks the build of kcoreaddons. This reverts commit 2e20aeab6e86670a66ff99a7b79120c4004b4d22.
2017-02-04Bindings: Remove unused memberv5.31.0-rc1v5.31.0Stephen Kelly
This should have been removed in a prior commit.
2017-02-04Automatically mark classes with pure virtual functions as /Abstract/.Shaheed Haque
2017-02-04Bindings: Take account of visibility of classesShaheed Haque
2017-02-04Bindings: Take account of visibility attribute on APIsShaheed Haque
Don't export API which has visibility "hidden". Visibility attributes on variables are ignored, but call the generic method anyway. Remove checks for macros which obscure the attributes. Processing the attribute directly means that is not needed.
2017-02-04Bindings: Generalize the skippable_attribute methodStephen Kelly
De-duplicate it between variables and functions. The callers already handle reporting the removal.
2017-02-04Bindings: Remove unused methodStephen Kelly
2017-01-31Bindings: Remove unused importStephen Kelly
2017-01-31Remove delimiters from licence headerStephen Kelly
2017-01-18Bindings: Fix default param handlingStephen Kelly
Clang API is odd.
2017-01-18Bindings: Handle const-ref of non-record parameter defaultsStephen Kelly
2017-01-18Bindings: Handle const-ref parameters with {} initializerStephen Kelly
2017-01-18Bindings: Handle parameter initializers using {} gracefullyStephen Kelly
2017-01-18Bindings: Add explicit handling of nullptr as a parameter defaultStephen Kelly
Don't prepend a namespace to it as we do otherwise with enum/flags.
2017-01-15Bindings: Make it possible for rules to modify the typedef typeStephen Kelly
Allow modifying the name also.
2017-01-15Bindings: Skip implementations of inline methods while parsingStephen Kelly
Don't process the same function name twice.
2017-01-15Bindings: Fix handling of forward declarationsStephen Kelly
It is not appropriate to decorate each forward declaration with the SIP attribute /External/. That is only needed for forward declarations of types which are defined in a different module. Local forward declarations can be omitted from the sip code. In sip code, a forward declaration followed later by a full class definition is an error. Omit forward declarations unless they are decorated with the external attribute. Introduce a rules database for consumers to decorate them with the attribute as required.
2017-01-15Bindings: Use lists in function API instead of stringsStephen Kelly
Custom rules should be able to deal with lists in these cases. This is already the case for function parameters.
2017-01-13Bindings: Add rules engine for typedefsStephen Kelly
Currently this is rather simple, allowing only matching typedefs by name. If we need more later, we can extend the interface. This will make it possible to add bindings for the K18n framework.
2017-01-13Bindings: Implement ModuleCode and MethodCode databasesStephen Kelly
2017-01-11Bindings: Use diagnostic level specific text when reportingStephen Kelly
Don't use the text 'Parse error' for warnings, which might confuse IDEs.
2017-01-11Bindings: Fix logging output severity for parsing messagesStephen Kelly
The Python logging module uses logging severities with numerical values which form a sequence in steps of 10. The Clang cindex.Diagnostic numerical values use a step size of 1, so the two are incompatible. Introduce a mapping function so that appropriate errors get issued when attempting to build the bindings. The logging module has one surplus diagnostic level, but we simply never use it. BUG: 374801
2017-01-10Bindings: Correctly handle access specifiers within macrosStephen Kelly
The Q_DECLARE_TR_FUNCTIONS macro contains a `public:` access specifier, but the sip_generator just pastes the entire macro name. Adjust the generator to extract the correct access specifier.
2017-01-05Bindings: Improve diagnostics for the rules engineShaheed Haque
Note which rule has a modification effect.
2017-01-05Skip attributes on enums when generating bindingsShaheed Haque
2016-10-31Add the rules_engine and sip_generatorShaheed Haque
These files process C++ headers with libclang and python-clang bindings, using the AST to generate SIP files for PyQt binding library generation. The design allows for further extensions which can process other artifacts found in headers. This iteration of the design is a simple minimum which suffices to generate headers for KItemModels and some other libraries.