| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I0597f4c4f2eb0e8d4979690eeb1f17d78cf4e619
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit works around some bugs where multiple/incorrect
wrappers were registered for some types:
- In cases where the first field of a class was itself a Value
type instance (instead of pointer), both the parent
and child wrappers had same cptr address, causing confusion
in retrieveWrapper. Previously, this was worked around by always
creating a new wrapper for all Value type fields on every access,
causing leaks. We now check for colocated child wrappers and
return that instead of creating new wrapper, so each Value type
subfield need only have one wrapper.
- Some cases of incorrect wrapper registration due to an existing
wrapper which shiboken could not figure being deleted are fixed,
specifically cases where the newly registered wrapper is from
object created in python or owns its wrapper.
- Do not release incorrect wrapper in case of address reuse
by checking that the registered wrapper is indeed the wrapper
being released.
Task-number: PYSIDE-217
Task-number: PYSIDE-224
Change-Id: I019c078566c4b9b90e63c5d991e2e372d39c632a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Replace by C++ casts.
Change-Id: I20d88ff021c681e63a6a4328c3402308f8c188e5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Replace usage of auto_ptr by a delete statement, which also makes
the intention of the code clearer.
Change-Id: Ida69b8df00f6a86c43547f013c799b8ccd66f60d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
| |
Change-Id: Idb7d588d5790d92139fcd7f629faf23be49ec527
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch addresses the missing overflow warnings for each
assertRaises found in overflow_test.py and in
implicitconv_numerical_test.py, specifically for the cases of big
numbers that can't be represented in long long's.
The patch doesn't cover all the possible cases, but the overflow checks
should be more robust now, especially in cases when the overflows
happened silently and returned -1 without showing any warnings.
Change-Id: Ifded579f5c11d4ae78d91f63374dd62c8cbf953f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Output type and size.
Change-Id: Id24fe755e3be9f8d2afe9c668dafe49ad6ec42c7
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing code written for Python 2 wrongly detected large
values of size_t as negative on Windows, causing
TestShiboken::testWrapInstance() to fail:
ERROR: testWrapInstance (__main__.TestShiboken)
File "module_test.py", line 51, in testWrapInstance
obj = shiboken.wrapInstance(addr, ObjectType)
OverflowError
Use the new API of Python 3 which takes care of checking for
negative values.
Task-number: PYSIDE-431
Change-Id: I16bee5385223a7baba81b112d800459becfd8df7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I4d38f0e3b308d4f314ba07ed7ccaed961e947f9e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the prototype of the getter SbkObjectGetDict and remove
the C-style cast. Add missing fields to initialization
PyGetSetDef SbkObjectGetSetList[] =
Fixes warnings:
libshiboken/basewrapper.cpp:126: Warnung: missing initializer for member 'PyGetSetDef::doc' [-Wmissing-field-initializers]
libshiboken/basewrapper.cpp:126: Warnung: missing initializer for member 'PyGetSetDef::closure' [-Wmissing-field-initializers]
libshiboken/basewrapper.cpp:126: Warnung: missing initializer for member 'PyGetSetDef::get' [-Wmissing-field-initializers]
libshiboken/basewrapper.cpp:126: Warnung: missing initializer for member 'PyGetSetDef::set' [-Wmissing-field-initializers]
...
Change-Id: I42a1d5010e282e07947cdc236f7eef2ef38aecb7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
libshiboken/helper.cpp:135:9: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
delete message;
^
libshiboken/helper.cpp:129:21: note: allocated with 'new[]' here
Change-Id: I05618a679df618e898ce3c189372b4eeabb2d1f5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
shiboken2\libshiboken\conversions.h(419): warning C4244: 'return': conversion from '__int64' to 'char', possible loss of data
sbkconverter.cpp(372): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
sbkconverter.cpp(385): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
sbkconverter.cpp(521): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
typeresolver.cpp(100): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
typeresolver.cpp(142): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
Change-Id: Ib1d31ef8f53ecb50f21abd6da17ab31656b3653d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sbkenum.cpp:268:1: warning: missing initializer for member 'PyGetSetDef::set' [-Wmissing-field-initializers]
sbkenum.cpp:268:1: warning: missing initializer for member 'PyGetSetDef::doc' [-Wmissing-field-initializers]
sbkenum.cpp:268:1: warning: missing initializer for member 'PyGetSetDef::closure' [-Wmissing-field-initializers]
sbkenum.cpp:268:1: warning: missing initializer for member 'PyGetSetDef::get' [-Wmissing-field-initializers]
sbkenum.cpp:268:1: warning: missing initializer for member 'PyGetSetDef::set' [-Wmissing-field-initializers]
sbkenum.cpp:268:1: warning: missing initializer for member 'PyGetSetDef::doc' [-Wmissing-field-initializers]
sbkenum.cpp:268:1: warning: missing initializer for member 'PyGetSetDef::closure' [-Wmissing-field-initializers]
sbkenum.cpp:375:1: warning: missing initializer for member '_typeobject::tp_del' [-Wmissing-field-initializers]
sbkenum.cpp:375:1: warning: missing initializer for member '_typeobject::tp_version_tag' [-Wmissing-field-initializers]
Change-Id: I368696973621b145f716eb3a9187c72e8fb38fe5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I552e2ac4c7c844afcb432f29aae71b3a55e33ad5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I579f9073dcaf16213bb506abb1eb1573bbc5590b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Prevent crash, output a warning instead.
Task-number: PYSIDE-346
Change-Id: Ieb63ca959442d650f54f3798aa8c5df45b3f57f5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
* USE_PYTHON3 got renamed to USE_PYTHON_VERSION
-> This variable can be now used to set a specific version to build for. For example, if you like to build for 3.4.5 you can set "-DUSE_PYTHON_VERSION=3.4".
* Adding a block for debugging all PYTHON* variables. Useful for hunting bugs.
* Adding generation of a extension suffix for Linux. Can also be useful for WIN and MAC, when building for different Python versions, so try it out.
* Renamed PYTHON_SUFFIX into PYTHON_EXTENSION_SUFFIX (!). This might break others work! This variable name is more selfexplaining, that's why I renamed it.
|
|
|
|
|
|
|
|
|
|
|
| |
The intention is to have PySide2 and Shiboken2 as project names, to
allow for co-existence of PySide and PySide2.
This is the first version that builds with these settings on OS X:
$ python3 setup.py build --debug --no-examples --ignore-git --qmake=/usr/local/Cellar/qt5/5.5.0/bin/qmake --jobs=9
This is not yet tested.
|
| |
|
|
|
|
| |
annoying warnings
|
|
|
|
|
|
|
|
|
| |
This fixes segfaults when trying to get the name of a dead key
from a qt key event.
Change-Id: Ie631e2245bca0a3fee8616854f6479d3dec0c2bb
Reviewed-by: Roman Lacko <backup.rlacko@gmail.com>
Reviewed-by: John Cummings <jcummings2@users.sf.net>
|
|
|
|
|
|
|
|
| |
A decref is needed if the type is not subclassed when an instance
is deallocated
Change-Id: I2c64d7cb5b726c5bf108c1cbc5283cf315a5f8e9
Reviewed-by: John Cummings <jcummings2@users.sf.net>
|
|
|
|
|
|
|
|
| |
When an object is deleted, invalidate / releaseWrapper needs to
be called before cptr array is deleted.
Change-Id: I82f71f569d5a0f52084fbe1cc3d7846e764c7ef6
Reviewed-by: John Cummings <jcummings2@users.sf.net>
|
|
|
|
|
|
|
|
|
|
| |
If a Python object is passed to recursive_invalidate and is a sequence,
each item in the sequence is invalidated
Add unit test for recursive invalidate of a sequence
Change-Id: I70834f8e027bd17a04c0e443bc7d584d1fde26c1
Reviewed-by: John Ehresman <jpe@wingware.com>
Reviewed-by: John Cummings <jcummings2@users.sf.net>
|
|
|
|
|
| |
Change-Id: I8946a8572b608bf8ede211d270f797f135f8083a
Reviewed-by: John Cummings <jcummings2@users.sf.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replaced old Nokia copyrights with Digia copyrights.
Removed "All rights reserved" strings without leading copyrights were
removed (for example, 'Copyright SomeCompany, all rights reserved
remain untouched).
Did NOT touch contact details, will change them later.
Excluded folders that have '3rdparty' in path.
Used command:
find . -path '*/3rdparty/*' -prune -o
-exec grep -ilI -E '.*Copyright.*Nokia.*' {} \; |
tee >(xargs sed -i -r '1,10 s/([ \t#*]*)(.*Copyright.*Nokia.*)/
\1Copyright \(C\) 2013 Digia Plc and\/or its subsidiary\(-ies\)\./I')
>(xargs sed -i -r '1,10 s/(^[ \t#*]*)(all rights reserved.*)/\1/I')
This excludes binary files and retains whitespace and #* characters in
the beginning of the edited lines.
Change-Id: I0d49f991c3dbd45d804843f185714e8681bc6c51
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
|
|
|
|
|
|
|
|
|
| |
Ensure that the GC is no longer tracking object an object before starting
to delete it. Since Shiboken's object deletion goes through several steps
we need to ensure that the GC will not try to delete the same object.
Change-Id: Ia3337c72204b0ebf524959e1c99fbef7c1a02249
Reviewed-by: John Ehresman <jpe@wingware.com>
|
|
|
|
|
|
|
| |
The interpreter may already be finalized when it gets to ~BindingManager() so ensure that the interpreter is still valid before doing anything that could result in Python being called for a DECREF or etc.
Change-Id: I8a68322f404a1dcaa9203923d6f699ed57e9d319
Reviewed-by: John Ehresman <jpe@wingware.com>
|
|
|
|
|
|
| |
Change-Id: I29674a2d758ebf4650e2fe26cdc2e663c0bae5c7
Reviewed-by: Sébastien Sablé <sable@users.sourceforge.net>
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
|
|
|
| |
Use a debug mode callback that's called every time free is
called to detect wrappers that are still in the binding manager's
map after the C++ object is deleted. When it's enabled 10+
of the PySide tests fail.
Change-Id: I30a40d48f6c4560ff0a3755d61c26ea4c6dd2758
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
|
|
|
| |
shiboken.dump would segfault when called on an object whose C++ object
had been deleted or whose parent C++ object had been deleted. This now
checks to see if the data pointers beneath the PyObject are NULL before
printing data.
Change-Id: I89763a3ca3a5d25fad4142ff924692cd232c9c40
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The address of the PyObject is used directly as the hash rather than a
member of that object. This avoids segfaults when the C++ object has
been deleted, rendering the child pointers NULL.
Removed a test case verifying that hash(QObject()) != hash(QObject())
because they in fact can be equal. The first QObject dies and is reaped
before the second QObject is created, meaning that the second QObject
may be allocated at the same address as the first QObject, giving them
both the same address. If a reference is held to the first object,
though, then they will get different hash values.
Change-Id: I116463f88b837726a98720bae36770d53b13f4ee
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
|
|
|
|
|
|
|
|
| |
Fix bug PYSIDE-42
Change-Id: I1392374dcf0055309152082e674cc1e3e6472d4d
Reviewed-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
|
| |
Change-Id: I51ba2fcf5f881abb38e9b69b115fb98c536e2146
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conflicts:
CMakeLists.txt
data/CMakeLists.txt
doc/CMakeLists.txt
doc/_templates/index.html
doc/_templates/layout.html
doc/_themes/pysidedocs/static/pysidedocs.css
doc/commandlineoptions.rst
doc/conf.py.in
doc/contents.rst
doc/images/bindinggen-development.png
doc/images/boostqtarch.png
tests/CMakeLists.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
E.g., when calling QtGui.QShortcut.setKey(QtCore.Qt.CTRL +
QtCore.Qt.Key_Delete) it was being called as
QtGui.QShortcut.setKey(long) (in Python 2) when it should be actually
QtGui.QShortcut.setKey(int). So that resulted in a TypeError exception
when using Python version 2 with that small code.
See http://bugs.pyside.org/show_bug.cgi?id=1097.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
given string.
Also added code to register a couple of type conversions by name,
a bunch of related tests, and some fixes to the converter functions.
|
| |
|
| |
|
|
|
|
| |
Comes with unit tests.
|
|
|
|
| |
This way they can be queried as the soon-to-be-deprecated TypeResolvers.
|
| |
|
|
|
|
|
| |
Fixes provided by Hugo Parente Lima.
Unit test added.
|
|
|
|
| |
Also removed a lot of unused and commented code.
|
|
|
|
| |
but primitive types.
|
| |
|