aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/abstractmetalang.cpp
Commit message (Collapse)AuthorAgeFilesLines
* shiboken: Fix some clazy warningsFriedemann Kleint2018-01-171-1/+0
| | | | | | | | | | | | - Mixing const/non-const iterators - Do not use operator[] on temporaries of type QVector - Remove unused nontrivial variables - Add Q_FALLTHROUGH() - Potential detach in range-based for Change-Id: I89391fdda616f119eadd7de529eb6cee69343f85 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove attributes Final and FinalInCppFriedemann Kleint2017-12-211-11/+7
| | | | | | | | | | Apparently, the meaning of FinalInCpp for functions was "virtual and not private". The previous code cleanup removed most uses of them. For the remaining cases, checking for virtual is sufficient. Change-Id: I6f794e36b99920af36fd0eba895be673dc35d9dd Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Remove unused code in abstractmetalang.hFriedemann Kleint2017-12-211-397/+0
| | | | | | | | | | | | The AbstractMeta* classes had a lot of functions trying to determine whether wrapper functions/classes should be generated. Apparently at some stage, this functionality was moved to the generator classes (apparently in conjunction with the "protected hack"), leaving the functions unused. Change-Id: Ia3fef96fe86cc6a6f9c70c674635bccf510362bc Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Stop using the FinalInCpp attribute for classesFriedemann Kleint2017-12-091-6/+5
| | | | | | | | | | | | | | | Besides its use for functions, the FinalInCpp attribute was used for classes meaning something like neither the class nor its derived classes can be constructed due to presence of private destructors and absence of non-private constructors. Since 'final' is now a reserved word in C++ 11, this becomes confusing. Remove the usage of the attribute for classes, add a bit field indicating presence of a private constructors and a new function isConstructible() instead. Change-Id: Ieb2f9943c21511e4f59d228885361e3ad66fb266 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Refactor copying of the MetaLang* classesFriedemann Kleint2017-12-061-10/+23
| | | | | | | | | Disable copying of the base classes AbstractMetaAttributes and AbstractMetaVariable and refactor the copy() functions of the derived classes in terms of protected assign*() functions. Change-Id: I6cbe1cfa02207230e914ad41dddba46c866cb689 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Unify constructors of the MetaLang* classesFriedemann Kleint2017-12-051-11/+65
| | | | | | | | | Use member initialization where possible. Move constructors/destructors of classes in hierarchies out of line (fixing Clang warnings about classes having no virtual out of line methods). Change-Id: I511e7261a077db259e6c305cb1dcb08c1ee4810f Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Do not use QString::split() to find nameFriedemann Kleint2017-12-051-3/+10
| | | | | Change-Id: I83e254a5d0f7ba4613a04a73683ed08c273fc2ca Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Use information about virtual from the code modelFriedemann Kleint2017-12-021-1/+1
| | | | | Change-Id: I27411e810fc3b3ff9d3bb629b5ebc2c7fdaa59ef Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken/MetaLang: Add information about override/finalFriedemann Kleint2017-12-021-1/+18
| | | | | | | Take over information from code model and test. Change-Id: Ibed2973e09b117966ed241798125f60ba337b0e9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken/AbstractMetaAttributes: Remove some unused attributesFriedemann Kleint2017-12-011-22/+3
| | | | | | | Remove Native, FinalOverload, InterfaceFunction, Fake. Change-Id: I1232751169fafb144387343857a962bafee714e9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add new <array> argument modification indicating array usageFriedemann Kleint2017-08-031-0/+3
| | | | | | | | | | | | The modification can be used to indicate that for example int* is meant to be used as int[]. This is reflected in the NativePointerAsArrayPattern usage pattern of AbstractMetaType. Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: Icaeb3cce4be9ce06caa2cab628d4e8fc1b684819 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* libshiboken: Add Array convertersFriedemann Kleint2017-08-031-0/+22
| | | | | | | | | | | | | | | | Add a SbkArrayConverter struct which provides a list of check functions that return a converter function for an array of matching size. Add simple array converters for arrays of C++ primitive types. Instances of the ArrayHandle<>, Array2Handle<> templates will be generated which may point to internal data or allocated arrays. Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: I157606891fad345ccd7af6d4a9d4dcb0c634b2f4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Shiboken: Improve Handling of array typesFriedemann Kleint2017-08-031-2/+21
| | | | | | | | | | | Change the AbstractMetaType::signature() functions to work with the nested AbstractMetaType types instead of TypeEntry so that the correct array signatures appear in the signature of AbstractMetaFunction. Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: I90aa11891c95ccdcbae81fb70db4bec0e62f5923 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* AbstractMetaType: Join the signature functionsFriedemann Kleint2017-07-111-50/+21
| | | | | | | | | | Introduce a common helper function to format the signature for minimalSignature() / cppSignature() which differ only by whitespace. Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: Ife6be7001618d73a7a2bc15e91bff4ae42192a45 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Shiboken: Improve debug operators of the type systemFriedemann Kleint2017-07-111-2/+18
| | | | | | | | | | | - Add debug operator for TypeParser::Info - Add verbose mode to AbstractMetaType - Output more information for TypeEntry Task-number: PYSIDE-354 Task-number: PYSIDE-516 Change-Id: Id9882e89f9b5a51929f27b100d28396d3f6c4198 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove AbstractMetaFunction::invalid()Friedemann Kleint2017-05-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change AbstractMetaBuilderPrivate::traverseFunction() to consistently return 0 if something does not fit. Previously, functions with half-parsed arguments with the invalid flag set were returned. This caused strange side effects since the flag was not checked in all places. The only relevant information is whether some constructors were rejected. In that case, no default constructors or default copy constructors should be generated. This is now determined by checking the code model function item; the attribute HasRejectConstructor is introduced for this. This fixes: - Make it possible to reject the QTextStreamManipulator constructor taking a function pointer without having a default constructor generated: typedef void (QTextStream::*QTSMFI)(int); QTextStreamManipulator(QTSMFI m, int a) Q_DECL_NOTHROW - Implement QtCharts whose class QAbstractSeries has a rejected constructor. Change-Id: I6310574ba677dac20699f257340d2c2a55674353 Reviewed-by: Christian Tismer <tismer@stackless.com>
* move everying into sources/shiboken2 (5.9 edition)Oswald Buddenhagen2017-05-221-0/+2784
in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.