aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/messages.h
Commit message (Collapse)AuthorAgeFilesLines
* shiboken6: Ignore nested containers as template parameters when inheriting a ↵Friedemann Kleint13 days1-0/+4
| | | | | | | | | | | | | | | | | | template Change qtbase/ab0b2a490eb98f3216403e87e4ea108a10fbeed2 removes QObject inheritance from QSignalSpy, making the QList<QVariantList> the first base class. Do not specialize this as it leads to errors later on when determining the instantiated templates. Split out the code for template parameters from inheritTemplate() to a separate helper function inheritTemplateParameter() and add error messages. Task-number: PYSIDE-2620 Pick-to: 6.7 Change-Id: I6b45d0293036b7a9177fab4d26d3e7e79d5799e6 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Improve code snippet error handlingFriedemann Kleint2024-01-311-0/+1
| | | | | | | | | | | | | Type conversion errors in code snippets can be hard to diagnose, particularly when they occur in an invalid context due to misspelt snippet markers. Add some functions wrapping the in try/catch, adding some context information to the error messages. Pick-to: 6.6 Change-Id: I7e35f298497b7fd0b582f43d6941a683e18377b3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Improve warning message when stripping argumentsFriedemann Kleint2023-12-211-1/+2
| | | | | | Pick-to: 6.6 Change-Id: Ibd4fd2da19811183fe8743b925ba2bf98b892541 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Add an options parser for common optionsFriedemann Kleint2023-09-201-1/+1
| | | | | | | | | Remove the old option handling completely. Pick-to: 6.6 Change-Id: I00661b530527cd072c346b983c33b789240ce722 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Move options parsing into API extractorFriedemann Kleint2023-09-201-0/+2
| | | | | | | | | | | Similar to the previous change for the TypeDatabase, add an OptionsParser for ApiExtractor and let it handle the its options directly instead of passing them from main. via ApiExtractor. Many ApiExtractor setters can then be removed. Pick-to: 6.6 Change-Id: I3fe37e2903edcc4f6e4a91181917d008df1e5ca8 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Introduce simple option structFriedemann Kleint2023-09-201-0/+2
| | | | | | | | | | | Add a struct Options to replace the struct CommandLineArguments from main.cpp with built-in handling of the project file. Port the generators over. Pick-to: 6.6 Change-Id: I3012d211761e7a43c709f2754e6846f008ff2b0d Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Improve message about not being able to resolve typedefsFriedemann Kleint2023-08-311-0/+1
| | | | | | | Pick-to: 6.5 Change-Id: I9605d7992dfd7506c1d6e75c2719d77cfeffe449 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Remove remaining usage of QCoreApplicationFriedemann Kleint2023-07-241-1/+1
| | | | | | | | | Pass arguments to the error message. Amends 0f0f732d91f8cf717283dbfbe67c8875bf191902. Pick-to: 6.5 Change-Id: Ie40c272732468ff3d7b6b0636120710f26309347 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Remove check for variable type in conversion snippetsFriedemann Kleint2023-05-111-2/+0
| | | | | | | | | | | | There might be subtle differences for example spaces in nested template types (QList<QSharedPointer<T> >) which are now obsolete that trigger the error. Remove the check as mostly auto is used today and it would result in a compiler error anyways. Pick-to: 6.5 Task-number: PYSIDE-2316 Change-Id: I28251549d1d103fa3e2d0f9eed405852b2195d8a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Use smart pointers for AbstractMetaClass instancesFriedemann Kleint2022-12-061-12/+12
| | | | | Change-Id: I101ca8ceea6ffa63ca8bd03e2e9adf7531cb8f80 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Use smart pointers for the TypeEntry classesFriedemann Kleint2022-11-171-12/+12
| | | | | | | | | | TypeEntry instances were previously stored and passed as raw pointers, which made it difficult to track ownership, particularly when synthesized classes were added. Change it to use QSharedPointer. Change-Id: I3612efbc5d467ebeac9aa5dda86c7439bbd03ddd Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Fix coding style regarding pointers (Type* v -> Type *v)Friedemann Kleint2022-11-141-1/+1
| | | | | | | | | As a drive-by, introduce some auto and streamline the code. Pick-to: 6.4 Change-Id: If84a3721a50b2e00b473ba78cba184f1a35d326b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Reorder headers containing typedefsFriedemann Kleint2022-11-111-2/+3
| | | | | | | | | | | | | | | - Split out Modifications/CustomConversions-related typedefs to separate headers customconversion_typedefs.h, modifications_typedefs.h - Move forward declarations of TypeEntries from typedatabase_typedefs.h to typesystem_typedefs.h - Rename TypeEntries to TypeEntryCList and add "C" to other lists containing const pointers following the shiboken convention. Pick-to: 6.4 Change-Id: Ic31872405778d794d85694386990b50edf42beec Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Enable specifying namespaces for smart pointer instantiationsFriedemann Kleint2022-11-101-0/+2
| | | | | | | | | [ChangeLog][shiboken6] It is now possible to specify a namespace for a smart pointer instantiation. Task-number: PYSIDE-454 Change-Id: I9b61c3514211108fd7009e1776ae4fb8988c576b Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Fix indirections of enums/flag argumentsFriedemann Kleint2022-10-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | The information about how arguments are converted (pointer indirections, etc.) was in CppGenerator::writePythonToCppTypeConversion() and partially duplicated in AbstractMetaType::shouldDereferenceArgument(), leading to discrepancies in the indirections generated for the function calls. To fix this, introduce a struct GeneratorArgument with type, conversion mode, indirections and a few flags storing this information and use that everywhere, replacing AbstractMetaType::shouldDereferenceArgument(). Pass the argument indirections obtained from writePythonToCppTypeConversion() via writeArgumentConversion() as a list into writeMethodCall(). Add a test for passing enums by pointer. Fixes: PYSIDE-2065 Change-Id: I495c2bc04ebc0162648d74b75e321609ecd00963 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Clean up includesFriedemann Kleint2022-09-211-2/+0
| | | | | | | | | Remove unused includes from headers; add includes to sources where needed. Change-Id: I05efd95a9340eaf42cc5d606e2aef97acdaf83c7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Refactor Handling of CustomConversionFriedemann Kleint2022-09-061-0/+2
| | | | | | | | | | | | | | | | | CustomConversion can appear in PrimitiveTypeEntry, ContainerTypeEntry and ValueTypeEntry. Move the field from the base class TypeEntry there. The deprecated QString targetConversionRule() was only implemented for ValueTypeEntry; move it from the base class TypeEntry there. In the original code, CustomConversion was stored as a raw pointer in TypeEntry. This is bad since TypeEntry are cloneable. Use a QSharedPointer to prevent crashes. Change-Id: Ia74219671bbd5792398f9711b4a020f5c9825b1b Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Fix mapping of arguments when writing virtual methodsFriedemann Kleint2022-06-271-0/+2
| | | | | | | | | | When generating the code for virtual methods, removed argument were not properly taken into account. Add a mapping method for this to AbstractMetaFunction. Change-Id: I6caf6bd676256affa7c9b85b36bec74a1c642be2 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Use SPDX license identifiersLucie Gérard2022-05-271-27/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor CppGenerator::argumentNameFromIndex()Friedemann Kleint2022-04-071-0/+3
| | | | | | | | | | | | The function was returning the argument class in a pointer passed in. Split this functionality out to a separate function argumentClassFromIndex() for clarity. Use exceptions to signal errors instead of writing #error directives. Pick-to: 6.2 Change-Id: Icfdf4344bfd3bab0e65c308bebde21f6940bdbfd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add attribute "value-check-method" to smart pointersFriedemann Kleint2022-04-051-1/+1
| | | | | | | | | | | | | | | | "value-check-method" (operator bool, std::optional::has_value()), is the opposite of the existing "null-check-method" (QSharedPointer::isNull()) and takes precedence over it. Synthesize these methods for smart pointers as well. As a drive-by, actually generate the value check and null check methods. Add a test for std::shared_ptr. Task-number: PYSIDE-454 Change-Id: Ie3b6f7042883888d23c9e6bed8a1409f0bdb56b9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: Synthesize missing smart pointer functions and classesFriedemann Kleint2022-03-291-3/+2
| | | | | | | | | | | | | | Add a function to create the smart pointer classes and their relevant member functions in case they are not in the code model due to being in some unspecified helper base class. [ChangeLog][shiboken6] Using std::shared_ptr has been simplified; it no longer requires specifying all implementation headers for the class declaration to be fully visible. Task-number: PYSIDE-454 Change-Id: I870ec59e55e947fa13f875c4af8756246651c466 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Split CppGenerator::generateClass()Friedemann Kleint2022-03-221-0/+5
| | | | | | | | | | | | | Split out the smart pointer part from CppGenerator::generateClass() into a separate CppGenerator::generateSmartPointerClass() along with several small helpers. This increases the clarity of the code and makes it easier to implement similar classes like std::optional or std::unique_ptr. Task-number: PYSIDE-454 Change-Id: I27ab16e2a9cef644e18e129eb18052df1b7a990f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/Documentation: Replace XPath/Xquery usage for retrieving WebXML ↵Friedemann Kleint2021-12-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docs by a parser shiboken used XPath expressions to extract the function descriptions from the qdoc-generated WebXML. With the deprecation of QtXmlPatterns in Qt 6, libxml/xslt was used for this. A major drawback is that libxml/xslt is unable to match entities in attributes which means functions taking parameters by const-ref could not be found. This required cumbersome workarounds involving repeated searches, which still were not sufficient to find all functions. To fix this, write a WebXML parser based on QXmlStreamReader that extracts the contents of a WebXML page into some simple data structures and use those for searching. On this occasion, also use the metafunction flags to correctly match binary operator functions. This reduces the number of functions for which no documentation can be found (from ~1100 to ~800 for the qtbase repository). From the remaining functions, ~230 are functions inherited from templates, which should at least be listed. Others are caused by qdoc not finding hidden friends. The remaining usages of libxml/xslt are the doxygen parser and the documentation modifications using XSLT. Task-number: PYSIDE-1106 Change-Id: I31c045ad42948afad884f40d5bbc8bee7555859e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix documentation generationFriedemann Kleint2021-12-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | The fuzzy checking introduced by 87efa57c6ddc1a8364b2ea4d9f909372d0af5cfc actually produced ambiguous matches like QStandardItemModel::insertRow(QStandardItem *), QStandardItemModel::insertRow(constd QList<QStandardItem *> &). Change this to be a 3 step process: First, try an exact type match. If that fails and there are arguments using const ref qualifications, try a fuzzy match. Check whether this produces a single match. Finally, try matching by argument count. As a drive-by, format qualifiers of template parameters like QList<QStandardItem *> correctly. Change the messages to report "Fallback used" instead of "Cannot find" if a fallback is found to make it easier to spot failures. Amends 87efa57c6ddc1a8364b2ea4d9f909372d0af5cfc. Pick-to: 6.2 Change-Id: I5b133274ae0f056e6901b0a66d385a270cabb9c9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add further methods to smart pointersFriedemann Kleint2021-11-241-0/+2
| | | | | | | | | | | | | | | | Add attributes for reset() and null-check. The shared pointer in the test uses isNull() which works due to the --use-isnull-as-nb_nonzero option, but it should be possible to explicitly specify that. [ChangeLog][shiboken6] Attributes for reset() and null-check of smart pointers have been added. Task-number: PYSIDE-454 Pick-to: 6.2 Change-Id: I22571eeb43f7f98b6a77b31066bf8daa681cb044 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Clean up messages about cyclic dependencies of overloaded functionsFriedemann Kleint2021-11-031-1/+2
| | | | | | | | | | | | | | | Move message helper msgCyclicDependency() from overloaddata.cpp to message.cpp to prevent a clash between the static helper and the one declared in messages.h. This was an oversight causing problems in 5.15: tqtc-pyside-setup/sources/shiboken2/generator/shiboken2/overloaddata.cpp: In function ‘QString msgCyclicDependency(const QString&, const QString&, const MetaFunctionList&)’: tqtc-pyside-setup/sources/shiboken2/generator/shiboken2/overloaddata.cpp:151:16: error: ‘QString msgCyclicDependency(const QString&, const QString&, const MetaFunctionList&)’ was declared ‘extern’ and later ‘static’ [-fpermissive] Pick-to: 6.2 5.15 Change-Id: I56375c5bbc483859f83658cfeb4df1e6067421a0 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Do not crash when class cannot be found in the overload sorterFriedemann Kleint2021-10-281-0/+3
| | | | | | | | | | | Print an error message instead. As a drive-by, add a helper to create a class-qualified signature for error reporting purposes to AbstractMetaFunction. Pick-to: 6.2 5.15 Task-number: PYSIDE-1684 Change-Id: I8417f405b4ce1b64060aad0696e5d328869cb83e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Store removed modification in AbstractMetaArgumentFriedemann Kleint2021-10-011-0/+3
| | | | | | | | | Similar to 984559a68d57d76b49c8ed0cbaf3492521aebebd, store the "removed" modification in AbstractMetaArgument. Task-number: PYSIDE-1660 Change-Id: Id541b4dccdcf3eba708a0da5dc873fe3b20b8151 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor modified types of functionsFriedemann Kleint2021-10-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove AbstractMetaFunction::typeReplaced(), which returned the modified type of an argument or the return type as a string. Instead, for function arguments, for which modified types must always be valid AbstractMetaTypes, add a getter modifiedType() returning an AbstractMetaType to AbstractMetaArgument. This fixes a number of potential bugs when accessing typeReplaced(int) with the wrong position due to removed arguments. The modified argument types are parsed from the XML strings in early on in AbstractMetaClass::fixFunctions() with proper error reporting. For return types, for which modified types need to be valid only when generating a type check for virtual method return in the C++ wrapper, add a function modifiedTypeName() to AbstractMetaFunction. Adapt the client code accordingly. Split apart CppGenerator::writeTypeCheck() into one overload taking an AbstractMetaType and one taking a string. Task-number: PYSIDE-1660 Change-Id: Id95379892b40ae2632ca33ed27263bada0ec015d Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Remove ShibokenGenerator::guessCPythonCheckFunction()Friedemann Kleint2021-09-301-0/+2
| | | | | | | | | | | | | | | | Since all CPython types are now built-in custom types, there is no longer a need to guess the check functions. Custom types passed to writeTypeCheck should be valid AbstractMetaTypes; throw an exception if this fails. Define a check function for Qml's VolatileBool where it was relying on heuristics. Task-number: PYSIDE-1660 Change-Id: I9641c63ae2942db86dbf84488429b7e25f0491a0 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* shiboken6: TypeEntry: Use a pointer to the target lang API type entryFriedemann Kleint2021-09-241-0/+1
| | | | | | | | | | | | | Replace the string m_targetLangApiName by a pointer to the type entry; allowing to retrieve the check function. Similarly, in TargetToNativeConversion::sourceTypeCheck(), use the existing type entry to retrieve the check function, allowing for removing some heuristics. Task-number: PYSIDE-1660 Change-Id: Ieeda43f804b4e129d3cc0984e36bd0c0d546fd86 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Improve message for a mismatched global functionFriedemann Kleint2021-09-241-1/+2
| | | | | | | | Output a list of candidates with matching name in case some type was misspelt. Change-Id: Ie763a912d02907d562f3feeb2eba44e811d80118 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add support for built-in typesFriedemann Kleint2021-09-171-0/+3
| | | | | | | | | Add a built-in flag to TypeEntry and fix the duplicate type entry checking logic to handle built-in types with a different warning. Task-number: PYSIDE-1660 Change-Id: I22b0fc92b0f19b4163a4311441638176ff6a4bfb Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: remove obsolete error messageChristian Tismer2021-06-181-3/+0
| | | | | | | | | | | | This message became pointless in PySide6 because the word "iterator" no longer creates clashes in shiboken and PySide. Thanks for checking this, Friedemann! Change-Id: Ib0496039ab194049fd1f09867de1bbcfeb47d21e Pick-to: 6.1 Fixes: PYSIDE-498 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Make missing snippet labels a fatal errorFriedemann Kleint2021-03-101-0/+2
| | | | | | | | Use a std::optional for helper extractSnippet() to be able to distinguish an empty result from an error. Change-Id: Id8da10f56155de54e50930c85f510704d2db8f48 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Add constructors of base classes imported via "using"Friedemann Kleint2021-03-011-0/+4
| | | | | | | | | | | | | Parse "using" declarations in the clang builder using some code from the base class determination algorithm. Resolve them to struct UsingMember containing the base class and the member name in the metabuilder and check whether any base constructors are imported via "using". Add them as functions like the default constructor. Change-Id: I121a70f0591c6d1e6f9daedfb653206c49c07a3f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor options parsingFriedemann Kleint2021-01-201-1/+1
| | | | | | | | | | | | Replace the string map in the CommandLineArguments struct by a QVariantMap, which can store strings and string lists. A number of list split and join operations can then be removed. Replace the path splitter by QDir::listSeparator(). Task-number: PYSIDE-1477 Change-Id: I70b798e531787d4932605ed5121b523fff5c1110 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/ApiExtractorResult: Use const AbstractMetaClass * for the class listFriedemann Kleint2020-12-221-1/+1
| | | | | | | | | | Add the missing overloads of AbstractMetaClass::findClass() and adapt some types. Pick-to: 6.0 Change-Id: I65851248b4b6a2e1d4f57fc58ecaf75fb4c00b29 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Shiboken6: Decouple QtXmlToSphinx from the doc generatorFriedemann Kleint2020-12-151-7/+0
| | | | | | | | | | | | | To enable testing, decouple QtXmlToSphinx from the doc generator by introducing a parameter struct QtXmlToSphinxParameters and an interface QtXmlToSphinxDocGeneratorInterface. Move the messages back into qtxmltosphinx.cpp and move the helper function convertToRst to the doc generator since it uses FileOut. Pick-to: 6.0 Change-Id: I176888dcbd65003856ea8797a5629949598801d5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Store AbstractMetaFunction using a QSharedPointerFriedemann Kleint2020-11-301-1/+1
| | | | | | | | | | | | | | | | | | Store the list functions (global / class member) as a QList<QSharedPointer<const AbstractMetaFunction> instead of a raw pointer list. This makes passing around function lists easier and solves the memory leaks caused by mixing cloned and unmodified functions while collecting the overload lists in the generators. - Change the function signatures accordingly - Add a qSharedPointerConstCast() for non-const access. - Restructure the traversing of added functions in the AbstractMetaBuilder - Remove some unused typedefs and functions unearthed by the change Change-Id: I08a6c5243750e3eb3813bc3f7172899ad2b13e22 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Replace QVector by QListFriedemann Kleint2020-11-251-2/+2
| | | | | | | | | | | | | | | | Change AbstractMetaClass::templateArguments() to return TypeEntries (const TypeEntry *) instead non-const. Remove redundant typedef OverloadData::MetaFunctionList. Use existing typedefs in some places. Add new typedefs for MetaObjectBuilder::EnumValues and AbstractMetaFunctionCList. Change-Id: Ia241b5fbe54d60ea57175fb1f6c844604e066a3d Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Refactor writing out filesFriedemann Kleint2020-11-241-0/+2
| | | | | | | | | Write the buffer directly to the file instead of reopening the text stream on it (which has unclear encoding semantics). Add error handling on this occasion. Change-Id: Ifd478f96a73dbc21e441fed8b8e543f07b6fa00b Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Fix some warning messagesFriedemann Kleint2020-11-181-0/+26
| | | | | | | | | Use standard messages where applicable. Move some messages over to messages.cpp and add a location. Remove some messages that cannot be triggered any more. Change-Id: I7fc821e4360b06af7ef6e5db7e30de0f1e8ed5ca Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Improve error messages when encountering forward-declared classesFriedemann Kleint2020-11-121-1/+4
| | | | | | | | | | | | Add an error string and return a message when a class can not be found (is only forward-declared) when looking for a minimal constructor expression and writing reference modifications. Remove debug code left over from a previous change. Pick-to: 5.15 Change-Id: I1e6f4f9f6d0611967cd77c4a3c1b8663366632fd Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Port AbstractMetaEnum/Value to use QSharedDataPointerFriedemann Kleint2020-11-111-1/+1
| | | | | | | | Change the client code to store it by value. For the various find() and traverseEnum() functions, use a std::optional to replace the pointer. Change-Id: Ie4e671bf95e569741fa3c9a399bfe239ceac0dec Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Port AbstractMetaField to use QSharedDataPointerFriedemann Kleint2020-11-101-1/+1
| | | | | | | | | | Fold AbstractMetaVariable into AbstractMetaField and use a QSharedDataPointer for it. Change the client code to store it by value. For the find() and traverseField() functions, use a std::optional to replace the pointer. Change-Id: Ibaa301b9aaae8851fcaa077327235cc5aaad7342 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Replace AddedFunction::TypeInfo by TypeInfoFriedemann Kleint2020-11-091-2/+2
| | | | | | | | | | | | | | | | | | AddedFunction::TypeInfo was a stripped-down version of the code model's TypeInfo with its own, simplified parser. Replacing it by TypeInfo allows for removing the parser code and the entire AbstractMetaBuilderPrivate::translateType(AddedFunction::TypeInfo) branch. The more powerful TypeParser from the code model can then be used, allowing for more complex types in <add-function> or <declare-function>. As a drive by, replace the AddedFunction constructor by a static factory function, allowing to pass up parse errors. Change-Id: I33ad19e9b5ed30bd27898afe771401ddc98c8c73 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-281-0/+210
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>