diff options
Diffstat (limited to 'sources/pyside2')
72 files changed, 1856 insertions, 556 deletions
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt index c4b97e860..d4bb023a0 100644 --- a/sources/pyside2/CMakeLists.txt +++ b/sources/pyside2/CMakeLists.txt @@ -1,7 +1,7 @@ include(cmake/Macros/icecc.cmake) # this must be the first line! -cmake_minimum_required(VERSION 3.0) -cmake_policy(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) +cmake_policy(VERSION 3.1) # Don't ignore targets that do not exist, inside add_dependencies calls. cmake_policy(SET CMP0046 NEW) @@ -104,6 +104,11 @@ if(CMAKE_HOST_APPLE) endif() endif() +# Force usage of the C++11 standard, without a silent fallback +# to C++98 if the compiler does not support C++11. +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + # Qt5: QT_INCLUDE_DIR does no longer exist. # On Windows, macOS, and Linux it can be computed from Qt5Core_INCLUDE_DIRS, which contains # a list of include directories. We take the first one. @@ -121,10 +126,6 @@ if (QtCore_is_framework) # QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point # to the actual include directory, which has include files for non-framework parts of Qt. get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE) - - # And then we append the framework dir, to mimic the way setup.py passed that in before to - # the old shiboken parser. - set(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}:${QT_FRAMEWORK_INCLUDE_DIR}") endif() if(MSVC) @@ -286,7 +287,10 @@ if(NOT MSVC) else() set(DISABLE_QtScriptTools 1) ENDIF() +COLLECT_MODULE_IF_FOUND(TextToSpeech opt) +COLLECT_MODULE_IF_FOUND(Charts opt) COLLECT_MODULE_IF_FOUND(Svg opt) +COLLECT_MODULE_IF_FOUND(DataVisualization opt) find_package(Qt5UiTools) if(Qt5UiTools_FOUND) COLLECT_MODULE_IF_FOUND(UiTools opt) diff --git a/sources/pyside2/PySide2/QtCharts/CMakeLists.txt b/sources/pyside2/PySide2/QtCharts/CMakeLists.txt new file mode 100644 index 000000000..5d6ed6aaf --- /dev/null +++ b/sources/pyside2/PySide2/QtCharts/CMakeLists.txt @@ -0,0 +1,99 @@ +project(QtCharts) + +set(QtCharts_SRC +${QtCharts_GEN_DIR}/qtcharts_qabstractaxis_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qabstractbarseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qabstractseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qarealegendmarker_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qareaseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qbarcategoryaxis_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qbarlegendmarker_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qbarmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qbarseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qbarset_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qboxplotlegendmarker_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qboxplotmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qboxplotseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qboxset_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qcandlesticklegendmarker_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qcandlestickmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qcandlestickseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qcandlestickset_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qcategoryaxis_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qchart_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qchartview_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qdatetimeaxis_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qhbarmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qhboxplotmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qhcandlestickmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qhorizontalbarseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qhorizontalpercentbarseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qhorizontalstackedbarseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qhpiemodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qhxymodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qlegend_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qlegendmarker_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qlineseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qlogvalueaxis_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qpercentbarseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qpielegendmarker_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qpiemodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qpieseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qpieslice_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qpolarchart_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qscatterseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qsplineseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qstackedbarseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qvalueaxis_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qvbarmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qvboxplotmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qvcandlestickmodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qvpiemodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qvxymodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qxylegendmarker_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qxymodelmapper_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_qxyseries_wrapper.cpp +${QtCharts_GEN_DIR}/qtcharts_wrapper.cpp +# module is always needed +${QtCharts_GEN_DIR}/qtcharts_module_wrapper.cpp +) + +make_path(QtCharts_typesystem_path + ${QtCore_SOURCE_DIR} + ${QtCore_BINARY_DIR} + ${QtGui_SOURCE_DIR} + ${QtGui_BINARY_DIR} + ${QtWidgets_SOURCE_DIR} + ${QtWidgets_BINARY_DIR} + ${QtCharts_SOURCE_DIR}) + +set(QtCharts_include_dirs ${QtCharts_SOURCE_DIR} + ${QtCharts_BINARY_DIR} + ${Qt5Core_INCLUDE_DIRS} + ${Qt5Gui_INCLUDE_DIRS} + ${Qt5Widgets_INCLUDE_DIRS} + ${Qt5Charts_INCLUDE_DIRS} + ${SHIBOKEN_INCLUDE_DIR} + ${libpyside_SOURCE_DIR} + ${SHIBOKEN_PYTHON_INCLUDE_DIR} + ${QtCore_GEN_DIR} + ${QtGui_GEN_DIR} + ${QtWidgets_GEN_DIR}) + +set(QtCharts_libraries pyside2 + ${SHIBOKEN_PYTHON_LIBRARIES} + ${SHIBOKEN_LIBRARY} + ${Qt5Charts_LIBRARIES} + ${Qt5Core_LIBRARIES} + ${Qt5Gui_LIBRARIES} + ${Qt5Widgets_LIBRARIES}) + +set(QtCharts_deps QtCore QtGui QtWidgets) + +create_pyside_module(QtCharts + QtCharts_include_dirs + QtCharts_libraries + QtCharts_deps + QtCharts_typesystem_path + QtCharts_SRC + "") diff --git a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml new file mode 100644 index 000000000..6c0c02a47 --- /dev/null +++ b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml @@ -0,0 +1,129 @@ +<?xml version="1.0"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of PySide2. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +--> +<typesystem package="PySide2.QtCharts"> + <load-typesystem name="typesystem_widgets.xml" generate="no" /> + <namespace-type name="QtCharts"> + <object-type name="QAbstractAxis" since="5.7"> + <enum-type name="AxisType"/> + </object-type> + <object-type name="QAbstractBarSeries" since="5.7"> + <enum-type name="LabelsPosition"/> + </object-type> + <object-type name="QAbstractSeries" since="5.7"> + <enum-type name="SeriesType"/> + </object-type> + <object-type name="QAreaLegendMarker" since="5.7"/> + <object-type name="QAreaSeries" since="5.7"/> + <object-type name="QBarCategoryAxis" since="5.7"/> + <object-type name="QBarLegendMarker" since="5.7"/> + <object-type name="QBarModelMapper" since="5.7"/> + <object-type name="QBarSeries" since="5.7"/> + <object-type name="QBarSet" since="5.7"/> + <object-type name="QBoxPlotLegendMarker" since="5.7"/> + <object-type name="QBoxPlotModelMapper" since="5.7"/> + <object-type name="QBoxPlotSeries" since="5.7"/> + <object-type name="QBoxSet" since="5.7"> + <enum-type name="ValuePositions"/> + </object-type> + <object-type name="QCandlestickLegendMarker" since="5.7"/> + <object-type name="QCandlestickModelMapper" since="5.7"/> + <object-type name="QCandlestickSeries" since="5.7"/> + <object-type name="QCandlestickSet" since="5.7"/> + <object-type name="QCategoryAxis" since="5.7"/> + <object-type name="QChart" since="5.7"> + <enum-type name="ChartType"/> + <enum-type name="ChartTheme"/> + <enum-type name="AnimationOption"/> + <modify-function signature="addSeries(QAbstractSeries*)"> + <modify-argument index="1"> + <parent index="this" action="add"/> + </modify-argument> + </modify-function> + </object-type> + <object-type name="QChartView" since="5.7"> + <enum-type name="RubberBand"/> + </object-type> + <object-type name="QDateTimeAxis" since="5.7"/> + <object-type name="QHBarModelMapper" since="5.7"/> + <object-type name="QHBoxPlotModelMapper" since="5.7"/> + <object-type name="QHCandlestickModelMapper" since="5.7"/> + <object-type name="QHorizontalBarSeries" since="5.7"/> + <object-type name="QHorizontalPercentBarSeries" since="5.7"/> + <object-type name="QHorizontalStackedBarSeries" since="5.7"/> + <object-type name="QHPieModelMapper" since="5.7"/> + <object-type name="QHXYModelMapper" since="5.7"/> + <object-type name="QLegend" since="5.7"> + <enum-type name="MarkerShape"/> + </object-type> + <object-type name="QLegendMarker" since="5.7"> + <enum-type name="LegendMarkerType"/> + </object-type> + <object-type name="QLineSeries" since="5.7"/> + <object-type name="QLogValueAxis" since="5.7"/> + <object-type name="QPercentBarSeries" since="5.7"/> + <object-type name="QPieLegendMarker" since="5.7"/> + <object-type name="QPieModelMapper" since="5.7"/> + <object-type name="QPieSeries" since="5.7"/> + <object-type name="QPieSlice" since="5.7"> + <enum-type name="LabelPosition"/> + </object-type> + <object-type name="QPolarChart" since="5.7"> + <enum-type name="PolarOrientation" flags="PolarOrientations"/> + <!-- Compile error assigning default flags value --> + <modify-function signature="axes(QFlags<QtCharts::QPolarChart::PolarOrientation>,QtCharts::QAbstractSeries*)const" remove="all"/> + </object-type> + <object-type name="QScatterSeries" since="5.7"> + <enum-type name="MarkerShape"/> + </object-type> + <object-type name="QSplineSeries" since="5.7"/> + <object-type name="QStackedBarSeries" since="5.7"/> + <object-type name="QValueAxis" since="5.7"/> + <object-type name="QVBarModelMapper" since="5.7"/> + <object-type name="QVBoxPlotModelMapper" since="5.7"/> + <object-type name="QVCandlestickModelMapper" since="5.7"/> + <object-type name="QVPieModelMapper" since="5.7"/> + <object-type name="QVXYModelMapper" since="5.7"/> + <object-type name="QXYLegendMarker" since="5.7"/> + <object-type name="QXYModelMapper" since="5.7"/> + <object-type name="QXYSeries" since="5.7"/> + </namespace-type> +</typesystem> diff --git a/sources/pyside2/PySide2/QtCore/CMakeLists.txt b/sources/pyside2/PySide2/QtCore/CMakeLists.txt index 5e3c16a08..384243f7c 100644 --- a/sources/pyside2/PySide2/QtCore/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtCore/CMakeLists.txt @@ -10,9 +10,6 @@ else() set(SPECIFIC_OS_FILES "") endif() -# TODO: Fix cycling dependency when generating QDataStream operator<< for QUuid -set (QtCore_SRC_FIXED_ME ${QtCore_GEN_DIR}/quuid_wrapper.cpp) - set(QtCore_SRC ${QtCore_GEN_DIR}/qabstractanimation_wrapper.cpp ${QtCore_GEN_DIR}/qabstracteventdispatcher_timerinfo_wrapper.cpp @@ -100,6 +97,9 @@ ${QtCore_GEN_DIR}/qreadwritelock_wrapper.cpp ${QtCore_GEN_DIR}/qrect_wrapper.cpp ${QtCore_GEN_DIR}/qrectf_wrapper.cpp ${QtCore_GEN_DIR}/qregexp_wrapper.cpp +${QtCore_GEN_DIR}/qregularexpression_wrapper.cpp +${QtCore_GEN_DIR}/qregularexpressionmatch_wrapper.cpp +${QtCore_GEN_DIR}/qregularexpressionmatchiterator_wrapper.cpp ${QtCore_GEN_DIR}/qresource_wrapper.cpp ${QtCore_GEN_DIR}/qrunnable_wrapper.cpp ${QtCore_GEN_DIR}/qsavefile_wrapper.cpp @@ -140,7 +140,10 @@ ${QtCore_GEN_DIR}/qtimezone_wrapper.cpp ${QtCore_GEN_DIR}/qtimezone_offsetdata_wrapper.cpp ${QtCore_GEN_DIR}/qtranslator_wrapper.cpp ${QtCore_GEN_DIR}/qurl_wrapper.cpp +${QtCore_GEN_DIR}/qurlquery_wrapper.cpp +${QtCore_GEN_DIR}/quuid_wrapper.cpp ${QtCore_GEN_DIR}/qvariantanimation_wrapper.cpp +${QtCore_GEN_DIR}/qversionnumber_wrapper.cpp ${QtCore_GEN_DIR}/qwaitcondition_wrapper.cpp ${QtCore_GEN_DIR}/qwritelocker_wrapper.cpp ${QtCore_GEN_DIR}/qxmlstreamattribute_wrapper.cpp diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index 41a20a617..2b441eba0 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -137,6 +137,35 @@ <rejection class="*" function-name="qFreeAligned"/> <rejection class="QMetaMethod" enum-name="Attributes" /> + <rejection class="*" argument-type="QByteArrayDataPtr"/> + <rejection class="*" argument-type="^qfloat16&?$"/> + <rejection class="*" argument-type="QHashData"/> + <rejection class="*" argument-type="QHashData::Node*"/> + <rejection class="*" argument-type="QLatin1String"/> + <rejection class="*" argument-type="QLinkedListData*"/> + <rejection class="*" argument-type="QListData::ArrayCompatibleLayout"/> + <rejection class="*" argument-type="QListData::Data*"/> + <rejection class="*" argument-type="QListData::NotArrayCompatibleLayout"/> + <rejection class="*" argument-type="QList::Node*"/> + <rejection class="*" argument-type="QTSMFI"/> + <rejection class="*" argument-type="QTSMFC"/> + <rejection class="*" argument-type="QMutexData*"/> + <rejection class="*" argument-type="QObjectUserData*"/> + <rejection class="*" argument-type="QtPrivate::QSlotObjectBase*"/> + <rejection class="*" argument-type="^Q\w+Private( const)?\&$"/> + <!-- Note: "QHelpModel(QHelpEnginePrivate*)" is needed --> + <rejection class="*" argument-type="^Q[^H]\w+Private( const)?\*$"/> + <rejection class="*" argument-type="^.*::QPrivateSignal$"/> + <rejection class="*" argument-type="Qt::Initialization"/> + + <rejection class="*" argument-type="FILE*"/> + <rejection class="*" argument-type="std::chrono::milliseconds"/> + <rejection class="*" argument-type="^std::nullptr_t&?$"/> + <rejection class="*" argument-type="^std::initializer_list<.*$"/> + <rejection class="*" argument-type="^std::list<[^>]> const&$"/> + <rejection class="*" argument-type="std::string const&"/> + <rejection class="*" argument-type="^std::vector<[^>]> const&$"/> + <!-- From Qt4.6 ^^^ --> @@ -182,6 +211,18 @@ <!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type --> <include file-name="signalmanager.h" location="global"/> </primitive-type> + + <!-- Among other use cases, these types are necessary for OpenGL "GLint"-like typedefs on macOS. + --> + <primitive-type name="int64_t" /> + <primitive-type name="int32_t" /> + <primitive-type name="int16_t" /> + <primitive-type name="int8_t" /> + <primitive-type name="uint64_t" /> + <primitive-type name="uint32_t" /> + <primitive-type name="uint16_t" /> + <primitive-type name="uint8_t" /> + <primitive-type name="bool" target-lang-api-name="PyBool"> <conversion-rule> <native-to-target> @@ -1754,9 +1795,7 @@ <value-type name="OffsetData"/> </value-type> - <!-- FIXME QT5: Remove QUuid because cyclic dependency found on overloaddata QUuid(), - this lead to cyclic dependency in <<(QDataStream &, QUUid) and incorrect QDataStream code generation (Windows only)--> - <!-- <value-type name="QUuid"> + <value-type name="QUuid"> <enum-type name="Variant"/> <enum-type name="Version"/> <add-function signature="__repr__" return-type="PyObject*"> @@ -1775,7 +1814,7 @@ </insert-template> </inject-code> </add-function> - </value-type> --> + </value-type> <value-type name="QMimeType" since="5.0" /> <object-type name="QMimeDatabase" since="5.0"> @@ -2337,6 +2376,7 @@ <include file-name="QSize" location="global"/> </extra-includes> </object-type> + <value-type name="QUrlQuery" since="5.0" /> <value-type name="QUrl" hash-function="PySide::hash"> <!-- Qt5: lots of changes --> <enum-type name="ComponentFormattingOption" flags="ComponentFormattingOptions,FormattingOptions"/> @@ -2427,6 +2467,15 @@ </inject-code> </add-function> </value-type> + + <value-type name="QRegularExpression"> + <enum-type name="MatchOption" flags="MatchOptions"/> + <enum-type name="MatchType"/> + <enum-type name="PatternOption" flags="PatternOptions"/> + </value-type> + <value-type name="QRegularExpressionMatch"/> + <value-type name="QRegularExpressionMatchIterator"/> + <value-type name="QFileInfo"> <extra-includes> <include file-name="QDateTime" location="global"/> @@ -3247,7 +3296,7 @@ <modify-function signature="notify(QObject*,QEvent*)" allow-thread="yes"> <modify-argument index="2" invalidate-after-use="yes"/> </modify-function> - <modify-function signature="QCoreApplication(int &, char **)" access="private"/> + <modify-function signature="QCoreApplication(int &, char **, int)" access="private"/> <inject-code class="native" file="glue/qcoreapplication_init.cpp" position="beginning" /> <modify-function signature="postEvent(QObject*,QEvent*, int)"> <modify-argument index="2"> @@ -3591,8 +3640,8 @@ <modify-function signature="operator<<(float)" remove="all"/> <modify-function signature="operator<<(qlonglong)" remove="all"/> <modify-function signature="operator<<(qulonglong)" remove="all"/> - <modify-function signature="operator<<(signed short)" remove="all"/> - <modify-function signature="operator<<(signed int)" remove="all"/> + <modify-function signature="operator<<(short)" remove="all"/> + <modify-function signature="operator<<(int)" remove="all"/> <modify-function signature="operator<<(unsigned int)" remove="all"/> <modify-function signature="operator<<(unsigned short)" remove="all"/> <modify-function signature="operator<<(const char*)" remove="all"/> @@ -3603,9 +3652,9 @@ <modify-function signature="operator>>(double&)" remove="all"/> <modify-function signature="operator>>(qlonglong&)" remove="all"/> <modify-function signature="operator>>(qulonglong&)" remove="all"/> - <modify-function signature="operator>>(signed long&)" remove="all"/> - <modify-function signature="operator>>(signed int&)" remove="all"/> - <modify-function signature="operator>>(signed short&)" remove="all"/> + <modify-function signature="operator>>(long&)" remove="all"/> + <modify-function signature="operator>>(int&)" remove="all"/> + <modify-function signature="operator>>(short&)" remove="all"/> <modify-function signature="operator>>(unsigned long&)" remove="all"/> <modify-function signature="operator>>(unsigned int&)" remove="all"/> <modify-function signature="operator>>(unsigned short&)" remove="all"/> @@ -4094,6 +4143,14 @@ s1.addTransition(button.clicked, s1h)</code> <object-type name="QVariantAnimation" since="4.6"/> + <value-type name="QVersionNumber" since="5.6"> + <modify-function signature="fromString(const QString &,int*)"> + <modify-argument index="2"> + <remove-argument/> + </modify-argument> + </modify-function> + </value-type> + <!-- From Qt4.6 ^^^ --> <add-function signature="SIGNAL(const char*)" return-type="str"> @@ -4211,7 +4268,7 @@ s1.addTransition(button.clicked, s1h)</code> <!-- TODO: this need be removed --> <suppress-warning text="skipping function '*', unmatched return type '*'"/> - <suppress-warning text="skipping function '*', unmatched parameter type '*'"/> + <suppress-warning text="skipping function '*', unmatched type '*"/> <suppress-warning text="enum 'q_static_assert_result39' does not have a type entry or is not an enum"/> <suppress-warning text="horribly broken type ''"/> diff --git a/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt b/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt new file mode 100644 index 000000000..54809807c --- /dev/null +++ b/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt @@ -0,0 +1,77 @@ +project(QtDataVisualization) + +set(QtDataVisualization_SRC +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3daxis_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcategory3daxis_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qlogvalue3daxisformatter_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qvalue3daxis_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qvalue3daxisformatter_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dseries_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstractdataproxy_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbar3dseries_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbardataitem_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbardataproxy_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3ditem_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3dlabel_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3dvolume_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qheightmapsurfacedataproxy_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelbardataproxy_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelscatterdataproxy_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelsurfacedataproxy_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatter3dseries_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatterdataitem_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatterdataproxy_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurface3dseries_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurfacedataitem_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurfacedataproxy_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dbars_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dcamera_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dlight_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dobject_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dscatter_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dscene_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dsurface_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dgraph_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dinputhandler_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dinputhandler_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_qtouch3dinputhandler_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dtheme_wrapper.cpp +${QtDataVisualization_GEN_DIR}/qtdatavisualization_wrapper.cpp +# module is always needed +${QtDataVisualization_GEN_DIR}/qtdatavisualization_module_wrapper.cpp +) + +make_path(QtDataVisualization_typesystem_path + ${QtCore_SOURCE_DIR} + ${QtCore_BINARY_DIR} + ${QtGui_SOURCE_DIR} + ${QtGui_BINARY_DIR} + ${QtDataVisualization_SOURCE_DIR}) + +set(QtDataVisualization_include_dirs ${QtDataVisualization_SOURCE_DIR} + ${QtDataVisualization_BINARY_DIR} + ${Qt5Core_INCLUDE_DIRS} + ${Qt5Gui_INCLUDE_DIRS} + ${Qt5DataVisualization_INCLUDE_DIRS} + ${SHIBOKEN_INCLUDE_DIR} + ${libpyside_SOURCE_DIR} + ${SHIBOKEN_PYTHON_INCLUDE_DIR} + ${QtCore_GEN_DIR} + ${QtGui_GEN_DIR}) + +set(QtDataVisualization_libraries pyside2 + ${SHIBOKEN_PYTHON_LIBRARIES} + ${SHIBOKEN_LIBRARY} + ${Qt5DataVisualization_LIBRARIES} + ${Qt5Core_LIBRARIES} + ${Qt5Gui_LIBRARIES}) + +set(QtDataVisualization_deps QtCore QtGui) + +create_pyside_module(QtDataVisualization + QtDataVisualization_include_dirs + QtDataVisualization_libraries + QtDataVisualization_deps + QtDataVisualization_typesystem_path + QtDataVisualization_SRC + "") diff --git a/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml b/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml new file mode 100644 index 000000000..bc2d66df4 --- /dev/null +++ b/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml @@ -0,0 +1,179 @@ +<?xml version="1.0"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of PySide2. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +--> +<typesystem package="PySide2.QtDataVisualization"> + <rejection class="^.*Proxy.*$" argument-type="^Q.*(DataRow|DataArray)\*.*$"/> + + <template name="cppqlistofptrtoqvectors_to_py_conversion"> + const int rowCount = %in.size(); + PyObject* %out = PyList_New(rowCount); + for (int r = 0; r < rowCount; ++r) { + const QVector<%INTYPE_0> *row = %in.at(r); + const int columnCount = row->size(); + PyObject *pyRow = PyList_New(columnCount); + for (int c = 0; c < columnCount; ++c) { + const %INTYPE_0 &cppItem = row->at(c); + PyList_SET_ITEM(pyRow, c, %CONVERTTOPYTHON[%INTYPE_0](cppItem)); + } + PyList_SET_ITEM(%out, r, pyRow); + } + return %out; + </template> + <template name="py_to_cppqlistofptrtoqvectors_conversion"> + const int rowCount = int(PySequence_Size(%in)); + %OUTTYPE &result = %out; + result.reserve(rowCount); + for (int r = 0; r < rowCount; ++r) { + Shiboken::AutoDecRef rowItem(PySequence_GetItem(%in, r)); + const int columnCount = int(PySequence_Size(rowItem)); + QVector<%OUTTYPE_0> *row = new QVector<%OUTTYPE_0>; + row->reserve(columnCount); + for (int c = 0; c < columnCount; ++c) { + Shiboken::AutoDecRef pyItem(PySequence_GetItem(rowItem, c)); + %OUTTYPE_0 v = %CONVERTTOCPP[%OUTTYPE_0](pyItem); + row->append(v); + } + result.append(row); + } + </template> + <load-typesystem name="typesystem_gui.xml" generate="no" /> + <namespace-type name="QtDataVisualization"> + <primitive-type name="QBarDataArray"> + <include file-name="qbardataproxy.h" location="global"/> + <conversion-rule> + <native-to-target> + <insert-template name="cppqlistofptrtoqvectors_to_py_conversion"> + <replace from="%INTYPE_0" to="QtDataVisualization::QBarDataItem"/> + </insert-template> + </native-to-target> + <target-to-native> + <add-conversion type="PySequence"> + <insert-template name="py_to_cppqlistofptrtoqvectors_conversion"> + <replace from="%OUTTYPE_0" to="QtDataVisualization::QBarDataItem"/> + </insert-template> + </add-conversion> + </target-to-native> + </conversion-rule> + </primitive-type> + <primitive-type name="QSurfaceDataArray"> + <include file-name="qsurfacedataproxy.h" location="global"/> + <conversion-rule> + <native-to-target> + <insert-template name="cppqlistofptrtoqvectors_to_py_conversion"> + <replace from="%INTYPE_0" to="QtDataVisualization::QSurfaceDataItem"/> + </insert-template> + </native-to-target> + <target-to-native> + <add-conversion type="PySequence"> + <insert-template name="py_to_cppqlistofptrtoqvectors_conversion"> + <replace from="%OUTTYPE_0" to="QtDataVisualization::QSurfaceDataItem"/> + </insert-template> + </add-conversion> + </target-to-native> + </conversion-rule> + </primitive-type> + + <object-type name="QAbstract3DAxis"> + <enum-type name="AxisOrientation"/> + <enum-type name="AxisType"/> + </object-type> + <object-type name="QCategory3DAxis"/> + <object-type name="QLogValue3DAxisFormatter"/> + <object-type name="QValue3DAxis"/> + <object-type name="QValue3DAxisFormatter"/> + <object-type name="QAbstract3DSeries"> + <enum-type name="Mesh"/> + <enum-type name="SeriesType"/> + </object-type> + <object-type name="QAbstractDataProxy"> + <enum-type name="DataType"/> + </object-type> + <object-type name="QBar3DSeries"/> + <value-type name="QBarDataItem"/> + <object-type name="QBarDataProxy"/> + <object-type name="QCustom3DItem"/> + <object-type name="QCustom3DLabel"/> + <object-type name="QCustom3DVolume"/> + <object-type name="QHeightMapSurfaceDataProxy"/> + <object-type name="QItemModelBarDataProxy"> + <enum-type name="MultiMatchBehavior"/> + </object-type> + <object-type name="QItemModelScatterDataProxy"/> + <object-type name="QItemModelSurfaceDataProxy"> + <enum-type name="MultiMatchBehavior"/> + </object-type> + <object-type name="QScatter3DSeries"/> + <value-type name="QScatterDataItem"/> + <object-type name="QScatterDataProxy"/> + <object-type name="QSurface3DSeries"> + <enum-type name="DrawFlag" flags="DrawFlags"/> + </object-type> + <value-type name="QSurfaceDataItem"/> + <object-type name="QSurfaceDataProxy"/> + <object-type name="Q3DBars"/> + <object-type name="Q3DCamera"> + <enum-type name="CameraPreset"/> + </object-type> + <object-type name="Q3DLight"/> + <object-type name="Q3DObject"/> + <object-type name="Q3DScatter"/> + <object-type name="Q3DScene"/> + <object-type name="Q3DSurface"/> + <object-type name="QAbstract3DGraph"> + <enum-type name="ElementType"/> + <enum-type name="OptimizationHint" flags="OptimizationHints"/> + <enum-type name="SelectionFlag" flags="SelectionFlags"/> + <enum-type name="ShadowQuality"/> + </object-type> + <object-type name="Q3DInputHandler"/> + <object-type name="QAbstract3DInputHandler"> + <enum-type name="InputView"/> + </object-type> + <object-type name="QTouch3DInputHandler"/> + <object-type name="Q3DTheme"> + <enum-type name="ColorStyle"/> + <enum-type name="Theme"/> + </object-type> + <extra-includes> + <include file-name="qutils.h" location="global"/> + </extra-includes> + </namespace-type> +</typesystem> diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt index a6a8c1049..b0973debe 100644 --- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt @@ -3,6 +3,7 @@ project(QtGui) qt5_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside2_SOURCE_DIR}/qpytextobject.h") set(QtGui_SRC +${QtGui_GEN_DIR}/qabstractopenglfunctions_wrapper.cpp ${QtGui_GEN_DIR}/qabstracttextdocumentlayout_paintcontext_wrapper.cpp ${QtGui_GEN_DIR}/qabstracttextdocumentlayout_selection_wrapper.cpp ${QtGui_GEN_DIR}/qabstracttextdocumentlayout_wrapper.cpp @@ -66,6 +67,23 @@ ${QtGui_GEN_DIR}/qmatrix4x4_wrapper.cpp ${QtGui_GEN_DIR}/qmouseevent_wrapper.cpp ${QtGui_GEN_DIR}/qmoveevent_wrapper.cpp ${QtGui_GEN_DIR}/qmovie_wrapper.cpp +${QtGui_GEN_DIR}/qoffscreensurface_wrapper.cpp +${QtGui_GEN_DIR}/qopenglcontextgroup_wrapper.cpp +${QtGui_GEN_DIR}/qopengldebuglogger_wrapper.cpp +${QtGui_GEN_DIR}/qopengldebugmessage_wrapper.cpp +${QtGui_GEN_DIR}/qopenglextrafunctions_wrapper.cpp +${QtGui_GEN_DIR}/qopenglframebufferobjectformat_wrapper.cpp +${QtGui_GEN_DIR}/qopenglfunctions_wrapper.cpp +# Compile error on Windows: ${QtGui_GEN_DIR}/qopenglpaintdevice_wrapper.cpp +${QtGui_GEN_DIR}/qopenglpixeltransferoptions_wrapper.cpp +${QtGui_GEN_DIR}/qopenglshaderprogram_wrapper.cpp +${QtGui_GEN_DIR}/qopengltexture_wrapper.cpp +${QtGui_GEN_DIR}/qopengltimemonitor_wrapper.cpp +${QtGui_GEN_DIR}/qopengltimerquery_wrapper.cpp +${QtGui_GEN_DIR}/qopenglversionprofile_wrapper.cpp +${QtGui_GEN_DIR}/qopenglvertexarrayobject_wrapper.cpp +${QtGui_GEN_DIR}/qopenglvertexarrayobject_binder_wrapper.cpp +${QtGui_GEN_DIR}/qopenglwindow_wrapper.cpp ${QtGui_GEN_DIR}/qpagedpaintdevice_margins_wrapper.cpp ${QtGui_GEN_DIR}/qpagedpaintdevice_wrapper.cpp ${QtGui_GEN_DIR}/qpagelayout_wrapper.cpp diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml index 55bc438be..9260b3d38 100644 --- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml +++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml @@ -54,6 +54,7 @@ } </template> + <rejection class="^Q.*$" argument-type="^QPlatform.*$"/> <function signature="qAlpha(uint)" /> <function signature="qBlue(uint)" /> <function signature="qGray(int,int,int)" /> @@ -96,6 +97,22 @@ <rejection class="*" function-name="d_func"/> <rejection class="*" field-name="d_ptr"/> <rejection class="*" field-name="d"/> + <rejection class="^QOpenGL.*$" argument-type="^GLboolean( const)?\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^GLchar\*$"/> + <rejection class="^QOpenGL.*$" argument-type="GLchar *const const*"/> + <rejection class="^QOpenGL.*$" argument-type="^char\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^char( const)?\*\*$"/> + <rejection class="^QOpenGL.*$" argument-type="GLintptr"/> + <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/> + <rejection class="^QOpenGL.*$" argument-type="GLsync"/> + <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/> + <rejection class="^QOpenGL.*$" return-type="^GLubyte( const)?\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^QMatrix.x.( const)?\*$"/> + <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/> + <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/> + <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/> + <rejection class="^QOpenGL.*$" argument-type="^QVector.D( const)?\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^void( const)?\*\*?$"/> <!-- Event classes have a lot of non-documented protected fields, those fields @@ -617,7 +634,7 @@ %0 = new %TYPE(QPixmap::fromImage(%1)); </inject-code> </add-function> - <modify-function signature="QPixmap(const char **)"> + <modify-function signature="QPixmap(const char*[])"> <modify-argument index="1"> <replace-type modified-type="PySequence" /> </modify-argument> @@ -846,7 +863,7 @@ <modify-function signature="QImage(const uchar*,int,int,QImage::Format,QImageCleanupFunction, void *)" remove="all" /> <!-- ### --> - <modify-function signature="QImage(const char**)"> + <modify-function signature="QImage(const char*[])"> <modify-argument index="1"> <replace-type modified-type="PySequence" /> </modify-argument> @@ -3207,6 +3224,7 @@ <enum-type name="RenderableType"/> <enum-type name="SwapBehavior"/> </value-type> + <object-type name="QOffscreenSurface" since="5.1"/> <primitive-type name="QPlatformSurface"> <extra-includes> <include file-name="QtGui/qpa/qplatformsurface.h" location="global"/> @@ -3260,19 +3278,384 @@ <object-type name="QOpenGLContext"> <enum-type name="OpenGLModuleType" /> </object-type> - <object-type name="QOpenGLFramebufferObject"> + <object-type name="QOpenGLContextGroup" since="5.0"/> + <object-type name="QOpenGLDebugLogger" since="5.1"> + <enum-type name="LoggingMode"/> + </object-type> + <value-type name="QOpenGLDebugMessage" since="5.1"> + <enum-type name="Source" flags="Sources"/> + <enum-type name="Type" flags="Types"/> + <enum-type name="Severity" flags="Severities"/> + </value-type> + <object-type name="QOpenGLFramebufferObject" since="5.0"> <enum-type name="Attachment" /> <enum-type name="FramebufferRestorePolicy" since="5.7"/> </object-type> - <object-type name="QOpenGLShader" > - <enum-type name="ShaderTypeBit" flags="ShaderType" /> + <value-type name="QOpenGLFramebufferObjectFormat"/> + <!-- Compile error on Windows: QOpenGLPaintDevice::QOpenGLPaintDevice(const QOpenGLPaintDevice &)': attempting to reference a deleted function + <object-type name="QOpenGLPaintDevice" since="5.0"/> + --> + <object-type name="QOpenGLExtraFunctions" since="5.6"> + <!-- Exlusions due to compile errors --> + <modify-function signature="glEndTransformFeedback()" remove="all"/> + <modify-function signature="glPauseTransformFeedback()" remove="all"/> + <modify-function signature="glResumeTransformFeedback()" remove="all"/> + <modify-function signature="^glClearBuffer.*\(.*$"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glDeleteProgramPipelines(int,const unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glDeleteQueries(int,const unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glDeleteSamplers(int,const unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glDeleteTransformFeedbacks(int,const unsigned int *)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glDeleteVertexArrays(int,const unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glDrawBuffers(int,const unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glGenProgramPipelines(int,unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glGenQueries(int,unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glGenSamplers(int,unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glGenTransformFeedbacks(int,unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glGenVertexArrays(int,unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetActiveUniformBlockiv(unsigned int,unsigned int,unsigned int,int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetActiveUniformsiv(unsigned int,int,const unsigned int*,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetFramebufferParameteriv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetIntegeri_v(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetInternalformativ(unsigned int,unsigned int,unsigned int,int,int*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetMultisamplefv(unsigned int,unsigned int,float*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetProgramInterfaceiv(unsigned int,unsigned int,unsigned int,int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetProgramPipelineiv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetProgramResourceiv(unsigned int,unsigned int,unsigned int,int,const unsigned int*,int,int*,int*)"> + <modify-argument index="5"><array/></modify-argument> + <modify-argument index="7"><array/></modify-argument> + <modify-argument index="8"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetQueryObjectuiv(unsigned int,unsigned int,unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetQueryiv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetSamplerParameterfv(unsigned int,unsigned int,float*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetSamplerParameteriv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetTexLevelParameteriv(unsigned int,int,unsigned int,int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetTexLevelParameterfv(unsigned int,int,unsigned int,float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetUniformuiv(unsigned int,int,unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetVertexAttribIiv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetVertexAttribIuiv(unsigned int,unsigned int,unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glInvalidateFramebuffer(unsigned int,int,const unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glInvalidateSubFramebuffer(unsigned int,int,const unsigned int*,int,int,int,int)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform1fv(unsigned int,int,int,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform1iv(unsigned int,int,int,const int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform1uiv(unsigned int,int,int,const unsigned int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform2fv(unsigned int,int,int,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform2iv(unsigned int,int,int,const int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform2uiv(unsigned int,int,int,const unsigned int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform3fv(unsigned int,int,int,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform3iv(unsigned int,int,int,const int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform3uiv(unsigned int,int,int,const unsigned int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform4fv(unsigned int,int,int,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform4iv(unsigned int,int,int,const int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniform4uiv(unsigned int,int,int,const unsigned int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix2fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix2x3fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix2x4fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix3fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix3x2fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix3x4fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix4fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix4x2fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glProgramUniformMatrix4x3fv(unsigned int,int,int,unsigned char,const float*)"> + <modify-argument index="5"><array/></modify-argument> + </modify-function> + <modify-function signature="glSamplerParameterfv(unsigned int,unsigned int,const float*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glSamplerParameteriv(unsigned int,unsigned int,const int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniform1uiv(int,int,const unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniform2uiv(int,int,const unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniform3uiv(int,int,const unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniform4uiv(int,int,const unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniformMatrix2x3fv(int,int,unsigned char,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniformMatrix2x4fv(int,int,unsigned char,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniformMatrix3x2fv(int,int,unsigned char,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniformMatrix3x4fv(int,int,unsigned char,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniformMatrix4x2fv(int,int,unsigned char,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glUniformMatrix4x3fv(int,int,unsigned char,const float*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glVertexAttribI4iv(unsigned int,const int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glVertexAttribI4uiv(unsigned int,const unsigned int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + </object-type> + <object-type name="QOpenGLFunctions" since="5.0"> + <enum-type name="OpenGLFeature" flags="OpenGLFeatures"/> + <modify-function signature="glGetAttachedShaders(unsigned int,int,int*,unsigned int*)"> + <modify-argument index="3"><array/></modify-argument> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetBufferParameteriv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetFloatv(unsigned int,float*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetFramebufferAttachmentParameteriv(unsigned int,unsigned int,unsigned int,int*)"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetIntegerv(unsigned int,int*)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetProgramiv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetRenderbufferParameteriv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetShaderiv(unsigned int,unsigned int,int*)"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="glGetShaderPrecisionFormat(unsigned int,unsigned int,int*,int*)"> + <modify-argument index="3"><array/></modify-argument> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="^glDelete.*s\(.*$"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="^glGen[A-Z].*s\(.*$"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="^gl(Get)?TexParameter[fi]v\(.*$"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="^glUniformMatrix\dfv\(.*$"> + <modify-argument index="4"><array/></modify-argument> + </modify-function> + <modify-function signature="^gl(Get)?Uniform\d?.v\(.*$"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> + <modify-function signature="^glVertexAttrib\dfv\(.*$"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="^glGetVertexAttrib[fi]v\(.*$"> + <modify-argument index="3"><array/></modify-argument> + </modify-function> </object-type> - <!-- Temporarily disable type, because it causes segfault on Linux due to incorrect parsing - of the void setUniformValue(const char *name, const GLfloat value[2][2]); method. - The float[][] ends up with an "Array" cpp signature, which obviously can't be found in the - typesystem. - <object-type name="QOpenGLShaderProgram" /> + <object-type name="QAbstractOpenGLFunctions" since="5.1"/> + <!-- Classes are result of a macro expansion in src/gui/opengl/qopenglversionfunctions.h + <object-type name="QOpenGLFunctions_1_0" since="5.1"/> + <object-type name="QOpenGLFunctions_1_1" since="5.1"/> + <object-type name="QOpenGLFunctions_1_2" since="5.1"/> + <object-type name="QOpenGLFunctions_1_3" since="5.1"/> + <object-type name="QOpenGLFunctions_1_4" since="5.1"/> + <object-type name="QOpenGLFunctions_1_5" since="5.1"/> + <object-type name="QOpenGLFunctions_2_0" since="5.1"> + <object-type name="QOpenGLFunctions_2_1" since="5.1"/> + <object-type name="QOpenGLFunctions_3_0" since="5.1"/> + <object-type name="QOpenGLFunctions_3_1" since="5.1"/> + <object-type name="QOpenGLFunctions_3_2_Compatibility" since="5.1"/> + <object-type name="QOpenGLFunctions_3_2_Core" since="5.1"/> + <object-type name="QOpenGLFunctions_3_3_Compatibility" since="5.1"/> + <object-type name="QOpenGLFunctions_3_3_Core" since="5.1"/> + <object-type name="QOpenGLFunctions_4_0_Compatibility" since="5.1"/> + <object-type name="QOpenGLFunctions_4_0_Core" since="5.1"/> + <object-type name="QOpenGLFunctions_4_1_Compatibility" since="5.1"/> + <object-type name="QOpenGLFunctions_4_1_Core" since="5.1"/> + <object-type name="QOpenGLFunctions_4_2_Compatibility" since="5.1"/> + <object-type name="QOpenGLFunctions_4_2_Core" since="5.1"/> + <object-type name="QOpenGLFunctions_4_3_Compatibility" since="5.1"/> + <object-type name="QOpenGLFunctions_4_3_Core" since="5.1"/> + <object-type name="QOpenGLFunctions_4_4_Compatibility" since="5.5/> + <object-type name="QOpenGLFunctions_4_4_Core" since="5.5"/> + <object-type name="QOpenGLFunctions_4_5_Compatibility since="5.5""/> + <object-type name="QOpenGLFunctions_4_5_Core" since="5.5"/> + <object-type name="QOpenGLFunctions_ES2" since="5.1"/> --> + <value-type name="QOpenGLPixelTransferOptions"/> + <object-type name="QOpenGLShader" since="5.0"> + <enum-type name="ShaderTypeBit" flags="ShaderType" /> + </object-type> + <object-type name="QOpenGLShaderProgram" since="5.0"> + <modify-function signature="setAttributeArray(int,const float*,int,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setAttributeArray(const char*,const float*,int,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setAttributeValue(int,const float*,int,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setAttributeValue(const char*,const float*,int,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setUniformValueArray(int,const float*,int,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setUniformValueArray(int,const int*,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setUniformValueArray(int,const unsigned int*,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setUniformValueArray(const char*,const float *,int,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setUniformValueArray(const char*,const int*,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + <modify-function signature="setUniformValueArray(const char *,const unsigned int*,int)"> + <modify-argument index="2"><array/></modify-argument> + </modify-function> + </object-type> + <object-type name="QOpenGLTexture" since="5.2"> + <enum-type name="BindingTarget"/> + <enum-type name="CoordinateDirection"/> + <enum-type name="ComparisonFunction"/> + <enum-type name="ComparisonMode"/> + <enum-type name="CubeMapFace"/> + <enum-type name="DepthStencilMode"/> + <enum-type name="Feature" flags="Features"/> + <enum-type name="Filter"/> + <enum-type name="MipMapGeneration"/> + <enum-type name="PixelFormat"/> + <enum-type name="PixelType"/> + <enum-type name="SwizzleComponent"/> + <enum-type name="SwizzleValue"/> + <enum-type name="Target"/> + <enum-type name="TextureFormat"/> + <enum-type name="TextureFormatClass"/> + <enum-type name="TextureUnitReset"/> + <enum-type name="WrapMode"/> + <modify-function signature="borderColor(unsigned int*)const" remove="all"/> + <modify-function signature="borderColor(int*)const" remove="all"/> + <modify-function signature="borderColor(float*)const" remove="all"/> + </object-type> + <object-type name="QOpenGLTimeMonitor" since="5.1"/> + <object-type name="QOpenGLTimerQuery" since="5.1"/> + <object-type name="QOpenGLWindow" since="5.4"> + <enum-type name="UpdateBehavior"/> + </object-type> + <value-type name="QOpenGLVersionProfile" since="5.1"/> + <object-type name="QOpenGLVertexArrayObject"> + <object-type name="Binder"/> + </object-type> <value-type name="QPageLayout"> <enum-type name="Mode"/> <enum-type name="Orientation"/> diff --git a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml index 9565b4334..f708d46ab 100644 --- a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml +++ b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml @@ -77,7 +77,7 @@ </modify-function> --> <!-- TODO: PYSIDE-354, arrays are not supported --> - <modify-function signature="mapPlanes(QAbstractVideoBuffer::MapMode,int*,Array,Array)" remove="all"/> + <modify-function signature="mapPlanes(QAbstractVideoBuffer::MapMode,int*,int[4],uchar*[4])" remove="all"/> </object-type> <object-type name="QAbstractVideoSurface"> <enum-type name="Error"/> diff --git a/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml b/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml index 2643f1ca9..2f8424ac7 100644 --- a/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml +++ b/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml @@ -181,8 +181,10 @@ <enum-type name="SpecialAddress"/> <!-- ### QHostAddress(QIPv6Address) does this --> <modify-function signature="QHostAddress(quint8*)" remove="all" /> - <!-- ### --> + <modify-function signature="QHostAddress(const quint8*)" remove="all" /> + <!-- ### --> <modify-function signature="setAddress(quint8*)" remove="all" /> + <modify-function signature="setAddress(const quint8*)" remove="all" /> </value-type> <value-type name="QHostInfo"> diff --git a/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml b/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml index d5c701b6f..8dea5d67c 100644 --- a/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml +++ b/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml @@ -59,6 +59,16 @@ <rejection class="QGLColormap::QGLColormapData"/> <rejection class="QGLContext" field-name="currentCtx"/> + <rejection class="^QGL.*$" argument-type="^GLboolean( const)?\*$"/> + <rejection class="^QGL.*$" argument-type="^GLchar( const)?\*$"/> + <rejection class="^QGL.*$" argument-type="GLchar *const const*"/> + <rejection class="^QGL.*$" argument-type="^GLenum( const)?\*$"/> + <rejection class="^QGL.*$" argument-type="^GLfloat( const)?\*$"/> + <rejection class="^QGL.*$" argument-type="^GLfloat( const)?\[.*$"/> + <rejection class="^QGL.*$" argument-type="^GLdouble( const)?\*$"/> + <rejection class="^QGL.*$" argument-type="GLintptr"/> + <rejection class="^QGL.*$" argument-type="^GLint64( const)?\*$"/> + <rejection class="^QGL.*$" argument-type="^GLsizei( const)?\*$"/> <namespace-type name="QGL"> <enum-type name="FormatOption" flags="FormatOptions" force-integer="yes"/> @@ -681,8 +691,6 @@ <!-- ### --> <!-- ### Use QMatrixZxY overloads --> - <modify-function signature="setUniformValue(int,Array)" remove="all" /> - <modify-function signature="setUniformValue(const char*,Array)" remove="all" /> <modify-function signature="setAttributeValue(int,const GLfloat*,int,int)" remove="all" /> <modify-function signature="setAttributeValue(const char*,const GLfloat*,int,int)" remove="all" /> <modify-function signature="setAttributeArray(int, GLenum, const void*, int, int)" remove="all" since="4.7" /> diff --git a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml index 4cee02eec..439c0bba7 100644 --- a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml +++ b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml @@ -45,7 +45,6 @@ <load-typesystem name="typesystem_gui.xml" generate="no"/> <load-typesystem name="typesystem_qml.xml" generate="no"/> - <primitive-type name="GLuint"/> <smart-pointer-type name="QSharedPointer" type="shared" getter="data" /> <extra-includes> diff --git a/sources/pyside2/PySide2/QtTest/typesystem_test.xml b/sources/pyside2/PySide2/QtTest/typesystem_test.xml index 61a3ee850..2e2d5a99d 100644 --- a/sources/pyside2/PySide2/QtTest/typesystem_test.xml +++ b/sources/pyside2/PySide2/QtTest/typesystem_test.xml @@ -51,6 +51,7 @@ <rejection class="QTest" function-name="qCompare<double,qreal>"/> <rejection class="QTest" function-name="qCompare<qreal,double>"/> <rejection class="QTest" function-name="qCompare"/> + <rejection class="QTest" function-name="qInit"/> <rejection class="QTest" function-name="qVerify"/> <rejection class="QTest" function-name="qSleep"/> <rejection class="QTest" function-name="toHexRepresentation"/> diff --git a/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt b/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt new file mode 100644 index 000000000..c616e1234 --- /dev/null +++ b/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt @@ -0,0 +1,40 @@ +project(QtTextToSpeech) + +set(QtTextToSpeech_SRC +${QtTextToSpeech_GEN_DIR}/qtexttospeech_wrapper.cpp +${QtTextToSpeech_GEN_DIR}/qtexttospeechengine_wrapper.cpp +${QtTextToSpeech_GEN_DIR}/qvoice_wrapper.cpp +# module is always needed +${QtTextToSpeech_GEN_DIR}/qttexttospeech_module_wrapper.cpp +) + +make_path(QtTextToSpeech_typesystem_path + ${QtCore_SOURCE_DIR} + ${QtCore_BINARY_DIR} + ${QtTextToSpeech_SOURCE_DIR}) + +set(QtTextToSpeech_include_dirs ${QtTextToSpeech_SOURCE_DIR} + ${QtTextToSpeech_BINARY_DIR} + ${Qt5Core_INCLUDE_DIRS} + ${Qt5TextToSpeech_INCLUDE_DIRS} + ${SHIBOKEN_INCLUDE_DIR} + ${libpyside_SOURCE_DIR} + ${SHIBOKEN_PYTHON_INCLUDE_DIR} + ${QtCore_GEN_DIR}) + +set(QtTextToSpeech_libraries pyside2 + ${SHIBOKEN_PYTHON_LIBRARIES} + ${SHIBOKEN_LIBRARY} + ${Qt5Multimedia_LIBRARIES} + ${Qt5TextToSpeech_LIBRARIES} + ${Qt5Core_LIBRARIES}) + +set(QtTextToSpeech_deps QtCore QtMultimedia) + +create_pyside_module(QtTextToSpeech + QtTextToSpeech_include_dirs + QtTextToSpeech_libraries + QtTextToSpeech_deps + QtTextToSpeech_typesystem_path + QtTextToSpeech_SRC + "") diff --git a/sources/pyside2/PySide2/QtTextToSpeech/typesystem_texttospeech.xml b/sources/pyside2/PySide2/QtTextToSpeech/typesystem_texttospeech.xml new file mode 100644 index 000000000..ebe73a0b4 --- /dev/null +++ b/sources/pyside2/PySide2/QtTextToSpeech/typesystem_texttospeech.xml @@ -0,0 +1,53 @@ +<?xml version="1.0"?> +<!-- +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of PySide2. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +--> +<typesystem package="PySide2.QtTextToSpeech"> + <load-typesystem name="typesystem_core.xml" generate="no" /> + + <object-type name="QTextToSpeech"> + <enum-type name="State"/> + </object-type> + <object-type name="QTextToSpeechEngine"/> + <value-type name="QVoice"> + <enum-type name="Gender"/> + <enum-type name="Age"/> + </value-type> +</typesystem> diff --git a/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml b/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml index f8255db07..ad33de4c8 100644 --- a/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml +++ b/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml @@ -54,11 +54,11 @@ <object-type name="QWebEngineDownloadItem"> <enum-type name="DownloadState" /> </object-type> - + <!-- TODO: Deal with private constructor <value-type name="QWebEngineHistory" /> --> - <value-type name="QWebEngineHistoryItem" /> + <object-type name="QWebEngineHistoryItem" /> <object-type name="QWebEnginePage"> <enum-type name="WebAction" /> diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml index 9d3e70be2..624ef591a 100644 --- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml +++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml @@ -1576,7 +1576,7 @@ </modify-function> <!-- TODO: Support conversions on virtual function --> - <modify-function signature="drawItems(QPainter*, int, QGraphicsItem**, const QStyleOptionGraphicsItem*)"> + <modify-function signature="drawItems(QPainter*, int, QGraphicsItem*[], const QStyleOptionGraphicsItem[])"> <modify-argument index="2"> <remove-argument/> <conversion-rule class="native"> @@ -1688,7 +1688,7 @@ <enum-type name="SceneLayer" flags="SceneLayers"/> <!-- Qt5: note: this was called 'obsolete'. Is that true? --> - <modify-function signature="drawItems(QPainter*,int,QGraphicsItem**,const QStyleOptionGraphicsItem*,QWidget*)" remove="all" /> + <modify-function signature="drawItems(QPainter*,int,QGraphicsItem*[],const QStyleOptionGraphicsItem[],QWidget*)" remove="all" /> <modify-function signature="createItemGroup(const QList<QGraphicsItem*>&)"> <modify-argument index="1"> diff --git a/sources/pyside2/PySide2/global.h.in b/sources/pyside2/PySide2/global.h.in index 6bddcfcce..1d04efe9c 100644 --- a/sources/pyside2/PySide2/global.h.in +++ b/sources/pyside2/PySide2/global.h.in @@ -37,345 +37,13 @@ ** ****************************************************************************/ -#undef QT_NO_STL - -#undef QT_NO_STL_WCHAR -#define Q_BYTE_ORDER // used to enable QSysInfo.Endian detection on MacOSX - -#if defined(__OBJC__) && !defined(__cplusplus) -# warning "File built in Objective-C mode (.m), but using Qt requires Objective-C++ (.mm)" -#endif - #include <QtCore/qnamespace.h> -QT_BEGIN_NAMESPACE - - -class QByteArray; -struct QArrayData; -typedef QArrayData QByteArrayData; - -class QString; - -#ifndef Q_MOC_OUTPUT_REVISION -#define Q_MOC_OUTPUT_REVISION 67 -#endif - -// The following macros are our "extensions" to C++ -// They are used, strictly speaking, only by the moc. - - -#ifndef QT_NO_META_MACROS -// macro for onaming members -#ifdef METHOD -#undef METHOD -#endif -#ifdef SLOT -#undef SLOT -#endif -#ifdef SIGNAL -#undef SIGNAL -#endif -#endif // QT_NO_META_MACROS - -Q_CORE_EXPORT const char *qFlagLocation(const char *method); - -#ifndef QT_NO_META_MACROS -#ifndef QT_NO_DEBUG -# define QLOCATION "\0" __FILE__ ":" QT_STRINGIFY(__LINE__) -# ifndef QT_NO_KEYWORDS -# define METHOD(a) qFlagLocation("0"#a QLOCATION) -# endif -# define SLOT(a) qFlagLocation("1"#a QLOCATION) -# define SIGNAL(a) qFlagLocation("2"#a QLOCATION) -#else -# ifndef QT_NO_KEYWORDS -# define METHOD(a) "0"#a -# endif -# define SLOT(a) "1"#a -# define SIGNAL(a) "2"#a -#endif - -#define QMETHOD_CODE 0 // member type codes -#define QSLOT_CODE 1 -#define QSIGNAL_CODE 2 -#endif // QT_NO_META_MACROS - -#define Q_ARG(type, data) QArgument<type >(#type, data) -#define Q_RETURN_ARG(type, data) QReturnArgument<type >(#type, data) - -class QObject; -class QMetaMethod; -class QMetaEnum; -class QMetaProperty; -class QMetaClassInfo; - - -class Q_CORE_EXPORT QGenericArgument -{ -public: - inline QGenericArgument(const char *aName = 0, const void *aData = 0) - : _data(aData), _name(aName) {} - inline void *data() const { return const_cast<void *>(_data); } - inline const char *name() const { return _name; } - -private: - const void *_data; - const char *_name; -}; - -class Q_CORE_EXPORT QGenericReturnArgument: public QGenericArgument -{ -public: - inline QGenericReturnArgument(const char *aName = 0, void *aData = 0) - : QGenericArgument(aName, aData) - {} -}; - -template <class T> -class QArgument: public QGenericArgument -{ -public: - inline QArgument(const char *aName, const T &aData) - : QGenericArgument(aName, static_cast<const void *>(&aData)) - {} -}; -template <class T> -class QArgument<T &>: public QGenericArgument -{ -public: - inline QArgument(const char *aName, T &aData) - : QGenericArgument(aName, static_cast<const void *>(&aData)) - {} -}; - - -template <typename T> -class QReturnArgument: public QGenericReturnArgument -{ -public: - inline QReturnArgument(const char *aName, T &aData) - : QGenericReturnArgument(aName, static_cast<void *>(&aData)) - {} -}; - -struct Q_CORE_EXPORT QMetaObject -{ - class Connection; - const char *className() const; - const QMetaObject *superClass() const; - - QObject *cast(QObject *obj) const; - const QObject *cast(const QObject *obj) const; - -#ifndef QT_NO_TRANSLATION - QString tr(const char *s, const char *c, int n = -1) const; -#endif // QT_NO_TRANSLATION - - int methodOffset() const; - int enumeratorOffset() const; - int propertyOffset() const; - int classInfoOffset() const; - - int constructorCount() const; - int methodCount() const; - int enumeratorCount() const; - int propertyCount() const; - int classInfoCount() const; - - int indexOfConstructor(const char *constructor) const; - int indexOfMethod(const char *method) const; - int indexOfSignal(const char *signal) const; - int indexOfSlot(const char *slot) const; - int indexOfEnumerator(const char *name) const; - int indexOfProperty(const char *name) const; - int indexOfClassInfo(const char *name) const; - - QMetaMethod constructor(int index) const; - QMetaMethod method(int index) const; - QMetaEnum enumerator(int index) const; - QMetaProperty property(int index) const; - QMetaClassInfo classInfo(int index) const; - QMetaProperty userProperty() const; - - static bool checkConnectArgs(const char *signal, const char *method); - static bool checkConnectArgs(const QMetaMethod &signal, - const QMetaMethod &method); - static QByteArray normalizedSignature(const char *method); - static QByteArray normalizedType(const char *type); - - // internal index-based connect - static Connection connect(const QObject *sender, int signal_index, - const QObject *receiver, int method_index, - int type = 0, int *types = 0); - // internal index-based disconnect - static bool disconnect(const QObject *sender, int signal_index, - const QObject *receiver, int method_index); - static bool disconnectOne(const QObject *sender, int signal_index, - const QObject *receiver, int method_index); - // internal slot-name based connect - static void connectSlotsByName(QObject *o); - - // internal index-based signal activation - static void activate(QObject *sender, int signal_index, void **argv); - static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv); - static void activate(QObject *sender, int signal_offset, int local_signal_index, void **argv); - - static bool invokeMethod(QObject *obj, const char *member, - Qt::ConnectionType, - QGenericReturnArgument ret, - QGenericArgument val0 = QGenericArgument(0), - QGenericArgument val1 = QGenericArgument(), - QGenericArgument val2 = QGenericArgument(), - QGenericArgument val3 = QGenericArgument(), - QGenericArgument val4 = QGenericArgument(), - QGenericArgument val5 = QGenericArgument(), - QGenericArgument val6 = QGenericArgument(), - QGenericArgument val7 = QGenericArgument(), - QGenericArgument val8 = QGenericArgument(), - QGenericArgument val9 = QGenericArgument()); - - static inline bool invokeMethod(QObject *obj, const char *member, - QGenericReturnArgument ret, - QGenericArgument val0 = QGenericArgument(0), - QGenericArgument val1 = QGenericArgument(), - QGenericArgument val2 = QGenericArgument(), - QGenericArgument val3 = QGenericArgument(), - QGenericArgument val4 = QGenericArgument(), - QGenericArgument val5 = QGenericArgument(), - QGenericArgument val6 = QGenericArgument(), - QGenericArgument val7 = QGenericArgument(), - QGenericArgument val8 = QGenericArgument(), - QGenericArgument val9 = QGenericArgument()) - { - return invokeMethod(obj, member, Qt::AutoConnection, ret, val0, val1, val2, val3, - val4, val5, val6, val7, val8, val9); - } - - static inline bool invokeMethod(QObject *obj, const char *member, - Qt::ConnectionType type, - QGenericArgument val0 = QGenericArgument(0), - QGenericArgument val1 = QGenericArgument(), - QGenericArgument val2 = QGenericArgument(), - QGenericArgument val3 = QGenericArgument(), - QGenericArgument val4 = QGenericArgument(), - QGenericArgument val5 = QGenericArgument(), - QGenericArgument val6 = QGenericArgument(), - QGenericArgument val7 = QGenericArgument(), - QGenericArgument val8 = QGenericArgument(), - QGenericArgument val9 = QGenericArgument()) - { - return invokeMethod(obj, member, type, QGenericReturnArgument(), val0, val1, val2, - val3, val4, val5, val6, val7, val8, val9); - } - - static inline bool invokeMethod(QObject *obj, const char *member, - QGenericArgument val0 = QGenericArgument(0), - QGenericArgument val1 = QGenericArgument(), - QGenericArgument val2 = QGenericArgument(), - QGenericArgument val3 = QGenericArgument(), - QGenericArgument val4 = QGenericArgument(), - QGenericArgument val5 = QGenericArgument(), - QGenericArgument val6 = QGenericArgument(), - QGenericArgument val7 = QGenericArgument(), - QGenericArgument val8 = QGenericArgument(), - QGenericArgument val9 = QGenericArgument()) - { - return invokeMethod(obj, member, Qt::AutoConnection, QGenericReturnArgument(), val0, - val1, val2, val3, val4, val5, val6, val7, val8, val9); - } - - QObject *newInstance(QGenericArgument val0 = QGenericArgument(0), - QGenericArgument val1 = QGenericArgument(), - QGenericArgument val2 = QGenericArgument(), - QGenericArgument val3 = QGenericArgument(), - QGenericArgument val4 = QGenericArgument(), - QGenericArgument val5 = QGenericArgument(), - QGenericArgument val6 = QGenericArgument(), - QGenericArgument val7 = QGenericArgument(), - QGenericArgument val8 = QGenericArgument(), - QGenericArgument val9 = QGenericArgument()) const; - - enum Call { - InvokeMetaMethod, - ReadProperty, - WriteProperty, - ResetProperty, - QueryPropertyDesignable, - QueryPropertyScriptable, - QueryPropertyStored, - QueryPropertyEditable, - QueryPropertyUser, - CreateInstance, - IndexOfMethod, - RegisterPropertyMetaType, - RegisterMethodArgumentMetaType - }; - - int static_metacall(Call, int, void **) const; - static int metacall(QObject *, Call, int, void **); - - struct { // private data - const QMetaObject *superdata; - const QByteArrayData *stringdata; - const uint *data; - typedef void (*StaticMetacallFunction)(QObject *, QMetaObject::Call, int, void **); - StaticMetacallFunction static_metacall; - const QMetaObject * const *relatedMetaObjects; - void *extradata; //reserved for future use - } d; -}; - -class Q_CORE_EXPORT QMetaObject::Connection { - void *d_ptr; //QObjectPrivate::Connection* - explicit Connection(void *data) : d_ptr(data) { } - friend class QObject; - friend class QObjectPrivate; - friend struct QMetaObject; -public: - ~Connection(); - Connection(); - Connection(const Connection &other); - Connection &operator=(const Connection &other); -#ifdef Q_QDOC - operator bool() const; -#else - typedef void *Connection::*RestrictedBool; - operator RestrictedBool() const { return d_ptr ? &Connection::d_ptr : 0; } -#endif - -#ifdef Q_COMPILER_RVALUE_REFS - inline Connection(Connection &&o) : d_ptr(o.d_ptr) { o.d_ptr = 0; } - inline Connection &operator=(Connection &&other) - { qSwap(d_ptr, other.d_ptr); return *this; } -#endif -}; - -inline const QMetaObject *QMetaObject::superClass() const -{ return d.superdata; } - -namespace QtPrivate { - /* Trait that tells is a the Object has a Q_OBJECT macro */ - template <typename Object> struct HasQ_OBJECT_Macro { - template <typename T> - static char test(int (T::*)(QMetaObject::Call, int, void **)); - static int test(int (Object::*)(QMetaObject::Call, int, void **)); - enum { Value = sizeof(test(&Object::qt_metacall)) == sizeof(int) }; - }; -} - -QT_END_NAMESPACE - -// This Q_QDOC definition is only a convenience, since the shiboken parser is -// happier with the simplified constructions. XXX remove this for Qt 5.7. -#define Q_QDOC - #if @ENABLE_X11@ #define Q_OS_X11 #elif @ENABLE_MAC@ #define Q_OS_MAC #elif @ENABLE_WIN@ - #include "pysidewtypes.h" #define Q_OS_WIN #endif @@ -383,24 +51,8 @@ QT_END_NAMESPACE // not in release #define QT_NO_DEBUG -#include <QtCore/QtCore> -#if @ENABLE_MAC@ || @ENABLE_WIN@ || @ENABLE_X11@ - // Workaround to parse the QApplication header - #define Q_INTERNAL_QAPP_SRC - #undef Q_QDOC -#endif -#if @Qt5Gui_FOUND@ -# include <QtGui/QtGui> -#endif -#if @Qt5Widgets_FOUND@ -# include <QtWidgets/QtWidgets> -#endif -#ifndef Q_QDOC -// Make sure that Q_QDOC is defined for as much modules as possible. -// This creates more wrappers without extra work. -// Will disappear when we have a really good parser! -# define Q_QDOC -#endif +// Make "signals:", "slots:" visible as access specifiers +#define QT_ANNOTATE_ACCESS_SPECIFIER(a) __attribute__((annotate(#a))) #include "qpytextobject.h" // PySide class @@ -408,21 +60,14 @@ QT_END_NAMESPACE # if @Qt5X11Extras_FOUND@ # include <QtX11Extras/QX11Info> # endif -#elif @ENABLE_MAC@ -# include <QtGui/qmacstyle_mac.h> #endif // QT_WIDGETS_LIB must be defined to QSqlRelationalDelegate become visible. // It also changes code generation in pysideqtesttouch.h #define QT_WIDGETS_LIB -#undef Q_DECLARE_INTERFACE #if @Qt5Test_FOUND@ # include "pysideqtesttouch.h" #endif -#ifndef QT_NO_OPENGL -# include <@GL_H@> -#endif // QT_NO_OPENGL - // Here are now all configured modules appended: diff --git a/sources/pyside2/PySide2/support/signature/mapping.py b/sources/pyside2/PySide2/support/signature/mapping.py index 668ca8df4..a03abc08d 100644 --- a/sources/pyside2/PySide2/support/signature/mapping.py +++ b/sources/pyside2/PySide2/support/signature/mapping.py @@ -228,6 +228,7 @@ def init_QtCore(): "float[][]": FloatMatrix, # 5.9 "PySide2.QtCore.unsigned int": int, # 5.9 Ubuntu "PySide2.QtCore.long long": int, # 5.9, MSVC 15 + "QGenericArgument(nullptr)": QGenericArgument(None), # 5.10 }) try: type_map.update({ diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake index 77653925e..c4177a8d7 100644 --- a/sources/pyside2/cmake/Macros/PySideModules.cmake +++ b/sources/pyside2/cmake/Macros/PySideModules.cmake @@ -69,9 +69,13 @@ macro(create_pyside_module # Contains include directories to pass to shiboken's preprocessor. set(shiboken_include_dirs ${pyside2_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}) + set(shiboken_framework_include_dirs_option "") if(CMAKE_HOST_APPLE) + set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}") # On macOS, provide the framework paths for OpenGL headers. - set(shiboken_include_dirs ${shiboken_include_dirs} ${CMAKE_SYSTEM_FRAMEWORK_PATH}) + set(shiboken_framework_include_dirs ${shiboken_framework_include_dirs} ${CMAKE_SYSTEM_FRAMEWORK_PATH}) + make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs}) + set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}") endif() # Transform the path separators into something shiboken understands. @@ -81,6 +85,7 @@ macro(create_pyside_module COMMAND "${SHIBOKEN_BINARY}" ${GENERATOR_EXTRA_FLAGS} ${pyside2_BINARY_DIR}/pyside2_global.h --include-paths=${shiboken_include_dirs} + ${shiboken_framework_include_dirs_option} --typesystem-paths=${pyside2_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}} --output-directory=${CMAKE_CURRENT_BINARY_DIR} --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt @@ -100,6 +105,8 @@ macro(create_pyside_module LIBRARY_OUTPUT_DIRECTORY ${pyside2_BINARY_DIR}) if(WIN32) set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd") + # Sanitize windows.h as pulled by gl.h to prevent clashes with QAbstract3dAxis::min(), etc. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX") endif() target_link_libraries(${module_name} ${${module_libraries}}) @@ -155,10 +162,17 @@ macro(check_qt_class module class optional_source_files dropped_entries) "${NAMESPACE_USE}\n" "int main() { sizeof(${class}); }\n" ) + + # Force usage of the C++11 standard. CMAKE_CXX_STANDARD does not work with try_compile + # but the issue has a fix in CMake 3.9. Thus we use a terrible workaround, we pass the C++ + # standard flag the way CheckCXXSourceCompiles.cmake does it. + set(CUSTOM_CPP_STANDARD ${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}) + try_compile(Q_WORKS ${CMAKE_BINARY_DIR} ${SRC_FILE} CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${QT_INCLUDE_DIR};${Qt5${_module_no_qt_prefix}_INCLUDE_DIRS}" + "-DCOMPILE_DEFINITIONS:STRING=${CUSTOM_CPP_STANDARD}" OUTPUT_VARIABLE OUTPUT) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCheckQtClassTest.log ${OUTPUT}) diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/alphachannel.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/alphachannel.cpp index 4606ce7b5..df5430bb0 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/alphachannel.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/alphachannel.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.cpp index 42ff004ac..2e4c967e2 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dialogs/dialogs.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/dialogs/dialogs.cpp index f926bbc03..58fb5653b 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dialogs/dialogs.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/dialogs/dialogs.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp index 739e70799..45b08af63 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp index ce25fd693..160064627 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp index 1211ccbc5..d98d91f39 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp index fb2440426..615d26aee 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp index 0f5b5f441..c0512f538 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp index a20f70fc2..e7dd80fe9 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/picture/picture.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/picture/picture.cpp index 1dba7c686..a46954197 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/picture/picture.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/picture/picture.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp index 5641dbdbe..393ab5a70 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp index a7abf4584..02bd2441a 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp index bea97889f..d951c9465 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp index d24d11e11..cb1888da8 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedwidget/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedwidget/main.cpp index b391bcc90..f43744ed7 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedwidget/main.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedwidget/main.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp index 1c85cf7cf..64b4f0a16 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp index a3579b789..97e6ce164 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp index 187acde31..531660469 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp index 269ca02da..3ca90077e 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h b/sources/pyside2/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h index f067f2249..1022e56b3 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.cpp index aa026d755..d92a03335 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp index e7d355115..ddac007c6 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp index c15d43646..dedc06e86 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp index 7874764db..640575050 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/transform/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/transform/main.cpp index 6d84261e9..784f4df1a 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/transform/main.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/transform/main.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp index d25ce3637..be575f53f 100644 --- a/sources/pyside2/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp +++ b/sources/pyside2/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp b/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp index de99bb3ec..18612e4ba 100644 --- a/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp +++ b/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp b/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp index 0ec3b071f..4732b7773 100644 --- a/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp +++ b/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp index 82c5f891b..d22a39151 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp index fa125e01f..c6fd2894b 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp index 8dc283ebf..33cb540b4 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp index 7032ba7da..ed23e83eb 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp index 8dc283ebf..33cb540b4 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/sql/relationaltablemodel/relationaltablemodel.cpp b/sources/pyside2/doc/codesnippets/examples/sql/relationaltablemodel/relationaltablemodel.cpp index b34c652d0..8df1d73b2 100644 --- a/sources/pyside2/doc/codesnippets/examples/sql/relationaltablemodel/relationaltablemodel.cpp +++ b/sources/pyside2/doc/codesnippets/examples/sql/relationaltablemodel/relationaltablemodel.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp b/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp index 22e5fbc37..f0d1f2ac6 100644 --- a/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp +++ b/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp b/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp index 54a9523ee..bf07fb73c 100644 --- a/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp +++ b/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp @@ -21,13 +21,13 @@ ## "Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are ## met: -## # Redistributions of source code must retain the above copyright +## * Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. -## # Redistributions in binary form must reproduce the above copyright +## * Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. -## # Neither the name of The Qt Company Ltd nor the names of its +## * Neither the name of The Qt Company Ltd nor the names of its ## contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## diff --git a/sources/pyside2/tests/QtCharts/CMakeLists.txt b/sources/pyside2/tests/QtCharts/CMakeLists.txt new file mode 100644 index 000000000..16e8b4bc9 --- /dev/null +++ b/sources/pyside2/tests/QtCharts/CMakeLists.txt @@ -0,0 +1 @@ +PYSIDE_TEST(qcharts_test.py) diff --git a/sources/pyside2/tests/QtCharts/qcharts_test.py b/sources/pyside2/tests/QtCharts/qcharts_test.py new file mode 100644 index 000000000..1503b2e54 --- /dev/null +++ b/sources/pyside2/tests/QtCharts/qcharts_test.py @@ -0,0 +1,63 @@ +#!/usr/bin/python + +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +'''Test cases for QCharts''' + +from helper import UsesQApplication +import unittest + +from PySide2.QtCore import QRect, QSize, QTimer +from PySide2.QtGui import QGuiApplication, QScreen +from PySide2.QtCharts import QtCharts + +class QChartsTestCase(UsesQApplication): + '''Tests related to QCharts''' + + def testCharts(self): + self.series = QtCharts.QPieSeries() + self.series.append("Jane", 1); + self.series.append("Joe", 2); + self.series.append("Andy", 3); + self.series.append("Barbara", 4); + self.series.append("Axel", 5); + slice = self.series.slices()[1] + slice.setExploded(); + slice.setLabelVisible(); + self.chart = QtCharts.QChart() + self.chart.addSeries(self.series); + chartView = QtCharts.QChartView(self.chart) + screenSize = QGuiApplication.primaryScreen().geometry().size() + chartView.resize(screenSize / 2) + chartView.show() + QTimer.singleShot(500, self.app.quit) + self.app.exec_() + +if __name__ == '__main__': + unittest.main() diff --git a/sources/pyside2/tests/QtCore/CMakeLists.txt b/sources/pyside2/tests/QtCore/CMakeLists.txt index 0a3fda0bb..d3d31af18 100644 --- a/sources/pyside2/tests/QtCore/CMakeLists.txt +++ b/sources/pyside2/tests/QtCore/CMakeLists.txt @@ -85,6 +85,7 @@ PYSIDE_TEST(qprocess_test.py) PYSIDE_TEST(qproperty_decorator.py) PYSIDE_TEST(qrect_test.py) PYSIDE_TEST(qregexp_test.py) +PYSIDE_TEST(qregularexpression_test.py) PYSIDE_TEST(qresource_test.py) PYSIDE_TEST(qsize_test.py) PYSIDE_TEST(qslot_object_test.py) @@ -105,6 +106,9 @@ PYSIDE_TEST(qtimer_timeout_test.py) PYSIDE_TEST(qtimezone_test.py) PYSIDE_TEST(qtnamespace_test.py) PYSIDE_TEST(qurl_test.py) +PYSIDE_TEST(qurlquery_test.py) +PYSIDE_TEST(quuid_test.py) +PYSIDE_TEST(qversionnumber_test.py) PYSIDE_TEST(repr_test.py) PYSIDE_TEST(setprop_on_ctor_test.py) PYSIDE_TEST(staticMetaObject_test.py) diff --git a/sources/pyside2/tests/QtCore/qregularexpression_test.py b/sources/pyside2/tests/QtCore/qregularexpression_test.py new file mode 100644 index 000000000..e11b9b61c --- /dev/null +++ b/sources/pyside2/tests/QtCore/qregularexpression_test.py @@ -0,0 +1,56 @@ +#!/usr/bin/python + +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +'''Unit tests for QRegularExpression''' + +import unittest +from PySide2.QtCore import QRegularExpression, QRegularExpressionMatch, QRegularExpressionMatchIterator + +class QRegularExpressionTest(unittest.TestCase): + + def testMatch(self): + re = QRegularExpression('^.*(word2).*$') + self.assertTrue(re.isValid()) + match = re.match('word1 word2 word3') + self.assertTrue(match.isValid()) + self.assertEqual(match.captured(1), 'word2') + + def testMatchIterator(self): + re = QRegularExpression('(\w+)') + self.assertTrue(re.isValid()) + count = 0 + it = re.globalMatch('word1 word2 word3'); + while it.hasNext(): + it.next() + count = count + 1 + self.assertEqual(count, 3) + +if __name__ == '__main__': + unittest.main() diff --git a/sources/pyside2/tests/QtCore/qurl_test.py b/sources/pyside2/tests/QtCore/qurl_test.py index 595e5931f..d5eb37d6e 100644 --- a/sources/pyside2/tests/QtCore/qurl_test.py +++ b/sources/pyside2/tests/QtCore/qurl_test.py @@ -33,6 +33,7 @@ import unittest from PySide2.QtCore import QUrl +from PySide2.QtCore import QUrlQuery class QUrlBasicConstructor(unittest.TestCase): '''Tests the basic constructors''' @@ -67,59 +68,96 @@ class QUrlBasicConstructor(unittest.TestCase): self.assertEqual(url.toString(), 'ftp://john:abc123@www.google.com:8080/mail/view') +class QueryItemsTest(unittest.TestCase): + '''Test query item management''' + + def testQueryItems(self): + url = QUrl('http://www.google.com/search?q=python&hl=en') + valid_data = [(('q'), ('python')), (('hl'), ('en'))] + + self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data)) + + def testEncodedQueryItems(self): + url = QUrl('http://www.google.com/search?q=python&hl=en') + valid_data = [(('q'), ('python')), (('hl'), ('en'))] + + self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data)) + + def testSetQueryItems(self): + urla = QUrl('http://www.google.com/search?q=python&hl=en') + urlb = QUrl('http://www.google.com/search') + + urlb.setQuery(urla.query()) + + self.assertEqual(urla, urlb) + + def testAddQueryItem(self): + url = QUrlQuery() + valid_data = [('hl', 'en'), ('user', 'konqui')] + + url.addQueryItem(*valid_data[0]) + self.assertEqual(url.queryItems()[0], valid_data[0]) + + url.addQueryItem(*valid_data[1]) + self.assertEqual(sorted(url.queryItems()), sorted(valid_data)) + + def testAllQueryItemsValues(self): + url = QUrlQuery() + key = 'key' + valid_data = ['data', 'valid', 'test'] + + for i, data in enumerate(valid_data): + url.addQueryItem(key, data) + self.assertEqual(url.allQueryItemValues(key), + list(valid_data[:i+1])) + def testPath(self): url = QUrl("http://qt-project.org/images/ban/pgs_front.jpg") self.assertEqual(url.path(), "/images/ban/pgs_front.jpg") # PYSIDE-345: No bindings for QUrlQuery -# class QueryItemsTest(unittest.TestCase): -# '''Test query item management''' -# -# def testQueryItems(self): -# #QUrl.queryItems -# url = QUrl('http://www.google.com/search?q=python&hl=en') -# valid_data = [(('q'), ('python')), (('hl'), ('en'))] -# -# self.assertEqual(sorted(url.queryItems()), sorted(valid_data)) -# -# def testEncodedQueryItems(self): -# #QUrl.encodedQueryItems -# url = QUrl('http://www.google.com/search?q=python&hl=en') -# valid_data = [(('q'), ('python')), (('hl'), ('en'))] -# -# self.assertEqual(sorted(url.encodedQueryItems()), sorted(valid_data)) -# -# def testSetQueryItems(self): -# #QUrl.setQueryItems -# urla = QUrl('http://www.google.com/search?q=python&hl=en') -# urlb = QUrl('http://www.google.com/search') -# -# urlb.setQueryItems(urla.queryItems()) -# -# self.assertEqual(urla, urlb) -# -# def testAddQueryItem(self): -# #QUrl.addQueryItem -# url = QUrl() -# valid_data = [('hl', 'en'), ('user', 'konqui')] -# -# url.addQueryItem(*valid_data[0]) -# self.assertEqual(url.queryItems()[0], valid_data[0]) -# -# url.addQueryItem(*valid_data[1]) -# self.assertEqual(sorted(url.queryItems()), sorted(valid_data)) -# -# def testAllEncodedQueryItemsValues(self): -# #QUrl.allEncodedQueryItemValues -# url = QUrl() -# key = 'key' -# valid_data = ['data', 'valid', 'test'] -# -# for i, data in enumerate(valid_data): -# url.addQueryItem(key, data) -# self.assertEqual(url.allEncodedQueryItemValues(key), -# list(valid_data[:i+1])) +class QueryItemsTest(unittest.TestCase): + '''Test query item management''' + + def testQueryItems(self): + url = QUrl('http://www.google.com/search?q=python&hl=en') + valid_data = [(('q'), ('python')), (('hl'), ('en'))] + + self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data)) + + def testEncodedQueryItems(self): + url = QUrl('http://www.google.com/search?q=python&hl=en') + valid_data = [(('q'), ('python')), (('hl'), ('en'))] + + self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data)) + + def testSetQueryItems(self): + urla = QUrl('http://www.google.com/search?q=python&hl=en') + urlb = QUrl('http://www.google.com/search') + + urlb.setQuery(urla.query()) + + self.assertEqual(urla, urlb) + + def testAddQueryItem(self): + url = QUrlQuery() + valid_data = [('hl', 'en'), ('user', 'konqui')] + + url.addQueryItem(*valid_data[0]) + self.assertEqual(url.queryItems()[0], valid_data[0]) + + url.addQueryItem(*valid_data[1]) + self.assertEqual(sorted(url.queryItems()), sorted(valid_data)) + + def testAllQueryItemsValues(self): + url = QUrlQuery() + key = 'key' + valid_data = ['data', 'valid', 'test'] + for i, data in enumerate(valid_data): + url.addQueryItem(key, data) + self.assertEqual(url.allQueryItemValues(key), + list(valid_data[:i+1])) if __name__ == '__main__': unittest.main() diff --git a/sources/pyside2/tests/QtCore/qurlquery_test.py b/sources/pyside2/tests/QtCore/qurlquery_test.py new file mode 100644 index 000000000..e42856e6d --- /dev/null +++ b/sources/pyside2/tests/QtCore/qurlquery_test.py @@ -0,0 +1,59 @@ +#!/usr/bin/python + +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +'''Unit tests for QUrlQuery''' + +import unittest +import ctypes +import sys + +from PySide2.QtCore import QUrlQuery + +class QUrlQueryTest(unittest.TestCase): + def testConstructing(self): + empty = QUrlQuery() + self.assertTrue(empty.isEmpty()) + self.assertEqual(empty.queryPairDelimiter(), QUrlQuery.defaultQueryPairDelimiter()) + self.assertEqual(empty.queryValueDelimiter(), QUrlQuery.defaultQueryValueDelimiter()) + + empty.clear(); + self.assertTrue(empty.isEmpty()) + + def testAddRemove(self): + query = QUrlQuery() + + query.addQueryItem("a", "b"); + self.assertTrue(not query.isEmpty()) + self.assertTrue(query.hasQueryItem("a")) + self.assertEqual(query.queryItemValue("a"), "b") + self.assertEqual(query.allQueryItemValues("a"), ["b"]) + +if __name__ == '__main__': + unittest.main() diff --git a/sources/pyside2/tests/QtCore/quuid_test.py b/sources/pyside2/tests/QtCore/quuid_test.py new file mode 100644 index 000000000..64183884a --- /dev/null +++ b/sources/pyside2/tests/QtCore/quuid_test.py @@ -0,0 +1,45 @@ +#!/usr/bin/python + +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +'''Unit tests for QUuid''' + +import unittest + +from PySide2.QtCore import QUuid + +class QUuidTest(unittest.TestCase): + def testFromString(self): + uuidString = '{fc69b59e-cc34-4436-a43c-ee95d128b8c5}' + uuid = QUuid(uuidString) + self.assertTrue(not uuid.isNull()) + self.assertEqual(uuid.toString(), uuidString) + +if __name__ == '__main__': + unittest.main() diff --git a/sources/pyside2/tests/QtCore/qversionnumber_test.py b/sources/pyside2/tests/QtCore/qversionnumber_test.py new file mode 100644 index 000000000..929772fa6 --- /dev/null +++ b/sources/pyside2/tests/QtCore/qversionnumber_test.py @@ -0,0 +1,48 @@ +#!/usr/bin/python + +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +'''Unit tests for QVersionNumber''' + +import unittest + +from PySide2.QtCore import QVersionNumber + +class QVersionNumberTest(unittest.TestCase): + def testFromString(self): + versionString = '5.9.2' + version = QVersionNumber.fromString(versionString) + self.assertTrue(not version.isNull()) + self.assertEqual(version.majorVersion(), 5) + self.assertEqual(version.minorVersion(), 9) + self.assertEqual(version.microVersion(), 2) + self.assertEqual(version.toString(), versionString) + +if __name__ == '__main__': + unittest.main() diff --git a/sources/pyside2/tests/QtDataVisualization/CMakeLists.txt b/sources/pyside2/tests/QtDataVisualization/CMakeLists.txt new file mode 100644 index 000000000..61b347263 --- /dev/null +++ b/sources/pyside2/tests/QtDataVisualization/CMakeLists.txt @@ -0,0 +1 @@ +PYSIDE_TEST(datavisualization_test.py) diff --git a/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py b/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py new file mode 100644 index 000000000..7efd6122d --- /dev/null +++ b/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py @@ -0,0 +1,85 @@ +#!/usr/bin/python + +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +'''Test cases for QtDataVisualization''' + +from helper import UsesQGuiApplication +from PySide2.QtCore import QTimer +from PySide2.QtDataVisualization import QtDataVisualization +import unittest + +def dataToBarDataRow(data): + result = [] + for d in data: + result.append(QtDataVisualization.QBarDataItem(d)) + return result + +def dataToBarDataArray(data): + result = [] + for row in data: + result.append(dataToBarDataRow(row)) + return result + +class QtDataVisualizationTestCase(UsesQGuiApplication): + '''Tests related to QtDataVisualization''' + + def testBars(self): + self.bars = QtDataVisualization.Q3DBars() + self.columnAxis = QtDataVisualization.QCategory3DAxis() + self.columnAxis.setTitle('Columns') + self.columnAxis.setTitleVisible(True) + self.columnAxis.setLabels(['Column1', 'Column2']) + + self.rowAxis = QtDataVisualization.QCategory3DAxis() + self.rowAxis.setTitle('Rows') + self.rowAxis.setTitleVisible(True) + self.rowAxis.setLabels(['Row1', 'Row2']) + + self.valueAxis = QtDataVisualization.QValue3DAxis() + self.valueAxis.setTitle('Values') + self.valueAxis.setTitleVisible(True) + self.valueAxis.setRange(0, 5); + + self.bars.setRowAxis(self.rowAxis) + self.bars.setColumnAxis(self.columnAxis) + self.bars.setValueAxis(self.valueAxis) + + self.series = QtDataVisualization.QBar3DSeries() + self.arrayData = [[1, 2], [3, 4]] + self.series.dataProxy().addRows(dataToBarDataArray(self.arrayData)) + + self.bars.setPrimarySeries(self.series) + + self.bars.show() + QTimer.singleShot(500, self.app.quit) + self.app.exec_() + +if __name__ == '__main__': + unittest.main() diff --git a/sources/pyside2/tests/QtGui/CMakeLists.txt b/sources/pyside2/tests/QtGui/CMakeLists.txt index 63cf3c35f..eeb7c7e36 100644 --- a/sources/pyside2/tests/QtGui/CMakeLists.txt +++ b/sources/pyside2/tests/QtGui/CMakeLists.txt @@ -37,6 +37,7 @@ PYSIDE_TEST(qpolygonf_test.py) PYSIDE_TEST(qkeysequence_test.py) PYSIDE_TEST(qradialgradient_test.py) PYSIDE_TEST(qrasterwindow_test.py) +PYSIDE_TEST(qopenglwindow_test.py) PYSIDE_TEST(qregion_test.py) PYSIDE_TEST(qstylehints_test.py) PYSIDE_TEST(qtextdocument_undoredo_test.py) diff --git a/sources/pyside2/tests/QtGui/qopenglwindow_test.py b/sources/pyside2/tests/QtGui/qopenglwindow_test.py new file mode 100644 index 000000000..2d11a0238 --- /dev/null +++ b/sources/pyside2/tests/QtGui/qopenglwindow_test.py @@ -0,0 +1,104 @@ +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +'''Unit test for QOpenGLContext, QOpenGLTexture, QOpenGLWindow and related classes''' + +import sys +import unittest + +from helper import UsesQApplication + +from PySide2.QtCore import QSize, QTimer, Qt +from PySide2.QtGui import (QColor, QGuiApplication, QImage, QOpenGLContext, + QOpenGLTexture, QSurfaceFormat, QOpenGLWindow) + +try: + from OpenGL import GL +except ImportError: + print("Skipping test due to missing OpenGL module") + sys.exit(0) + +class OpenGLWindow(QOpenGLWindow): + def __init__(self): + super(OpenGLWindow, self).__init__() + + self.m_functions = None + self.m_texture = None + self.visibleChanged.connect(self.slotVisibleChanged) + + def slotVisibleChanged(self, visible): + if not visible and self.m_texture is not None and self.context().makeCurrent(self): + self.m_texture = None + self.context().doneCurrent() + + def initializeGL(self): + self.m_functions = self.context().functions() + self.m_functions.initializeOpenGLFunctions() + image = QImage(QSize(200, 200), QImage.Format_RGBA8888) + image.fill(QColor(Qt.red)) + self.m_texture = QOpenGLTexture(image) + + def paintGL(self): + GL.glMatrixMode(GL.GL_MODELVIEW); + GL.glLoadIdentity(); + + GL.glMatrixMode(GL.GL_PROJECTION); + GL.glLoadIdentity(); + GL.glOrtho(0, 1, 1, 0, -1, 1); + + self.m_functions.glClear(GL.GL_COLOR_BUFFER_BIT) + self.m_functions.glEnable(GL.GL_TEXTURE_2D); + self.m_texture.bind() + + d = 0.5 + GL.glBegin(GL.GL_QUADS) + GL.glTexCoord2f(0, 0) + GL.glVertex2f(0, 0) + GL.glTexCoord2f(d, 0) + GL.glVertex2f(d, 0) + GL.glTexCoord2f(d, d) + GL.glVertex2f(d, d) + GL.glTexCoord2f(0, d) + GL.glVertex2f(0, d) + GL.glEnd() + self.m_texture.release() + + def resizeGL(self, w, h): + self.m_functions.glViewport(0, 0, self.width(), self.height()) + +class QOpenGLWindowTest(UsesQApplication): + # On macOS, glClear(), glViewport() are rejected due to GLbitfield/GLint not being resolved properly + def test(self): + openGlWindow = OpenGLWindow() + openGlWindow.resize(640, 480) + openGlWindow.show() + QTimer.singleShot(100, openGlWindow.close) + self.app.exec_() + +if __name__ == '__main__': + unittest.main() diff --git a/sources/pyside2/tests/QtTextToSpeech/CMakeLists.txt b/sources/pyside2/tests/QtTextToSpeech/CMakeLists.txt new file mode 100644 index 000000000..6f5851587 --- /dev/null +++ b/sources/pyside2/tests/QtTextToSpeech/CMakeLists.txt @@ -0,0 +1 @@ +PYSIDE_TEST(qtexttospeech_test.py) diff --git a/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py b/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py new file mode 100644 index 000000000..6f26f3691 --- /dev/null +++ b/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py @@ -0,0 +1,63 @@ +#!/usr/bin/python + +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +'''Test cases for QTextToSpeech methods''' + +from helper import UsesQApplication +import sys +import unittest + +from PySide2.QtCore import QTimer + +try: + from PySide2.QtTextToSpeech import QTextToSpeech, QVoice +except ImportError: + print("Skipping test due to missing QtTextToSpeech module") + sys.exit(0) + +class QTextToSpeechTestCase(UsesQApplication): + '''Tests related to QTextToSpeech''' + def testSay(self): + engines = QTextToSpeech.availableEngines() + if not engines: + print('No QTextToSpeech engines available') + else: + speech = QTextToSpeech(engines[0]) + speech.stateChanged.connect(self._slotStateChanged) + speech.say("Hello, PySide2") + QTimer.singleShot(5000, self.app.quit) + self.app.exec_() + + def _slotStateChanged(self, state): + if (state == QTextToSpeech.State.Ready): + self.app.quit() + +if __name__ == '__main__': + unittest.main() diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt index 821b6f819..16380e490 100644 --- a/sources/pyside2/tests/pysidetest/CMakeLists.txt +++ b/sources/pyside2/tests/pysidetest/CMakeLists.txt @@ -1,7 +1,7 @@ project(pysidetest) project(testbinding) -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.1) # On Windows, don't link to qtmain.lib for executables automatically. cmake_policy(SET CMP0020 OLD) @@ -38,14 +38,32 @@ ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testview_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testbinding_module_wrapper.cpp ) +# Get per module include dirs. +# There are usually 3 paths there: +# ./qt/include/; ./qt/include/QtCore ; ./qt/mkspecs/linux-g++ +# on framework build they are: +# ./qt/lib/QtCore.framework; ./qt/lib/QtCore.framework/Headers ; ./qt/mkspecs/macx-clang +# Thus we use the second direct path, which contains the actual header files. + +list(GET Qt5Core_INCLUDE_DIRS 1 Qt5Core_DIRECT_INCLUDE_DIR) +list(GET Qt5Gui_INCLUDE_DIRS 1 Qt5Gui_DIRECT_INCLUDE_DIR) +list(GET Qt5Widgets_INCLUDE_DIRS 1 Qt5Widgets_DIRECT_INCLUDE_DIR) + +# Adjust include headers paths for frameworks. +set(shiboken_framework_include_dirs_option "") +if(CMAKE_HOST_APPLE AND QtCore_is_framework) + set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}") + set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}") +endif() + make_path(testbinding_include_dirs ${pyside2_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../PySide2 ${CMAKE_CURRENT_SOURCE_DIR}/../../libpyside ${QT_INCLUDE_DIR} - ${QT_INCLUDE_DIR}/QtCore - ${QT_INCLUDE_DIR}/QtGui - ${QT_INCLUDE_DIR}/QtWidgets + ${Qt5Core_DIRECT_INCLUDE_DIR} + ${Qt5Gui_DIRECT_INCLUDE_DIR} + ${Qt5Widgets_DIRECT_INCLUDE_DIR} ) make_path(testbinding_typesystem_path ${CMAKE_CURRENT_SOURCE_DIR} @@ -58,6 +76,7 @@ add_custom_command(OUTPUT ${testbinding_SRC} COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/pysidetest_global.h --include-paths=${testbinding_include_dirs} + ${shiboken_framework_include_dirs_option} --typesystem-paths=${testbinding_typesystem_path} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_pysidetest.xml |