| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- '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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the volatile keyword ended up as a part of the
qualified type name while parsing in translateType().
Add the token to TypeParser and add it to AbstractMetaType.
Task-number: PYSIDE-672
Change-Id: I553ea1b35e7e99ffde4442471b82e32be84731ba
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the int "indirections" field of TypeInfo and AbstractMetaType
by a Vector of an enumeration representing '*' and "* const".
It is then possible distinguish between "int *" and "int *const".
Task-number: PYSIDE-672
Change-Id: I68677fa515abb7e94217fc1c2b6ac28b42678284
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Output template arguments of TypeEntry/AbstractMetaType.
Task-number: PYSIDE-672
Change-Id: Ib7e161c8313f91a540659c395a8684498e86aba2
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Introduce an attribute for added methods and exclude them
from the documentation generation.
Task-number: PYSIDE-363
Change-Id: I06d3f468bcec4d0480012d29e26dabadae51634b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First encountered in:
QtScxmlEvent::setEventType(const EventType &);
The metatype was wrongly detected as NativePointerPattern
in AbstractMetaType::determineUsagePattern().
Introduce a helper for detecting plain const-ref and use
that consistently.
Change-Id: I6b105bc99ae63e4737c5d628e79f23b7acbcca3d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing the word 'project' from all the headers,
and changing the PySide reference from the examples
to Qt for Python:
The following line was used inside the source/ and
build_scripts/ directory:
for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done
and the following line was used inside the examples/ directory:
for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done
Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
When referring to the project one should use "Qt for Python"
and for the module "PySide2"
Change-Id: I36497df245c9f6dd60d6e160e2fc805e48cefcae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove a lot of ugly value parsing code in favor of
clang_getEnumConstantDeclValue() and
clang_getEnumConstantDeclUnsignedValue() depending on the
type.
Introduce a class EnumValue containing a union of qint64 and quint64 values
to represent signed/unsigned values correctly and use that in the code model
and meta language classes.
Change-Id: If2efb7cfd560237907678b8f6fdfb0bc689c0c93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Clang function clang_EnumDecl_isScoped() tells whether an enum is a class,
so, there is no need to specify that in the typesystem.
Use that information to pass it up to the metalang classes and revert the
parts of 44cb6c51e6c3b43376f284941454dc8c13b81c3f that added it to the
type system.
Task-number: PYSIDE-487
Change-Id: Ie10885f74168821d0307e91b6f1f7f3f30dd074b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add helper AbstractMetaEnum::findEnumValue() which
finds unqualified as well as qualified enum values.
- Remove unused function bstractMetaClass::findEnumForValue(QString).
- Remove 2nd parameter from
AbstractMetaClass::findEnumValue(QString, AbstractMetaEnum *).
The comment claimed that it is excluded from the search, but the
condition was the reverse. Just removing it apparently does not do
harm.
Task-number: PYSIDE-487
Change-Id: I32b036045ea335b805fba79df327cc42d787f18c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Mixing const/non-const iterators
- Do not use operator[] on temporaries of type QVector
- Remove unused nontrivial variables
- Add Q_FALLTHROUGH()
- Potential detach in range-based for
Change-Id: I89391fdda616f119eadd7de529eb6cee69343f85
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Apparently, the meaning of FinalInCpp for functions was "virtual and
not private". The previous code cleanup removed most uses
of them. For the remaining cases, checking for virtual is sufficient.
Change-Id: I6f794e36b99920af36fd0eba895be673dc35d9dd
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AbstractMeta* classes had a lot of functions trying to determine
whether wrapper functions/classes should be generated. Apparently at
some stage, this functionality was moved to the generator classes
(apparently in conjunction with the "protected hack"), leaving the functions
unused.
Change-Id: Ia3fef96fe86cc6a6f9c70c674635bccf510362bc
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Besides its use for functions, the FinalInCpp attribute was used for
classes meaning something like neither the class nor its derived classes
can be constructed due to presence of private destructors and absence
of non-private constructors. Since 'final' is now a reserved word
in C++ 11, this becomes confusing.
Remove the usage of the attribute for classes, add a bit field indicating
presence of a private constructors and a new function isConstructible() instead.
Change-Id: Ieb2f9943c21511e4f59d228885361e3ad66fb266
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Disable copying of the base classes AbstractMetaAttributes and
AbstractMetaVariable and refactor the copy() functions of the derived
classes in terms of protected assign*() functions.
Change-Id: I6cbe1cfa02207230e914ad41dddba46c866cb689
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Use member initialization where possible. Move constructors/destructors
of classes in hierarchies out of line (fixing Clang warnings about
classes having no virtual out of line methods).
Change-Id: I511e7261a077db259e6c305cb1dcb08c1ee4810f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I83e254a5d0f7ba4613a04a73683ed08c273fc2ca
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I27411e810fc3b3ff9d3bb629b5ebc2c7fdaa59ef
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Take over information from code model and test.
Change-Id: Ibed2973e09b117966ed241798125f60ba337b0e9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Remove Native, FinalOverload, InterfaceFunction, Fake.
Change-Id: I1232751169fafb144387343857a962bafee714e9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The modification can be used to indicate that for example
int* is meant to be used as int[].
This is reflected in the NativePointerAsArrayPattern
usage pattern of AbstractMetaType.
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: Icaeb3cce4be9ce06caa2cab628d4e8fc1b684819
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a SbkArrayConverter struct which provides a list of
check functions that return a converter function
for an array of matching size.
Add simple array converters for arrays of C++ primitive types.
Instances of the ArrayHandle<>, Array2Handle<> templates will be
generated which may point to internal data or allocated arrays.
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: I157606891fad345ccd7af6d4a9d4dcb0c634b2f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Change the AbstractMetaType::signature() functions to work with the
nested AbstractMetaType types instead of TypeEntry so that the correct
array signatures appear in the signature of AbstractMetaFunction.
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: I90aa11891c95ccdcbae81fb70db4bec0e62f5923
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Introduce a common helper function to format the signature for
minimalSignature() / cppSignature() which differ only by whitespace.
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: Ife6be7001618d73a7a2bc15e91bff4ae42192a45
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
- Add debug operator for TypeParser::Info
- Add verbose mode to AbstractMetaType
- Output more information for TypeEntry
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: Id9882e89f9b5a51929f27b100d28396d3f6c4198
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change AbstractMetaBuilderPrivate::traverseFunction() to consistently
return 0 if something does not fit. Previously, functions with
half-parsed arguments with the invalid flag set were returned. This
caused strange side effects since the flag was not checked in
all places.
The only relevant information is whether some constructors were
rejected. In that case, no default constructors or default copy
constructors should be generated. This is now determined
by checking the code model function item; the attribute
HasRejectConstructor is introduced for this.
This fixes:
- Make it possible to reject the QTextStreamManipulator
constructor taking a function pointer without having
a default constructor generated:
typedef void (QTextStream::*QTSMFI)(int);
QTextStreamManipulator(QTSMFI m, int a) Q_DECL_NOTHROW
- Implement QtCharts whose class QAbstractSeries has a rejected
constructor.
Change-Id: I6310574ba677dac20699f257340d2c2a55674353
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
in preparation for a subtree merge.
this should not be necessary to do in a separate commit, but git is a
tad stupid about following history correctly without it.
|