Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* type hints: Fix QInputDialog get methodsEce Cinucen2025-05-151-0/+5
| | | | | | | | | | | QInputDialog.get* methods should accept None as parent Fixes: PYSIDE-3078 Pick-to: 6.8 6.9 Change-Id: I5e6889800040a44649f99e1e7f95ab07e127c550 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix crash retrieving a QGraphicsProxyObject from QVariantFriedemann Kleint2025-05-091-1/+1
| | | | | | | | | | | | | | | | | | Remove the default-superclass specification QGraphicsItem for QGraphicsObject since it causes the type discovery to directly cast from QGraphicsObject* to QGraphicsItem*. This crashes since QGraphicsObject inherits from QObject as first base class. The intention of the class attribute was to ensure that any QGraphicsObject class is stored as a QGraphicsItem. To preserve this, hardcode it in QVariant_resolveMetaType(). Pick-to: 6.9 Fixes: PYSIDE-3069 Task-number: PYSIDE-86 Task-number: PYSIDE-1887 Change-Id: I3704988f105b118b1e4ef8d078b68c01ba89386c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6/type system: Remove obsolete "since" attributesFriedemann Kleint2025-04-231-23/+23
| | | | | | Pick-to: 6.9 Change-Id: I184a939af6814a04f76f1047217bc9736143bd74 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Use QT_CONFIG when possibleCristián Maureira-Fredes2025-04-071-1/+1
| | | | | | | | | | A few places were still using the double negation on a couple of Qt configuration options. Pick-to: 6.9 Change-Id: Id182e7a3958af21368cb890e645dc4a2902f8260 Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* type-hints: Correct QMessagebox annotationsEce Cinucen2025-04-041-10/+30
| | | | | | | | | parent parameter of about, aboutQt, critical, information, question, and warning changed to Optional[QWidget]. Fixes: PYSIDE-3021 Pick-to: 6.8 6.9 Change-Id: I31e556933f25f6c21e18debb274db6a13ffbe2ed Reviewed-by: Christian Tismer <tismer@stackless.com>
* type hints: Add optional to QTreeWidget.setItemWidgetEce Cinucen2025-03-271-1/+1
| | | | | | | | Fixes: PYSIDE-3057 Pick-to: 6.8 6.9 Change-Id: Iceced6c84fbfabfb484663a71ccdf13c2f69ab0a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Add optional to QProgressDialog.setCancelButtonEce Cinucen2025-03-271-1/+1
| | | | | | | Fixes: PYSIDE-3050 Pick-to: 6.8 6.9 Change-Id: Ic200e75717518b2363e0aca6fe4cfc31e5fe6256 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* type hints: Add optional to QTabBar.setTabButtonEce Cinucen2025-03-271-0/+5
| | | | | | | | Fixes: PYSIDE-3055 Pick-to: 6.8 6.9 Change-Id: I5b3ee124b57643991afcb70cd9293f0cd30ff83d Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Make str Optional in QLineEdit.setTextCristián Maureira-Fredes2025-03-191-0/+3
| | | | | | | Change-Id: I0565751f0189fea3e59cea7aa953d205527dd8b2 Pick-to: 6.8 Fixes: PYSIDE-3041 Reviewed-by: Christian Tismer <tismer@stackless.com>
* type hints: add explicit optional to setItemWidgetCristián Maureira-Fredes2025-03-141-1/+1
| | | | | | | | Change-Id: I9d14b23d9fe2e084ffdacd66560c84c8c0d54764 Fixes: PYSIDE-3042 Pick-to: 6.8 Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Remove obsolete rejectionsFriedemann Kleint2025-02-241-2/+0
| | | | | | Pick-to: 6.8 Change-Id: I0780ee2f7f5f42a9281f4add3818109628df8332 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6: Change some templates to be snippetsFriedemann Kleint2025-02-201-3/+2
| | | | | | | | Brush up the code and remove unused templates. Pick-to: 6.8 Change-Id: Ic9a0a6fb941e0d110124df7f02b2fc3c91664656 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QtWidgets: Use the new sequence templatesFriedemann Kleint2025-02-201-2/+7
| | | | | | | | | Use templates introduced by e3631c3322d28447068de3a874055ff937b237c4. Pick-to: 6.8 Task-number: PYSIDE-3002 Change-Id: I5b7948c83768fa0c03c6b360717d202270ebbc9e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix QAbstractSpinBox.fixup() behaviorFriedemann Kleint2025-02-111-0/+3
| | | | | | | | | | | Add the missing native return value conversion. Complements 6c0a0d70305cd6e12260a352099e74d34f3c239e. Pick-to: 6.8 Fixes: PYSIDE-3014 Task-number: PYSIDE-106 Change-Id: I7cce422512175dcbf15ca0e9c0a0a3be5dfb93d6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Consider all base classes when finding a modificationFriedemann Kleint2025-02-061-50/+0
| | | | | | | | | | | | | | | | | | This enables removing a duplicate modification for QGraphicsWidget::getContentsMargins() which is inherited from class QGraphicsLayout, QGraphicsLayoutItem (2nd base class) and activates other base modifications for QGraphicsObject-derived classes. Also add a flag indicating whether the modification is inherited from a base class or directly specified for later use in size reduction. [ChangeLog][shiboken6] Modifications from base classes in multiple inheritance will now be correctly applied. Task-number: PYSIDE-2701 Change-Id: I190764a673fb6b7ad44aea5ed90ff64c57eda324 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to 6.9Friedemann Kleint2025-02-061-0/+1
| | | | | | Fixes: PYSIDE-2862 Change-Id: I7cef186d1fb1e1b23cb62daa659db6fab2f460d9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add parameter names to added global functionsFriedemann Kleint2024-11-211-4/+4
| | | | | | | | It brings some clarity to the documentation. Pick-to: 6.8 Change-Id: I8787e5d6a3ceedcd91442e0e1f9561dbea657d7c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@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>
* 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>
* Add QMessageBox.open() with a slotFriedemann Kleint2024-07-041-1/+5
| | | | | | | | | 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>
* Fix undesired invalidation of QObjects/QWidgets after calling parent(Widget)()Friedemann Kleint2024-05-141-3/+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>
* shiboken6: Generate polymorphic bases into type discovery functionsFriedemann Kleint2024-05-061-2/+2
| | | | | | | | | 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>
* Release dialogs when using QDialog.exec()Friedemann Kleint2024-04-121-1/+3
| | | | | | | | | | | | | | | In the typical pattern ported from C++ dialog = QDialog(mainWin) dialog.exec() one would expected the dialog to be deleted. However, due to the constructor heuristics creating a parent-child relationship, the dialog leaks. Add a modification to remove the relationship in case exec() is called. Change-Id: Ibc6f8c150cbd80a4085af4a5b713ee7c2c62abf3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix potential undefined behavior in type discovery of class hierarchiesFriedemann Kleint2024-04-121-36/+65
| | | | | | | | | | | | | | | | | | | Use the %B-placeholder for base classes always, changing the generated expressions from: reinterpret_cast<QMouseEvent *>(cptr)->type() == QEvent::MouseMove to reinterpret_cast<QEvent *>(cptr)->type() == QEvent::MouseMove Remove the copyable-attributes since object-type is not copyable anyways. Pick-to: 6.7 Task-number: PYSIDE-2675 Change-Id: I89092b0afd6901e0f8cf5144eb1185ab1d80a0d5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add attributes for global inline namespacesFriedemann Kleint2024-04-082-2/+4
| | | | | | | Pick-to: 6.7 Fixes: PYSIDE-2590 Change-Id: I36ce25bc759cd888f80b797d4f40864c3d2e2a84 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Build system: Clean Qt libraries linked by the modulesFriedemann Kleint2024-04-041-6/+4
| | | | | | | | | | | | | | Only the bound Qt library needs to be linked, it will bring its dependencies. Add explanatory comment for the exceptions (QtTest, QtSql). Pick-to: 6.7 Task-number: PYSIDE-2649 Change-Id: Ib84d37248578a76400d307bb5d050005110677c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix crash when adding None to a QLayoutFriedemann Kleint2024-03-141-2/+4
| | | | | | | | | | | | | | | This caused a crash in PySide's addLayoutOwnership() code snippet, whereas Qt errors out with a warning. Guard all input parameters of the layout snippets with a check. Rename the snippet "addownership-0" which is used for the itemAt() functions "addownership-item-at" for clarity and add a check there. Pick-to: 6.6 6.5 Fixes: PYSIDE-2638 Change-Id: Ia89532059e7a27cc38d790a0d17e24e19d68887f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Adapt to Qt 6.7Friedemann Kleint2024-02-282-0/+9
| | | | | | Task-number: PYSIDE-2497 Change-Id: Id506616710ba06851401cf62511e49967acde71e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Allow None in type hints of ↵Friedemann Kleint2023-11-011-2/+2
| | | | | | | | | QAbstractItemView.setModel()/QGraphicsView.setScene() Pick-to: 6.6 6.5 Fixes: PYSIDE-2514 Change-Id: I565f13de6515d441f7848d3b5c2477937b7af496 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix QGestureRecognizer.registerRecognizerCristian Maureira-Fredes2023-08-251-0/+10
| | | | | | | Task-number: PYSIDE-287 Change-Id: I9308ec96c607097f91daff78b5197c2d1045cff6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* stubs: setParent should accept an Optional objectCristián Maureira-Fredes2023-08-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | The current stubs specify the type of the required argument, for example: w = QWidget() help(w.setParent) reports: setParent(self, parent: PySide6.QtWidgets.QWidget) -> None which makes some IDEs to complain when passing None, behavior that it's accepted as well. This change adds an Optional to the parameter. Pick-to: 6.5 Fixes: PYSIDE-2235 Change-Id: I57b54f47aee6783b1b7027981b5d282798d57ad4 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Clean up some unused rejection warningsFriedemann Kleint2023-08-011-10/+0
| | | | | | Pick-to: 6.5 Change-Id: I155f0297a1f6d31dc84472c8c7f99e2842da33e6 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Clean up some unused suppression warningsFriedemann Kleint2023-08-011-15/+0
| | | | | | Pick-to: 6.5 Change-Id: I261ec7ec933e21658d357ad1ffbeb4de5b84d13f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix warning about unused allow-thread attribute on add-functionFriedemann Kleint2023-07-261-1/+1
| | | | | | | | | | | | | Allow-thread must be done in code for add-function. Fixes: typesystem_widgets_common.xml:537:164: Warning: 1 attributes(s) unused on <add-function>: allow-thread="yes" Amends 65e48138e166c3575dfe23dfec259e112302fd28. Task-number: PYSIDE-2384 Change-Id: Idf906c27fb3caa2361cff71ccca5f5385881ae40 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add QWizardPage::registerField() with a signal instancFriedemann Kleint2023-07-261-0/+8
| | | | | | Fixes: PYSIDE-2384 Change-Id: Iad7a26385b40267308c287b8f6a4915972468574 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to Qt 6.6Friedemann Kleint2023-07-071-0/+1
| | | | | | Change-Id: Ie6379044282809fe73790d03cd086845bee98089 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix signature of QWizardPage.registerField()Friedemann Kleint2023-07-061-1/+4
| | | | | | | Pick-to: 6.5 Task-number: PYSIDE-2384 Change-Id: Ib32a4b336c39c4710745c221f9f1036dc21d6a29 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6: Reject some internal namespacesFriedemann Kleint2023-05-121-0/+1
| | | | | | | | This reduces noise in the log files. Pick-to: 6.5 Change-Id: I0c8c98859058d9bbef26f71da83918490099a318 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add type hints for return values modified to Tuple[]Friedemann Kleint2023-04-131-10/+10
| | | | | | | Pick-to: 6.5 Fixes: PYSIDE-2285 Change-Id: I525ffea2f79bf54de43dc02c31a41994fe3004d5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Clean up rejectionsFriedemann Kleint2023-03-161-7/+8
| | | | | | | | Remove non-existent functions and move stuff to QtWidgets. Task-number: PYSIDE-2252 Change-Id: Id2c73698a138b0e6a28dfd531ac7d7de9a1df3de Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add license headers to cmake filesFriedemann Kleint2023-02-161-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Task-number: QTBUG-105718 Task-number: QTBUG-88621 Change-Id: I98bd2e80f182d8bf7aef6b633f37a428e2dac69b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* PySide6: Add missing include for QWidgetFriedemann Kleint2022-12-191-0/+3
| | | | | | Task-number: PYSIDE-2155 Change-Id: I4f1e08d95dbae08c755e8169d5b88181361ddbdf Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Remove obsolete "since" tags from typesystemFriedemann Kleint2022-11-021-2/+2
| | | | | | Pick-to: 6.4 6.2 Change-Id: Id7f1c8923eb8612771863893ab159d3434ca5041 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Typesystem: Add includes required to be able to forward-declare classes in ↵Friedemann Kleint2022-10-311-0/+2
| | | | | | | | | | the module header Pick-to: 6.4 Task-number: PYSIDE-2099 Change-Id: I4607a6a224f194edadf25a9aa2d27b3eca0dede2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix type annotations for static functions of QInputDialogFriedemann Kleint2022-10-171-0/+5
| | | | | | | | | | | | | Change 6c03699b50f2597a1c150db86fed4bcb95b297bf removed modified-removed arguments from the signatures, causing some heuristics in shibokensupport/signature/mapping.py to fail. Fix by specifying the return types. Fixes: PYSIDE-2081 Pick-to: 6.4 Change-Id: I227a0ff0c9f079ed9e58593dafa80a92e702c8d0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Fix some compiler warningsFriedemann Kleint2022-09-291-1/+0
| | | | | | | | | | | - Add missing include to primitivetypeentry.h, making the header self-sufficient. Amends 21e1bfafa1ed86adfa2e9ec4e990a582e4a20266. - Remove unused function in codesnip.cpp - Do not inject unused functions into qmenubar_wrapper.cpp Pick-to: 6.3 6.2 Change-Id: Iaa077406c91f52ba47ce29534ee2b12bd8c23955 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix blocking threads in static functions of QMessageBoxFriedemann Kleint2022-08-241-0/+9
| | | | | | | | | | | Add the allow-thread attribute for the compatibility overloads along with a fixme comment. Pick-to: 6.3 6.2 5.15 Fixes: PYSIDE-2034 Task-number: PYSIDE-803 Change-Id: Id89767c8fdd14cc450ae131ead873d1afdc94b8f Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add support for QFormLayout::TakeRowResultCristian Maureira-Fredes2022-08-182-0/+4
| | | | | | | | | | | The struct TakeRowResult was not explicitly declared in the typesystem, leaving out some QFormLayout functions like QFormLayout::takeRow(...). Fixes: PYSIDE-1312 Pick-to: 6.2 6.3 Change-Id: I77577cb54ff9cca56435b62c4848832e79f575f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PyEnum: Define a fixed list of Int(Enum|Flag) decisionsChristian Tismer2022-08-131-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was "PyEnum: Write a default Int decisor for Enum and Flag". Historically, C++ enums were all compatible with int. The new Python enums are more diverse here. There are the basic types Enum/IntEnum and Flag/IntFlag. We have tried a lot to come up with a sensible default heuristic computed from the data. In the end, this was reverted and replaced by a fixed list that was collected from similar implementations. By the move away from Int inheritance, a few classes needed extra support. Python 3.11.0b5 also required the Flag creation parameter "boundary=KEEP". It is not clear if this is correct, yet. [ChangeLog][shiboken6] Most former IntEnum/IntFlag are replaced by pure Enum/Flag classes in a generally compatible way to other implementations. Change-Id: I1dbe7b0556a3375df89eb40e9d9f495f14bf42b1 Pick-to: 6.3 Task-number: PYSIDE-1735 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Introduce an attribute for parent ownership heuristicsFriedemann Kleint2022-05-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The parent ownership heuristics cause some unintended ownership transfers to be generated that can cause crashes. However, completely removing them would mean to have to explicitly specify it in each QObject-derived class constructor. To improve this, introduce an attribute to restrict the heuristics to classes to which this is applicable. For compatibility, the attribute is only honored in shiboken 6 if some class in the type system explicitly specifies it. For shiboken 7, it will be mandatory. [ChangeLog][shiboken6] An type system attribute for restricting the parent ownership heuristics to relevant classes has been introduced. The workaround 0e62c4db50472f8b581022c86a6be651158d0cd0 can then be reverted. Task-number: PYSIDE-1939 Change-Id: I0fb01e9842aecbccaa686ce71b2163b20a97cbf7 Reviewed-by: Christian Tismer <tismer@stackless.com>