aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/messages.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-281-210/+0
| | | | | | | | 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>
* shiboken2: Add location to error messages about added functionsFriedemann Kleint2020-10-281-2/+4
| | | | | Change-Id: I39210642a96e98328d193f4e81ecad82b496d6c9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add QStringView/QByteArrayViewFriedemann Kleint2020-09-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | View types as function parameters cannot be converted in the standard way shiboken does it: QStringView cppArg0; pythonToCpp(pyArg, &cppArg0); since they reference some other data. Introduce a new "viewOn" member to type system entry for them. It causes the function arguments to be replaced by their viewed-on types (stringview->string) via metatype. Add a test in libsample and a test for QUuid::fromString(QStringView). Test returning QStringView via QRegularExpressionMatch::capturedView(). Task-number: QTBUG-84319 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Task-number: PYSIDE-487 Change-Id: Iddb4ea268a54928d290e29012e2738772fae83f0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-241-0/+4
|\ | | | | | | Change-Id: I7e4c7f9378706438715362b1e2da9a3cd2794562
| * shiboken2: Add a way of specifying properties in typesystem XMLFriedemann Kleint2020-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | Add a list of TypeSystemProperty to ComplexTypeEntry, parse it from XML and add those properties in AbstractMetaBuilderPrivate::parseQ_Properties(). Task-number: PYSIDE-1019 Change-Id: Idf6ecde7c9de6bf1e56be423921672152e97de70 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * shiboken2: Refactor property parsingFriedemann Kleint2020-09-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store AbstractMetaType instead of TypeEntry in QPropertySpec for more complete type information and better parsing. Introduce a struct TypeSystemProperty to the typesystem which can be later populated from a newly introduced typesystem XML element. Rewrite the parser to first populate a TypeSystemProperty and convert it to QPropertySpec with type lookup in a second step. Change the parser algorithm to first look for any of the READ/WRITE tokens and split the tokens leading up to them into type name and property name in order to parse complex types like Q_PROPERTY(QList<QSpriteSheetItem *> sprites READ sprites.. correctly. Task-number: PYSIDE-1019 Change-Id: I942bc659cc236d31041cdc22e26a82d270599033 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Start porting away from QStringRefFriedemann Kleint2020-08-191-1/+1
|/ | | | | | | | | | | | | QStringRef will be replaced by QStringView. Remove most usages or use auto. This will require a 2nd cleanup removing its usages from the QXmlStreamReader code once this has landed in qtbase. Task-number: QTBUG-84319 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I2885df70d5f883bcad7bb3a31618fc1d63116df5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken2: Add file location to more warningsFriedemann Kleint2020-06-231-2/+28
| | | | | | | | | | | | | | | | | | | | Output most warnings in the standard file:line syntax used by compilers. This is done for C++ source code and typesystem files. Introduce a class SourceLocation and add it to type entry, AbstractMetaFunction and AbstractMetaClass. Move more messages into messages.cpp and output the location. Change the errors reported by the XML typesystem parser to the same format. [ChangeLog][shiboken] A number of error and warning messages have been prefixed by file name and line for better tooling. Task-number: PYSIDE-904 Change-Id: Ie2008f4060757e9d7ca1b25c00c7c5585240a7b8 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-03-251-0/+7
|\ | | | | | | Change-Id: Ibcd8a3b5c6d1d2f636fd21b162c67a85e727c2c4
| * shiboken: Improve error messages about invalid types of added functionsFriedemann Kleint2020-03-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | 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: Remove InterfaceTypeEntryFriedemann Kleint2020-02-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InterfaceTypeEntry is a relic from Java, which does not have multiple inheritance. Remove it and handle it as object-type. Just removing the code breaks tests though, since AbstractMetaClass only has one pointer to its base class. The other base classes are added to the interface list. FAIL! shiboken2:testmultipleinheritance Newly detected Real test failure! FAIL! shiboken2:sample::ownership_invalidate_after_use Newly detected Real test failure! FAIL! shiboken2:sample::visibilitychange Newly detected Real test failure! [ChangeLog][shiboken] interface-type has been deprecated. object-type should be used instead. Change-Id: I19e876d82b26c2ef7865e3fafc74503c6cbd5a8b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | shiboken: Make it possible to specify smartpointer instantiationsFriedemann Kleint2020-02-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add an attribute "instantiations" to the smart-pointer-type element, which allows to specify a comma-separated list of instantiation types for which wrappers should be generated in the module. This avoids clashes of indexes. Task-number: PYSIDE-1024 Change-Id: Iac4b93b91ca4982064beef4c5abafc547052e7f1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | shiboken/typedatabase: Match multiple type entries by nameFriedemann Kleint2020-01-061-0/+4
|/ | | | | | | | | | | | | | | | | For smart pointer instantiations, type entries from multiple modules need to be searched, which is currently not implemented. Extend the type database to return all type entries by name. Split out the code finding a type entry from AbstractMetaBuilderPrivate::translateType() and change it return a list. Ignore duplicate primitive types for now since that cannot be easily avoided. Task-number: PYSIDE-1024 Change-Id: I4a30b9151b472acff5fba221019a2e321807d4a0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Store the unqualified entry name in TypeEntryFriedemann Kleint2019-11-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+2
| | | | | | | | | | | | | | | 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: Fix crash when smartptr template class cannot be foundFriedemann Kleint2019-11-181-0/+3
| | | | | | | | | | shiboken currently crashes when naively trying to use std::shared_ptr since it does not see the template due to system directories being excluded from clang parsing. Add an error message and bail out. Task-number: PYSIDE-454 Change-Id: I6627e968061f8f704a90f898879f3861308e1705 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Improve handling of pointer types for CONVERTTOCPP in injected codeFriedemann Kleint2019-07-131-0/+2
| | | | | | | | | | | | | | Code snippets like: QByteArray *cppSelf = %CONVERTTOCPP[QByteArray *](obj); cause an assert in shiboken since the '*' is captured into the target of the assignment and is not considered part of the type. Make the error message a bit clearer and add documentation. Fixes: PYSIDE-1037 Change-Id: Ie8da2f57ba91325ea677e1a00852e91726c0e09b Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Make it possible to extend namespacesFriedemann Kleint2019-05-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* shiboken: Enable including typesystem XML snippets via entitiesFriedemann Kleint2019-04-161-0/+2
| | | | | | | | | | | | Implement a QXmlStreamEntityResolver which resolves undeclared entities to file names in the type system include path. This is a work-around for the missing handling of standard externally parsed entities of QXmlStreamReader. Task-number: PYSIDE-955 Change-Id: I68ebae8ad465ae460c3a0eeadaef22dca2101e6c Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Check whether enum should be converted to int for the protected hackFriedemann Kleint2018-10-011-0/+2
| | | | | | | | | | | Find the AbstractMetaEnum belonging to the type entry and perform some checks. Generally do not use int for public enums. Warn when a protected scoped enum is encountered as this cannot be converted. Task-number: PYSIDE-817 Change-Id: I02b566093b331ea2ea627bf72964aad0a1a51c83 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Centralize most msg* functions in a separate fileFriedemann Kleint2018-09-101-0/+140
| | | | | | | | | This makes it easier to maintain a consistent style, unclutters the source and allows for re-using formatting helpers. Change-Id: I4f29637a22afb457f629272e2d86f14bedb36008 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* remove pyside2 and shiboken2 submodules (dev edition)Oswald Buddenhagen2017-05-221-25/+0
| | | | to be replaced by a subtree merge.
* update: bring repositories back in syncChristian Tismer2017-02-151-15/+21
| | | | | | | From time to time, it is good to update the master project. Change-Id: I50c45caf7c37ebb4ea865b4e4f5896e5cd8915fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update the pyside-setup submodulesChristian Tismer2016-12-121-15/+15
| | | | | | | | | | From time to time, submodules need to be updated. Actually, I would even like to update the master module after every submodule checkin, but this seems to be not easy to do all the time. Change-Id: I52f266c58086186df05ddcc85085f35e2e28ead7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix OS/X inclusion of framework headers.Alexandru Croitor2016-06-161-6/+16
| | | | | | | | | | | | | | | | | | | | | The recent change that made use of framework headers on OS/X did not work with homebrew Qt, and it didn't work with official builds either, because neither of the chosen include folders contained all the necessary headers to lead to a successful build. Fortunately shiboken actually supports being passed multiple include locations, separated by a colon on OS/X, and a semicolon on Windows. This patch makes sure to always pass the Qt include folder, and in case if the Qt build is a framework build, also passes the root frameworks location, with headers found by shiboken under frameworkName.framewework/Headers. This works for homebrew builds, official builds and custom non-installed prefix / in-source builds of Qt. Change-Id: I47b24e197839883de2ab873461efc1f4d4d33743 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add option to link with libc++ on older OSX versions.Alexandru Croitor2016-05-111-5/+8
| | | | | | | | | | | | | | Versions of OSX lower than 10.9 link libstdc++ by default. Also libstdc++ is linked when the osx minimum deployment target is lower than 10.9. The new option allows explicitly linking libc++ in the cases mentioned above. It is not enabled by default, because most libraries and executables on versions lower than 10.9 are compiled with libstdc++, and mixing standard library versions can lead to crashes. Change-Id: I7397d2bbce2cfceaeb848f25e0bbf1a24ac9bde8 Reviewed-by: Christian Tismer <tismer@stackless.com>
* a quick shiboken fix that should work, but will become obsolete with Qt 5.6.1Christian Tismer2016-04-191-11/+5
|
* fix the name pyside2uicChristian Tismer2016-04-191-5/+11
| | | | This was modified, but not corrected in setup.py
* UpdateThomas-Karl Pietrowski2016-04-021-5/+5
|
* shiboken should build with tests.Christian Tismer2016-02-231-8/+5
| | | | We will see how travis works now.
* updateChristian Tismer2015-12-291-8/+7
|
* updateChristian Tismer2015-12-281-7/+8
|
* fixing debug builds on windows.Christian Tismer2015-11-121-9/+7
| | | | | How on earth did people debug without debug builds? This must have been wrong before the move to Qt5.
* merge the new signal supportChristian Tismer2015-11-071-5/+10
|
* updateChristian Tismer2015-10-241-8/+5
|
* Merge pull request #9 from thopiekar/cmake-workChristian Tismer2015-09-281-7/+7
| | | | Fix for empty PYTHON*_VERSION_* variables
* Merge pull request #8 from thopiekar/cmake-workChristian Tismer2015-09-281-7/+7
| | | | Quick fix for last PR.
* sub-reposChristian Tismer2015-09-281-7/+7
|
* )small fixes (right wiki, name changesChristian Tismer2015-09-251-5/+8
|
* change all scripts to respect the new PySide2 module name.Christian Tismer2015-09-211-9/+5
| | | | still, there seem to be errors....
* not-so-small fix to the huge change.Christian Tismer2015-09-211-13/+8
| | | | | | I just understood what is needed to define a package: The files PySide2Config(...).cmake are crucial, the project names have little to do with that.
* huge change on project layout.Christian Tismer2015-09-211-7/+13
| | | | | | | | | | | The intention is to have PySide2 and Shiboken2 as project names, to allow for co-existence of PySide and PySide2. This is the first version that builds with these settings on OS X: $ python3 setup.py build --debug --no-examples --ignore-git --qmake=/usr/local/Cellar/qt5/5.5.0/bin/qmake --jobs=9 This is not yet tested.
* fix the repos names in setup.pyChristian Tismer2015-09-201-5/+8
|
* add/extend README.md files and add pyside2.wiki.git as a sub-repo of ↵Christian Tismer2015-09-201-13/+5
| | | | pyside2-setup.
* updateChristian Tismer2015-09-191-6/+12
|
* update sub-reposChristian Tismer2015-09-181-5/+7
|
* simplify the project structure. "qt5" is replaced by "master".Christian Tismer2015-09-171-5/+5
|\ | | | | | | For the old qt4 version, the old repository should be used.
| * small update to state that the docs are still from 4.8Christian Tismer2015-09-151-6/+17
| |
| * update sub-reposChristian Tismer2015-08-161-5/+7
| |
| * be more forgiving when file trees cannot be removed (happens often during ↵Christian Tismer2015-08-161-6/+5
| | | | | | | | window debugging)