aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests
Commit message (Collapse)AuthorAgeFilesLines
* Implement default __ne__ and __eq__ for all PySide typesAlex Hughes2020-09-082-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PySide types have been following the Qt implementation of comparisons, completely. This is not correct for Python, because the Python default has the operators `==` and `!=` at least. They are needed for tests like `obj in collection`. We fix this by redirecting the default case to `PyBaseObject_Type.tp_richcompare`. This is the correct way to fix it, because for types which do not define `tp_richcompare', this is the default, anyway. From the original patch, the test case is still in use. Old message: Implement __ne__ and __eq__ for QTreeWidgetItem Testing if a QTreeWidgetItem belongs to a list raises a NotImplementedError. I have exposed the operator== and the operator!= from C++ to shiboken which has solved our eq operator issue. Implemented the test from PYSIDE-74 for the QTreeWidgetItem eq operator and the ne operator. This also allows us to have the behavior "QTreeWidgetItem in ['a']" and "QTreeWidgetItem not in ['a']". Adding qtreewidgetitem_test.py to CMakeFiles.txt Fixes: PYSIDE-74 Change-Id: Id221c0163fc8c2d85730c4c26f22db5f61710706 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix up qprocess_test.pyFriedemann Kleint2020-09-031-1/+2
| | | | | | | | | | Fix deprecated API and wait for the process to finish, fixing: DeprecationWarning: QProcess.start(const QString & command, QFlags<QIODevice::OpenModeFlag> mode) is deprecated p.start("dir") QProcess: Destroyed while process ("dir") is still running. Change-Id: Ib1705c9723fa1e72ea650d6f541506b62487aff7 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Port some tests away from deprecated APIFriedemann Kleint2020-08-182-9/+13
| | | | | | | | | | | Use QRandomGenerator instead of deprecated qsrand() and remove usage of deprecated QPolygonF constructor taking the size. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ic4b773772555716636f5dfec797052a945d431cd Reviewed-by: Christian Tismer <tismer@stackless.com>
* feature-select: optimize feature access to the feasible maximumChristian Tismer2020-07-311-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** fix: MSVC needs extra sign bit in basewrapper_p.h! Buglet? ** The new feature selection has some tiny overhead. It is about two dict accesses plus a slot access for every tp_(get|set)attro call. The introduction of an explicit `__init_feature__` call allows to optimize this overhead very nicely, because this init is done for each __feature__ import: First, we can remove that tiny overhead completely by not initializing the feature_select module at all if no __feature__ import is used. Second, we can optimize this access further by caching the current module dict. If the dict is unchanged, then the last select_id can be used. This reduces the overhead of frequent calls to a single slot access. Third, we finally cache the select id in unused SbkObjectType bits. That removes the last structure where repeated attribute lookup is used. The overhead is therefore quite small when something is changed. But typically these changes are infrequent. The majority of accesses do change nothing, and this case is now quite much optimized. Change-Id: I7d1a4611a1c19216fd9be8f04457bb18ebd52ab1 Reviewed-by: Christian Tismer <tismer@stackless.com>
* feature-select: allow snake_case instead of camelCase for methodsChristian Tismer2020-07-243-8/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Test signal_arguments.py: Use Qt Quick Controls 2Friedemann Kleint2020-07-232-2/+3
| | | | | | | | | Qt Quick Controls 1 is deprecated and has been removed in Qt 6. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: If70fde907c3984b0593186a9b570a921f270d45c Reviewed-by: Christian Tismer <tismer@stackless.com>
* feature-select: Implement a selectable feature frameworkChristian Tismer2020-07-102-0/+106
| | | | | | | | | | | | | | | | | | | | | 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>
* qfontmetrics_test.py: Stop using deprecated APIFriedemann Kleint2020-07-031-1/+1
| | | | | | Task-number: PYSIDE-904 Change-Id: Ie69503e27d7cefc957c20c4eb1e618f03db1f771 Reviewed-by: Christian Tismer <tismer@stackless.com>
* QByteArray::number(): suppress small integer types as is for setNum()Friedemann Kleint2020-07-031-0/+8
| | | | | | | | Otherwise, overflow errors can occur. Task-number: PYSIDE-904 Change-Id: I42486a27bcdb8e7562d411b4519d2e61f315be1d Reviewed-by: Christian Tismer <tismer@stackless.com>
* basewrapper.cpp: add PyErr_Fetch/Restore in SbkDeallocWrapperCommon()Kyle Altendorf2020-07-012-0/+86
| | | | | | | | | | | | | 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>
* Add QObject.findChildren(QRegularExpression)Friedemann Kleint2020-06-261-2/+5
| | | | | | | | | Replacing the deprecated QRegExp version in Qt 6. Merge identical code snippets. Task-number: PYSIDE-904 Change-Id: Id6f5c39379c65cf71fb6352531173d0fd7f2ae5e Reviewed-by: Christian Tismer <tismer@stackless.com>
* Implement the QEnum/QFlag decorator, V2Christian Tismer2020-06-151-9/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implementation allows module-level and scoped QEnums which are Python enum types. Scoped types are registered in Qt's meta object system. Usage of QEnum/QFlag with decorator or function call: from enum import Enum, Flag, auto from PySide2.QtCore import QEnum, QFlag, QObject class Compass(QObject): @QEnum class Orientation(Enum): North, East, South, West = range(4) class Color(Flag): RED = auto() BLUE = auto() GREEN = auto() WHITE = RED | BLUE | GREEN QFlag(Color) Fixes: PYSIDE-957 Change-Id: Ie15f45cbd932c816b50724a96eee0c14ae1fdee8 Task-number: PYSIDE-487 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QtQuickControls2Cristian Maureira-Fredes2020-05-261-0/+1
| | | | | | | | | 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>
* QtSerialPort improved unit testsAndreas Buhr2020-05-261-6/+43
| | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-05-264-4/+141
|\ | | | | | | Change-Id: I9c7163094bc934f481002adcea78ef4928ed26be
| * Add QtUiTools.loadUiTypeCristian Maureira-Fredes2020-05-251-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | 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: Fix refcounting leakChristian Tismer2020-05-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Support pickling of Qt Enum objectsChristian Tismer2020-05-181-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Implement __qualname__ and correct __module__ for classesChristian Tismer2020-05-162-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | pyside2: Prepare build system for Qt 6Friedemann Kleint2020-05-184-22/+33
| | | | | | | | | | | | | | | | | | | | | | - 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 support for QSerialPortAndreas Buhr2020-05-152-0/+59
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-04-295-15941/+4697
|\| | | | | | | Change-Id: Ia9c2e8c7e4fb3665a78020ed154ab9a103368bd1
| * signature: Fix and simplify for mypy compatibility, Part 2Christian Tismer2020-04-225-15945/+4697
| | | | | | | | | | | | | | | | | | 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>
| * signature: Fix and simplify for mypy compatibilityChristian Tismer2020-04-214-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-04-072-0/+133
|\| | | | | | | Change-Id: Id9d77dcbb396227a670e4455031ce074488c9e17
| * shiboken: Fix Qt properties not working in classes inheriting QObjectFriedemann Kleint2020-04-052-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-03-254-12/+67
|\| | | | | | | Change-Id: Ibcd8a3b5c6d1d2f636fd21b162c67a85e727c2c4
| * PySide2: Use int for QVariant conversion when possibleFriedemann Kleint2020-03-252-5/+18
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Add functions with callback of QWebEnginePageFriedemann Kleint2020-03-242-7/+49
| | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-03-062-0/+83
|\| | | | | | | Change-Id: I116f2abfda7263fac8a31ffbe8fc82bfa0cbc618
| * Accept EnumMeta as a valid Signal typeCristián Maureira-Fredes2020-03-042-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Including a check for Python EnumMeta types to not consider them as a normal PySequence allows the decision to use the default PyObject wrapper case. Using the 'object' type is currently the workaround, so this allow the users to use the Enum class instead of declaring the signal with 'object'. class A(Enum): a = 1 b = 1 # Workaround # signal = Signal(object) # With this patch signal = Signal(A) A test case was added. Fixes: PYSIDE-239 Change-Id: Ib593dba5a988eceb8b1bfae097768e9ec02be6d5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-03-04482-435/+2559
|\| | | | | | | Change-Id: I7a94c67fdb9225edf4d605e67839a1f6f7375c2a
| * Fix running the PySide2 tests for Python 3.8/WindowsFriedemann Kleint2020-02-28479-332/+2512
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, DLL directories can no longer be specified via the PATH environment variable. They need to be added via os.add_dll_directory(). In order to fix this, move the entire environment setup from CMake to a python helper and set the environment variables BUILD_DIR and QT_DIR pointing to the build directory and Qt directory, respectively, from CMake. In addition, this has a huge advantage: The tests can also be executed much more easily without ctest from the command line by just setting BUILD_DIR and QT_DIR instead of a complex manipulation of PATH/LD_LIBRARY_PATH. Change-Id: I7d518ccab19ca184c3112a126c779d4a6d7c6c5e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Unify the py3kcompat.py test helpersFriedemann Kleint2020-02-273-103/+47
| | | | | | | | | | | | | | Put everything into a single file and mark them as copies. Change-Id: I782247520d6976695a14f762e8247e5c4eb46aac Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-02-271-6/+33
|\| | | | | | | Change-Id: I64cb93d53a2811ba695820501287902995140f9a
| * Fix web_engine_custom_scheme.pyFriedemann Kleint2020-02-241-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a flag to distinguish timeouts from successful loading. Register the scheme properly and set "Path" syntax, fixing the warning: Please register the custom scheme 'testpy' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler. Add required initializations of QWebEngine and embed the view into a top level widget, as using a QWebEngineView as a top level on Windows hangs. Change-Id: Id39a6b14606795216994928ad82f60435f4caaca Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-02-244-51/+6
|\| | | | | | | Change-Id: I587b40f07da85d431d4fdb6f98259a9be0bb73e5
| * Turn qApp into a normal Python variable, finallyChristian Tismer2020-02-214-51/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a long odyssey of more or less unpythonic compromizes, the qApp "macro" would finally be moved into a normal variable without surprizes. This was only possible since we removed qApp from QtWidgets and other modules. Otherwise, from PySide2.QtWidgets import * would pull qApp, being the constant "None", into main and shadow the true qApp variable in the builtins. By inserting qApp into the builtins, only, we make sure that this variable is always freshly looked up, without making it change its contents. DONE... + change the singleton code to normal + rename to MakeQAppWrapper + simplify the implementation + fix new bug concerning duplicate applications + check very much for refcounting bugs + review the rest of the implementation and further simplify Note... The Q*Application variable will not be turned back into a GC variable. This is not worth the effort. Fixes: PYSIDE-571 Change-Id: Idbd158c083318e6b0dfe48d62485c68c90e944de Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | shiboken: Add a test for smart pointers used in different librariesFriedemann Kleint2020-02-211-2/+2
|/ | | | | | | | Generate different instantiations in libsmart and libother. Task-number: PYSIDE-1024 Change-Id: Id29cea65e48209fa226ce3142f3af72b99bf4662 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Pyside2/tests: Split the helper moduleFriedemann Kleint2020-02-20205-373/+535
| | | | | | | | | | The classes of the helper module were defined in the __init__.py file with complicated logic to test for presence of the modules. Split the classes apart and empty the __init__.py file (still required for Python2). Change-Id: I4f4971f9a48e2961233da5585aa0df53bfbb9c7a Reviewed-by: Christian Tismer <tismer@stackless.com>
* Make PySide2 tests using the helper modules from 'util' self-containedFriedemann Kleint2020-02-19224-74/+1001
| | | | | | | | | | Add the relative import path to locate the modules "helper" and "py3kcompat". The tests can then be launched from the command line without the ctest environment. Change-Id: Ia50663d7381b52cb248de3e4d23002a195ca9139 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Improve the libdir for windowsCristián Maureira-Fredes2020-02-181-1/+8
| | | | | | | | | | | | | | | | | | With virtualenv 20 we have the case where the first path in the PYTHON_LIBRARIES cmake variable was wrong: a_virtual_env/libs/python3.lib so the python code inside the helper didn't have a proper check if the file was valid or it was just a wrong construct. Additionally, the 'prefix' variable will contain the virtual environment directory location, which will not contain the 'libs' directory, because that's included in the system's installation path. To solve this, we use the 'INCLUDEPY' directory, which is correct as a base to create the real 'libs' one. Task-number: PYSIDE-1231 Change-Id: Ifca08d74c49cd57572836a087edb96c089266dc7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix testrunner for Python 3.8/LinuxFriedemann Kleint2020-02-071-4/+18
| | | | | | | | | | | | | | | | | | | When running tests with Python 3.8/Linux, the existence_test fails: File "pyside-setup/sources/pyside2/tests/registry/existence_test.py", line 73 from init_platform import enum_all, generate_all File "pyside-setup/sources/pyside2/tests/registry/init_platform.py", line 59 from util import get_refpath, get_script_dir File "pyside-setup/sources/pyside2/tests/registry/util.py", line 113 platform_name = "".join(distro.linux_distribution()[:2]).lower() AttributeError module 'platform' has no attribute 'linux_distribution' since platform.linux_distribution() was removed in 3.8. Extract into a separate method and warn to install distro. Task-number: PYSIDE-939 Change-Id: I42d04830d51563cc3fbaddc3941c927402514480 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix PyBuffer interface for QByteArrayCristián Maureira-Fredes2020-02-051-0/+6
| | | | | | | | | | | | | For the limited API, properly implement the PyBUF_ND flag (shape requested). Otherwise, use the convenience function PyBuffer_FillInfo() to properly populate the view. Fixes: PYSIDE-1204 Change-Id: I2a4c81885cf49b25c89823577c0d7ee2f2707b87 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Let qApp be noApp instead of pretending to be NoneChristian Tismer2020-01-293-16/+9
| | | | | | | | | | | | | | | | | | | | qApp should stay almost as it is with only two cosmetic changes: When qApp's return value has Type(Py_None), the value now reports "noApp" instead of "None". Also the feature of "del __builtins__.qApp" is replaced by function qApp.shutdown() . This makes things easier to explain and avoids refcounting hacks. The embedding problem (Falkon browser) was too complicated. We finally solved it by disabling qApp in embedded mode. Change-Id: I0d99661137130684823aa3d1978b494d8ab08e59 Fixes: PYSIDE-1158 Fixes: PYSIDE-1178 Fixes: PYSIDE-1135 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix printer test in returnquadruplesofnumbers_test.py on some systemsFriedemann Kleint2020-01-241-0/+2
| | | | | | | | Setting the page margin used for comparing tuples requires a PDF printer. Ensure PDF format if no such printer can be found. Change-Id: Ie8509d4a336392cb711e210842664e238c487444 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix Python 3.8 problemsChristian Tismer2019-12-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | This patch fixes some refcounting problems with Python 3.8 . One incompatible change was announced in the what's new document, but actually there were two more problems which were not explicitly mentioned but took much time to sort out. The patch is compatible with the limited API changes (tested with debug build and API error disabled). It is also independent of the Python version which is full Limited API support. For more info, see the documentation mentioned below. The flag error is circumvented now! We either find a better solution or leave it as it is. For now this is ok. Fixes: PYSIDE-939 Change-Id: Iff4a9816857a6ebe86efd4b654d8921e4e464939 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-11-284-4/+4
|\ | | | | | | Change-Id: I698090a9c9fdc995e00e39873aa35f8edda0f0b1
* | Replace imp by importlibCristián Maureira-Fredes2019-11-191-4/+4
| | | | | | | | | | | | | | | | Getting rid of the DeprecationWarning Change-Id: I86370c266d502fcd0fb61a9945770354b8f87142 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Simplify recreation of registry filesChristian Tismer2019-11-072-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registry files were recreated when they do not exist. This was used to trigger recreation on a file. We now include a comment line on top of the files. #recreate # uncomment this to enforce generation By uncommenting this line, a NameError is provoked, which has the desired effect without creating huge deltas in the repository. Change-Id: Idcc1015abae504f111102e8c9851f8ef45dcbdff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>