| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix warnings occurring in 5.13:
sources/shiboken2/ApiExtractor/abstractmetalang.cpp:1431:66: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = AbstractMetaFunction**; LessThan = bool (*)(AbstractMetaFunction*, AbstractMetaFunction*)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/shiboken2/cppgenerator.cpp:358:43: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = Include*]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/shiboken2/cppgenerator.cpp:1683:55: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = QList<QString>::iterator]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/shiboken2/cppgenerator.cpp:5500:53: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = Include*]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp:1585:65: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = AbstractMetaFunction**; LessThan = bool (*)(const AbstractMetaFunction*, const AbstractMetaFunction*)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp:1681:24: warning: ‘void qSort(Container&) [with Container = QStringList]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp:2054:25: warning: ‘void qSort(Container&) [with Container = QStringList]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
Change-Id: If6940941ac31327597ce362a31b27773f4d5b94c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace in comments, code and generated code.
Rename variable NULL_VALUE to NULL_PTR and make extern for follow-up
changes.
Rewrite code using NULL in QString::arg() (resulting apparently from
some misunderstanding that it requires a terminating nullptr) to use
printf-formatting to fix a warning: format not a string literal and no
format arguments [-Wformat-security]).
Change-Id: I97c111cadc09192132308924136eb6ede7a6bf44
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
It should abort as it will usually result in broken code.
Change-Id: I81d930c4516b0ee97dec985525fab8140fdce3dc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Query llvm-config for the lib dir instead of constructing the path
from the prefix in case the Clang location is obtained via
llvm-config. Assume a standard build in case the Clang location is
obtained via environment variables.
Change-Id: I7628d90706100a61f8a605e931bd023b27f1f442
Fixes: PYSIDE-867
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add missing include, fixing:
sources/shiboken2/ApiExtractor/clangparser/clangutils.h:91:17: error: field 'childMessages' has incomplete type 'QStringList'
appearing in Qt 5.13 due to some header rearrangements.
Change-Id: Iab22538af8688ebb3dcbaf0e1042b1198bde5800
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-834
Change-Id: I3daad497ed32a56c05c8dc2b06271e243d579b99
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the files were not read when no code was generated. This
caused the code to be missing for methods in classes inheriting from a
class in a dependent typesystem (for example, QAbstractSocket
inheriting QIODevice).
Split out the reading into a helper checking the attributes
and always read the snippets.
Task-number: PYSIDE-834
Change-Id: Iecc6285422afbf3b3e2ff4846850f8c2dbcabaf1
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Update the copyright statements visible in Shiboken2 and ApiExtractor
documentation sets. Update the name of the Qt documentation tool.
Change-Id: I09726e15a6b860f2698df683138a02683596d07d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-834
Change-Id: I2530b44f704ef96b784a77512f71777d9fd492bb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a snippet attribute to inject-code and conversion-rule
instructing shiboken to extract code from a source file using
annotations.
Task-number: PYSIDE-834
Change-Id: I576c4a48fe68e9d26fe46e324af5baa88a5c1d34
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the need to copy around test files and the test
will also run when launched from a different directory.
Extend and fix the declare_test() CMake macro to also add resource
files, add .qrc files and modify the tests accordingly.
Task-number: PYSIDE-834
Change-Id: Id469e0b11837f7c6a7d71a20494ac019a32d8ed0
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure the diff/dry-run options work for this file as well. Move the
touchFile() utility around and adapt the verifyDirectoryFor() helper
to take a string.
Task-number: PYSIDE-834
Change-Id: Ic34b5f8eff304d9de85f60082f582f0537805cd4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Some warnings are multiline (function modification).
Change-Id: I34db1b15cd0122576e65122c0665d8b4987781fc
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a GUI class happens to be detected unreferenced when garbage
collecting in a non-GUI thread and is subsequently deleted, crashes
can occur for QWidgets and similar classes.
The hitherto unimplemented delete-in-main-thread" attribute should be
used.
Add the missing implementation. Add the field to shiboken's type entry
and SbkObjectTypePrivate class and pass it via newly introduced flags
to introduceWrapperType().
Defer the deletion when invoked from the background thread and store
the list of destructors in a list in binding manager run by
Py_AddPendingCall().
Task-number: PYSIDE-743
Task-number: PYSIDE-810
Change-Id: Id4668a6a1e32392be9dcf1229e1e10c492b2a5f5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Task-number: PYSIDE-817
Change-Id: Id7e8fb1b18abb51d6fdf450c4069e5ba88b53285
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add XML elements specifying an exception handling mode to type system,
complex type entries (classes) and function modifications.
From the mode and the exception specification as detected
by Clang, deduce whether to generate try/catch code.
Task-number: PYSIDE-62
Change-Id: Ib76adc21cefd81bf9f82f819a3c151056c33a3b7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Amends 2bfd1de3495b18c0ecc251260442a9a46009861e
Task-number: PYSIDE-725
Change-Id: I4adb9022feee954ca65dc60f07bf71bd9b92dc11
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When no option was passed, all type system entries with a "since"
would be silently excluded. For example, the scriptable application
would only see Qt API that does not have a "since" attribute. This
could be fixed by adding version options for all dependent Qt
libraries it uses to the build steps, but this is tedious and
error-prone.
Flip the behavior such that an empty version list specification means
"latest".
Add helper functionality to clear the versions to the TypeDatabase
and use that in the tests to start out with a clean list.
Change the tests to use a QString for the version.
Add a test for the new behavior.
Task-number: PYSIDE-814
Change-Id: Ie6137ba6095ce562813bacbadbf4028d0e2c061f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
| |
Change-Id: I8f8138e405eaac86cd3012b703c28ff77aa4e2c8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Move the checking code to a static method taking an AbstractMetaFunction
and add static methods operating on a list. This makes it possible
to implement checks without constructing temporary lists.
Change-Id: I9b137858f81396f8243f2d1be5277e6a38be4c84
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I38b9e8a457371f5e364b06fc90821753df4af3e9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Replace various loops operating on lists by a convenience
function
AbstractMetaFunction *AbstractMetaClass::copyConstructor() const
Change-Id: If38b954ae01856a84835a17a7e4d3e981b5aac9b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change boolean 'noexcept' flag into an enumeration
that indicates whether a function throws, is 'noexcept'
or the behavior is unknown.
This makes it easier to implement an 'auto' mode
for exception handling.
Task-number: PYSIDE-62
Change-Id: I4e5405863e5af2a54f3528ba5eb5c51d3929703d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, syntax errors would be generated for
QMatrix2x2(const float*),
which is an array.
Change-Id: Ic5c67e221934a4635c2bbeb83cd378ff4a02af66
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When trying to specify the base class
template<int R, int C> QGenericMatrix of the QMatrixRxN classes,
clashes of the SBK..IDX enumeration values occurred since
the integers were not part of the type name.
Fix that by dynamically adding dummy entries of
EnumValueTypeEntry for the integer values encountered on the fly.
Task-number: PYSIDE-725
Change-Id: Ie6b4489b5293e04b7c2c76861341c99b136cd558
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
sources/shiboken2/tests/libsample/objecttype.cpp:283:17: warning: unused variable 'fake_child' [-Wunused-variable]
sources/shiboken2/ApiExtractor/doxygenparser.cpp:71:15: warning: unused variable 'numPrefixes' [-Wunused-variable]
Change-Id: I409f22e1450e9ae0f3f5924cb6dd47991d12a2ad
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add some convenience functions returning the status of
default expressions to AbstractMetaArgument.
Rewrite the function to only insert suitable candidates into
an ordered multimap instead of looping twice over all candidates.
This unearthed a bug in the old algorithm trying to find the maximum
number of arguments: When no candidates were found, maxArgs was left
at 0, which caused it to assume default constructible. This triggered
for the QMatrixNxN classes inheriting QGenericMatrix<int, int, Type>
with (unsupported) non-type template parameters. For these, the
default constructor needs to be specified now.
Task-number: PYSIDE-62
Change-Id: I5ce2bed43001780553048d8af0addaba2b22410b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
Put each candidate on a new line and limit the number of member
functions in the output.
Change-Id: Ia628e61009997b37e0f3c2129fba5ccfa29f763e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an enum has a null value, store that on the EnumTypeEntry for
use in Generator::minimalConstructor() as a default value.
Fully qualify scoped enum value type entries for this purpose.
The value can then be used for default values instead of an ugly
static_cast<EnumType>(0).
Task-number: PYSIDE-62
Change-Id: I42cb2ca63fb1da6c795df630ab30bded66aac901
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Pop the parse stack entry for typedef entries as well
which was overlooked in bfd1de3495b18c0ecc251260442a9a46009861e.
Task-number: PYSIDE-725
Change-Id: If1f572076b9442ed3a434e3b6fb7b10c17def12d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\
| |
| |
| | |
Change-Id: I81270510e3a27915781a50769bb627e666970142
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When parsing the typesystem XML file, decrement variable containing
the depth of dropped entries in Handler::endElement().
Otherwise, when dropping a type like
<object-type name="QDtls" since="5.12">
<enum-type name="HandshakeState"/>
</object-type>
all subsequent entries would be droppped.
Change-Id: I640a916e8c8dbddcaeaebc3859300cc2a0eb1b0c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use different messages for type entry not found and conflicting types.
Spell out values of anonymous enums and indicate scoped enums
and associated classes.
Change-Id: Id60eb70c28790019b29ebae174369e6963909587
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The intention is be able to specify
typedef std::optional<int> OptionalInt
in the typesystem file and generate code for it (without having
a typedef in C++).
Task-number: PYSIDE-725
Change-Id: I5847a3c3f68556ac1d0ea3635f65a29caa6cb208
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a prerequisite for adding a typedef entry.
Add copy constructors and clone() methods.
Task-number: PYSIDE-725
Change-Id: I7cee679432be70e2349071f1dd62335fda564fe3
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change defines to variables where possible (not used in string literal
concatenations).
Remove constants only used in one file from the header.
Change regular expressions to raw string literals for clarity.
Replace static instance of the CONVERTTOCPP regular expressions
by an accessor of ShibokenGenerator.
Change PATH_SPLITTER in main.cpp define to a QChar constant.
Change-Id: If6766e0467ca2c635788240414c984d60feef875
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove member variables and enumeration values.
Task-number: PYSIDE-743
Change-Id: Id7bff33b180e99e19d02bd895e45e4f0749dc042
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
| |
| |
| |
| | |
Change-Id: I928ed3d07cd66393675d014050c3bf3ab2ea5c49
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add the fields to the typedef'ed class specializing the type
similar to the functions.
Task-number: PYSIDE-725
Change-Id: I2daae9bd3c8a73fbd868f495cfc3a2dfba703103
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Add a helper template to conveniently search for a MetaClass by name
and convenience function to search in lists.
- Remove parameter bool *ok from
AbstractMetaBuilderPrivate::inheritTemplateType() and check on returned
pointer instead.
- In the inheritTemplate*() functions, use QScopedPointer to ensure
the result is deleted on failure.
- Search for a shadowing function first before creating the copy
in inheritTemplate().
Task-number: PYSIDE-725
Change-Id: I3183087fb42b22a2189c17b94eaafdb4c1151f0e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-725
Change-Id: I68a57bbd98d111faa42dc62b667985281517df31
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use QMultiMap::equal_range().
Amends a6d12454983f8b1f2f8e7087de4b11ccd9126178
Task-number: PYSIDE-757
Change-Id: I82018ca78226f8fe45cd1ab43d8c05a0b0fc8811
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove code working around a Qt bug and a modification
on a type entry name which was apparently intended to strip
off qualifiers using a regex, but has no effect since the QString
overload was called.
Remove check for null in AbstractMetaBuilderPrivate::addAbstractMetaClass()
and modify call sites accordingly.
Change-Id: I7ab2a163fe558af09f2c7989bdec1561e9bbb203
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|