aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/pysidetest
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-11-272-155/+4
|\ | | | | | | Change-Id: I79637555fbfbd596dee4313baf80149d03bb5206
| * Skip some permanently failing tests and blacklist flaky onesAlexandru Croitor2017-11-241-1/+4
| | | | | | | | | | Change-Id: Idcbf62b58f097370f61a27d0f16bce630e817526 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Create a function existence registrymaya1Christian Tismer2017-11-192-168/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Update and complete the signature moduleChristian Tismer2017-11-141-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is now an external typing module for Python 2.7 and Python 3.6 from Guido (PSF license again) that makes the differences between both versions vanish. Also, when generating interface files, some types did not show correctly, and the constant "0" is wrong in almost all cases. Values in signatures looked often bad since they have no nice __repr__, and it was almost impossible to create correct .pyi files. Now, these instances are created as wrapped string types with a nice __repr__. A call of these objects creates the real constant. This way, also objects can be rendered which are dependent from the existence of other objects (i.E. QPixMap). This patch improves the usability of the signature module. We can now generate source code or .pyi files without modifications. Task-number: PYSIDE-510 Change-Id: I55490d76a29fc6c0e4f821c0c77d5e5d1e28976e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | PySide2: Simplify typesystem path handlingFriedemann Kleint2017-11-062-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify the typesystem.xml files such that all dependent files are loaded via module (for example, QtCore/typesystem_core.xml). As a result, it is no longer necessary to add each dependent directory to the typesystem path; it is sufficient to pass the binary and source path of PySide2 and the source directory of the Qt module only. This requires rewriting the dependency checking for --reuse-build so that it loops over the source directories of the dependent Qt modules. Change-Id: Ib234c2673f4ee93cc8a3282fac69bcfcfaebd0ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-10-272-0/+77
|\| | | | | | | Change-Id: I94cb5a7dab97cff3591bac534228bfd3e3ad5938
| * Support the qApp macro correctly, final version incl. debugChristian Tismer2017-10-272-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For short the new features: - there is a qApp in QtCore, QtGui and QtWidgets for compatibility, and also in __builtins__ for a true macro-like experience. - if you delete any qApp variable, the Q*Application is reset and you can start over. Long description: There is a qApp macro in Qt5 which is equivalent to Q*Application.instance() . Python does not have macros. Both PyQt5 and PySide2 have an according structure in QtWidgets. In the case of PySide2, the qApp variable is first initialized to None and later to QApplication(). This does not reflect the original sense of the qApp macro, because - it only handles QApplication, - it does not handle destruction. This "macro" should live in QtCore, but both PyQt5 and PySide2 decided to put this in QtWidgets. As a compromize, I propose to put qApp into all three modules, and into __builtins__ as well, so wherever you create an application, you find this "macro" in place. While changing the code, I stumbled over the template set_qapp_parent_for_orphan. I tried to make sense out of it and finally removed it. There were no side effects but bug PYSIDE-85 is gone, now. With some extra effort, I created a singleton qApp that changes itself. This way, a true macro was simulated. Note that this was not possible with a garbage collected variable, and I had to make shiboken aware of this. As the final optimization, I turned qApp also into a fuse variable: Delete any qApp variable and Q*Application will finish when there is no extra reference. Task-number: PYSIDE-85 Task-number: PYSIDE-571 Change-Id: I7a56b19858f63349c98b95778759a6a6de856938 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-09-282-0/+154
|\| | | | | | | Change-Id: I47521e21977b1f17fcc65590f565270b2440a48b
| * Signature: Improve error reportingChristian Tismer2017-09-251-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | It is likely that with Qt 5.9 we get new signature text that is not recognized. This becomes a problem because COIN takes much time. This patch does not stop on the first parser error, but collects all warnings and raises an error at the end. Task-number: PYSIDE-510 Change-Id: I898e0a7a59e8313c115d7ce8160908bf85d4140c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Implement introspection with __signature__ packageChristian Tismer2017-09-202-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature module was turned into a package under 'PySide2/support/signature'. The package is completely isolated so that nothing is leaking into the normal import machinery. The package is also not initialized unless a __signature__ attribute is accessed. The only change to Python during a PySide run is the existence of the __signature__ attribute. As a side effect, all tests run at the same speed as before this extension. The module does not actively import PySide modules. Instead, it inspects sys.modules and reloads its mapping.py if needed. Example usage: >>> PySide2.QtWidgets.QGraphicsAnchorLayout.addAnchors.__signature__ >>> PySide2.QtWidgets.QGraphicsAnchorLayout.__signature__ The module has been thoroughly tested on macOS. I consider this ready. Task-number: PYSIDE-510 Change-Id: Ibb231a7fbb4ccc1a7249df55e3881a4e21a19c0d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Bump minimum required CMake version to 3.1Alexandru Croitor2017-07-271-1/+1
| | | | | | | | | | | | | | | | | | Shiboken uses C++11 features, and thus the CMAKE_CXX_STANDARD setting needs to be set in the CMakeLists.txt file. The setting was introduced in CMake version 3.1.0. Thus we bump the minimum required version. Change-Id: Ic93dc76440930a19945bbd95461fc5859f2df0d0 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-07-141-1/+2
|\| | | | | | | Change-Id: I1dd2958b252b82e8699e8d2212afdce0086a16d2
| * Fix Windows module extensions and tests to work with --debug buildAlexandru Croitor2017-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same imp.get_suffixes() mechanism as on Unix, to determine the suffix part of module extension files. This fixes debug builds to work on Windows. Note that the whole build stack has to use the same configuration, no mixing is allowed on Windows. For release build you need: python.exe + setup.py without --debug flag + release build of Qt5. For debug build you need: python_d.exe + setup.py with --debug flag + debug build of Qt5. Change-Id: I6188c859b5757d11e87d6a9e32b9ba558f7f609e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Improve suffix names for shared libraries and cmake config filesAlexandru Croitor2017-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change decouples the naming of general shared libraries, python module extensions, and cmake configuration files. All of them are now computed depending on the python version and python build configuration, and can also be manually set via CMake variables. The module extensions names now use the most detailed 'import' prefix, which usually informs whether a debug or release python was used, or the Python ABI flags (for Python >= 3.2). When a debug Python interpreter is used for building PySide2, the preprocessor define Py_Debug is now correctly propagated to PySide2 sources, which fixes previous crashes in debug builds. This affects only Linux and macOS builds. There is a subsequent change for making it work for Windows builds. All in all, this now allows proper mixing of debug / release versions of the Python interpreter with debug / release versions of PySide2 on Linux and macOS. Task-number: PYSIDE-508 Change-Id: I88a05c3ada0fb32c7c29bdb86d7a2c15acc963b8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-07-102-0/+45
|\| | | | | | | Change-Id: I9d55ec493763dc9536d7926d428aecf75c10a72d
| * Simplify the test for loading modulesChristian Tismer2017-07-102-0/+45
| | | | | | | | | | | | | | | | | | | | Some time ago, I added the test file that makes sure that all modules can load. This file needed to repeat for each module without any other tests. Now we have a real "PySide2.__all__" variable, and we can remove these tests in favor of one simple test. Change-Id: I96d91e749c134f30afc30751abb874ede2639d10 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-06-231-1/+4
|\| | | | | | | Change-Id: Ieeaa4659753416315a619d0b683a3e5a4c8ed54e
| * Silence some build warnings when building pysidetestAlexandru Croitor2017-06-231-0/+3
| | | | | | | | | | | | Change-Id: I91a1c87e6153a65a6e4088a41fbe0f696c2dd058 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Remove incorrect dependency in pysidetest targetAlexandru Croitor2017-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Even though the final library name is libpyside, the actual target that generates that file is called pyside2, as indicated by the project(pyside2) command in the CMakeLists.txt file. Also set the CMake policy of not ignoring incorrect dependencies. Change-Id: Iba65dfd5fe7e34e7557c756a838017fe48f0ffd5 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-06-024-6/+6
|\| | | | | | | Change-Id: Ia6485d1b1caa93c4ecdd02b0544f19d197a43fb0
| * pysidetest_delegatecreateseditor_test: Add QtWidgets dependencyFriedemann Kleint2017-06-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | The test was failing since the method TestView::setItemDelegate(QAbstractItemDelegate *) was rejected due to QAbstractItemDelegate being unknown. Fix by adding the dependency to QtWidgets. Task-number: PYSIDE-431 Change-Id: I65c3690eccfdd55b310f45d65a2b0d8c32bedd36 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * libpyside: Use Q_SLOTS instead of slotsFriedemann Kleint2017-06-021-1/+1
| | | | | | | | | | | | | | | | | | When mixing Python and C++, Qt needs to be used with 'CONFIG += no_keywords' to suppress the 'slots' macro definition, which clashes with a Python header. Task-number: PYSIDE-526 Change-Id: I4feeae2de21db712b4de6653e243d556623436a1 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Fix typos in licensesFriedemann Kleint2017-05-301-3/+3
| | | | | | | | | | Change-Id: I781418f8747d51a0d329c0562e076600989b3768 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * move everying into sources/pyside2Oswald Buddenhagen2017-05-2229-0/+2202
| | | | | | 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-2229-0/+2221
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.