| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Use a QTextStream for better readability
- Extract a helper function to format the function parameter type query:
- Fix the function parameter type attribute ("left"->"type")
- Fully qualify enumeration and other non-primitive types
Task-number: PYSIDE-363
Change-Id: I529e839fb737f30bd9b70d10a48fcfb0c9141f8f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Trim the strings returned by the XPath queries and warn about
failing queries.
Task-number: PYSIDE-363
Change-Id: Ia0233d490497597cb78aa16b0908fe226270705c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move code from shouldSkip() helper of the doc generator
into the doc parser and use that for the qdoc/doxygen parsers.
The additional checks (most importantly the check for
declaringClass != ownerClass excluding the virtual functions
added by AbstractMetaClass::fixFunctions() to derived classes)
avoid running unneeded XPATH queries.
Task-number: PYSIDE-363
Change-Id: Ib1141a348c96b269a50c63dd94fe93931c12d1ec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce a streamable class that does the escaping and some
helpers for QString/QStringRef.
Task-number: PYSIDE-363
Change-Id: Ica6d8a2ab43eeb597b4e9080330dc2ce700e0ed2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I4bbaa7d46bab2526906655c5f03bbd25a142bbc4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\ \ |
|
| |\|
| | |
| | |
| | | |
Change-Id: If56adeea2f888d8bc34e202b697f735508896c84
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The macOS 10.8, PySide2 branch 5.6 integrations were misteriously
failing with crashes on exit in the objecttype_test.py test, with a
stack trace similar to:
0x00007fff8899e90a _sigtramp + 26
0x0000000100784710 0x0 + 4302849808 (note the 0x0 address)
0x0000000100055408 dict_traverse + 168
0x0000000100107f77 collect + 407
0x00000001001089f4 PyGC_Collect + 52
0x00000001000ef503 Py_Finalize + 259
0x00000001000eefca handle_system_exit + 250
0x00000001000ef235 PyErr_PrintEx + 469
0x00000001000efebb PyRun_SimpleFileExFlags + 299
0x00000001001071dd Py_Main + 3101
Reproducing it on a CI VM was very difficult, requring dubious
manipulation of PATH, PYTHONPATH and LD_LIBRARY_PATH environment
variables. In the end the issue was diagnosed to be heap corruption,
and thus the difficulty in reproducing it.
The testParentFromCpp test in objecttype_test.py calls
the destroyCppParent method to delete its parent. Because
the deletion of the parent invokes the destructor ~ObjectType(), that
in turn deletes the child. This lead to head corruption, because
the child "o" by destroying its parent, destroys itself, and once
the "delete m_parent" is done, the next "m_parent = 0" would write
to invalid (freed) memory.
In a release build of the Python interpreter, this ends up in
accessing the freed memory in the GC collection phase (but under a
debugger this crashed in several other random places).
The fix is to delete the "m_parent = 0;" statement, so that nothing
is written to freed memory.
Change-Id: I2d7a41b99a3255ebb300e6157b3dd0d78eb27a54
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix a warning about a malformed table (qcursor.cpp) whose
last row has too few columns.
Task-number: PYSIDE-363
Change-Id: I5eec88226e48064ee54e3abe1247d9dc06dc1d82
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Use splitRef() where applicable or rewrite.
Task-number: PYSIDE-363
Change-Id: I08dcafbba82327f6ff4c02f582341083b4b48755
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a streamable Pad class for these purposes or use
the corresponding QString constructor.
Task-number: PYSIDE-363
Change-Id: I7e58ae19d2b0f2e1e14c0a235a5ab311350174c2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove removed constructors and move constructors first
before writing out documentation.
Task-number: PYSIDE-363
Change-Id: I8dbe3e96ccc8f293253eb52e00c384d3ff458dcc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Empty snippets may actually be valid in case a single
closing bracket in C++ is turned into an empty line
in Python (customstyle.cpp[1]). Differentiate between
those by using QString::isNull() for the fallback
mechanism. Always output snippet identifier in messages.
Amends 45f3126a04cd5493323b689c85a48106d0f8367e.
Task-number: PYSIDE-363
Change-Id: I0391b18fafacbd4c57c4017adb08126a5e2c7c7e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
be found
Use the "path" attribute.
Task-number: PYSIDE-363
Change-Id: I27adc86cfb58d20a90f411842c2f78de9dbe1a60
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Split out the code path for empty identifier
and port to QRegularExpression.
Task-number: PYSIDE-363
Change-Id: I6c0eeba1d62762e475de12d503fdc1a9d495d349
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rewrite to use QStringRef and add some checks preventing
overflow should the text contain empty lines.
Task-number: PYSIDE-363
Change-Id: I850221bc6e7a6b88fc3b6078cf2cb2e01663ab15
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-363
Change-Id: I781fc0dc195bc8f3222f9fce7c863b67d3d2c568
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the qCDebug() to qCWarning() for snippets issues and
pass the errors up so that more context can be given.
Task-number: PYSIDE-363
Change-Id: I23310cd55a1cdb3b040dd785db43717fa3c4c07d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I777970f7bb17db766660d82556559eadd7293355
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The signature extension is a feature that can switch itself off, using the
expression
PY_VERSION_HEX >= 0x03040000 || \
(PY_VERSION_HEX < 0x03000000 && PY_VERSION_HEX >= 0x02070000)
Unfortunately, the use of this constant when disabled became inconsistent
over time.
This patch corrects that and also adds a cosmetic improvement that was lost.
Task-number: PYSIDE-510
Change-Id: Id1653c391d921a2c51008db2bc222d6f4bec9e90
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the doc generator would rewrite the URLs to point
to QTDIR/doc/src/images where the images were located in Qt 4.
Add a function to copy the images from the webxml/images directory
to a matching directory under rst where they can be picked up by
sphinx.
Task-number: PYSIDE-363
Change-Id: I1da83a7717dd61a9c0b80a7cc18444e00a1f4c1b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove apparently unused/deprecated code.
Change-Id: I566014bafdcbf0b3b46e9dc836c451c64d409511
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Unused variables
- Mixing const/non-const iterators
- Signedness
- Missing const ref in range-based for
- Uninitialized variable
Change-Id: I02e6d4c5b0416aa8462f7b9d567b562a702a5740
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the exclusion. Required for
Qt3dExtras::QAbstractCameraController::moveCamera() in 5.10.
Task-number: PYSIDE-487
Change-Id: I67ae24d4cda2d90ac30c97f77457c2eaf65099ab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace virtual by override where appropriate to make the code
clearer.
Change-Id: I143daf29f1c162b2de959411a5f4acdc43a2b253
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I5f2e1660a27efafa445592898db4dfe3250306e0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no need to link against the python shared library (or static
library) on Linux / macOS because the python symbols will already be
loaded by the dynamic linker, by the time when a PySide2 module is
imported.
This is especially relevant on Debian distributions, which ship a
statically built python interpreter, as well as a python shared
library (which is not used by the interpreter). The python shared
library package is intended for native application that want to
embed a Python interpreter inside the application.
So far PySide2 would have linked against the python shared library,
which means that on Debian distributions when running a PySide2
example, the executable would load two versions of the same python
symbols (one from the static interpreter, and one from the shared
library), and this might cause issues.
On Windows we still need to link against the python.lib import library,
because otherwise the python symbols would not be resolved.
Task-number: PYSIDE-522
Change-Id: I4483ded96461c04f8e7a17d39068d07f772a973c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Shiboken generated conditions to select which constructor overload
needed to be used in an unexpected order.
These conditions were incorrect, and hence produced an error.
Handling QObjects in the inheritance relationship process
solved the issue.
Task-number: PYSIDE-203
Change-Id: Iee3a8c8fe48671cd752cc0e3d92b740c823656ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fix clazy warnings about possibly detaching containers.
Change-Id: I3c3a229de5e0c71f17c1f26273e1b0be3b0d7e81
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For paths containing spaces, the lack of quotes
will make the process to fail.
Task-number: PYSIDE-169
Change-Id: Iee99eb4fe6ed1045b7c6053ef199c49714fab32f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Looking at PYSIDE-441 there was an issue regarding overloading
the __getitem__ method on a class that inherits from QObject.
The bug report showed that setting an object of the same
class to be the parent of another object of the same class
ended up causing an infinite loop when trying to get the parent
element.
Overloading __getitem__ implicitly converts the class
into an iterator, and the developer *must* include a proper
implementation of the method which raises a StopIteration exception
when needed.
Commonly, people that overload this method included access
to class data structures where in most of the cases
an IndexError is raised which forces the iteration
to stop.
Since the bug report did not include this code
and also there was no access to any internal variable,
no exception was raised and ended up causing an infinite loop.
This can be replicated in python as folows:
class A(object):
def __getitem__(self, arg=None):
print("getitem called:", arg)
#raise StopIteration
a = A()
print(list(a))
This small fix avoids the infinite loop when the method __len__
is not implemented (length = -1) or when the length of the pyObj
is zero.
Without a proper implementation of __getitem__ (Raising IndexError
or StopIteration) the infinite loop will happen.
If __len__ is not implemented, then the application
will complain, but does not matter since this is never
checked during the iteration.
Change-Id: I74e7bf1755c265dbc309bb6c5a760f11643fd7ed
Task-number: PYSIDE-441
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order for GL types like GLint64 to be available on macOS, the
macOS-specific system header "gltypes.h" has to be parsed by libclang.
Before this change, shiboken skipped parsing system headers (except
for gl.h) because there are issues when trying to parse C++ std headers
(ostream for example).
The file "gltypes.h" contains the typedef declarations for GL numeric
types. A few other system headers like "cstdint" are also needed
(which contain the actual typedefs from int32_t to int for example).
A few different system headers are also needed on Linux (also for
GL -> numeric typedefs).
This system header exclusion mechanism is far from a clean solution,
but it seems like current versions of libclang do not provide enough
preprocessor information to be able to limit the parsing to specific
chunks of code (for example everything included by gltypes.h), thus
we need to limit ourselves to exclusion by file paths.
Change-Id: I58c151e2cb083e16f7cafb3dc9df2d757442bb59
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
System framework paths queried from the system clang compiler should
be re-added to libclang via the -iframework command line argument
instead of -F, so that they appear at the bottom of the list
of candidate include search paths. This prevents issues with picking
up incorrect headers, like an installed official package of Qt 4.8.
Also there is no need to use CMAKE_SYSTEM_FRAMEWORK_PATH like in the
5.6 branch because it duplicates the list of includes and also
causes conflicts with the same paths being added as both system
and non-system include paths.
It was necessary in 5.6 branch because the list of include paths was
not queried from the clang compiler.
Change-Id: I04b299fc5bc759842a0ab890a85170f153932e79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
License header templates should be at the top if at all.
Task-number: PYSIDE-363
Change-Id: If9e2f6631b478b9a1a991682a6f52dce1a04e2dc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Clear the Python error on failure. Note that PyErr_Occurred() is not
set for some reason in that case.
Task-number: PYSIDE-580
Change-Id: I5672b9f5bf98e3d409abb4132f2face060826a0a
Reviewed-by: Christian Tismer <tismer@stackless.com>
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>
|
|\|
| |
| |
| | |
Change-Id: I78039827d32c1d4d540a8b1b2afd4841e40d5c2c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It turned out that there are tiny differences between Python2 and Python3
which make the versions of the registry almost, but not totally equal.
There are functions which are slot wrappers in Python2 instead of
method wrappers in Python3, and we currently don't support slot wrappers.
There are other tiny differences when we switch to Qt 5.9, too.
Initially, I thought to split the files for Python2 and Python3, but then
it turned out that the problems vanish when we ignore the 'next' and '__next__'
functions in both python versions.
The filter function is both applied to the generating function and the testing
function. Therefore we can keep the existing data intact.
I further removed an indentation leftover in cppgenerator.cpp,
fixed handling of duplicate entries and improved modularisation of the
signature enumerator and formatter. This part will later be moved into the signature
library.
Task-number: PYSIDE-510
Change-Id: I18f5e8f08fb9b07534003919abe55ab4dafeb2c2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There are no classes deriving from AbstractMetaBuilder, so there is no
need to have virtual creation functions.
Change-Id: I2d4c494ac6b0a17ceea71939a1f07a49a369df73
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Use member initialization where possible
- Make constructors explicit
- Remove unused version attributes, unused comparison operators of
FunctionModification and unused struct ExpensePolicy
- Rearrange members to minimize Clang warnings about padding
Change-Id: I1423f120b2117237c2674cdbb6d06923c842999f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| | |
Change-Id: I83e254a5d0f7ba4613a04a73683ed08c273fc2ca
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ifcbabe09665c33daf5dd8d5df52036598c9f428f
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). Add override and
move virtual functions out of line.
Remove unused method ComplexTypeEntry *ComplexTypeEntry::copy().
Change-Id: Ie4a6c30cb0c99be35697f29ebe407b327079222a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| | |
Check the attributes and add test.
Change-Id: I6c3d76ed32b5d20b6940849dd4895f98abd62fca
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will result in a compilation error (overriding final method).
Final methods appear in Qt3DInput::QMouse/QKeyboardDevice.
Task-number: PYSIDE-487
Change-Id: I6eb300c91327c587b6bfe530fdafb519817171c4
Reviewed-by: Christian Tismer <tismer@stackless.com>
|