diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-29 11:17:46 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-29 11:17:48 +0100 |
| commit | f72b75d9a75a32d93a66147ffaa240ea061bf0cd (patch) | |
| tree | 38b686f7063e0f08864f5cfb2192ec02bc059a02 /sources/pyside2 | |
| parent | 5a74c902555ed6bce4b45889adfdaa1123b64ace (diff) | |
| parent | 26404dd4b6c61083bf5de1c1c2208bf2350aba0e (diff) | |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ie902334068eda21ed71934da56de168a9627e41d
Diffstat (limited to 'sources/pyside2')
9 files changed, 80 insertions, 117 deletions
diff --git a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml index b8550ef2c..a14177586 100644 --- a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml +++ b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml @@ -41,6 +41,9 @@ --> <typesystem package="PySide2.QtCharts"> <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/> + <!-- PYSIDE-1101 Removing inherited method to avoid argument conflict + on the QChart::scroll overload --> + <rejection class="QGraphicsItem" function-name="scroll"/> <namespace-type name="QtCharts"> <object-type name="QAbstractAxis" since="5.7"> <enum-type name="AxisType"/> diff --git a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml index 7a18dac54..223eff773 100644 --- a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml +++ b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml @@ -55,8 +55,9 @@ <object-type name="QQuickAsyncImageProvider" since="5.6"/> - <object-type name="QQuickFramebufferObject"/> - <object-type name="QQuickFramebufferObject::Renderer"/> + <object-type name="QQuickFramebufferObject"> + <object-type name="Renderer"/> + </object-type> <object-type name="QQuickTextureFactory"/> <object-type name="QQuickImageProvider"/> @@ -122,12 +123,12 @@ <enum-type name="AttributeType" since="5.8"/> <enum-type name="DrawingMode" since="5.8"/> <enum-type name="Type" since="5.8"/> + <value-type name="Attribute"/> + <value-type name="AttributeSet"/> + <value-type name="ColoredPoint2D"/> + <value-type name="Point2D"/> + <value-type name="TexturedPoint2D"/> </object-type> - <value-type name="QSGGeometry::Attribute"/> - <value-type name="QSGGeometry::AttributeSet"/> - <value-type name="QSGGeometry::ColoredPoint2D"/> - <value-type name="QSGGeometry::Point2D"/> - <value-type name="QSGGeometry::TexturedPoint2D"/> <object-type name="QSGGeometryNode"/> <!-- QSGMaterialShader doesn't compile because of const char * char * types not being recognized diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp index 47b3dd6db..8bcc315b2 100644 --- a/sources/pyside2/PySide2/glue/qtcore.cpp +++ b/sources/pyside2/PySide2/glue/qtcore.cpp @@ -81,7 +81,6 @@ if (typeObj) { for (int i = 0; i < valuesSize; i++) { PyObject *item = PyUnicode_FromString(valuesList[i].data()); PyList_SET_ITEM(list, i, item); - Py_DECREF(item); } %PYARG_0 = list; @@ -110,15 +109,23 @@ if (typeObj) { float asFloat = out.toFloat(); %PYARG_0 = PyFloat_FromDouble(asFloat); } else if (typeObj == &PyBool_Type) { - %PYARG_0 = out.toBool() ? Py_True : Py_False; + if (out.toBool()) { + Py_INCREF(Py_True); + %PYARG_0 = Py_True; + } else { + Py_INCREF(Py_False); + %PYARG_0 = Py_False; + } } // TODO: PyDict_Type and PyTuple_Type } else { - if (!out.isValid()) + if (!out.isValid()) { + Py_INCREF(Py_None); %PYARG_0 = Py_None; - else + } else { %PYARG_0 = %CONVERTTOPYTHON[QVariant](out); + } } // @snippet qsettings-value diff --git a/sources/pyside2/doc/deployment-pyinstaller.rst b/sources/pyside2/doc/deployment-pyinstaller.rst index c9c7b09fd..e7ed643f6 100644 --- a/sources/pyside2/doc/deployment-pyinstaller.rst +++ b/sources/pyside2/doc/deployment-pyinstaller.rst @@ -1,55 +1,49 @@ |project| & PyInstaller ####################### -`PyInstaller <https://www.pyinstaller.org/>`_ lets you freeze your python -application into a stand-alone executable. -The supported platforms are Linux, macOS, Windows, FreeBSD, and others. +`PyInstaller <https://www.pyinstaller.org/>`_ lets you freeze your python application into a +stand-alone executable. This installer supports Linux, macOS, Windows, and more; and is also +compatible with 3rd-party Python modules, such as |pymodname|. -One of the main goals of `PyInstaller` is to be compatible with 3rd-party -Python modules, for example: |pymodname|. - -You can read the `official documentation <https://www.pyinstaller.org/documentation.html>`_ -to clarify any further question, and remember to contribute to -`the project <https://github.com/pyinstaller/pyinstaller>`_ -by filing issues if you find any, or contributing to their development. +For more details, see the `official documentation <https://www.pyinstaller.org/documentation.html>`_. Preparation =========== -Installing `PyInstaller` can be done using **pip**:: +Install the `PyInstaller` via **pip** with the following command:: pip install pyinstaller -If you are using a virtual environment, remember to activate it before -installing `PyInstaller` into it. +If you're using a virtual environment, remember to activate it before installing `PyInstaller`. -After the installation, the `pyinstaller` binary will be located in the `bin/` -directory of your virtual environment, or where your Python executable is located. -If that directory is not in your `PATH`, include the whole path when executing `pyinstaller`. +After installation, the `pyinstaller` binary is located in your virtual environment's `bin/` +directory, or where your Python executable is located. If that directory isn't in your `PATH`, +include the whole path when you run `pyinstaller`. .. warning:: If you already have a PySide2 or Shiboken2 version installed in your - system path, PyInstaller will pick them instead of your virtual environment - version. + system path, PyInstaller uses them instead of your virtual environment version. -Freezing an application +Freeze an application ======================= -`PyInstaller` has many options that you can use. -To learn more about them you can just run `pyinstaller -h`. +`PyInstaller` has many options that you can use. To list them all, run `pyinstaller -h`. -Two main features are the option to package the whole project -(including the shared libraries) into one executable file (`--onefile`), -and to place it in a directory containing the libraries. +There are two main features: -Additionally, for Windows you can enable opening a console during the -execution with the option, `-c` (or equivalent `--console` or `--nowindowed`). -Further, you can specify to not open such console window -on macOS and Windows with the option, `-w` (or equivalent `--windowed` or `--noconsole`). + * the option to package the whole project (including shared libraries) into one executable file + (`--onefile`) + * the option to place it in a directory containing the libraries -Creating an example -------------------- +Additionally, on Windows when the command is running, you can open a console with the `-c` option +(or `--console` or `--nowindowed` equivalent). + +Otherwise, you can specify to not open such a console window on macOS and Windows with the `-w` +option (or `--windowed` or `--noconsole` equivalent). -Now, consider the following simple script, named `hello.py`:: +Create an example +----------------- + +Now, consider the following script, named `hello.py`:: import sys import random @@ -90,68 +84,58 @@ Now, consider the following simple script, named `hello.py`:: sys.exit(app.exec_()) -As it has a UI, you will use the `--windowed` option. +Since it has a UI, you use the `--windowed` option. The command line to proceed looks like this:: pyinstaller --name="MyApplication" --windowed hello.py -This process creates a `dist/` and `build/` directory. -The application executable and the required shared libraries are -placed in `dist/MyApplication`. +This process creates two directories: `dist/` and `build/`. The application executable and the +required shared libraries are placed in `dist/MyApplication`. -To run the application you can go to `dist/MyApplication` and -execute the program:: +To run the application, go to `dist/MyApplication` and run the program:: cd dist/MyApplication/ ./MyApplication -.. note:: The directory inside `dist/` and the executable will have - the same name. +.. note:: The directory inside `dist/` and the executable have the same name. -If you prefer to have everything bundled into one executable, -without the shared libraries next to it, you can use the option -`--onefile`:: +Use the `--onefile` option if you prefer to have everything bundled into one executable, without +the shared libraries next to it:: pyinstaller --name="MyApplication" --windowed --onefile hello.py -This process takes a bit longer, but in the end you will have one -executable in the `dist/` directory:: +This process takes a bit longer, but in the end you have one executable in the `dist/` directory:: cd dist/ ./MyApplication -Current Caveats To Be Aware Of -============================== +Some Caveats +============ -PyInstaller Problem -------------------- +PyInstaller Issue +----------------- -As already mentioned, `PyInstaller` will pick a system installation -of PySide2 or Shiboken2 instead of your virtualenv version without -notice, if it exists. This may not be a problem if those two -versions are the same. +As mentioned before, if available, `PyInstaller` picks a system installation of PySide2 or +Shiboken2 instead of your `virtualenv` version without notice. This is negligible if those +two versions are the same. -If you are working with different versions, this can result in -frustrating debugging sessions. You could think you are testing the -latest version, but `PyInstaller` could be working with an older +If you're working with different versions, this can result in frustrating debugging sessions +when you think you are testing the latest version, but `PyInstaller` is working with an older version. -Problem with numpy in Python 2.7.16 ------------------------------------ +Issue with numpy in Python 2.7.16 +--------------------------------- -A recent problem of PyInstaller is the Python 2 release, that is -v2.7.16. This Python version creates a problem that is known from -Python 3 as a `Tcl/Tk` problem. It rarely shows up in Python 3 as -`Tcl/Tk` is seldom used with `PyInstaller. +A recent issue with PyInstaller is the appearance of Python 2.7.16. This Python version creates +an issue that is known from Python 3 as a `Tcl/Tk` problem. This rarely shows up in Python 3 +because `Tcl/Tk` is seldom used with `PyInstaller`. -On Python 2.7.16, this problem is very much visible, as many are -using numpy. For some reason, installing `numpy` creates a -dependency to `Tcl/Tk`, which can be circumvented only by explicitly -excluding `Tcl/Tk` related things by adding this line to the analysis -section of the spec-file:: +On Python 2.7.16, this problem is common, as many developers use numpy. For some reason, +installing `numpy` creates a dependency to `Tcl/Tk`, which can be circumvented only by explicitly +excluding `Tcl/Tk` by adding this line to spec-file's analysis section:: excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'], diff --git a/sources/pyside2/doc/overview.rst b/sources/pyside2/doc/overview.rst index 86c3a54fe..88f03c4eb 100644 --- a/sources/pyside2/doc/overview.rst +++ b/sources/pyside2/doc/overview.rst @@ -1,12 +1,11 @@ Overview ========= -The |project| project aims to provide a complete port of the PySide module to Qt 5. -The development started on GitHub in May 2015. The project managed to port Pyside to -Qt 5.3, 5. 4 & 5.5. +The |project| project provides a complete port of the PySide module to Qt 5. Development started on +GitHub in May 2015. Since then, the project has ported PySide to Qt 5.3, 5.4, and 5.5. -The `PySide2` module was released mid June 2018 as a Technical Preview (supporting Qt 5.11), -and it has been fully supported since Qt 5.12. +In June 2018, the `PySide2` module was released as a Technical Preview (supporting Qt 5.11); it's +been fully supported since Qt 5.12. |project| is available under LGPLv3/GPLv2 and commercial license for the following platforms: @@ -23,34 +22,3 @@ and it has been fully supported since Qt 5.12. * (*): `No Qt release <https://wiki.qt.io/Qt_5.12_Tools_and_Versions#Software_configurations_for_Qt_5.12.0>`_ * (**): `MSVC issue with Python 2.7 and Qt <https://wiki.qt.io/Qt_for_Python/Considerations#Missing_Windows_.2F_Python_2.7_release>`_ - -What does PySide2 look like? ----------------------------- - -A simple Hello World example in PySide2 looks like this: - -:: - - import sys - from PySide2.QtWidgets import QApplication, QLabel - - - if __name__ == "__main__": - app = QApplication(sys.argv) - label = QLabel("Hello World") - label.show() - sys.exit(app.exec_()) - - -Additional overviews --------------------- - -These additional topics provide detailed information about -several Qt-specific features: - -.. toctree:: - :titlesonly: - :glob: - - overviews/* - diff --git a/sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py b/sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py index a1385298a..98ec8fcbc 100644 --- a/sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py +++ b/sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py @@ -34972,7 +34972,7 @@ sig_dict.update({ "PySide2.QtCharts.QtCharts.QChart.removeAllSeries": (), "PySide2.QtCharts.QtCharts.QChart.removeAxis": ('PySide2.QtCharts.QtCharts.QAbstractAxis',), "PySide2.QtCharts.QtCharts.QChart.removeSeries": ('PySide2.QtCharts.QtCharts.QAbstractSeries',), - "PySide2.QtCharts.QtCharts.QChart.scroll": [('float', 'float'), ('float', 'float', 'PySide2.QtCore.QRectF')], + "PySide2.QtCharts.QtCharts.QChart.scroll": ('float', 'float'), "PySide2.QtCharts.QtCharts.QChart.series": (), "PySide2.QtCharts.QtCharts.QChart.setAnimationDuration": ('int',), "PySide2.QtCharts.QtCharts.QChart.setAnimationEasingCurve": ('PySide2.QtCore.QEasingCurve',), diff --git a/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py b/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py index 2cdf9d6f7..e19f8a27c 100644 --- a/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py +++ b/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py @@ -34994,7 +34994,7 @@ sig_dict.update({ "PySide2.QtCharts.QtCharts.QChart.removeAllSeries": (), "PySide2.QtCharts.QtCharts.QChart.removeAxis": ('PySide2.QtCharts.QtCharts.QAbstractAxis',), "PySide2.QtCharts.QtCharts.QChart.removeSeries": ('PySide2.QtCharts.QtCharts.QAbstractSeries',), - "PySide2.QtCharts.QtCharts.QChart.scroll": [('float', 'float'), ('float', 'float', 'PySide2.QtCore.QRectF')], + "PySide2.QtCharts.QtCharts.QChart.scroll": ('float', 'float'), "PySide2.QtCharts.QtCharts.QChart.series": (), "PySide2.QtCharts.QtCharts.QChart.setAnimationDuration": ('int',), "PySide2.QtCharts.QtCharts.QChart.setAnimationEasingCurve": ('PySide2.QtCore.QEasingCurve',), diff --git a/sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py b/sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py index b89ecc7dd..575236710 100644 --- a/sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py +++ b/sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py @@ -35148,7 +35148,7 @@ sig_dict.update({ "PySide2.QtCharts.QtCharts.QChart.removeAllSeries": (), "PySide2.QtCharts.QtCharts.QChart.removeAxis": ('PySide2.QtCharts.QtCharts.QAbstractAxis',), "PySide2.QtCharts.QtCharts.QChart.removeSeries": ('PySide2.QtCharts.QtCharts.QAbstractSeries',), - "PySide2.QtCharts.QtCharts.QChart.scroll": [('float', 'float'), ('float', 'float', 'PySide2.QtCore.QRectF')], + "PySide2.QtCharts.QtCharts.QChart.scroll": ('float', 'float'), "PySide2.QtCharts.QtCharts.QChart.series": (), "PySide2.QtCharts.QtCharts.QChart.setAnimationDuration": ('int',), "PySide2.QtCharts.QtCharts.QChart.setAnimationEasingCurve": ('PySide2.QtCore.QEasingCurve',), diff --git a/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py b/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py index 0e293986a..2bacf6ae7 100644 --- a/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py +++ b/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py @@ -34987,7 +34987,7 @@ sig_dict.update({ "PySide2.QtCharts.QtCharts.QChart.removeAllSeries": (), "PySide2.QtCharts.QtCharts.QChart.removeAxis": ('PySide2.QtCharts.QtCharts.QAbstractAxis',), "PySide2.QtCharts.QtCharts.QChart.removeSeries": ('PySide2.QtCharts.QtCharts.QAbstractSeries',), - "PySide2.QtCharts.QtCharts.QChart.scroll": [('float', 'float'), ('float', 'float', 'PySide2.QtCore.QRectF')], + "PySide2.QtCharts.QtCharts.QChart.scroll": ('float', 'float'), "PySide2.QtCharts.QtCharts.QChart.series": (), "PySide2.QtCharts.QtCharts.QChart.setAnimationDuration": ('int',), "PySide2.QtCharts.QtCharts.QChart.setAnimationEasingCurve": ('PySide2.QtCore.QEasingCurve',), |
