aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
Commit message (Collapse)AuthorAgeFilesLines
* Return None for .name of enum if no name for value.John Ehresman2013-07-121-2/+7
| | | | | | | | | 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>
* Decref reference to type objectJohn Ehresman2013-06-241-19/+19
| | | | | | | | 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>
* Fix segfault when using shiboken.deleteJohn Ehresman2013-06-241-1/+11
| | | | | | | | 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>
* Fix bug introduced when recursive_invalidate was added.John Cummings2013-06-241-5/+14
| | | | | | | | | | 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>
* Prevent infinite recursion in invalidateJohn Ehresman2013-06-131-5/+15
| | | | | Change-Id: I8946a8572b608bf8ede211d270f797f135f8083a Reviewed-by: John Cummings <jcummings2@users.sf.net>
* Replaced Nokia copyrights in headerTeemu Kaukoranta2013-05-2836-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix possible conflict with garbage collector.Robin Dunn2013-05-131-0/+17
| | | | | | | | | 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>
* Fix possible crash at exit.Robin Dunn2013-05-081-3/+5
| | | | | | | 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>
* Fix handling of unsigned long long and provide unittests.Sébastien Sablé2013-03-142-2/+24
| | | | | | Change-Id: I29674a2d758ebf4650e2fe26cdc2e663c0bae5c7 Reviewed-by: Sébastien Sablé <sable@users.sourceforge.net> Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
* Optionally assert on free'd pointer with a valid wrapper.John Ehresman2012-12-174-1/+230
| | | | | | | | | | 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>
* PYSIDE-83 Fix segfault calling shiboken.dumpNathan Smith2012-07-041-9/+14
| | | | | | | | | | 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>
* Fix and test case for bug PYSIDE-72.Nathan Smith2012-07-041-1/+1
| | | | | | | | | | | | | | | | 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>
* Set a default hash function for all ObjectTypes.Hugo Parente Lima2012-05-032-0/+11
| | | | | | | | Fix bug PYSIDE-42 Change-Id: I1392374dcf0055309152082e674cc1e3e6472d4d Reviewed-by: Paulo Alcantara <paulo.alcantara@openbossa.org> Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
* Don't clear weakrefs if Python interpreter isn't runningJason McCampbell (Enthought, Inc)2012-04-191-2/+7
| | | | | Change-Id: I51ba2fcf5f881abb38e9b69b115fb98c536e2146 Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
* Merge GeneratorRunner inside Shiboken.Hugo Parente Lima2012-03-092-3/+3
| | | | | | | | | | | | | | | | 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
* Fix BUG #1097 - "QtGui.QShortcut.setKey requires QKeySequence"Paulo Alcantara2012-03-081-15/+16
| | | | | | | | | | | | | | 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>
* Fixed/refactored Shiboken::warning function.Marcelo Lira2012-03-082-9/+8
|
* Fixed CMake configuration of sbkversion.h header.Marcelo Lira2012-03-081-1/+2
|
* Added a convenience method to check if a converter belongs to a wrapper type.Marcelo Lira2012-03-082-0/+8
|
* Added adapter class SpecificConverter to provide type conversion based on a ↵Marcelo Lira2012-03-082-12/+84
| | | | | | | 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.
* Added a "to Python" converter function that gets a SbkConverter object.Marcelo Lira2012-03-082-3/+9
|
* Added some setting and converting functions to the new converter's API.Marcelo Lira2012-03-082-6/+40
|
* Added functions to the new converters API to check if a type is value or object.Marcelo Lira2012-03-086-5/+23
| | | | Comes with unit tests.
* Register type converters by name.Marcelo Lira2012-03-083-6/+27
| | | | This way they can be queried as the soon-to-be-deprecated TypeResolvers.
* Make converter branch work on a Python3.2 setup.Hugo Parente Lima2012-03-085-20/+41
|
* Fixes SBK_CONVERTER macro and SbkEnumType structure.Marcelo Lira2012-03-082-3/+6
| | | | | Fixes provided by Hugo Parente Lima. Unit test added.
* New converters for C++ enum and qflags types.Marcelo Lira2012-03-082-0/+18
| | | | Also removed a lot of unused and commented code.
* Added SBK_CONVERTER, a macro to get the type converter whatever the type, ↵Hugo Parente Lima2012-03-083-10/+3
| | | | but primitive types.
* Stores C++ enum type names on enum types itself instead of yet another hash.Hugo Parente Lima2012-03-081-18/+12
|
* Don't call PyTypeReady on QFlags types in createEnum function, this is done ↵Hugo Parente Lima2012-03-081-4/+1
| | | | when QFlags types is created.
* Updates creation of QFlags types at runtime.Hugo Parente Lima2012-03-085-56/+12
|
* Shiboken's enums now have converters.Marcelo Lira2012-03-083-6/+79
|
* Fixed Python 2.5 compatibility header for PyLong_FromSize_t and ↵Marcelo Lira2012-03-081-0/+3
| | | | PyLong_AsSsize_t functions.
* SbkConverter's copyToPython function now returns Python None for C++ NULL ↵Marcelo Lira2012-03-081-0/+2
| | | | pointer.
* New conversions for containers.Marcelo Lira2012-03-084-0/+514
|
* Converter can be registered and retrieved for string representations of types.Marcelo Lira2012-03-082-1/+48
|
* New converters for C++ primitive types.Marcelo Lira2012-03-084-2/+443
|
* New converters for user added primitive types.Marcelo Lira2012-03-084-4/+70
| | | | Win32 fix for zero length type converter array.
* Implemented new type converters, but only for wrapper types.Marcelo Lira2012-03-088-37/+544
|
* Implemented PSEP 0106.Hugo Parente Lima2012-03-085-5/+175
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Paulo Alcantra <pcacjr@gmail.com>
* Fix BUG #1057sb-1.0.10Paulo Alcantara2012-03-081-3/+4
| | | | | | Signed-off-by: Paulo Alcantara <pcacjr@gmail.com> Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
* basewrapper: cleanupsPaulo Alcantara2012-03-081-13/+12
| | | | | | Signed-off-by: Paulo Alcantara <pcacjr@gmail.com> Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Fix bug 1033 - "QDialog.DialogCode instances and return value from ↵Hugo Parente Lima2012-03-081-1/+4
| | | | QDialog.exec_ hash to different values"
* Fix bug 1013 - "connect to QSqlTableModel.primeInsert() causes crash"Hugo Parente Lima2012-03-081-0/+18
|
* Fix bug 1010 - "Shiboken Cygwin patch."Yaakov2012-03-081-1/+1
| | | | | Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Fix regression with enums.Lauro Neto2012-03-081-26/+22
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Reviewer: Hugo Lima <hugo.lima@openbossa.org>
* Fix ABI break and link error on MS Windows.sb-1.0.8Hugo Parente Lima2012-03-082-4/+4
|
* Don't delete parentInfo when it seens to be useless to avoid crash on ↵Hugo Parente Lima2012-03-082-13/+13
| | | | garbage collector.
* Add constructor overload AutoDecRef(SbkObject*).Hugo Parente Lima2012-03-081-0/+6
|
* Fixed code style on sbkenum.cppHugo Parente Lima2012-03-081-9/+4
| | | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Lauro Moura <lauro.neto@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>