| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This exposes the C++ class QQuickStyle
Task-number: PYSIDE-487
Change-Id: I5776421070362d8b3bf9556eb28a410de3c90948
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Support for QtSerialPort was added to PySide2 recently. However,
only very few unit tests were added at that time.
This change replicates a part of the C++ unit tests of QtSerialPort
in PySide/Python.
Change-Id: I7e7a1ee7a521b952a6c0860cd8cceacb3b0b7e57
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |\|
| |
| |
| | |
Change-Id: I9c7163094bc934f481002adcea78ef4928ed26be
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This function will allow users to convert and load .ui files
at runtime.
A test case was added.
Change-Id: I64a220a07955e560f61f823d0ee2c3c9ff2209c1
Fixes: PYSIDE-1223
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sbkenum had a wrong deallocator and some other errors.
Found while developing pickling on enums.
At the same time, a wrong Python 3.8 condition was removed.
There are currently no additional bugs in Python 2.7, 3.7 and 3.8.
Change-Id: I4abccf3b84a3738bba7781ea3dfd00e98ae63ea1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pickling for types exists in most cases.
Pickling of Qt Enum objects works fine.
Pickling of Qt Enum types is supported, but does not work
because the builtin type pickling intercepts and then fails..
This problem is now solved because PySide supports
now __qualname__.
So pickling of nested types works now without any extra
code in Python 3. Python 2 is not supported since it would
require too strange patches to Python itself.
Fixes: PYSIDE-15
Task-number: PYSIDE-1286
Change-Id: I346bde07a63afcf2555a3324fcca04efe25e704a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Ensure it is 64bit for 64bit systems.
Change-Id: I0b4d54f2568bd70288e184a5a2d8f31532fed157
Fixes: PYSIDE-1303
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PyType_FromSpec breaks the name "A.B.C.D" in module "A.B.C"
and name = qualname = "D".
We fix that for PySide:
module = "A.B"
qualname = "C.D"
name = "D"
and for other prefixes like Shiboken:
module = "A"
qualname = "B.C.D"
name = "D"
This had quite some impact on the signature modules.
Change-Id: Ie94971ba737107b15adbfc2517e1ed32b65fda39
Fixes: PYSIDE-1286
Task-number: PYSIDE-15
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Renaming pre_release_version_type to release_version_type to match its
future usage to differentiate between wheel/package types.
Change-Id: I70a2361f639a36b17f63b7f76d8c231a144bd825
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Renaming a few .cpp files into .py
* Replacing the use of SIGNAL() and SLOT()
* Fixing Python syntax
* Removing C++-isms from translated Python code
* Including the snippets from QStackedLayout
Task-number: PYSIDE-691
Fixes: PYSIDE-1309
Change-Id: I431be3d930b2adc36a22118901baa6799581adb2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We currently have only a tutorial for .ui files,
and the .qrc case was missing.
Task-number: PYSIDE-841
Change-Id: Ic12e8e77cb1ee042bc118fab74c97b3f6ba54ff4
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Change QBasicTimer to be an object type since its copy constructor
and assignment were deleted in Qt 6. It probably was never
intended to be a value type.
- Remove the hash function of QItemSelectionRange which
according to code comment is a dummy to get
QItemSelectionRange::toSet() compiled with MSVC. There is no need
for it to have it in Python
- Adapt the underlying string types for QString conversion
Task-number: PYSIDE-904
Change-Id: Idb60b95b6bc0ce3d1272862995f3247d2f191454
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Introduce a version variable to the CMakeLists.
- Emulate the Qt5Core_INCLUDE_DIRS, Qt5Core_LIBRARIES variables
by retrieving them from the INTERFACE
- Raise the language level
Task-number: PYSIDE-904
Change-Id: Ie4e43e7e6a9a2631d666038b80f306e2d9af47b1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-841
Change-Id: I1d64fe659a7651a4da2f537368d19d731d5c1e54
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QSerialPort is part of Qt since Qt 5.1. PySide2 so far
had no support for QSerialPort. At the same time, QSerialPort
was not listed as unsupported.
Task-number: PYSIDE-487
Change-Id: I88d4282a206dadf6f398c3f0e5740f02641724b6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I302699433b1a9d11b5134b43703a775556bbee14
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To remove the groundwork from the next checkin, the step
of replacing PyType_FromSpec with SbkType_FromSpec
is extracted.
This change introduces a packageLevel number that is generated
as a name prefix in the class creation but does not use it, yet.
Change-Id: Ic9061231708b546dbd3620d148bca24c27df60a5
Task-number: PYSIDE-1286
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove deprecated functions and class DestroyListener, which
had hard-coded Qt 5 specific meta object data.
Task-number: PYSIDE-904
Change-Id: Idce86cd5df12dc918335f043c8d7a5f0a95db990
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: If256dd2b05ef2e31592cf50327ec9a2d6fb742bb
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code snippet passing the message to the Python handler
used QString::toLocal8Bit() to convert the message. This is
wrong as Python always requires UTF-8.
Fixes: PYSIDE-1293
Change-Id: I1f16dad970aaf0d776e748110fc2054269412047
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Increasing the refcount since otherwise the objects will be GCd.
Fixes: PYSIDE-1285
Change-Id: I9bb03c64f6ba9385de4ee892ce370bb2f827d79e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After the improvement to the GIL treatment inside PySide
to avoid UI freezing issues, many functions need an entry
on the typesystem to allow thread explicitly, this was
the case of the report, where a QMutexLocker was initialized.
The initialization was done inside a QThread run method,
so the lack of allow-thread was generating a deadlock.
The nogil section of the code (from Cython)
was not related to the issue, since replacing the content with
any instruction produced the deadlock anyways.
Fixes: PYSIDE-1271
Change-Id: Ib1fd1ebd923c3f9dc9ae390228bcf40b5b878019
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In case someone manually lock/tryLock a QBasicMutex
inside a section where threads are allowed, the lack of the
attribute will end on a deadlock.
Additionally, this removes the allow-thread for unlock() in
QMutex, since is not needed.
Task-number: PYSIDE-1271
Change-Id: I3d394c77d1b876afe324d5a50eb5da11b271c30e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: Ia9c2e8c7e4fb3665a78020ed154ab9a103368bd1
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
After regeneration of the registry, we need to restore the blacklist.txt
file, fix the scrape script and use the newly generated registry files.
Task-number: PYSIDE-1100
Change-Id: I2f73e36a9cc9bfb1e07b8a08ab67ddd63e211e81
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was a problem with the typing module for Python2
that showed the wrong name.
The generated signature files are further simplified.
They no longer contain fancy definitions like "Char", which
made little sense and was replaced by "int", which our
competitor does as well.
The mypy compatibility should be considered mostly complete.
Update.. QChar was not changed to "int" but "str" because we
got clashes. Therefore, recreation of the registry was necessary.
Hard to solve stay the definitions
"Virtual, Missing, Invalid, Default, Instance".
They are very rarely used for special cases. Mypy cannot
see these definitions since the module path does not exist
in the file system.
I tried hard to fix this by building a mypy plugin, but I seem to
be forced to generate real files in a temp dir. This was too much
effort. A plugin may make sense in the future when we need to
improve the type support.
Change-Id: Id80c2da1a4a379a80ec5f3019a916a9c00cc87ff
Task-number: PYSIDE-1100
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I67ca2ec01e220ef32c61aba17a0be4e46f50cb5f
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to PEP 561, there needs to exist a py.typed file.
Also, the import of typing must be visible statically for mypy without
importing PySide2.
Testing.. run
mypy pyside_1100.py
and you will get the correct output without "any".
Change-Id: I1d08447161630a8c7a64eda32ff8a431e994c6a7
Fixes: PYSIDE-1100
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The signalmanager module contains a PyObjectWrapper object
into which PySide::SignalManager::qt_metacall calls via many
hard-to-track indirections.
Finding this problem was quite tricky. It was done by modifying
the Py_INCREF and Py_DECREF macros of a debug Python
interpreter and using the new PyGILState_Check function to
provoke a crash if the GIL was not held.
See the online documentation for details.
Change-Id: Ida8246c97dcf6443ff057d206a42d22e462f1913
Fixes: PYSIDE-813
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QHelpLink was added as an API review result by
qttools/6c28b30cacc72959b8efdb4644b3d2bde2dd86f9.
Amends bf14a84a7f658a37e8b246852f15e3b9969a2bad.
Task-number: PYSIDE-487
Change-Id: I7f2e139655f56261e26c541a2c39834f51050dfa
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: Id9d77dcbb396227a670e4455031ce074488c9e17
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QMetaObjectBuilder::toMetaObject uses malloc to allocate the
space for the returned QMetaObject. As such, we need to use
free instead of delete, otherwise ASAN will report an error:
```
39: ==1537629==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x61200006cf40
39: #0 0x7f7952f00960 in operator delete(void*) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:165
39: #1 0x7f7930c4d8d4 in void qDeleteAll<__gnu_cxx::__normal_iterator<QMetaObject const* const*, std::vector<QMetaObject const*, std::allocator<QMetaObject const*> > > >(__gnu_cxx::__normal_iterator<QMetaObject const* const*, std::vector<QMetaObject const*, std::allocator<QMetaObject const*> > >, __gnu_cxx::__normal_iterator<QMetaObject const* const*, std::vector<QMetaObject const*, std::allocator<QMetaObject const*> > >) /usr/include/qt/QtCore/qalgorithms.h:320
39: #2 0x7f7930c4cf98 in void qDeleteAll<std::vector<QMetaObject const*, std::allocator<QMetaObject const*> > >(std::vector<QMetaObject const*, std::allocator<QMetaObject const*> > const&) /usr/include/qt/QtCore/qalgorithms.h:328
39: #3 0x7f7930c4a847 in PySide::MetaObjectBuilder::~MetaObjectBuilder() ../3rdParty/PySide2/sources/pyside2/libpyside/dynamicqmetaobject.cpp:143
39: #4 0x7f7930c54c8f in PySide::GlobalReceiverV2::~GlobalReceiverV2() ../3rdParty/PySide2/sources/pyside2/libpyside/globalreceiverv2.cpp:208
39: #5 0x7f7930c54ccf in PySide::GlobalReceiverV2::~GlobalReceiverV2() ../3rdParty/PySide2/sources/pyside2/libpyside/globalreceiverv2.cpp:223
39: #6 0x7f7930c54f63 in PySide::GlobalReceiverV2::decRef(QObject const*) ../3rdParty/PySide2/sources/pyside2/libpyside/globalreceiverv2.cpp:271
39: #7 0x7f7930c553fc in PySide::GlobalReceiverV2::qt_metacall(QMetaObject::Call, int, void**) ../3rdParty/PySide2/sources/pyside2/libpyside/globalreceiverv2.cpp:338
39: #8 0x7f7941d2e251 (/usr/lib/libQt5Core.so.5+0x2db251)
39: #9 0x7f7941d28bef in QObject::destroyed(QObject*) (/usr/lib/libQt5Core.so.5+0x2d5bef)
39: #10 0x7f7941d2c8d6 in QObject::~QObject() (/usr/lib/libQt5Core.so.5+0x2d98d6)
39:
39: 0x61200006cf40 is located 0 bytes inside of 264-byte region [0x61200006cf40,0x61200006d048)
39: allocated by thread T0 here:
39: #0 0x7f7952efdd48 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
39: #1 0x7f7941d1d742 in QMetaObjectBuilder::toMetaObject() const (/usr/lib/libQt5Core.so.5+0x2ca742)
39: #2 0x7f7930c4bb88 in PySide::MetaObjectBuilder::update() ../3rdParty/PySide2/sources/pyside2/libpyside/dynamicqmetaobject.cpp:425
39: #3 0x7f7930c54a85 in PySide::GlobalReceiverV2::GlobalReceiverV2(_object*, QSharedPointer<QMap<QByteArray, PySide::GlobalReceiverV2*> >) ../3rdParty/PySide2/sources/pyside2/libpyside/globalreceiverv2.cpp:195
39: #4 0x7f7930c50a70 in PySide::SignalManager::globalReceiver(QObject*, _object*) ../3rdParty/PySide2/sources/pyside2/libpyside/signalmanager.cpp:313
39: #5 0x7f792ec3b257 in getReceiver 3rdParty/PySide2/sources/pyside2/PySide2/QtCore/PySide2/QtCore/qobject_wrapper.cpp:155
39: #6 0x7f792ec3b67f in qobjectConnectCallback 3rdParty/PySide2/sources/pyside2/PySide2/QtCore/PySide2/QtCore/qobject_wrapper.cpp:205
39: #7 0x7f792ec3e5b9 in Sbk_QObjectFunc_connect 3rdParty/PySide2/sources/pyside2/PySide2/QtCore/PySide2/QtCore/qobject_wrapper.cpp:944
39: #8 0x7f7943a66250 in PyObject_Call (/usr/lib/libpython3.8.so.1.0+0x13c250)
```
Change-Id: I8c5a745fab9785425c0844129731c7c8a17b8d21
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit fcbbab0a6b5949b5c3726214ed87898b5fbcebcc.
This is no longer required after a fix generating the property
code into the setattro methods of QObject-derived classes.
Task-number: PYSIDE-803
Task-number: PYSIDE-1255
Change-Id: I9e989c0592eaaf25aa55a1db49537daa4bdb2a57
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The fixes for PYSIDE-803 caused setattro methods to be generated
for many classes, resulting in QObject's setattro method no longer
being called.
Generate property code in each class inheriting QObject.
Task-number: PYSIDE-803
Fixes: PYSIDE-1255
Change-Id: I56f52fb43c4ddc77914090ac122776050354ddbe
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add allow-thread.
Change-Id: I7feba9761a52c273cf4500a42dfbea0463d6040f
Fixes: PYSIDE-1253
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Amends cf8e0d98821cc7e6f0fc48b56a0a16ad88cd881b.
Task-number: PYSIDE-841
Change-Id: Iea6ab04e2ce8c4fb77d7d5c770dc45005f2635dc
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In PYSIDE-803 we used an optimization that accessed
a dictionary without holding the GIL. This turned out to be not
correct, because PyDict_GetItem works with thread state
to maintain the global error variables.
PyDict_GetItemWithErrors can be used instead in a way that
allows releasing the GIL.
Task-number: PYSIDE-803
Task-number: PYSIDE-813
Change-Id: Ifb0cbb20c21ca9c8b3d099fff1db5410eb6824b4
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The unicode implementation has changed very much.
PyUnicode_GET_SIZE has been used all the time, although this
macro is already a quite expensive real function since Python 3.3 .
The function is deprecated, and the macro PyUnicode_GET_LENGTH
should be used, instead.
This is relevant for cleaning things up, because in the course of
fixing PYSIDE-813 we work with debug Python, which then complains
that Python memory is used without holding the GIL.
The usage of the right implementation was ensured by a function
PepUnicode_GetLength and removing all traces of the former version.
Task-number: PYSIDE-813
Change-Id: I62e94e10e14975dac3dad0ed1fffec8a1b54a0d5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New users are getting confused by the phrasing of the page,
and believe we only have two examples in our codebase.
Adding a paragraph to clarify this situation will solve the
misconception.
Change-Id: I2a18d99771eee82af3181a997c137109840edbec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I6f4621d935f74fe7ecdbaf588a05523dd44712ce
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows to access the doc attribute from Properties
when set:
>>> p = Property(int, doc="some doc")
>>> p.__doc__
some doc
>>> p = Property(int)
>>> p.__doc__
None
Fixes: PYSIDE-135
Change-Id: Idf3e6c6632c775a50cfc8ecf03de3d2dc485f9f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using clear on an item with children,
we rely on the childCount() function so when children
with only a parent and no local reference were inside,
they ended up being removed, altering the behavior of the loop.
Change-Id: I111a600cd2e805eeb7110082437e666f88ff65a5
Fixes: PYSIDE-1251
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: Ibcd8a3b5c6d1d2f636fd21b162c67a85e727c2c4
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check using the init limits in the QVariant long long conversion
and create an int if possible. This works more smoothly with
Qt and for example ensures that the correct editor is created in
item views.
Change-Id: I0ca2e5e7b91f309deaa81a25e70a5f894f43f841
Fixes: PYSIDE-1250
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Provide them as user-added functions using C++ lambdas.
Fixes: PYSIDE-946
Task-number: PYSIDE-1241
Change-Id: I9733bc98b3fc8b3bcf40ab4ce91ffdb84e385b93
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-487
Change-Id: I4ebd62a5d81b308a189b8f4b06c1523fa78b5ef0
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |\|
| |
| |
| | |
Change-Id: Ia1c7d31c9f5d1fd8dbc33a0357c419301fd67b6a
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds and remove the usage of:
allow-thread="yes"
in some typesystem entries.
This also adapt the usage of the Py_BEGIN/END_ALLOW_THREAD
macro inside the snippets used by other typesystem entries.
The main reason is that in some cases not the whole snippet
requires to be inside such state, but only when calling the
C++ equivalent function.
Task-number: PYSIDE-803
Change-Id: Ifa9c8cee2713c453e4d5c624aaa862e75559180c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After massive GIL savings in the generated code, there still
exists a place where a lot of repeated GIL acquirements are
done. It was observed that up to 24 consecutive calls to
retrieveMetaObject(self) were made, all with the same value
for 'self'.
The code in question was:
(1) Shiboken::GilState gil;
(2) MetaObjectBuilder *builder = metaBuilderFromDict( \
reinterpret_cast<SbkObject *>(self)->ob_dict);
(3) if (!builder)
(4) builder = &(retrieveTypeUserData(self)->mo);
(5)
(6) return builder->update();
An exact analysis of the code showed that the GIL usage (1) could
be moved out of the function into a deeper function that does
updates in a branch (6).
Function retrieveTypeUserData does not involve the Python
interpreter at all (4).
It took some time until it was proven that access to some
special Python dictionary cannot reach the Python interpreter
and therefore does not need the GIL as well (2).
This replaces the abandoned effort to write a "Lazy GIL".
It worked great for the example program, but had problems
with some never finishing tests.
After all, this solution is much simpler and works perfectly
well. More effort seems not to be necessary to handle the GIL.
Task-number: PYSIDE-803
Change-Id: I439009ff933fc6f498beb0c7f1523b6f985afda8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I116f2abfda7263fac8a31ffbe8fc82bfa0cbc618
|