aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6
Commit message (Collapse)AuthorAgeFilesLines
...
* QtHttpServer: Fix build after API review changeFriedemann Kleint2024-09-092-11/+12
| | | | | | | | | | | Adapt to qthttpserver/6acb3ccf221923a19118b3f3b15ffbebb3f33d4c. The example will be fixed in a follow-up change. Task-number: QTBUG-128113 Task-number: PYSIDE-2620 Change-Id: Ic454bcb8a37aa89ef6e9718df6dd8a7135e0b36c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QFix compilation of QDirListing helper codeFriedemann Kleint2024-09-091-2/+2
| | | | | | | | | Use a sentinel for end, adapting to qtbase/089263fd4f1db201c98f4200cbb6ecdad8a437c3 . Task-number: PYSIDE-2620 Change-Id: If3f8d745b405e7c4e8d8c8d72ef4c2411b2d703e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* type hints: Fix some systematic problemsChristian Tismer2024-09-063-83/+83
| | | | | | | | | | | | | | __str__ and __repr__ are simply fixed by returning str instead of PyObject. __reduce__ actually has return type "str | tuple[Any, ...]", but using str here too fits the purpose. Errors before: 533 Errors after: 450 Change-Id: I6dd3527d3f5f3f035e667d0ca3c8f123e94e844f Task-number: PYSIDE-2846 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add QDirListingFriedemann Kleint2024-09-055-0/+140
| | | | | | | Task-number: PYSIDE-2620 Change-Id: I4e4826c5ab01a36022f43d2aa7d23558e6964a66 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Adapt to 6.8Friedemann Kleint2024-09-0524-177/+306
| | | | | | | Task-number: PYSIDE-2620 Task-number: QTBUG-125719 Change-Id: I6efeb1770c9bd7cddc3dbd91ca6294b9fddc9cc9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide: Fix QByteArray.fromRawData() signatureShyamnath Premnadh2024-08-231-0/+3
| | | | | | | | | | | | | | | | | | | - For some reason, libclang after parsing the headers ignores the `const` qualifier in the `data` parameter of the `QByteArray::fromRawData()`, making the paramerter `char*`. `char*` maps to `typing.Union[bytes, bytearray, memoryview]` which causes the issue. The expected correct type for the `data` parameter is `str` in Python. - This patch explicitly specifies the pyi-type as `str` thereby overriding the default `char*` type. Note: This patch is a workaround for the issue. The actual issue should be fixed in the libclang, if it is fixable. Fixes: PYSIDE-2831 Pick-to: 6.7 6.5 6.2 Change-Id: Iee3f6a54e1d65e9e4cb0082b7b6b17ba9ac501aa Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Reimplement signal connections for Python callables not targeting ↵Friedemann Kleint2024-08-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a QMetaMethod The code previously used a instances of class GlobalReceiverV2 inheriting QObject in a hash in SignalManager per slot tracking the list of senders to be able to use standard signal/slot connections in Qt. This was a complicated data structure and had issues with cleanups. This has been replaced by using an invoker object based on QtPrivate::QSlotObjectBase which can be passed to QObjectPrivate::connect(const QObject *, int signal, QtPrivate::QSlotObjectBase *, ...). The connections (identified by ConnectionKey) are now stored in a hash with QMetaObject::Connection as value, which can be used to disconnect using QObject::disconnect(QMetaObject::Connection). Deletion tracking is done by using signal QObject::destroyed(QObject*) which requires adapting some tests checking on the connection count and weak ref notification on receivers as was the case before. [ChangeLog][PySide6] Signal connections for Python callables not targeting a QMetaMethod has be reimplemented to simplify code and prepare for removal of the GIL. Task-number: PYSIDE-2810 Task-number: PYSIDE-2221 Change-Id: Ib55e73d4d7bfe6d7a8b7adc3ce3734eac5789bea Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix hangs when calling QMediaPlayer.setSource() several timesFriedemann Kleint2024-08-211-0/+1
| | | | | | | Pick-to: 6.7 Fixes: PYSIDE-2843 Change-Id: I2e3476605d2818d20159ce945856d24dab26ff86 Reviewed-by: Christian Tismer <tismer@stackless.com>
* pyi: improve findChild/findChildren type hintsCristián Maureira-Fredes2024-08-161-3/+3
| | | | | | | | | | | Add a TypeVar that's bound to QObject in order to use it as a generic QObject-based for the returns of both findChild and findChildren. Fixes: PYSIDE-2517 Pick-to: 6.7 6.5 6.2 Change-Id: I165cdc391bd7b57df95247202170d6fa9d2aa824 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* WebView: Make QtWebView depend on WebEngine foundShyamnath Premnadh2024-08-131-1/+1
| | | | | | | | | | - Make QtWebView depend on WebEngineCore and WebEngineQuick when building for Windows or Linux. - Additionally, fix the dependency to not target APPLE. Pick-to: 6.5 6.7 Change-Id: Idfa17ef2ab290cc7ca08364a3e4a98d171f10324 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6/__init__.py replace runtime list of modules for static oneCristián Maureira-Fredes2024-08-071-3/+1
| | | | | | | | | | This aims to fix the issues that static analysis tools might have when exploring the PySide available modules. Fixes: PYSIDE-2836 Pick-to: 6.7 6.5 6.2 Change-Id: If37795acb68feb71df4934a15e3f0543a085ab33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix clang warning: lambda capture 'count' is not used [-Wunused-lambda-capture]Friedemann Kleint2024-08-011-1/+1
| | | | | | | | | It shows up in macOS builds: qcoreapplication_wrapper.cpp:2200:44: warning: lambda capture 'count' is not used [-Wunused-lambda-capture] Pick-to: 6.7 Change-Id: Ie886c9e4f23c8da61096e7c95129d44c04fb072e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add QtWebViewShyamnath Premnadh2024-07-312-0/+47
| | | | | | | | | [ChangeLog][PySide6] QtWebView has been added. Pick-to: 6.5 6.7 Task-number: PYSIDE-2825 Change-Id: I4617cb6b170b37c232ba55aa8be374f150604105 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyi: fix QFormLayout.getLayoutPosition hintCristián Maureira-Fredes2024-07-301-3/+3
| | | | | | | Change-Id: I040044be236f83546424c8621d95a86a068cddeb Fixes: PYSIDE-2788 Pick-to: 6.7 6.5 6.2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Add clarifying commentsAdrian Herrmann2024-07-192-6/+18
| | | | | | | | | | | Add a few more clarifying comments regarding to previous bug fixes or non-obvious variable usages. Pick-to: 6.7 Task-number: PYSIDE-2644 Task-number: PYSIDE-769 Change-Id: Ic4db10510e1adf8141efa83d727f519547d67b24 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QtAsyncio: Don't cancel handleAdrian Herrmann2024-07-161-2/+1
| | | | | | | | | | | | | | | It is not necessary to cancel a task's handle when cancelling said task, as the step function already handles the cancellation. Furthermore, cancelling the handle can cause issues with TaskGroups if an exception is raised inside the TaskGroup's context, where the tasks inside the group are not allowed to properly cancel and thus block the program. Pick-to: 6.7 Task-number: PYSIDE-769 Fixes: PYSIDE-2799 Change-Id: I1ab782380ffbe8c1ec40aba22b9ed2ebdcb1498f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtAsyncio: Add cancel count and uncancelAdrian Herrmann2024-07-161-9/+18
| | | | | | | | | | | | | | | | Implement the QAsyncioTask.uncancel() function and the associated cancel count. Note to reader: Unlike what the name suggests, the uncancel() function on its own does not undo a task cancellation. This must be performed by consuming the CancelledError exception, at which point uncancel() serves to remove the cancellation state. Pick-to: 6.7 Task-number: PYSIDE-769 Fixes: PYSIDE-2790 Change-Id: I4e817e1dd3f49179855432d20ed2f043090fd8f1 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add Fixme comment about QLabel::setMovie()Friedemann Kleint2024-07-081-0/+1
| | | | | | Task-number: PYSIDE-2808 Change-Id: I8675a2a70d4269081b3fe884fedc6dba2a712aaa Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QtAsyncio: Add messages to NotImplementedErrorsAdrian Herrmann2024-07-081-29/+33
| | | | | | | | | | | | Add explanatory messages to NotImplementedError exceptions for less confusing debugging. Pick-to: 6.7 Task-number: PYSIDE-769 Task-number: PYSIDE-2565 Change-Id: Id27afec471668fa2e47a6895ef6f9d8dc5842dee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Shiboken: Get rid of the fullName field in generated codeChristian Tismer2024-07-051-1/+2
| | | | | | | | | | | | | | | | | This patch does the actual removal of the fullName field. Unfortunately, not all fields can be removed but only the ones which are reachable by the TypeInitStructs. (meanwhile less than 500) This result is pretty much better (at least on macOS), so we would not want to optimize it any further. Many thanks to Friedemann's help with improving the generator and removing the quirks that I could not solve. Task-number: PYSIDE-2701 Change-Id: Ie350766c450da1d86359c4e24c313ade3146233f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QMessageBox.open() with a slotFriedemann Kleint2024-07-044-20/+14
| | | | | | | | | Extract a helper function from QTimer::singleShot() implementation and use that to implement it. Fixes: PYSIDE-2805 Change-Id: Ib758d355b36c598052cfa495b53d7da423999976 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Avoid parenting of QNetworkReply on QNetworkAccessManager in request functionsFriedemann Kleint2024-07-021-6/+50
| | | | | | | | | Suppress return value heuristics for them. Pick-to: 6.7 Task-number: PYSIDE-1057 Change-Id: Id249d8c769f808600545f7a48861bd4fe7eae6fe Reviewed-by: Christian Tismer <tismer@stackless.com>
* Avoid parenting of QModbusReply on QModbusClient in the request functionsFriedemann Kleint2024-07-021-1/+22
| | | | | | | | | Suppress return value heuristics for them. Pick-to: 6.7 Task-number: PYSIDE-2793 Change-Id: I4ebf8c971b02fb00b9c6658b02157eb26d71f418 Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtAsyncio: Use modern typing syntaxAdrian Herrmann2024-06-284-87/+81
| | | | | | | | | | | We can already use the modern typing syntax introduced with Python 3.10 in 3.9 via future statement definitions, even before we raise the minimum Python version to 3.10. Task-number: PYSIDE-769 Task-number: PYSIDE-2786 Change-Id: I560d0c25f3503217f920906a5b26193282b0247b Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtAsyncio: Properly document run() argsAdrian Herrmann2024-06-271-1/+19
| | | | | | | | | Properly document the arguments to QtAsyncio.run() with a docstring instead of leaving it only to the module rst. Task-number: PYSIDE-769 Change-Id: Ia4d63b3cdf81d052203a2752ed3ca6cb0b40f814 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Remove application arg from loop policyAdrian Herrmann2024-06-272-8/+7
| | | | | | | | | | | | | Remove the optional application argument from the constructor of QAsyncioEventLoopPolicy, as it is unnecessary. If a QCoreApplication or other type of qApp was created outside of QtAsyncio, it will always be retrieved by QCoreApplication.instance(), and therefore passing it as an argument makes little sense. Task-number: PYSIDE-769 Change-Id: Iac7a913a1c9d6ebbb0984fe11f8b5cda955baab1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6/QML: Fix Qt properties of type QAbstractItemModelFriedemann Kleint2024-06-261-1/+2
| | | | | | | | | | | Add a metatype registration for the class for them to work. [ChangeLog][PySide6] Properties of type QAbstractItemModel can now be used in QML. Pick-to: 6.7 Change-Id: I3c0c08175a09f1decb00726b65edc73746fa71a7 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-207-0/+7
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* QtAsyncio: Clarify usage of singleShot w/o contextAdrian Herrmann2024-06-181-1/+4
| | | | | | | | | | | The singleShot overload that accepts a context argument was used inside the do() method of the QAsyncioExecutorWrapper class, but this usage was unnecessary and adds confusion. Task-number: PYSIDE-769 Change-Id: Idcdd99eda6ae3bfd11ec50b9a42ff15ade005cc9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* libshiboken: Fix some static analysis warningsFriedemann Kleint2024-06-181-0/+1
| | | | | | | | | | | | - Initialize variables - Use auto * - Use range-based for - Move '#include "sbktypefactory.h"' from basewrapper.h to shiboken.h (for use by the generated code) - Fix some int types (Py_ssize_t/size_t) to avoid lossy conversions Change-Id: I7cc8b33850afcd07cc8f9a115e56a77cbacd58b0 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Android Deployment: Build wheels with macOS hostShyamnath Premnadh2024-06-031-0/+9
| | | | | | | | | | | | - Additionally, also move setting Python_SOABI manually for Android to where FindPython CMake module is called. This also aids in naming the wheel correctly. Pick-to: 6.7 Task-number: PYSIDE-2766 Change-Id: I73c089d31e2ee629f3ed676965fca27d53882110 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Improve documentation (part 3)Adrian Herrmann2024-05-301-5/+14
| | | | | | | | | | Improve the inline documentation of QtAsyncio with more comprehensive comments. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: Ia25bab88de3cb66178ced15fe3b2a4d35e9c09a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix suppressed exceptions for 0-delay singleShotAdrian Herrmann2024-05-271-0/+2
| | | | | | | | | | | Fix an issue where exceptions were not shown when raised inside a slot called from a zero-delay singleshot timer, causing problems further down the line. Pick-to: 6.7 Fixes: PYSIDE-2745 Change-Id: Iab7696663e5dfa00d99d28ee21ac687fde4cf731 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix type hint of QModelIndex.internalPointer()Friedemann Kleint2024-05-221-0/+2
| | | | | | | | | | | | It returns the item passed to createIndex(). Amends c8970b29d76415d41fa383cbe5eb77eefb191fa1. Pick-to: 6.7 Fixes: PYSIDE-2762 Task-number: PYSIDE-883 Change-Id: I0fd33b4958513db9355af9147033872ef335c07e Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* PySide6: QNetworkAccessManager.setCache() takes ownership of cache objectPhilipp Wolfer2024-05-171-0/+5
| | | | | | | Fixes: PYSIDE-2759 Pick-to: 6.7 Change-Id: I0aa203a868ea37e07fc51ea892a11038bcc6faab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QAccessibleSelectionInterfaceMichael Weghorn2024-05-162-0/+2
| | | | | | | | | | | The interface was added as preliminary in qtbase commit 9d16d5e2245c26e5746fd7609300b84a2a983457 and is no longer preliminary since qtbase commit 2496882ea71b8bc52c84e1b9c59cfd48cd56c6f2. Pick-to: 6.7 Change-Id: I8a24aa2a7a1cd961bdc9974f41d407783ad1a82b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyi: fix QItemSelection.__init(self) returning wrong typeFrancisco Boni2024-05-161-2/+3
| | | | | | | | | QItemSelection as return-type attribute is unnecessary to make the function known to shiboken. And it was mistakenly setting it as the return type in the Python signature. Pick-to: 6.7 Fixes: PYSIDE-2756 Change-Id: I1f7a4355f483e968839dad34d0e9b9cee8fa06b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Python 3.12: Avoid issues with reference counting of immortal Python typesFriedemann Kleint2024-05-162-5/+6
| | | | | | | | | | Use the PY_RETURN_* macros for returning them. Pick-to: 6.7 6.5 Task-number: PYSIDE-2747 Change-Id: I48db8b958925e6ae39ce8ae8fb926429d0e4cd02 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add missing QQuickWebEngineProfile.setUrlRequestInterceptor() and othersFriedemann Kleint2024-05-162-2/+12
| | | | | | | | | | | QtWebEngineQuick was missing the dependency to QtWebEngineCore and thus rejected the function due to missing class QWebEngineUrlRequestInterceptor. Fixes: PYSIDE-2758 Pick-to: 6.7 Change-Id: I334a9c6899b1093d27d39cdb57e84f4b5aed6d65 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix build for Tech Preview classesFriedemann Kleint2024-05-152-4/+4
| | | | | | | | | Header QSurfaceDataProxy no longer exists after qtgraphs/b023ef4ef5686656437be0795099de2be0ac216f . Pick-to: 6.7 Change-Id: Iaca9d85208ec22d19d5eb240f77cc83987146e49 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix undesired invalidation of QObjects/QWidgets after calling parent(Widget)()Friedemann Kleint2024-05-142-6/+0
| | | | | | | | | Remove setting of parent relationship to the return values of QObjects.parent(), QWidget.parentWidget(). Fixes: PYSIDE-2711 Change-Id: Ib6fbcea4b1ecd0efa95d9e4c71dccc5cd0d365aa Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Add more doc file hints for QML functionsFriedemann Kleint2024-05-131-3/+6
| | | | | | | | | Complements ad5eb64daaaa1b927bcbf9e568738f417fef845f. Pick-to: 6.7 Task-number: PYSIDE-1106 Change-Id: I0ae554db3be02d6160e7e00af46f21ff0a34cca8 Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtAsyncio: Improve documentation (part 2)Adrian Herrmann2024-05-103-8/+43
| | | | | | | | | | Improve the inline documentation of QtAsyncio with more comprehensive comments. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: I7306da43d8f1f350dae188f5346cdec8f60a7a06 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtAsyncio: Improve documentation (part 1)Adrian Herrmann2024-05-101-3/+110
| | | | | | | | | | Improve the inline documentation of QtAsyncio with more comprehensive comments. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: I3828dea94f770a69e8d0390fd803b923ba932fc2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Shiboken: Simplify Python Error MessagesChristian Tismer2024-05-106-25/+13
| | | | | | | | | | | | | | | | | | | The function PyErr_SetString is used quite often, which has no return value. The bracketed sequence PyErr_SetString(...); return nullptr; can in most cases be replaced by a single call to return PyErr_Format(...); To simplify matters, PyErr_Format is now used everywhere. Task-number: PYSIDE-2404 Change-Id: I5988fcd2430be700415d14d7a5cc740211e61d08 Pick-to: 6.7 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix type hint of QTranslator.translate()Friedemann Kleint2024-05-101-0/+5
| | | | | | | | | The function takes strings like the other translate() functions. Pick-to: 6.7 6.5 Fixes: PYSIDE-2748 Change-Id: I331ba045276192c6f83ddae3f1a24459a9570bfa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Generate polymorphic bases into type discovery functionsFriedemann Kleint2024-05-063-4/+4
| | | | | | | | | In case of a chain QLabel->QWidget->QObject; QWidget should be marked as a polymorphic base and checked for example for functions returning a QWidget *. Change-Id: I44306d6635794119e6f18658a438e64160c5c41c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Improve readability of _stepAdrian Herrmann2024-04-241-10/+9
| | | | | | | | | | Improve the readability of the QAsyncioTask._step function; avoid nested try/except blocks. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: Ibb82c50cf93b084b30dd2a5abcc0197ae25802e0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add some missing classesFriedemann Kleint2024-04-2229-5/+125
| | | | | | | | | | | | Identified by the script added by 1251a23cfd13bb0652f38ef3b36087034f552d57. [ChangeLog][PySide6] A number of missing classes have been added. Task-number: PYSIDE-487 Pick-to: 6.7 Change-Id: Ia62aab2578d46f00540856557474bc394669613f Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* QtAsyncio: Round handle timeoutsAdrian Herrmann2024-04-221-1/+2
| | | | | | | | | | | | Handle timeouts should be rounded up or down instead of only up as happens with a plain int() call. Otherwise, a timeout of e.g. 0.9 would be handled as 0, where 1 would be more appropriate. Pick-to: 6.7 Task-number: PYSIDE-2644 Task-number: PYSIDE-769 Change-Id: I19585010c3e007afb6ae83750e4b6ffc9beb5961 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>