| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation was considering only Py_True
as a success, but not Py_False.
The else statement will enter just in case of error,
as intended.
Added a test case to verify the proper behavior of
Qt.UniqueConnection.
Task-number: PYSIDE-34
Change-Id: I5bafe0e81383022dcd7fc6251fc61d0ab5e918d0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Amends 8d0ce19ca6cef467e67a49cb720fa5ed61aaca35
Task-number: PYSIDE-596
Change-Id: I4acd653d0772ddee85a06f41b5273018c3861651
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As reported on PYSIDE-264, when an item of an already cleared
QListWidget was being accessed, a segfault happened when trying
to access this deleted data.
Due to the lack of an invalidation process of the python objects
when clear() was called, the generated validation step before accessing
the data had no effect.
This was solved injecting code to set their parents to NULL, and
invalidating them.
The outcome of trying to access deleted data then will be a RuntimeError,
instead of a segfault.
A test case is provided.
Task-number: PYSIDE-264
Change-Id: If52dd85827500c96a078a8f9d61921a275fb28f9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
| |
Change-Id: I1ce182621862f57ee555999cdd7a18eecc60ffe1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-587
Change-Id: I9f78ed0c66e4bb9db463f04fe77a8fc63413cd83
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-363
Change-Id: If7b3e7157fccb0494860664505df96c946e1c402
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-487
Change-Id: I17100eda57fbe5015b6c8ff531a3c62b22e8de95
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>
|
|
|
|
|
| |
Change-Id: I0e4e3472e1d5644db281fb46ce4ba4ddfc1eafae
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
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
|
| |
| |
| |
| |
| |
| |
| | |
Otherwise, messages are suppressed and the test fails.
Change-Id: Ie7fb8192e542a09822f6e1f70392100f4cdc0f11
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If modules are installed on the system but not in
the local Qt installation, cmake will find them
and try to build, but this will lead to errors.
Comparing the QT_INCLUDE_DIR and the path where
the package was found, we can filter the modules
that were found on a different directory.
Change-Id: I463172b7081c191fb303387f98a495dd675e0486
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
install is better suited for distro installation
due to permission issues.
Amends 5d5eed53e49f4aaea85ce1638dd6fa3774a960e0.
Task-number: PYSIDE-589
Change-Id: I6539b7c9957fd542a39b68e2d63a66f544414cd7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I256eced0fb4fcef097c63cdf63257e89953c54d0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The proper approach is to replace the returning
data as Python Strings instead of QByteArray.
Task-number: PYSIDE-40
Change-Id: I554b88bb79b7ae7d36fdc8c597704e3fcadd4527
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ib98eaeb3895bb933a7b611406f622a92c9d72619
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The typesystem files end up in a flat directory after installing,
so, the include by module name introduced by f2063ee4737f90c5d412a9a328672fde32b033eb
no longer works. Remove the module in the install step.
Task-number: PYSIDE-584
Change-Id: I6d0acdc26ee865c7e452bb702b7383579eef060d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Removing depth and Mode from tests.
assertEqual instead of assertTrue.
Change-Id: I9f0f04a460790b65af264c58ab65f248ae207e81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Rename qdoc3 to qdoc.
- Run qdoc in single-exec mode.
- Qt 5 documentation modules are added to the build from
/qtmodules (see existing examples in that folder).
- Fix modules.rst
Done-with: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Done-with: Topi Reiniö <topi.reinio@qt.io>
Task-number: PYSIDE-363
Change-Id: I47c3ec60c3132517424aef6c066a51c955e5bf2d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Doc: 'make apidoc' fails while reading lines from a qml file (Python 3).
Apparently, the python code that reads the rsts and the corresponding
snippet qml files, uses a stream reader that needs a byte stream and not
a decoded string. Otherwise, the build fails with the following error:
TypeError: can't concat str to bytes
Task-number: PYSIDE-363
Change-Id: I84f97f2be37f9e81bca312013b49fad3a7d984c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I254cc725505349e73c7abc290afc7abb85156997
|
| |
| |
| |
| |
| |
| |
| |
| | |
Amends cd1037060e0cbc263e601fb67fbd40d85c8801a1.
Task-number: PYSIDE-510
Change-Id: Ic93a6ef4ab846b07b369f691f52240aeedbfbec3
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| | |
'make apidoc' fails while generating htmls using python3.
Change-Id: I21f1c0dcaa5bfb9cb5021ed98ce5db2138538195
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In case the reference file for a given patch release does not
exist, fall back to a previous one.
Replace variables in the init_platform module by functions
getEffectiveRefPath(), getRefPath().
Task-number: PYSIDE-510
Change-Id: I208f4618be6e20be5023938850ca0eacc43b0101
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The file inheritance_diagram.py still had the old python 2 syntax.
Obviously nobody tried to build documentation in Python 3...
Change-Id: I0e245940a2593a1a5e93c7f538d8e73ca1001a0f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test used Python functionality to create a temporary
file which caused an access error on Windows, apparently due to
the file still being open. Besides, the temporary file was leaked.
Rewrite using QTemporaryFile and make sure the file is closed
and the QTemporaryFile is deleted before using it and delete it
in __del__().
Task-number: PYSIDE-431
Change-Id: I5d63e76ead7169d9f3f2267ee53aa91b601a3968
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 is unfortunately another bad side effect with .pyc files.
I had to make sure that not the __file__ attribute is used, but
the correct filename is computed, because __file__ can refer
to the .pyc file under certain circumstances.
Improved error handling, more file type checks and short
filenames relative to the project path added for convenience.
Task-number: PYSIDE-510
Change-Id: Ia0002fdfb382b7d3681156b1aef42739eb22dcc9
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I6dffab506814e1d33812ed23b3e3920882b6c4e6
Reviewed-by: Lars Knoll <lars.knoll@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>
|