| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The __STDC__ macro should not only be defined, but be 1 like in ANSI.
Task-number: PYSIDE-206
Change-Id: I77cf48cad0b0b32c66d9ffd05b2478e6779fc630
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In CppGenerator::finishGeneration(), the code tried to reorder the
classlist such that the initialization of QMetaObject is written
before the initialization of QObject by re-inserting the QMetaObject
class entry in front of QObject. This does not consider the dependency
of QMetaObject::Connection on QMetaObject and worked only by
coincidence since the old parser did not recognize
QMetaObject::Connection as an inner class due to it being
forward-declared.
With the Clang-based parser, which recognizes this, the initialization
for QMetaObject::Connection would be called before the initialization
of QMetaObject, causing a crash.
Fix this by making it possible to pass additional dependencies
as pairs of QString to the topological sorting functions, which
then generate the correct sequence.
Task-number: PYSIDE-323
Change-Id: Ia915b47131d57e71df366876a1a9f317cfd8d497
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove printing of version from errorPrint(), which was not used.
Output the command line and call errorPrint() with a message
from all places where EXIT_FAILURE is returned.
Change-Id: I6bde49b461c24834be38ad9e18851a20cbe9e7bd
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add static/mutable, etc fields.
Change-Id: I02f547a54ecb709484fc81a452e9606d4f16d3ba
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will invoke the verbose formatting of TypeInfo.
Change-Id: Ica2b02b771b029bab811cf2b50e557a0e715424e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The code would generate
return foo();
even for void functions.
Fix it to generate
foo();
return;
Change-Id: I007adf85a52ec08e5c2ada14b0c9ba4aa3ba66f8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Output accessibility and template parameters of functions.
Add verbose output to TypeInfo.
Fix a type in 77eefb7a42c4a96f69ac4f5af464ea3520ae4de7.
Task-number: PYSIDE-323
Change-Id: Ia2eba89c35b1d2a9d41070784a9c49a88254a5c2
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change argument to const reference, fixing the clang parse error:
main.cpp:8:12: error: copy constructor must pass its first argument by reference
Task-number: PYSIDE-323
Change-Id: I53ea89f34fada52ab7eb02c78793d6a2cf0f49ce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Output the code model item class directly, output
the line number in addition, add line breaks to some
sequences.
Output templates and scopes of the MetaBuilder.
Task-number: PYSIDE-323
Change-Id: I523afdcce09e5756f6ad37c09239bae528654642
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For template classes, the function was supposed to add the template
parameters to the arguments and return types that take the class
itself, for example:
QList(const QList &) -> QList(const QList<T> &)
In the old implementation, it checked only on the first part
of the type's qualified name, causing
void QList::erase(QList::iterator) -> void QList::erase(QList<T>)
Rewrite the function to operate with QStringLists so that a full
match can be performed.
Task-number: PYSIDE-323
Change-Id: I27900916e864d9451cc588c3ade311fbb033665c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Introduce a convenience function to check and use that in
the generators.
Task-number: PYSIDE-323
Change-Id: Iccd2907bb8f41d212087984a35a2b5efa7121546
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0e670b54c978c43ccad2563e6801b6f834587da3
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
actualIndirections() so far ignores rvalue-references.
Amends change 80fef1705ca23be01edbb12ece1b8bd49473bafe.
Task-number: PYSIDE-323
Change-Id: Ieca0c4d3cac62030cb02254c8d72e9f93cb08a2b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
operators"
This reverts commit a45049999520f3981c83964db4ae81c8123e48ee.
The change caused unaryoperator_test.py to fail, operator-(QPoint)
no longer worked.
Change-Id: I9707e6e89222fb9cfeb20689d168540dd45953de
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add CopyConstructorFunction, MoveConstructorFunction,
AssignmentOperatorFunction and MoveAssignmentOperatorFunction.
Add code to determine the type at the bottom of
AbstractMetaBuilderPrivate::traverseFunction().
This prevents those special functions from appearing in the list
of conversions and operators, causing cyclic dependencies.
Task-number: PYSIDE-323
Change-Id: I57c24024cb949dfed96341172f85b67f9f82a17c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Split out the const-part into a new function
AbstractMetaType::determineUsagePattern() const
to improve code clarity.
Task-number: PYSIDE-323
Change-Id: I2ef66c3c828c601b1c715e4585501e231f688873
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move the reference type enumeration from class TypeInfo to a common header
and use that in all classes representing a type.
Task-number: PYSIDE-323
Change-Id: I8eecf76efd8b5daf0230161a224e16e218ebbf8d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: PYSIDE-323
Change-Id: I8b06870d4d7ccaab95827f068375626a501496b1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Collect and output all implicit conversions involved.
Task-number: PYSIDE-323
Change-Id: I166cb8bd9ea157d07444772ba341195327c0061e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This function was developed in 2012 by John Ehresman.
One of his bug reports uses this function.
To be able to test the applicability of his issue PYSIDE-150, I thought it
makes sense to add this function, again.
Task-number: PYSIDE-150
Change-Id: Ie35b5a87ac9c0edfd303b1790eb8695a09b8d8e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There was a harder to find memory leak reported in early PySide 1 times
which was still valid in PySide2.
I used two scripts which were different by only one line and showed very
different memory behavior. With valgrind, I ran both scripts in parallel,
and after some tweaking, the valgrind logfiles of the two runs could be
compared.
The result was a clear indicator that some new call was never disposed of.
It turned out that the error was a mis-placed ‘delete’ in basewrapper.cpp
of shiboken2.
Task-number: PYSIDE-205
Change-Id: I1897ec4e75e3ec887716bdbe0f4487176530e03c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I8fbca647cc287e3762e54f4d9071b9a31fac376c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Comparison operators like
bool operator==(Foo lhs, Foo rhs);
are rewritten as
class Foo {
bool operator==(Foo rhs);
and attached to the class.
This handling causes existing member operators
class QLine
{
bool operator==(QLine);
to be stripped to
class QLine
{
bool operator==();
causing crashes later on. Prevent by checking the argument count.
Task-number: PYSIDE-323
Change-Id: I1d566192408404324e25a892db7094679cb81ab7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make it possible to obtain an error message and print it
from where it is used, for example:
TypeParser: Unable to parse "typename QtPrivate::QEnableIf<QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1, QMetaObject::Connection>::Type": : Unrecognized character in lexer at 79 : '='
Task-number: PYSIDE-323
Change-Id: I6b6348f9087a1e0d7932daefddb2f3633d284c63
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
AbstractMetaBuilderPrivate::traverseOperatorFunction()
would crash when encountering:
class QTreeWidgetItemIterator {
public:
inline QTreeWidgetItem *operator*() const;
since it expects operator* with arguments.
Rewrite the code compiling the list of operators filtering
out the ones without arguments.
Task-number: PYSIDE-323
Change-Id: I16fb8a15f892d385713a7487f9d996d6488954b7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also output includes and templates.
Task-number: PYSIDE-323
Change-Id: I01ad264cb3b33327446a5f52647c3d00e86c5c72
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: PYSIDE-323
Change-Id: I6ac1fc7eef5083cdd31d8ea99c9bbbecf5936b98
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: PYSIDE-323
Change-Id: If38e5b8f1677acc0fe808a10799872426dd112f3
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
AbstractMetaBuilderPrivate::fixReturnTypeOfConversionOperator()
is supposed to apply some changes to a conversion operator
like
class A {
operator int() const;
};
The old C++ parser has a bug in that it creates this as a function
of return type "A" instead of "int" and this is also checked at the top
of the function.
Remove the check since that causes the function to not do anything
if the correct type "int" is passed.
Task-number: PYSIDE-323
Change-Id: I19e5b83599dccd5737209dd2e92064e80e8a506d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add _NamespaceModelItem::uniqueNamespaces() returning a QSet
of unique namespaces via QSharedPointer::operator< instead
of repetitively sorting in AbstractMetaBuilderPrivate.
Remove the sorting for classes as it is not needed.
Task-number: PYSIDE-323
Change-Id: I0bc62bd8a44a99ca33a6499d64f7d5ab8f590a82
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, for a template "vector<T>", two entries were made into
the hash for "vector<T>" and "vector" so that the class would be found
when looking up "vector" from its member methods. Replace that by
a search predicate in _ScopeModelItem::findClass().
Task-number: PYSIDE-323
Change-Id: I404c096cde73154e8cbb5c2179b5b466bdd505be
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The usage of QHash causes the order of the members to
be non-deterministic and makes it hard to compare
the generated code. Use QList instead where it is easily
possible.
Task-number: PYSIDE-323
Change-Id: I7fc139c382b254cfc73c8d770c0a4a69dc220607
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use the m_ convention for member variables and make inline setters
and getters one-liners for better readability.
Task-number: PYSIDE-323
Change-Id: I59583e299bd499f7c966d20e35acfa870c6affc1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove unused remove() functions and setters
and other left-overs.
Task-number: PYSIDE-323
Change-Id: Icb815da21422c8989de0103631633b63c1d65f4a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Replace signed short/int by short/int, respectively.
Task-number: PYSIDE-323
Change-Id: I272b7dbff89e001de7f6e39f12ae1cd212dd4ea8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use QString::fromLatin1() instead of QStringLiteral
for multiline literals.
Fix duplicated class name.
Task-number: PYSIDE-467
Change-Id: I600482e9c55678b254b596459296925b64f588d1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Replace bool by an enumeration containing RValueReference as
introduced in C++ 11.
The old parser only handles LRValueReference.
Task-number: PYSIDE-323
Change-Id: I87779a4cbf062b242e94321d59c0e0a5a9ab3cdf
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a test to dump out the code model contents of a source file.
Task-number: PYSIDE-323
Change-Id: Ie74c6bbbf31595600ab4c15678d961a57b7065cf
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"auto" cannot be used until we switch to C++ 11.
Also use begin(), end() to stay compatible with Qt 5.5.1.
Amends change 4e91c0f1744288df752809e2ff1ced753dbb6b4b.
Change-Id: I51af7f619c148849bc5164ea48ac1903d7443c9c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QDebug::verbosity was added in Qt 5.6, and this causes
failures when compiling with Qt 5.5.1.
Change-Id: I02dfc69dbbbf8088b4400cc227bc2b4644bc26fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add virtual formatting functions and debug operators.
Task-number: PYSIDE-323
Change-Id: I32837d239180cef5468fc1aa718db0a8542e6e5b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"TypeAlias" becomes confusing as the term "Alias" gets a different
meaning in C++ 11.
Rename classes and related API.
Also rename aliasedType to referencedType in the type database.
Task-number: PYSIDE-323
Change-Id: Ic13049bde1cf94090de0dbf46e4ce484992dcbbf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Amends change a7877f55316c5d8d07ccc0db6bbe95450505b421
Task-number: PYSIDE-323
Change-Id: Icc1a59da0603146e13c1f64015415d5dd783a7cd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: PYSIDE-323
Change-Id: I306ccbb3a1c69e00129f5cc17626b502f79ed191
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: PYSIDE-323
Change-Id: I347ba0f0bb3e9676b249524931fd2877fbcdd49a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Catch a few crashes in case the underlying code parser does not
fully work.
Task-number: PYSIDE-323
Change-Id: I91f7cc0470bc919e5e0277370de0dc4e7687aa94
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix Clang warnings about vtable being emitted into each
compilation unit due to the non-existence of any out-of line
virtual methods.
Change-Id: Ie95f698ce5297211fcca79b37a1dceb93b83bbfc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Removed copy constructor due to Clang warning about missing
assignment operator for usage in QList.
- Moved flags member variable down to to avoid padding.
Change-Id: I5e17c715cadf88b313c26a4ba2c25dedbf69abcb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Replace by C++ casts.
Change-Id: I20d88ff021c681e63a6a4328c3402308f8c188e5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add Q_DISABLE_COPY to base class and remove private copy constructors
and assignment operators in derived classes which are redundant.
Task-number: PYSIDE-323
Change-Id: I25b0db500258f49d1068e27ea1785aebf469f958
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|