aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Avoid set parent for QLabel.pixmap()Cristian Maureira-Fredes2018-05-011-0/+1
| | | | | | | | | | | | Setting owner as default to not allow Python to create a copy of the QPixmap associated with the QLabel. The C++ object pointer is acquired through the pixmap() method. A test case was included. Task-number: PYSIDE-150 Change-Id: Ie6975c39cbf49a59ebd478db0e1a0c30fc14864a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix crashes on RHEL 6.6 CI machines due to a race condition in glib2Alexandru Croitor2017-11-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Qt launches the QXcbEventReader thread, by default the created thread dispatcher will call g_thread_init_glib to initialize the glib thread. When libqgtk2 plugin is loaded, the plugin calls gtk_init which also needs to initialize the glib thread library. This can cause a race condition where the xcb thread might not finish initializing all of the glib thread library, but the main thread believes that initializing is done, and thus ends up dereferencing null pointers. Specifically when the glib function g_slice_alloc is called in the main thread, which calls allocator_categorize, the glib initialization flag 'sys_page_size' is checked. This flag can already be set by the call to g_slice_init_nomessage in the xcb thread, but magazine_mutex might not yet be allocated (in g_slice_thread_init_nomessage), and the main thread ends up dereferencing a null pointer mutex. Relevant code can be found at https://sourcecodebrowser.com/glib2.0/2.27.4/gslice_8c_source.html The workaround is to set the QT_NO_GLIB environment variable to 1 when running the tests, so that a regular QEventDispatcherUNIX is used. Thus only the gtk plugin will call the glib initialization function, eliminating the race condition. Note that the issue probably happens only for glib versions < 2.32. The g_thread_init function is deprecated since 2.32, and glib thread initialization is done at the start of the program, as referenced at https://developer.gnome.org/glib/2.32/glib-Deprecated-Thread-APIs.html#g-thread-init Task-number: QTBUG-64716 Change-Id: Ibcccf8f6e0a3299e61dd320eb6d08e29658298e2 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Create a function existence registrymaya1Christian Tismer2017-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | With the signature module, it is now a straight forward task to generate a registry of all known function signatures. We check that these signatures all exist. One file contains all signatures for one platform and version. The test is only activated when run in the CI system. An initial call creates the expected file as output and raises an error. The result can then be picked up from the error log and added to the repository. Done: linux2 5.6.4 Done: darwin 5.6.4 Done: win32 5.6.4 Task-number: PYSIDE-510 Change-Id: I4f406cf72d25fdd2336814f6f20129079b8be54f Reviewed-by: Christian Tismer <tismer@stackless.com>
* Make standalone installations relocatableAlexandru Croitor2017-11-151-1/+1
| | | | | | | | | | | | | | | | | | This is achieved by registering a qt.conf file with a Prefix pointing to a directory relative to the loaded PySide2 module (e.g. QtCore). Thus Qt does not crash due to not finding platform plugins. Because this change would affect tests, which are ran before the PySide package is installed, a new environment variable called PYSIDE_DISABLE_INTERNAL_QT_CONF is introduced. This variable disables the registration of the internal qt.conf file, thus it will not point to a not yet created location, which will allow tests to run as before. Change-Id: I5a96037adfafe1f08ea57535aa4a2a0d1660dfaf Task-number: PYSIDE-558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* move everying into sources/pyside2Oswald Buddenhagen2017-05-221-0/+61
in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.