| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-743
Change-Id: I7caddc5c84749911db3a550006ca9f9884b20958
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Show number of classes, etc.
Change-Id: I2ca7a1b4eae09db7ea71e8843182f69df95b7c1c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sort the classes, enumerations and global functions
alphabetically.
Task-number: PYSIDE-757
Change-Id: I65fd7058fa5dff6f5724915b142d68bd18dba4c7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change underlying type of the type database from
a QHash<qualified_name, list of entries> to
a QMultiMap<qualified_name, entry>.
Previously, there was an allEntries() accessor and a function
named entries() building a QHash<qualified_name, entry>.
Simplify this so that there is only an entries() accessor
returning the QMultiMap.
Refactor the various Typedatabase::find() functions to operate on an
iterator range of the QMultiMap.
This unearthed some bugs:
1) In the generators, the call to findType(packageName()) would return
the namespace entry for "sample" instead of the intended
module type entry named "sample" due to the ordering.
Add a new function to search for module type entries and assert
that it finds it.
2) There was a duplicate, empty primitive type entry for
QModelIndexList.
Task-number: PYSIDE-757
Change-Id: I1814e4ca67d306e1488398507707cfd07b3f2c78
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QAbstractRayCaster is the first class in Qt to use type aliases:
using Hits = QVector<QRayCasterHit>;
Treat them as typedefs if a canonical type can be obtained for
them. This requires adding some simplification of the canonical types
obtained for standard containers.
Task-number: PYSIDE-751
Change-Id: I521a8b02d3c8cb89e4f72a817fbacc5955041570
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, calls to BEGIN_ALLOW_THREADS/END_ALLOW_THREADS were always
generated since the value of XML attribute was not used.
Fix it to actually use the value. Since having it default to "no"
caused a number of deadlocks (related to thread functions or functions
calling a virtual function (potentially reimplemented in Python),
introduce "auto" as default value. "auto" turns off
BEGIN_ALLOW_THREADS/END_ALLOW_THREADS for simple getter functions.
Task-number: PYSIDE-743
Change-Id: I4833afef14f2552c75b3424417c2702ce25cb379
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ied74ec8ca7e3b3c439204c5010b0b727be3b13b2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For exception handling, calls into C++ might need to wrapped
in try/catch. Detect noexcept functions for which this can be omitted.
Task-number: PYSIDE-62
Change-Id: I37aced91ace184edf211a457a60c131d516a4037
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ie90b31ed1b88f1353261fc4040db2d788df279e6
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The option is a workaround for an old LLVM bug and is no longer needed.
Worse, it causes parse errors in code that declares throw().
Task-number: PYSIDE-62
Change-Id: Ib72b14cc704c04ae3b4197fd2af718276e3fe788
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QStringRefs returned by QXmlStreamAttribute do not point
to some XML buffer but into a string within QXmlStreamAttribute
itself and thus become invalid when the attribute is removed
from the list. Store them in a QString instead.
Amends e0e44f0fd5b05ee299bd4e377b0d4a302c442aae.
Task-number: PYSIDE-743
Change-Id: I841eb70379af8e006868c6352283bf2970dd127d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 'else if' after return/break/continue
- Use const ref for complex arguments passed by value where possible
- Fix 'if (foo) delete foo' to 'delete foo'
- Use container.isEmpty() instead of container.size() in checks
- Use ' = default' for trivial constructors/destructors
- Use range based for where possible
- Complete constructor initializer lists
- Fix invocations of static methods
- Replace some reinterpret_cast by static_cast
- Remove unused variables/fields
- Use initializer lists for return types
Change-Id: Id5b44a2f9d429f66ef069d532a1cd31df796d38e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| | |
Use colons to separate name, line and column as compilers do.
Change-Id: I43adf1c9f7ac50759777fbbd855faaa7f858f369
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactor and breathe life back into the existing diff/dry-run
functionality of class FileOut and make it available via command line
options.
Change-Id: I32e1e262c0c2e8f107776923477fe9714ad295cf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extend the existing rudimentary comparison function
from the meta builder and provide comparison operators.
This will be useful for later refactorings.
Task-number: PYSIDE-672
Change-Id: I793656a733db676d9bc3ab8910869e50274f6a79
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a cache containing the TypeInfo for the CXType structs.
Task-number: PYSIDE-672
Change-Id: Ibd0b5bb3f01fa507a65ded8f121c12a10aa7c401
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Split up the 1400 lines Handler::startElement() function into smaller
helper functions.
Previously, the function populated a hash with the default values of all
attributes. The values were then set by fetchAttributes() from the XML
attributes and applied later on. In this setup, it is not possible to add
deprecation warnings since it not possible to tell which attributes were
actually present in the file.
Change this to operate on the QXmlStreamAttributes list from which the
consumed options are removed. Add a warning about unused attributes.
It is now possible to add deprecation warnings and the default values are
now more obvious.
Task-number: PYSIDE-743
Change-Id: I1ee04e9490b3664bba4c976fe654183819610b58
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace the static QHashes in Handler::startElement() and other places
which required converting and lower-casing the QStringRef's returned
by the QXmlStreamReader by lookup functions that take a QStringView,
which can be constructed from QString or QStringRef.
Task-number: PYSIDE-743
Change-Id: I10234f2ddfff13ee7e0ee67f9aee118a088e5ab8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-363
Change-Id: Ib07430cb26676a47e6de1453c10b080719f7ed7d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Pass up the bool return.
Task-number: PYSIDE-743
Change-Id: Ic63a33be4c20a225d9f6a2e8a750e0e90bdce358
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-743
Change-Id: Ie4794c6387ef5ffaf8a5813b744fa725427b5f09
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes warnings:
WARNING: html_use_smartypants option is deprecated. Smart quotes are on by default; if you want to disable them, use the smartquotes option.
Amends 32a2eb95758f7beb13b54053bfa97c9bc973b9f0.
Task-number: PYSIDE-363
Change-Id: I0a4a8578aacbeca1fba08cffd54adfeac6022f21
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They were previously stored in a global hash, apparently due to BC
issues. Replace the global set/getTypeIndex/Revision functions by member
functions of TypeEntry in typedatabase.cpp.
As a drive-by change, simplify the code assigning the SBK numbers
to use a flat list of entries ordered by revision and name instead
of a grouped hash (bearing in mind that revision is rarely used)
and might be removed one day).
Also replace the use of std::unique() by the !contains()/append() pattern
since std::unique() assumes an ordered list which is likely not the case.
Task-number: PYSIDE-725
Task-number: PYSIDE-743
Change-Id: I9356acf1f5795446c08f266c1323f1db65cd490c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
TypeEntry::customConversion and ComplexTypeEntry::defaultConstructor where
previously stored in global-static hashes, apparently due to BC issues.
This can now be fixed.
Task-number: PYSIDE-725
Task-number: PYSIDE-743
Change-Id: If4f28246a5b83e3772021a518058a9d152bb3e3f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Normally, only the root typesystem element has a package specification;
there is no need to have virtual functions for it.
Task-number: PYSIDE-725
Task-number: PYSIDE-743
Change-Id: I3b86c8418cf16ce372c1953279a115e2eff0e984
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-725
Task-number: PYSIDE-743
Change-Id: I61fcd8af7329c14ef064795c13787005b4375548
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I85c005419736d5abf65077ff259509610853af4e
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extend the check introduced by 4725008aeea407ae55cfd66de802dd9e06412efc
to CentOS.
Task-number: PYSIDE-733
Change-Id: Iaaf2b8af0fa03684d4a3cbd5c5e70e141d125139
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A brew build environment sets up a clang shim (fake clang ruby script
that sets up additional compiler flags), which passes all
brew formula dependency include paths as system include paths
(via -isystem). This also includes the Qt dependency.
Because our clang parser currently ignores system headers
(see Builder::visitLocation in clangbuilder.cpp) and
because Qt include statements inside header files would resolve
to the system header location, this would result in no Qt classes
being recognized by the API extractor, and thus fail the build.
Fix this by checking for an environment variable that brew sets
inside its build environment, to filter out the unnecessary
-isystem flags.
This way the Qt include path would be passed as a non-system include
path from CMake, and thus correctly complete the build.
Task-number: PYSIDE-731
Change-Id: I9b543eddc85270f1e8a90d9f30194b2a862e80d7
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alberto Sottile <alby128@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Add Q_FALLTHROUGH()
- Fix warnings about passing messages as format to qFatal()
- Fix warnings about old-style casts
- Fix warnings about comma operator
- Fix warning about unreachable return
Change-Id: Iaf31259c0f8156204f4d10ee0e594b89abbba5d3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|