aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add bindings for QtWebEngine (aka Quick)Alexandru Croitor2018-06-072-1/+75
| | | | | | | | | | | There is only one method we really need, QtWebEngine::initialize() which is used for all Qt Quick based WebEngine applications. Otherwise you get a warning upon startup of a Qt Quick WebEngine application, and this might lead to undefined behavior. Task-number: PYSIDE-688 Change-Id: I7de2bbb58c49cb2a41b0e13ffc9de6a3161f3960 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix glitch in voidptr.cpp after the PEP 384 commitChristian Tismer2018-06-052-0/+48
| | | | | | | | | | | | | | | | By lots of editing, somehow an expression in voidptr.cpp became incomplete. We should improve the current test to be certain that the VoidPtr is working. This problem can be avoided by not doing many type casts at once. Doing the same in two steps is much safer because a forgotten call would give a compile time error. Task-number: PYSIDE-560 Change-Id: Ibb24a27f439cbda490723131f34f93978725420f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Improve the QByteArray implementationBoxiang Sun2018-06-0129-154/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | The available constructors for QByteArray are now: bytes, bytearray, and QByteArray, unicode is not accepted anymore. Also the concatenation is now possible between QByteArrays. Even though is not possible to initialize a QByteArray with an unicode, we include the possibility to compare it with one (Compatibility with PyQt). The __repr__ and __str__ are now properly working. There seemed to be a confusion regarding data types between Shiboken, Python2 and Python3 related to bytes, so now the structure is based on the flag SBK_BYTES_NAME, which is define as "bytes" for Python3 and "str" for Python2. Many tests were modified to properly handle string, using the `py3kcompat` module. Task-number: PYSIDE-232 Change-Id: I8b671f367c60a0870c72dcbe5662106b3225037d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve sbkstring::toCString to support unicodeBoxiang Sun2018-06-011-0/+5
| | | | | | | | | | | | | If `unicode` is used in Python 2, shiboken cannot properly translate it to `const char *`. sbkstring did not supported a proper conversion of unicode types in Python2, and this change includes it. Task-number: PYSIDE-100 Change-Id: I3a70d935ad61b0e567e620c62754800370270a6b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix test to assert only if english is the localeCristian Maureira-Fredes2018-06-011-4/+4
| | | | | | Change-Id: I3188c33414d283478a6ff6d7d354ce9231b4f106 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtScxmlFriedemann Kleint2018-05-243-0/+143
| | | | | | | Task-number: PYSIDE-487 Change-Id: Ib8eb4a77f04ddbbe2c4b164b95f49e2f53bf44d9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add more QtMultimedia classesFriedemann Kleint2018-05-163-3/+3
| | | | | | | | | | | | | | | | Add QCameraFeedbackControl, QMediaService, QMediaServiceCameraInfoInterface, QMediaServiceDefaultDeviceInterface, QMediaServiceFeaturesInterface, QMediaServiceProviderHint, QMediaServiceSupportedDevicesInterface, QMediaServiceSupportedFormatsInterface, QMediaTimeInterval, QMediaVideoProbeControl, QMetaDataReaderControl and QMetaDataWriterControl. Add commented out classes QCameraFlashControl and QCameraFocusControl with explanatory comment. Task-number: PYSIDE-487 Change-Id: I4125ee2088bde487c36c3c13dd7b05d6667b0711 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add default parameter to Q*ApplicationsCristian Maureira-Fredes2018-05-156-0/+123
| | | | | | | | | | | 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 QProxyStyleFriedemann Kleint2018-05-141-1/+25
| | | | | | Task-number: PYSIDE-487 Change-Id: Ib862be9c0c62be09a34c3a79740d147b9788cb34 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change license from last filesCristian Maureira-Fredes2018-05-141-1/+1
| | | | | | | | Just renaming PySide2 -> Qt for Python for these files that somehow got excluded when renaming the whole project. Change-Id: Id6dfbae1ab3bd603f1db5e0346664004102fd19f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add more QtCore classesFriedemann Kleint2018-05-116-1/+162
| | | | | | | | | 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-092-0/+60
| | | | | | | | | | | | | | 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>
* Add more bindings for QtNetworkFriedemann Kleint2018-05-095-9/+69
| | | | | | | Task-number: PYSIDE-487 Change-Id: Id9a06b83173b9a8880a256fb45e8d85fb1978d65 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change license from all the filesCristian Maureira-Fredes2018-05-03506-506/+506
| | | | | | | | | | | | | | | | | Removing the word 'project' from all the headers, and changing the PySide reference from the examples to Qt for Python: The following line was used inside the source/ and build_scripts/ directory: for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done and the following line was used inside the examples/ directory: for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Avoid set parent for QLabel.pixmap()Cristian Maureira-Fredes2018-05-014-2/+97
| | | | | | | | | | | | 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>
* Implement Python slicing support for QByteArrayBoxiang Sun2018-04-301-8/+13
| | | | | | | | | | | | | | | | | | | | | PySide2 for Python 3 didn't support get item by slice, e.g. ``` >>> from PySide2.QtCore import QByteArray >>> ba = QByteArray('1234567890') >>> ba[2:4] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: sequence index must be integer, not 'slice' ``` This is because get item by slice is supported by mp_subscript. But current PySide2 doesn't implemented it. So I added __mgetitem__ in QByteArray. And we also need to keep __getitem__ to support iterate over QByteArray. Also removed the __getslice__ from QByteArray. Task-number: PYSIDE-567 Change-Id: I01f79cc2ab8700da92155cfad96be2e98bb8b331 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rename PySide references to Qt for PythonCristian Maureira-Fredes2018-04-27505-505/+505
| | | | | | | | | When referring to the project one should use "Qt for Python" and for the module "PySide2" Change-Id: I36497df245c9f6dd60d6e160e2fc805e48cefcae Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove currentThreadId bindingCristian Maureira-Fredes2018-04-276-6/+0
| | | | | | | | | | | | | Since this method should not be used in any application code, we should remove it from PySide2. Removing also the test registry. https://doc.qt.io/qt-5/qthread.html#currentThreadId Task-number: PYSIDE-275 Change-Id: I152b36ccfa4342d4d6b916d8b2fe228e4fe4a1c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QtPositioning and QtLocationFriedemann Kleint2018-04-244-0/+86
| | | | | | Task-number: PYSIDE-487 Change-Id: Ie44d8472beb3f1a5ab75caafd1f58b512b53ccb1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Strip parameters of invalid type with a default value expressionFriedemann Kleint2018-04-231-4/+0
| | | | | | | | | | | | | | | | For example for: void QWebEnginePage::findText(const QString &subString, FindFlags options = FindFlags(), const QWebEngineCallback<bool> &resultCallback = QWebEngineCallback<bool>()) the resultCallback will be removed and a binding for void QWebEnginePage::findText(const QString &subString, FindFlags options) generated. Task-number: PYSIDE-487 Change-Id: I6299d1735ad6c00e257daecb64d8f2f235140a98 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add QtSensorsFriedemann Kleint2018-04-202-0/+56
| | | | | | Task-number: PYSIDE-487 Change-Id: Id60f3f6e70b4fbb8e4316b994cdd557ff9be7b3b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtWebEngineCore moduleDavid Rosca2018-04-202-0/+93
| | | | | Change-Id: I8e1127e082abe5978a94aa8a080dfb1d8bbd5952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Check default superclass when getting baseClassesCristian Maureira-Fredes2018-04-192-0/+77
| | | | | | | | | | | | | | | | | | | | | | | Reimplementing a class must respect the closest base class instead of falling back to QObject. By adding a default-superclass argument one can verify that field first when shiboken is getting the base classes. This problem was found by reimplementing QGraphicsObject including methods from one of its parent classes, QGraphicsItem. With this change, the generated wrapper will list all the base classes in `Sbk_QGraphicsObject_Type_bases` leaving QObject at the end, because if not, it will match inmediately. A test case was included. This change doesn't affect other existing tests. Task-number: PYSIDE-86 Change-Id: I6b9a220497b12c8085302a502f8581cc2d3fb11b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Transfer ownership of the header to the QTreeViewCristian Maureira-Fredes2018-04-191-1/+8
| | | | | | | | | When using setHeader on a QTreeView, the view needs to take ownership of the header object. Task-number: PYSIDE-227 Change-Id: Ib37c00c098be422c7f0df4a32a6795c267642a41 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Transfer ownership of new Widget to QTreeWidgetCristian Maureira-Fredes2018-04-192-0/+65
| | | | | | | | | | | | | | | When new widgets were added to a QTreeWidget the ownership was not being transferred. This problem happened when the Widget was being build inside the method call. When trying to show owner-less Widgets inside the Tree, a segfault happened. A test case was added. Task-number: PYSIDE-73 Change-Id: I0f1c3c065ae8ed0a336c8e39b1766f3e8870b54d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* fix more qApp crashesChristian Tismer2018-04-192-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | When building PySide with a debug Python, a lot more problems become visible. They were triggered by some malicious ordering of the shutdown code, which must come *after* the refcounts of the variables are adjusted. The initial issue PYSIDE-585 was caused because the shutdown code is not only used for every created Q*Application, but also for the module shutdown, which deletes qApp_contents too often. Instead of special-casing that or adding some refcount, it was much more intuitive in that context to set qApp_content's refcount to the same value as Py_None, which also is not supposed to be garbage collected. Btw., the reason for the error message is that Py_None has it, too. When we set qApp_content's type to Py_None's type, it inherits the protection code that prevents someone from garbage collecting Py_None. Task-number: PYSIDE-585 Change-Id: I4af9de1192730f06054a5aca099a32e2392e367d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add default return value to pythonTypeIsValueTypeCristian Maureira-Fredes2018-04-191-1/+36
| | | | | | | | | | | | | | | | | | | | | When a class inherits from two base classes, Shiboken sets the converter of the newly created SbkObject to 0 (SbkObjectTypeTpNew), and handle the multiple inheritance in a different way. When any SbkObject try to release its ownership, it first verify if the ownership is already on the C++ side by checking the attribute hasOwership and also if the converter is a ValueType. The later fails if the converter is null, so a default value (false) was added. A test case using deleteLater() was included, which uses the releaseOwnership method internally. Task-number: PYSIDE-11 Change-Id: I34fba0d3e5d28b99b49a183ed08e977a311da632 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Stabilize returnquadruplesofnumbers_test:testQPrinterGetPageMargins()Friedemann Kleint2018-03-261-6/+14
| | | | | | | | | | | Loop over the available printers and try to find a PDF printer or similar which allows for setting arbitrary page margins. Failures have been observed with some printer apparently due to invalid values. Task-number: PYSIDE-431 Change-Id: I777e20072834ab1aa7ae3ba7d9b6c83d824aaae1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Move QStringListModel to QtCoreJulien Schueller2018-03-192-4/+2
| | | | | | | | | | Seems this was in QtGui at the time of Qt 4, but now it's in QtCore: http://doc.qt.io/archives/qt-4.8/qstringlistmodel.html http://doc.qt.io/qt-5/qstringlistmodel-members.html Task-number: PYSIDE-614 Change-Id: I918cbffd64fb8da9e81123073ff57cd2126e5cae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Correct the test location for minimal buildsChristian Tismer2018-03-157-4/+3
| | | | | | | | | | | The tests were partially wrong assigned so that a minimal build with "--module-subset=QtCore,QtGui,QtWidgets" had unnecessary errors. This patch re-arranges the tests accordingly. Change-Id: I48e37875dd8856707df41f5943ce9435851f2d03 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-03-052-6/+27
|\ | | | | | | Change-Id: I452d3a0a04e282b678879132ca1b3a272910ef04
| * Implement proper package versioningAlexandru Croitor2018-03-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is inspired by / follows PEP 440 for handling version numbers and also takes into account the Qt versioning scheme. PySide2 as package name will stay as-is (not renamed to PySide5). Release versions would have the following pattern: PySide2 5.x.y (e.g. 5.6.3) Package (wheel) name would also contain the bundled Qt version, e.g.: PySide2-5.6.0-5.6.4-cp27-cp27m-macosx_10_7_intel.whl Pre-release versions would look like: PySide2 5.6.0a1, 5.6.0a2, 5.6.0b1, 5.6.0b2, 5.6.0rc1, etc. Development (snapshot) versions would look like: PySide2 5.6.0-dev123456789 (last part is timestamp of build time) All of the examples above comply with the PEP 440 rules. In the example above where the Qt version is specified as part of the wheel package name ("5.6.4"), the Qt version is not part of the package version itself, because it doesn't comply with PEP 440. But it does comply with wheel package names (PEP 427), and by that PEP's definitions, it will be the optional "build tag" part of the file name, which is preceded by the actual package version, and followed by the python version / abi tag. Implementation: This change defines two new python configuration files which will be the authoritative source for the shiboken and PySide2 libraries, as well as the final PySide2 package itself: sources/shiboken/shiboken_version.py sources/pyside2/pyside_version.py The pyside_version.py file will be the source of the final package version. The shiboken and PySide2 version should be modified in sync, when bumping the version of the package before a release. The reason for having both files instead of 1, is to make life easier for developers that might extract only shiboken from the repository. If at some point shiboken and PySide2 CMake projects get merged into one project, the duplicate version files would go away. The version files are parsed by CMake to correctly name the shared libraries (and SO versions), and they are also read by the setup.py script, to generate correct package metadata and a correct package (wheel) name. This change also removes the broken dist targets from PySide2's and shiboken's CMakelists files, which depended on some version suffix which was never set in setup.py. PEP440: https://www.python.org/dev/peps/pep-0440/ PEP427: https://www.python.org/dev/peps/pep-0427/ Change-Id: I3226460b1adf2555c8711fa2ba47c223b957cb44 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix QValidator fixup() behaviorCristian Maureira-Fredes2018-03-011-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | The return value from the fixup() method was ignored leaving an Intermediate or Invalid input intact. This was solved injecting code to the native wrapper for the fixup() method that allows to change its value. A test case is provided. Task-number: PYSIDE-106 Change-Id: I1d796955178dbdbcfff90adb6ede5c8b2dd1acc3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Check slot-signal association when connectingCristian Maureira-Fredes2018-03-021-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connecting a signal with a slot there is a process to associate the proper signal signature, but the slot signature was not verified. This missing verification step lead to wrongly associate the slots and the signal signatures, for example: def on_clicked(checked=True): ... QGroupBox.clicked.connect(on_clicked) will wrongly connect the slot "on_clicked" with the signal "clicked()" (without any argument), when the proper signal is "clicked(bool)". This can be solved by manually specifying the arguments: QGroupBox.clicked[bool].connect(self.clicked) We can add an additional verification step to associate the proper signal if the slot has a certain number of arguments. There is an existing test that checks the compatibility of this change with all the ways to connect signals and slots. A few additional cases were added. Task-number: PYSIDE-104 Change-Id: Ic5b06fa3bb91903f7d506e0e2c52a6f7d3dc4570 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-02-232-52/+0
|\| | | | | | | Change-Id: I5d1a4734e8f44785898ba62beaa0bdd2004fca22
| * Remove _utils.py module from packageAlexandru Croitor2018-02-222-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt4 days, _utils.py was used to register a custom qt.conf file into the Qt Resource System, which contained a Prefix (and other locations like binaries / QML imports) so that QtCore can find the correct location of the QPA plugin, and all other requirements. The code was not adopted to work for Qt5, and was silently failing without doing anything. It is not needed anymore though, since the qt.conf registration is now done in C++ in libpyside shared library, since the commit e455d995be989cbdfef2bcd54fd7057a9b036b52 . Thus remove the _util.py file, and adjust __init__.py accordingly. Task-number: PYSIDE-600 Change-Id: I76e3ea442a6e9b9df4996e628ffffcc7384b7f82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Remove the internal functions Qt::get_enumName()/Qt::get_enumMetaObjectFriedemann Kleint2018-02-213-12/+0
| | | | | | | | | | | | | | | | | | | | They apparently originate from an expanded macro and result in doc warnings. Change-Id: I2418034f643156855091e1e94e0fbb2a58e77bfc Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add condition to qmimedatabase_testCristian Maureira-Fredes2018-02-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | An assert related to a Mimetype comment fails if the language is unset or is not English. Since this assert is not critical to the functionality of the module, we can remove it or add a simple condition to test it only when the system's language is English. The last one was applied. Task-number: PYSIDE-575 Change-Id: Ida85268e25522e406878dd6ac4e5e70852f8d8e4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix lost reference for item delegatesCristian Maureira-Fredes2018-02-142-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | After setting an item delegate for columns and rows in classes that inherit from QAbstractItemView (like QTreeView) the reference was not kept, causing a segfault. This was solved by keeping the reference of the object. A test is provided. Task-number: PYSIDE-226 Task-number: PYSIDE-219 Change-Id: I43eeb6e85a37537311d838f5abb0ee1ab10ea713 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-02-022-0/+64
|\| | | | | | | Change-Id: I777970f7bb17db766660d82556559eadd7293355
| * Fix QTabWidget.clear to avoid double obj removalCristian Maureira-Fredes2018-02-022-0/+64
| | | | | | | | | | | | | | | | | | | | | | Replacing shiboken call setParent with releaseOwnership so Python will not delete the underlying C++ object. A test case is provided to check that the error is not happening. Task-number: PYSIDE-213 Change-Id: Ic0f383c3d93b905885f76788d32d62ba37ed9d2f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Registry: Trigger re-generation of files for Qt3DChristian Tismer2018-02-024-848/+911
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is phase 2. The files are generated. I only changed the date in the license section. After this check-in, the update is done. From Phase 1: The function registry does not contain the new Qt3D module. This produces no error because the test is configured to only break on missing functions but not on new unknown functions. We provoke a reaction of the system by removing of the 5.9 registry files. The system will generate an error once and produce the desired output. But because of the multiple testing, the test will succeed because the generated file exist on the second run and therefore the test will succeed as a flaky test. There is only one run necessary for all platforms at once. A second check-in will then do the update with the generated data. I also had to fix the testrunner to produce a good listing without labels. Task-number: PYSIDE-487 Change-Id: I06a73d244ce306977fd16223eec4dc491fff3429 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix error with second Qt.UniqueConnection callCristian Maureira-Fredes2018-02-011-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation was considering only Py_True as a success, but not Py_False. The else statement will enter just in case of error, as intended. Added a test case to verify the proper behavior of Qt.UniqueConnection. Task-number: PYSIDE-34 Change-Id: I5bafe0e81383022dcd7fc6251fc61d0ab5e918d0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add code to invalidate objs on QListWidget.clearCristian Maureira-Fredes2018-01-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported on PYSIDE-264, when an item of an already cleared QListWidget was being accessed, a segfault happened when trying to access this deleted data. Due to the lack of an invalidation process of the python objects when clear() was called, the generated validation step before accessing the data had no effect. This was solved injecting code to set their parents to NULL, and invalidating them. The outcome of trying to access deleted data then will be a RuntimeError, instead of a segfault. A test case is provided. Task-number: PYSIDE-264 Change-Id: If52dd85827500c96a078a8f9d61921a275fb28f9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add Qt3DFriedemann Kleint2018-01-318-0/+161
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I17100eda57fbe5015b6c8ff531a3c62b22e8de95 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-01-191-3/+4
|\| | | | | | | Change-Id: I5f2e1660a27efafa445592898db4dfe3250306e0
| * qinstallmsghandler_test.py: Test qDebug() in debug builds onlyFriedemann Kleint2018-01-161-3/+4
| | | | | | | | | | | | | | Otherwise, messages are suppressed and the test fails. Change-Id: Ie7fb8192e542a09822f6e1f70392100f4cdc0f11 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Add bindings for QHelpSearchResultCristian Maureira-Fredes2018-01-152-0/+45
| | | | | | | | | | Change-Id: I256eced0fb4fcef097c63cdf63257e89953c54d0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix return conversion for readData/readLineDataCristian Maureira-Fredes2018-01-152-0/+83
| | | | | | | | | | | | | | | | | | 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>
* | Add bindings for QColormapCristian Maureira-Fredes2018-01-092-0/+44
| | | | | | | | | | | | | | | | Removing depth and Mode from tests. assertEqual instead of assertTrue. Change-Id: I9f0f04a460790b65af264c58ab65f248ae207e81 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>