aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* shiboken: Remove unused static functionsFriedemann Kleint2020-04-281-35/+0
| | | | | | | | Remove _compareAbstractMetaFunctions() msgInvalidVersion(), fixing warnings. Change-Id: I5f55b0de2d3c3fed2df09cb922c02569c937f7c1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Enable flags types in added functionsFriedemann Kleint2020-03-231-0/+2
| | | | | | | | | | Add a search for flags entries to translateType(AddedFunction::TypeInfo). Task-number: PYSIDE-946 Task-number: PYSIDE-1241 Change-Id: I8f0092ad2dd546fdf8678864e49ad2940e7bb8dc Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Improve error messages about invalid types of added functionsFriedemann Kleint2020-03-231-24/+41
| | | | | | | | | | | Change translateType() to pass up the error instead of aborting so that the error is printed in traverseFunction() along with the name. The abort in case of failure will then occur in fillAddedFunctions(). Task-number: PYSIDE-946 Task-number: PYSIDE-1241 Change-Id: Iee9ca478b28c8f82d9c4b6c5165f3028bf1e0d08 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Refactor metatype comparisonFriedemann Kleint2019-11-251-29/+16
| | | | | | | | | | Remove unused code left over from previous changes and add flags for matching value and const-ref as equivalent. Rename a few functions for improved clarity. Change-Id: Ifac1414e4977643b18d31dfc63a8e4a5f89a2ddc Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Refactor target lang nameFriedemann Kleint2019-11-251-4/+1
| | | | | | | | | | | | | | | | | | - Devirtualize TypeEntry::targetLangName() and replace by QString buildTargetLangName() that walks up the hierarchy and builds the name from the components. It populates a mutable variable m_cachedTargetLangName. - Implement setTargetLangName() to set m_cachedTargetLangName directly so that it works in all classes (for target-lang-name). - Implement a targetLangEntryName() that returns the last name part using the same pattern. - Remove the unused lookupName(). Fixes: PYSIDE-1133 Task-number: PYSIDE-990 Task-number: PYSIDE-1074 Change-Id: I15a6805a21584f1d7d4222e577e50907d7291841 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Store the unqualified entry name in TypeEntryFriedemann Kleint2019-11-251-28/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous change adding a parent pointer, this is working towards building the target lang name by walking up the hierarchy, prepending the names, making it possible to exclude namespaces. Pass the unqualified name from the XML parser and build the qualified name in the TypeEntry constructor. For this to work, a new ConstantValueTypeEntry is added replacing the abuse of EnumValueTypeEntry for nontype-template parameters. As a side effect, it is no longer possible to nest types by qualifying with "::" in XML: <object-type name="Class"/> <enum-type name="Class::Enum"/> This needs to be fixed in the type system files. [ChangeLog][shiboken] As a result of a code cleanup, it is no longer possible to nest types by by qualifying with "::" in the type system files. The elements need to be properly nested. Task-number: PYSIDE-990 Task-number: PYSIDE-1074 Change-Id: I8a2f93c40d59167b0ba205ef3ff3b325d242c3d3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Give the type system entries a pointer to their parentFriedemann Kleint2019-11-181-7/+15
| | | | | | | | | | | | | | | This helpful when building the qualified names including namepaces whose names may not appear (due to them being C++ inline namespaces or generation being disabled). With this, an accessor to the type system entry can be added, which helps to avoid ambiguities. Task-number: PYSIDE-990 Task-number: PYSIDE-1074 Change-Id: I7dce742770fbdbbc6ed0c3fce5120108dd12ffc4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
* shiboken: Remove unused codeFriedemann Kleint2019-11-071-7/+0
| | | | | Change-Id: Idf421747a41fbc7c58e8cc84023426bc12b47544 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-10-311-7/+16
|\ | | | | | | Change-Id: I9f31a647fd9d4ad9c854a307f8b5df1be935354a
| * Fix hasVirtualDestructor() for implicit destructorsAndreas Beckermann2019-10-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a derived class does not declare an explicit destructor, AbstractMetaClass::hasVirtualDestructor() is set to false. However this is incorrect for classes that have a base class that in turn provide a virtual destructor. Consequently shiboken generates incorrect code in cases where it depends on that value (e.g. for methods that override ownership of the returned object - instead of releasing ownership, shiboken invalidates it). This patch considers the baseClass()->hasVirtualDestructor() after traversing all functions (which checks for explicit destructors). Change-Id: Ifc4a472290d835dd6ef7d702b912643c9a2b42da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Add support for __repr__ in QObject derived classesAndreas Beckermann2019-10-251-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently shiboken generates classes without __repr__ for QObject derived classes. However for all non-QObject classes that have an operator<<() for QDebug, it *does* add a valid repr implementation. Extend this behavior to QObject classes as well. In order for this to become more useful, also check for the indirection of operator<<(): If operator<<(QDebug, Foo*) is available, use the current non-value-type behavior, (i.e. provide cppSelf to operator<<()), but if operator<<(QDebug, const Foo&) is available instead, use the same behavior as for value-types, i.e. provide *cppSelf. This greatly increases the number of classes where operator<<() provides useful results. Also make sure to check for operator<<() in namespaces (recursively), not just at global scope. Change-Id: Ief9158455a25e332f07169f09692cafb8097078b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | shiboken: Streamline code for argument default value modificationFriedemann Kleint2019-10-041-41/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out a helper for applying the modifications and use that in AbstractMetaBuilderPrivate::traverseFunction(AddedFunction) and AbstractMetaBuilderPrivate::traverseFunction(FunctionModelItem) consistently using the existing list of function modifications. Streamline AbstractMetaBuilderPrivate::fixDefaultValue() to handle empty expressions for simplicity. Remove AbstractMetaFunction::replacedDefaultExpression() and AbstractMetaFunction::removedDefaultExpression() which are no longer needed. Remove unused AbstractMetaFunction::argumentReplaced(). Task-number: PYSIDE-1095 Change-Id: I649d8aa4d2ecc8bd551ecf57303ab9b849757029 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | shiboken: Introduce flags for AbstractMetaBuilder*::translateType*Friedemann Kleint2019-09-121-12/+17
| | | | | | | | | | | | | | This is a preparation for further extensions. Change-Id: I5279f351f7964f17ee3ca92386c10d3b90b5d8c8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Friedemann Kleint2019-07-301-0/+4
|\ \
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-07-291-0/+4
| |\| | | | | | | | | | Change-Id: I057084ef25f7bbe8ec62ef7893b1d44b0074d987
| | * shiboken: List location of anonymous structs in rejected classesFriedemann Kleint2019-07-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Anonymous structs showed up as mysterious, empty entries in mjb_rejected_classes.log. Output the location. Change-Id: I0754e426a9fff3d1dac03aa587747ab0d7816df5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | Fix build against Qt 5.13Friedemann Kleint2019-07-301-0/+4
|/ / | | | | | | | | | | | | | | | | For development purposes, the 5.14 branch is currently built against Qt 5.13. Qt 5.14 deprecation fixes must be guarded by version checks. Change-Id: I41f7185577c612e8daf8020b9fe57d9ff2c66379 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-07-031-86/+85
|\| | | | | | | Change-Id: I389468b76913ac3c8113ab89833c756a7a72e54f
| * shiboken: Fix various clang warningsFriedemann Kleint2019-06-251-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoid copying complex types by using const ref - Use isEmpty() to check for container emptyness - Use range-based for - Use Q_DISABLE_COPY in 'public:' area - Fix spelling error - Use '= default' for trivial constructors/destructors - Remove non-null checks before deletion - Fix misleading indentation - Fix else after return - Simplify boolean expressions - Fix unused parameters, streamline code Change-Id: I8c6cadd8653e220ba8e5bdb4dd55524d13a81768 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * shiboken: Replace 'typedef' by 'using'Friedemann Kleint2019-06-251-4/+3
| | | | | | | | | | | | | | | | Apply Fixits by Qt Creator with some amendments. Remove iterator types by using auto instead. Change-Id: I8a75323da6ae5cdcc6b67af8be9376408953986b Reviewed-by: Christian Tismer <tismer@stackless.com>
| * shiboken: Introduce autoFriedemann Kleint2019-06-251-18/+18
| | | | | | | | | | | | | | Apply Fixits by Qt Creator with some amendments. Change-Id: Ib2be1012ef7e8a2ad0e6cd130371bf1e941c4264 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * shiboken: Introduce nullptrFriedemann Kleint2019-06-251-25/+25
| | | | | | | | | | | | | | Apply Fixits by Qt Creator with some amendments. Change-Id: Ie8300ddb834adb8b649324562f2c912a4e8cf4ce Reviewed-by: Christian Tismer <tismer@stackless.com>
| * shiboken: Introduce member initializationFriedemann Kleint2019-06-251-2/+1
| | | | | | | | | | | | | | | | | | Use member initialization, use default bodies for constructors. Initialize missing members as reported by clang. Change-Id: Ibc51e46a37b310912ec8f274543092dfdda78e1b Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Cleanup pointer whitespace everywhereChristian Tismer2019-06-241-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Among other files to fix, basewrapper.(cpp|h) was full of uncommon pointer whitespace. After fixing that, I could not resist and fixed also libshiboken, generators, and after acceptance also PySide. Most of the time, this regex worked fine (\w\w+)([*&]+)[ ]*(?![&*]*[/=]) replaced with \1 \2 but everything was checked by hand. I did not touch the shiboken tests which are quite hairy. It turned out that inserting a space between a variable and asterisk causes a crash of shiboken, if the same line contains "CONVERTTOCPP". This was temporarily fixed by adding another space after it. Example.. sources/pyside2/PySide2/glue/qtcore.cpp line 977 QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj); //XXX /|\ omitting this space crashes shiboken! cppgenerator.cpp was special, since it was modified to _generate_ correct pointer whitespace. This caused a few testcases to fail, which had to be adjusted, again. This was difficult since some internal names must end on "*" and generated code normally not. Removing the last errors involved binary search on path sets... Apply C++ 11 fixits to the changed code, where applicable. Done-with: Friedemann.Kleint@qt.io Task-number: PYSIDE-1037 Change-Id: I4ac070f52c5efb296c05d581c9d46e6f397a6c81 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-06-191-2/+4
|\| | | | | | | Change-Id: I5aa8f69849db51c61d058b7f0197b883b7d2d4e2
| * shiboken: Enable specifying names for a parameters of added functionsFriedemann Kleint2019-06-051-2/+4
| | | | | | | | | | | | | | | | | | | | Introduce a way to specify a name for a parameter using '@' delimiters. Fixes: PYSIDE-1017 Change-Id: I3ae505c104a64413ca2bad628d9f9d3e04bb5b88 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-241-10/+46
|\| | | | | | | Change-Id: I38964a8efc7905afd879cd2a96e75149d5942c8a
| * shiboken: Make it possible to extend namespacesFriedemann Kleint2019-05-221-10/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt has some modules, where functions and classes are added to namespaces of other modules. For example, QtGui adds the free functions mightBeRichText() and convertFromPlainText() to the "Qt" namespace and Qt3DQuick adds a namespace "Quick" to the namespace "Qt3DCore" started in Qt3DCore. Shiboken was unable to handle this since the name of the index constant was derived from the namespace name and would thus clash. Also, all code model items from the base module would be re-generated into the extended namespace. To fix this: - No longer join namespace code model items in clang builder. - Search for pre-existing namespaces in traverseNamespace() before creating a new one, continuing populating it. - Add a "files" attribute taking a regular expression to match header names to the namespace type entry, making it possible to restrict code model items by files when extending namespaces (as otherwise, all base items are again added). - Add "extends" attribute specifying the package name of the namespace to extend, which will be used as base type in CPython. - Disambiguate the SBK indexes of namespaces and the init_ functions by adding the module name. Change-Id: Ib552e878911942fa4d52d2bb0c6695e5b2c4c341 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix deprecation warnings about deprecated container conversionsFriedemann Kleint2019-05-221-1/+2
|/ | | | | | | | Fix warnings introduced by qtbase/92f984273262531f909ede17a324f546fe502b5c. Change-Id: Ic46e5c93f8dd1910742fbd0578602cca4461643b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* shiboken: Refactor progress message output handlingFriedemann Kleint2019-04-301-18/+21
| | | | | | | | | | | | In class ReportHandler, replace the step counting by a simple pair of startProgress()/endProgress() functions that check for warnings and print the appropriate terminator. Module name and timestamp are now also printed. Add a few more messages and give proper names to the generators. Change-Id: I92b4ef2854b824fbba3d371417edc1f88561a2cb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Fix code injection not working for operator functionsFriedemann Kleint2019-04-151-11/+1
| | | | | | | | | | | | | | | | | | | Searching for the function modifications of the operator function by signature failed due to the internally changed signature. Store the function modification list of user-added-functions directly in struct AddedFunction instead of the type entry of the containing class. In AbstractMetaFunction, replace the bool m_userAdded flag by a shared pointer to the AddedFunction and use that to retrieve the modifications (injected code snippets) for the user-added functions instead of searching for them by function signature. Task-number: PYSIDE-995 Change-Id: Ic4d0b257f141a450df26563d33beb397b6209d91 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Pass around struct AddedFunction by QSharedPointerFriedemann Kleint2019-04-151-14/+14
| | | | | | | | | This is a preparatory step for storing it directly in AbstractMetaFunction. Task-number: PYSIDE-995 Change-Id: Ia281bb8d3d94d3d56549ec227a476d9750922323 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Remove some special handling for QObject'sFriedemann Kleint2019-04-101-68/+0
| | | | | | | | | | | | For types, QObjects are equivalent to objects, there is no need to differentiate. Remove the code trying to find whether a type is a QObject. Only AbstractMetaClass needs to know whether it inherits QObject. Add a simple check recursing down the base classes. Change-Id: I2365b451c8873f044b06c09b58aff29e2db3c5b7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken/meta builder: Remove member m_namespacePrefixFriedemann Kleint2019-04-101-5/+4
| | | | | | | It is only used for nested namespace names. Change-Id: Id808b6db3b20c861ed3180d6df956f31702afbde Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken/meta builder: Refactor type resolution parseQ_Property()Friedemann Kleint2019-04-101-21/+19
| | | | | | | | Use a list instead of splitting and joining repeatedly. Use splitRef() for the tokens. Change-Id: I0519b18126ba828a00aff6e4455c45f682928ca9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Remove member m_currentClass from AbstractMetaBuilderPrivateFriedemann Kleint2019-04-081-97/+78
| | | | | | | | Pass the current class as function parameter instead while traversing instead of setting and restoring m_currentClass. Change-Id: I38391dff9a52ff99593c25208e1e2bf7d98d17d6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Allow for include paths with relative directoriesFriedemann Kleint2019-04-041-3/+47
| | | | | | | | | | Resolve the absolute file paths of the code model items against the include paths of shiboken to reconstruct the relative paths. Change-Id: Id0f793315b01c0fc65a4cfb26b3372f9c6688872 Fixes: PYSIDE-975 Reviewed-by: Volker Aßmann <volker.assmann@gmail.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Remove finding of the current class in metabuilderFriedemann Kleint2019-04-031-33/+16
| | | | | | | | | | | | | | | | | shiboken iterates over the code model items in 2 passes: The first one generates a list of classes, the second one adds the members. In the second pass, the function AbstractMetaBuilderPrivate::currentTraversedClass() was used to find the AbstractMetaClass instance for the code model item by name. This is inefficient and causes problems when extending namespaces. Therefore, replace AbstractMetaBuilderPrivate::currentTraversedClass() by a hash associating the code model items with the AbstractMetaClass instances. Change-Id: I88ea5205d0fde03558db8efb8738632aa3ab6da6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Search for classes by type entry instead of nameFriedemann Kleint2019-04-031-3/+3
| | | | | | | | | Searching by name is more efficient and has problems when extending namespaces. Search by type entry instead where possible. Change-Id: I131329a6648bb7f0a02cba08a5fbbc0531e0c51f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Refactor AbstractMetaBuilder::classesTopologicalSorted()Friedemann Kleint2019-04-011-55/+46
| | | | | | | | | | | | | | | | | | Change the function parameter to be a list always, making the logic of the inner classes clearer. In the implementation, use a of QHash<AbstractMetaClass*, int> instead of hashing by name, which makes it possible to disambiguate namespaces extended in modules. This also allows for a drastic simplification of the code trying to determine the dependency given by parameter default values. Instead of trying to match by name, correctly qualifying it, the matching can be done by TypeEntry pointers. Change-Id: Ia17bf6e109576bac029fb016e5e11309777d0735 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Replace QLinkedList by a QVector in the Graph classFriedemann Kleint2019-04-011-2/+1
| | | | | Change-Id: I4d76a29699867e9d4ff6138cc40fae9b1f519121 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Handle <array> modifications in template inheritanceFriedemann Kleint2019-03-011-32/+32
| | | | | | | | | | | | | | | | | | | | Array modifications did not work in template specializations (like typedef QGenericMatrix<2,2,int> QMatrix2x2> causing warnings like: There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive type 'const float *' of argument 1 in function 'QMatrix2x2::QMatrix2x2(const float * values)'. Rewrite the array modification code to operate on AbstractMetaType only instead of requiring code model data types and add the missing handling to AbstractMetaBuilderPrivate::inheritTemplate(). Add a test. Note that the warning was fixed by another change removing the array modification since it did not take effect due to the presence of a manually added PySequence constructor. Change-Id: Ie4a1092fbef7237f8858790a74e2f75070ef6586 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Add allow-thread attribute to type system and class entriesFriedemann Kleint2019-02-281-0/+2
| | | | | | | | | | | | | | In the typesystem parser, add the allow-thread attribute to root and complex type entry. Rewrite the handling of allow-thread (cached) in AbstractMetaFunction similar to the exception handling (store the modification in AbstractMetaFunction and go down the class hierarchy if it is unspecified). Change-Id: I00e6e2ab25208fda63ec20522814cbfccbb8c42d Fixes: PYSIDE-931 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Fix exception handling when specified in base classFriedemann Kleint2019-02-281-37/+2
| | | | | | | | | | | | | | | | | | | | | Class-level exception specifications on a base class were not working so far. This requires a larger refactoring, since the base classes are not yet known at the point where class functions were traversed (AbstractMetaBuilder::setupInheritance() is called at a later stage). To fix this, store the actual type system modification in the AbstractMetaFunction and move the logic determining whether to generate exception handling into AbstractMetaFunction::generateExceptionHandling(). In this function, recurse down the base classes if the function does not have a modification set. This is a preparation for giving the allow-thread attribute, which can currently only be used at a function level, a similar handling. Task-number: PYSIDE-62 Change-Id: I28597559511d330cf860c6f6e21ffea229bfab3e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Suppress warnings about missing types for dropped entriesFriedemann Kleint2019-01-311-0/+1
| | | | | | | | | Fix warnings in case Qt is not built with SCTP: qt.shiboken: (network) type 'QSctpServer' is specified in typesystem, but not defined. This could potentially lead to compilation errors. qt.shiboken: (network) type 'QSctpSocket' is specified in typesystem, but not defined. This could potentially lead to compilation errors. Change-Id: I0352e34011f2123e08fe3330a53dcdadc468d6a9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Add option to skip deprecated functionsFriedemann Kleint2019-01-311-1/+21
| | | | | | | | | | | | | Pass the "deprecated" annotation from Clang into the meta language and reject functions based on it when the the command line option --skip-deprecated is set. By default, have Python output a deprecation warning when a deprecated function is called (which is visible when passing -Wd). Task-number: PYSIDE-487 Change-Id: Ic28d82963fde11f258b2559b562d3f24017fe98d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Make constructor checks more fine-grainedFriedemann Kleint2019-01-301-10/+12
| | | | | | | | | | | | | | | | ShibokenGenerator::isValueTypeWithCopyConstructorOnly() returned false for QWebEngineHistoryItem since the check for AbstractMetaAttributes::HasRejectedConstructor triggered on WebEngineHistoryItem(QWebEngineHistoryItemPrivate *priv), causing the function to bail out. To prevent this, add a new AbstractMetaAttributes::HasRejectedDefaultConstructor attribute and use that in isValueTypeWithCopyConstructorOnly(). Task-number: PYSIDE-906 Change-Id: I4fee83b89f0a4c44e7e8d69e118ed7f2b03ceee1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Remove defunct code trying to merge namespacesFriedemann Kleint2018-10-301-5/+3
| | | | | | | | | Remove the function _NamespaceModelItem::uniqueNamespaces() which created a QSet of_NamespaceModelItem *. Hashing by pointer values does not have any effect. Change-Id: I723024f0004aacecf4f06a1baa10678848d4a56b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Refactor finding of enumsFriedemann Kleint2018-09-281-12/+12
| | | | | | | | | | In the AbstractMetaBuilder, change the list of enums into a QHash with the type entry as key since that is mostly used for searching. Streamline and simplify the search functionality accordingly. Task-number: PYSIDE-817 Change-Id: I205cad1f90bc26511ea6b6e9b76ddb1bae544cf1 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken/AbstractMetaBuilder: Remove unused member variablesFriedemann Kleint2018-09-281-17/+0
| | | | | | Task-number: PYSIDE-817 Change-Id: Id7e8fb1b18abb51d6fdf450c4069e5ba88b53285 Reviewed-by: Christian Tismer <tismer@stackless.com>