aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
Commit message (Collapse)AuthorAgeFilesLines
* Add option to create additional documentationFriedemann Kleint2018-05-022-0/+584
| | | | | | | | | | Add an option taking a list of files under the webxml directory that are run though the Sphinx converter to create .rst files. This can be used for tutorials and example descriptions. Task-number: PYSIDE-363 Change-Id: Ifa6df32517a2b336cd3f755523947d70c5c24f2e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add Positioning, Location and Sensors to documentationFriedemann Kleint2018-05-024-0/+17
| | | | | | Task-number: PYSIDE-363 Change-Id: Idc4418b6313c2f6b7946fcfb80abc772caec361b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Update the QML advanced tutorialVenugopal Shivashankar2018-05-0219-141/+217
| | | | | | | | | | | - Switch the languague to 2nd person - Update the Qt Quick import statements - Replace instances of "elements" that referred to QML types or items. Change-Id: Iabac624270dbd8685bf1f4d2dec198984e7a3c68 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Re-add QShortcutEvent removed methodsAlexandru Croitor2018-05-021-5/+0
| | | | | | | | They seem to work, no need to reject them. Task-number: PYSIDE-655 Change-Id: I20e5a0ddd03392bacac8875158159d84bf16cdb9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Avoid set parent for QLabel.pixmap()Cristian Maureira-Fredes2018-05-015-3/+105
| | | | | | | | | | | | 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>
* Add tool for creating a license pageFriedemann Kleint2018-04-302-1/+152
| | | | | | | | | | | | Add a tool which runs qtattributionsscanner and converts its JSON output to .rst to create an additional license page It differs from the Qt usage in that the license text is extracted from triple quotes of the referenced file. Task-number: PYSIDE-363 Change-Id: Idef9b0ada06bec5947aac210d7fec25fd0742ab8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Update the footer CSS styleVenugopal Shivashankar2018-04-301-1/+1
| | | | | | | | The copyright text at the bottom of the page doesn't wrap without it. Change-Id: I28a275c4c96b63573dd3fe1af554e98a593880e4 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Doc: Use additional include paths for some Qt modulesTopi Reinio2018-04-304-0/+4
| | | | | | | | | | | | | | | Some of the Qt documentation modules use custom module headers that pull in additional content into the build. On a normal Qt documentation build, these are implemented as relative paths - these are incorrect when the doc build is invoked externally in PySide. To fix this, add absolute qdocconf include path entries for each module that needs them. This cuts down the number of QDoc warnings significantly. Change-Id: I22756cc3170e7e2ff678986a46e117faf43a735d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Implement Python slicing support for QByteArrayBoxiang Sun2018-04-303-19/+103
| | | | | | | | | | | | | | | | | | | | | 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>
* Doc: Use product name and python module names appropriatelyVenugopal Shivashankar2018-04-306-19/+14
| | | | | | | | | Configured replaceable text entities so that updating instances of product and module names in the doc is less cumbersome. Change-Id: I6ef8adcc4324775eeb8a48bf81294effb0ea12d5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Rename PySide references to Qt for PythonCristian Maureira-Fredes2018-04-271222-1222/+1222
| | | | | | | | | 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-277-6/+1
| | | | | | | | | | | | | 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>
* Doc: Add top-level index and getting started informationVenugopal Shivashankar2018-04-278-23/+210
| | | | | | | | | - Updated the copyright text in the config file - Added the copyright to the footer in the template Change-Id: Iaadc293af524abea41873d04206516caec189c53 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add missing flag for QChartViewCristian Maureira-Fredes2018-04-261-1/+1
| | | | | | Task-number: PYSIDE-645 Change-Id: I4f18e1ede50a68767772eb02e55ff4e1fd718636 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtPositioning and QtLocationFriedemann Kleint2018-04-249-1/+414
| | | | | | 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>
* QWebEngineDownloadItem: Add enum SavePageFormatFriedemann Kleint2018-04-201-0/+1
| | | | | | Task-number: PYSIDE-487 Change-Id: Ia4b57f4cdc48741ed7659018a742bbda3824c188 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtSensorsFriedemann Kleint2018-04-205-1/+290
| | | | | | Task-number: PYSIDE-487 Change-Id: Id60f3f6e70b4fbb8e4316b994cdd557ff9be7b3b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve qt.conf registration handlingAlexandru Croitor2018-04-202-1/+43
| | | | | | | | | | | | | | | | | | | | | | When PyInstaller is used to deploy a PySide2 application, it changes the layout of the copied PySide2 files (no Qt subfolder, all shared libraries are copied next to tehe generated executable). In that case using the internal qt.conf won't work. Detect if there a exists a qt.conf file next to the executable, and use that file instead. Note that this won't work when the executable path has unicode characters in conjunction with Python 2 and Windows, but that is an unsupported config anyway (due to the mixing MSVC issue). Also add a logging category to ease figuring out which qt.conf file is used if a need ever arises to do so. Task-number: PYSIDE-642 Change-Id: I1260cbc13e5e62be72c4ed9c64c2aa5905d2e9c6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QtWebEngineCore moduleDavid Rosca2018-04-207-1/+202
| | | | | Change-Id: I8e1127e082abe5978a94aa8a080dfb1d8bbd5952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add installed package directory to PATH on WindowsAlexandru Croitor2018-04-201-3/+9
| | | | | | | | | This makes sure that all shared libraries like plugins and qml plugins are able to find the Qt libraries they depend on. Task-number: PYSIDE-642 Change-Id: I0f54481c089dfdbc69a9098f2768f98b1e7a9a22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QtWebEngineProcess related issues on the supported platformsAlexandru Croitor2018-04-203-1/+29
| | | | | | | | | | | | | | | | | | There were 2 issues: 1) QtWebEngineProcess could not be found on Windows because we have a non-standard directory layout for the Qt files we copy over (there is no bin directory), so we need to adjust the internal qt.conf which is set in pyside.cpp 2) QtWebEngineProcess itself does not use the qt.conf from pyside.cpp, because it is a separate executable, and thus we need to supply a qt.conf specifically for it which is placed in the libexec folder. Task-number: PYSIDE-626 Task-number: PYSIDE-631 Task-number: PYSIDE-642 Change-Id: I75d1b083fb5afe5dc31ba90174f42c7f559c5cd5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove white spaces from signature label in XMLsCristian Maureira-Fredes2018-04-1918-473/+473
| | | | | | Change-Id: I2d41bb92335bcbd2300da29b793ce0529e57960a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Check default superclass when getting baseClassesCristian Maureira-Fredes2018-04-193-1/+78
| | | | | | | | | | | | | | | | | | | | | | | 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-192-1/+13
| | | | | | | | | 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-193-0/+70
| | | | | | | | | | | | | | | 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-193-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Use XINCREF/XDECREF in PyObjectWrapper constructorCristian Maureira-Fredes2018-04-191-6/+6
| | | | | | | | | | | | When emitting a None signal the PyObjectWrapper constructors in the signalmanager were not working properly, but using the safe macros to increase and decrease the references of the object solves the issue. Task-number: PYSIDE-17 Change-Id: I1871e5b8227d6ddc893afce2ab9b311b60649024 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Update deprecated Qsql headerCristian Maureira-Fredes2018-04-191-1/+1
| | | | | Change-Id: I8e0a4e4c264c420304d29235e51190e1edac3ede Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix qt_attribution.jsonFriedemann Kleint2018-04-181-0/+12
| | | | | | | | | | | | | | - Move from root to sources/pyside2/PySide2/support/signature - Set "QtForPython" as module name, fixing the qtattributionsscanner warning: File ./qt_attribution.json: Missing mandatory property 'QDocModule'. - Use "Qt for Python" as in descriptions - Reference backport_inspect.py as file Task-number: PYSIDE-363 Change-Id: I5e2b546a0a2a090abebc73a38ca4077a2983f216 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@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>
* Add missing flags for AnimationOptionsCristian Maureira-Fredes2018-03-191-1/+1
| | | | | Change-Id: I8e19b379fd7be8d858927af80a2b33b854626f63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move QStringListModel to QtCoreJulien Schueller2018-03-196-6/+4
| | | | | | | | | | 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>
* Fix ownership transference in QDropEvent.sourceCristian Maureira-Fredes2018-03-151-1/+1
| | | | | | | | Changing the owner from Python (target) to default. Task-number: PYSIDE-258 Change-Id: Ib0ec567648c973ed4c427cbd86ed01a8eae19364 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Docs/inheritance_diagram.py: Remove compat importFriedemann Kleint2018-03-141-2/+1
| | | | | | | | | Use class Directive from docutils.parsers.rst instead. Task-number: PYSIDE-363 Change-Id: I4356f0b0aa1eb0fc393bf8713be39c58fd281f4e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Check for compatible Qt version when building PySide2Alexandru Croitor2018-03-061-1/+1
| | | | | | | | | Shiboken uses C++11 constructs like qAsConst, which necessitates the usage of a Qt version >= 5.7. Instead of showing weird compilation errors when building against Qt 5.6, print a nice error message. Change-Id: Iea4bd41dbe1d7d05e9b28bfa6654f68c6633cd74 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtCore: Fix documentation modificationsFriedemann Kleint2018-03-061-6/+3
| | | | | | | | | | - Remove documentation modification on QUrl. The text in Qt is identical. - Remove C++ 'new' from the QHistoryState code snippet Task-number: PYSIDE-363 Change-Id: I4c0d4fb9b426e24ce9352c954bcd5765d89aeca8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-03-059-35/+162
|\ | | | | | | Change-Id: I452d3a0a04e282b678879132ca1b3a272910ef04
| * Implement proper package versioningAlexandru Croitor2018-03-026-31/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-013-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Add rudimentary support for address sanitizer buildsAlexandru Croitor2018-02-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a new setup.py option called --sanitize-address which will build all executables and shared libraries with address sanitizer enabled. The builds will only succeed on Linux and macOS machines that have new enough gcc / clang versions, so it is a "use at your own risk" build configuration. This change was necessitated by the random crashes that are sometimes observed on the CI machines, and due to valgrind not working properly on new macOS versions, using AddressSanitizer is the next best thing. Note that when running tests with address sanitizer builds, you might need to export a LD_PRELOAD / DYLD_INSERT_LIBRARIES environment variable pointing to the address sanitizer runtime library path, which will be provided by the crashed application. Change-Id: I93014002e5c5e94bcc808ba2fb830d60724cfb69 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Update the pysideversion.rst documentFriedemann Kleint2018-03-021-9/+9
| | | | | | | | | | | | Task-number: PYSIDE-363 Change-Id: Ibed88d97e70c7b6861ee47b23a7f4402683ba51e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Revert "Temporarily disable building of Qt3D for Qt >= 5.10"Friedemann Kleint2018-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change qt3d/352dacc0040f77345ab2f6e9019ff68ba2ed354e has made it up to the dev branch and the qt5.git integration succeeded, so, Qt 3D can be re-enabled. This reverts commit 52ac602d7b25dc31e681dcddc0b6dc9452fa4f59. Task-number: PYSIDE-487 Change-Id: I4b95a7050f03786a08e4fb14c1bb332ca0281db4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Check slot-signal association when connectingCristian Maureira-Fredes2018-03-022-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Documentation/inheritance_diagram.py: Fix import logicFriedemann Kleint2018-03-021-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script tried to import a class or a module to obtain an introspectable object, which failed for nested classes like PySide2.QtCore.QStateMachine.SignalEvent, resulting in numerous warnings like: WARNING: Could not import class or module 'QStateMachine.SignalEvent' specified for inheritance diagram Rewrite the import to strip off the path components in a loop until the import succeeds and then walk up the attributes again to obtain the object. Task-number: PYSIDE-363 Change-Id: I33c6b4c6145b501a2f8f9ef3325610fefad9580d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix inheritance_diagram.py to run with Python3Friedemann Kleint2018-02-271-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix _class_info() to return a real list instead of list view, fixing: TypeError: can't pickle dict_values objects - Enclose font names in quotes, fixing dot complaining about a syntax error. - Encode the hash string get_graph_hash(), fixing TypeError: Unicode-objects must be encoded before hashing - Pass on options as dict instead of list to render_dot_html(), render_dot_latex() Task-number: PYSIDE-363 Task-number: PYSIDE-617 Change-Id: If050b73cf35ac6a6c58c0d3e5ea713c736ea842c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Augment signature mapping for 5.11Christian Tismer2018-02-261-1/+3
| | | | | | | | | | | | | | | | | | There is some new structure that is not yet supported. I hope this works because I have no installation of 5.11. Change-Id: I310bfc4f20d33b2a6511ce59a4d68aec971a4128 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-02-2310-374/+38
|\| | | | | | | Change-Id: I5d1a4734e8f44785898ba62beaa0bdd2004fca22