aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtCore/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* feature_select: Implement True PropertiesChristian Tismer2020-09-161-1/+1
| | | | | | | | | | | | | | | | | This feature is now almost fully implemented. TODO: Static properties like `QtWidgets.QApplication.platformName` are skipped for now. They need support by the meta class. Maybe this is a reason to use QtCore.Property instead of vanilla Python property and improve it. With the new infrastructure, we can also consider to add properties which have no equivalent in the Qt implementation. A prominent example is "central_widget". Change-Id: Ia0e32e41de8ab72e3bba74878e61bcbac6da50ea Task-number: PYSIDE-1019 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* feature-select: allow snake_case instead of camelCase for methodsChristian Tismer2020-07-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the implementation of the first of a series of dynamically selectable features. The decision depends of the following setting at the beginning of a module after PySide2 import: from __feature__ import snake_case For more info, see the Jira issue, section The Principle Of Selectable Features In PySide The crucial problems that are now solved were: - it is not sufficient to patch a type dict, instead the whole `tp_mro` must be walked to rename everything. - tp_getattro must be changed for every existing type. This is done either in shiboken by a changed PyObject_GenericGetAttr or PyObject_SenericGetAttr, or in the generated tp_(get|set)attro functions. An example is included in sources/pyside2/doc/tutorial/expenses. Task-number: PYSIDE-1019 Change-Id: I5f103190be2c884b0b4ad806187f3fef8e6598c9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* feature-select: Implement a selectable feature frameworkChristian Tismer2020-07-101-0/+1
| | | | | | | | | | | | | | | | | | | | | This is the framework for selectable features. There are no real features implemented. Planned is a maximum of 8 features. They are all implemented as a dummy for now. The decision depends of the following setting at the beginning of a module after PySide2 import: from __feature__ import <feature name> For more info, see the Jira issue, section The Principle Of Selectable Features In PySide Task-number: PYSIDE-1019 Change-Id: If355e9294b5c16090b39d30422a90ea9c8523390 Reviewed-by: Christian Tismer <tismer@stackless.com>
* basewrapper.cpp: add PyErr_Fetch/Restore in SbkDeallocWrapperCommon()Kyle Altendorf2020-07-011-0/+1
| | | | | | | | | | | | | Fixes corruption of the interpreter's internal exception state which can occur for example in a final send to a generator which results in teardown of Python objects. Resolved by adding PyErr_Fetch and PyErr_Restore calls around the deallocation code in SbkDeallocWrapperCommon(). Task-number: PYSIDE-1313 Change-Id: Ie68c7b08d60eec8ca91b4032b21089d66d6e4478 Reviewed-by: Christian Tismer <tismer@stackless.com>
* pyside2: Prepare build system for Qt 6Friedemann Kleint2020-05-181-1/+2
| | | | | | | | | | | - 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>
* Add Qt Core bindings for Qt 5.14Friedemann Kleint2019-09-051-0/+3
| | | | | | | | | | | Adding the new QCalendar class is required to unlock the branch since the rejected constructor QDate(int, int, int, QCalendar) causes test failures in of QDate. Task-number: PYSIDE-487 Change-Id: I2720b92f3356421065f539ea0eba75d3049b9702 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add optional support for types in QSettings::valueCristián Maureira-Fredes2019-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This add an optional named parameter to the function value() to automatically cast the type that is being returned by the function. An example of this situation could be an ini file that contains the value of a one-element list: settings.setValue('var', ['a']) The the ini file will be: [General] var=a # we cannot know that this is a list! Once we read it, we could specify if we want the default behavior, a str, or to cast the output to a list. settings.value('var') # Will get "a" settings.value('var', type=list) # Will get ["a"] The cppgenerator was modified to add a verification step before trying to get the named parameter, since it could be optional and having one named parameter was assumming that all of them were provided. Change-Id: I8f379debea86b42cf89019d432e990084c9e6614 Fixes: PYSIDE-1010 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add std::nullptr_t supportCristian Maureira-Fredes2018-11-191-0/+1
| | | | | | | | | | | | Shiboken did not have support for `nullptr_t` so the converter was failing when encountering a `nullptr`. A test case is included. Fixes: PYSIDE-854 Change-Id: If5aad245e7074ed791bfc7a42a4c6a56de441d5b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add bindings for 5.12Friedemann Kleint2018-09-101-0/+1
| | | | | | | Task-number: PYSIDE-487 Change-Id: Ib37efc4e480a978f920d3bc40756fe7abd59cb19 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Remove Py_TPFLAGS_HAVE_VERSION_TAG in Python 3Boxiang Sun2018-07-051-0/+1
| | | | | | | | | | | | | The Py_TPFLAGS_DEFAULT in Python 3 has the Py_TPFLAGS_HAVE_VERSION_TAG flag, which causes the type attribute cache in _PyType_Lookup. According to the Shiboken implementation for Python 2, this is not we expected. So remove the Py_TPFLAGS_HAVE_VERSION_TAG flag from Py_TPFLAGS_DEFAULT in Python 3. Task-number: PYSIDE-60 Change-Id: Id731a59b65640eb5adea56fe06e0deb58ac4a168 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add test for "Segfault when emitting string with emoji"Christian Tismer2018-07-041-0/+1
| | | | | | | | | | | | | The used constant was encoded directly as a unicode literal. This was the same possible in Python 2 and 3 due to https://www.python.org/dev/peps/pep-0414/ . Note that the emoji character creates a 1 or 2 codepoints long constant because Python 2 can be built with UCS-4 or UCS-2. Task-number: PYSIDE-336 Change-Id: Icc7ea664cf64f9e53ef5f7696c56c6470f7ada4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add default parameter to Q*ApplicationsCristian Maureira-Fredes2018-05-151-0/+1
| | | | | | | | | | | When no arguments are passed, build an empty list and to start a QCoreApplication, QApplication and QGuiApplication. This is a small effort to include the idea of a default parameter from Python. Change-Id: Ieedc1e7ee17de996778aa2d0bddfb88c5ef208cf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add more QtCore classesFriedemann Kleint2018-05-111-0/+3
| | | | | | | | | Add QIdentityProxyModel, QLockFile, QMessageAuthenticationCode, OperatingSystemVersion and QSignalBlocker. Task-number: PYSIDE-487 Change-Id: I680c3d175394e9d560152a38195d015fc6abb7fa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix QSocketNotifier constructorCristian Maureira-Fredes2018-05-091-0/+1
| | | | | | | | | | | | | | The first argument was modified to be a socket type, but it needs to be an int (file descriptor). Adding a new signature solves the compatibility problem between Python2 and 3. A test case was added. Task-number: PYSIDE-629 Change-Id: Id9dea37459350dfc90d0f0ab9e2e1993d03fe6e4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix return conversion for readData/readLineDataCristian Maureira-Fredes2018-01-151-0/+1
| | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-11-271-1/+0
|\ | | | | | | Change-Id: I79637555fbfbd596dee4313baf80149d03bb5206
| * Remove QtCore::static_protected_methods_testFriedemann Kleint2017-11-141-1/+0
| | | | | | | | | | | | | | | | | | The test calls QThread::sleep(), which was static protected in Qt 4, but is public in Qt 5. In addition, the test is flaky on macOS. Task-number: PYSIDE-431 Change-Id: Ie0faae785cda61937b3f20290f1dccbcb20bffda Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add bindings for QRegularExpressionFriedemann Kleint2017-09-051-0/+1
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I5902ce37ad40b8180b6710b3e7cd091925ad392d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add bindings for QVersionNumberFriedemann Kleint2017-09-051-0/+1
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I0106d87418c757d14c2dd7dd9fd1ab9d0c66a449 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Re-enable bindings for QUuidFriedemann Kleint2017-09-041-0/+1
| | | | | | | | | | | | | | | | | | Remove comments, add test. The claimed cyclic dependency apparently disappeared when porting to Clang. Task-number: PYSIDE-487 Change-Id: I44556fb5de92d83bd9471a41a03db9f6eeff0a31 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-08-221-0/+1
|\| | | | | | | Change-Id: Iddee2cf511ee0f0896a04a76e5b5b8bd44d1d6f1
| * Add QTimeZoneFriedemann Kleint2017-08-021-0/+1
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I9a2c19c6b8415e3f608531b315a6841eb3de55f5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * move everying into sources/pyside2Oswald Buddenhagen2017-05-221-0/+121
| | | | | | 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.
* move everying into sources/pyside2 (5.9 edition)Oswald Buddenhagen2017-05-221-0/+122
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.