aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/CMakeLists.txt32
-rw-r--r--sources/pyside2/PySide2/QtCharts/CMakeLists.txt104
-rw-r--r--sources/pyside2/PySide2/QtCharts/typesystem_charts.xml124
-rw-r--r--sources/pyside2/PySide2/QtCore/CMakeLists.txt1
-rw-r--r--sources/pyside2/PySide2/QtCore/glue/qcoreapplication_init.cpp2
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml54
-rw-r--r--sources/pyside2/PySide2/QtGui/CMakeLists.txt18
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml123
-rw-r--r--sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml2
-rw-r--r--sources/pyside2/PySide2/QtNetwork/typesystem_network.xml4
-rw-r--r--sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml12
-rw-r--r--sources/pyside2/PySide2/QtTest/typesystem_test.xml1
-rw-r--r--sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt40
-rw-r--r--sources/pyside2/PySide2/QtTextToSpeech/typesystem_texttospeech.xml53
-rw-r--r--sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml4
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml4
-rw-r--r--sources/pyside2/PySide2/global.h.in365
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake7
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/alphachannel.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/dialogs/dialogs.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/picture/picture.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedwidget/main.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/transform/main.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/sql/relationaltablemodel/relationaltablemodel.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp6
-rw-r--r--sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp6
-rw-r--r--sources/pyside2/tests/QtCharts/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtCharts/qcharts_test.py63
-rw-r--r--sources/pyside2/tests/QtCore/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtCore/qurl_test.py132
-rw-r--r--sources/pyside2/tests/QtCore/qurlquery_test.py59
-rw-r--r--sources/pyside2/tests/QtGui/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtGui/qopenglwindow_test.py104
-rw-r--r--sources/pyside2/tests/QtTextToSpeech/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py63
-rw-r--r--sources/pyside2/tests/pysidetest/CMakeLists.txt27
64 files changed, 1070 insertions, 548 deletions
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index f5e4102c4..d517d0ad7 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,12 +104,22 @@ if(CMAKE_HOST_APPLE)
endif()
endif()
-if(NOT CMAKE_HOST_APPLE)
- # Qt5: QT_INCLUDE_DIR does no longer exist.
- # On Windows and Linux, it can be computed from Qt5Core_INCLUDE_DIRS
- message("Qt5Core_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS}")
- list(GET Qt5Core_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
- message(STATUS "*** computed QT_INCLUDE_DIR as ${QT_INCLUDE_DIR}")
+# 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.
+message(STATUS "*** Qt5Core_INCLUDE_DIRS = ${Qt5Core_INCLUDE_DIRS}")
+list(GET Qt5Core_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
+
+# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
+get_target_property(QtCore_is_framework Qt5::Core FRAMEWORK)
+
+if (QtCore_is_framework)
+ get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
+ message(STATUS "*** QT_FRAMEWORK_INCLUDE_DIR is ${QT_FRAMEWORK_INCLUDE_DIR}")
+
+ # QT_INCLUDE_DIR points to the QtCore.framework directory, so need to adjust this to point
+ # to the actual include directory.
+ get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
endif()
if(MSVC)
@@ -133,12 +143,14 @@ else()
if (NOT QT_INCLUDE_DIR)
set(QT_INCLUDE_DIR "/Library/Frameworks")
endif()
- if(ALTERNATIVE_QT_INCLUDE_DIR)
+ if(NOT QT_INCLUDE_DIR AND ALTERNATIVE_QT_INCLUDE_DIR)
set(QT_INCLUDE_DIR ${ALTERNATIVE_QT_INCLUDE_DIR})
endif()
string(REPLACE " " ":" QT_INCLUDE_DIR ${QT_INCLUDE_DIR})
endif()
endif()
+message(STATUS "*** computed QT_INCLUDE_DIR as ${QT_INCLUDE_DIR}")
+
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
@@ -271,6 +283,8 @@ 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)
if(Qt5Designer_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..03c07b546
--- /dev/null
+++ b/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
@@ -0,0 +1,104 @@
+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
+)
+
+# Sanitize windows.h as pulled by gl.h to prevent clashes with QValueAxis::min(), etc.
+if (WIN32)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX")
+endif()
+
+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..d17734273
--- /dev/null
+++ b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml
@@ -0,0 +1,124 @@
+<?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"/>
+ </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&lt;QtCharts::QPolarChart::PolarOrientation&gt;,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..0439f0a5c 100644
--- a/sources/pyside2/PySide2/QtCore/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
@@ -140,6 +140,7 @@ ${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}/qvariantanimation_wrapper.cpp
${QtCore_GEN_DIR}/qwaitcondition_wrapper.cpp
${QtCore_GEN_DIR}/qwritelocker_wrapper.cpp
diff --git a/sources/pyside2/PySide2/QtCore/glue/qcoreapplication_init.cpp b/sources/pyside2/PySide2/QtCore/glue/qcoreapplication_init.cpp
index 20e9c4464..c48b4ffa0 100644
--- a/sources/pyside2/PySide2/QtCore/glue/qcoreapplication_init.cpp
+++ b/sources/pyside2/PySide2/QtCore/glue/qcoreapplication_init.cpp
@@ -55,7 +55,7 @@ void QCoreApplication_constructor(PyObject* self, PyObject* args, QCoreApplicati
return;
}
- *cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
+ *cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues, QT_VERSION);
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
index f3bf41923..efcc5d955 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&amp;?$"/>
+ <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)?\&amp;$"/>
+ <!-- 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&amp;?$"/>
+ <rejection class="*" argument-type="^std::initializer_list&lt;.*$"/>
+ <rejection class="*" argument-type="^std::list&lt;[^&gt;]&gt; const&amp;$"/>
+ <rejection class="*" argument-type="std::string const&amp;"/>
+ <rejection class="*" argument-type="^std::vector&lt;[^&gt;]&gt; const&amp;$"/>
+
<!-- From Qt4.6 ^^^ -->
@@ -182,6 +211,16 @@
<!-- 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="int32_t" />
+ <primitive-type name="int16_t" />
+ <primitive-type name="int8_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>
@@ -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"/>
@@ -3246,7 +3286,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 &amp;, char **)" access="private"/>
+ <modify-function signature="QCoreApplication(int &amp;, 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">
@@ -3590,8 +3630,8 @@
<modify-function signature="operator&lt;&lt;(float)" remove="all"/>
<modify-function signature="operator&lt;&lt;(qlonglong)" remove="all"/>
<modify-function signature="operator&lt;&lt;(qulonglong)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(signed short)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(signed int)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(short)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(int)" remove="all"/>
<modify-function signature="operator&lt;&lt;(unsigned int)" remove="all"/>
<modify-function signature="operator&lt;&lt;(unsigned short)" remove="all"/>
<modify-function signature="operator&lt;&lt;(const char*)" remove="all"/>
@@ -3602,9 +3642,9 @@
<modify-function signature="operator&gt;&gt;(double&amp;)" remove="all"/>
<modify-function signature="operator&gt;&gt;(qlonglong&amp;)" remove="all"/>
<modify-function signature="operator&gt;&gt;(qulonglong&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(signed long&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(signed int&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(signed short&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(long&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(int&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(short&amp;)" remove="all"/>
<modify-function signature="operator&gt;&gt;(unsigned long&amp;)" remove="all"/>
<modify-function signature="operator&gt;&gt;(unsigned int&amp;)" remove="all"/>
<modify-function signature="operator&gt;&gt;(unsigned short&amp;)" remove="all"/>
@@ -4210,7 +4250,7 @@ s1.addTransition(button.clicked, s1h)&lt;/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/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 7a0db8a41..343b76229 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,27 @@
<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( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLchar *const const*"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLenum( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLfloat( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLfloat( const)?\[.*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLdouble( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLint64( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLsizei( const)?\*$"/>
+ <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="^GLu?int( 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 +639,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 +868,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 +3229,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"/>
@@ -3263,19 +3286,99 @@
<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"/>
+ </object-type>
+ <object-type name="QOpenGLFunctions" since="5.0">
+ <enum-type name="OpenGLFeature" flags="OpenGLFeatures"/>
</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"/>
+ <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/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&lt;double,qreal&gt;"/>
<rejection class="QTest" function-name="qCompare&lt;qreal,double&gt;"/>
<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 59412699c..7c16781c8 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&lt;QGraphicsItem*&gt;&amp;)">
<modify-argument index="1">
diff --git a/sources/pyside2/PySide2/global.h.in b/sources/pyside2/PySide2/global.h.in
index 6bddcfcce..b8ac01bba 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,20 +60,27 @@ 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
+// Define export macros for Windows' gl.h
+# ifdef Q_OS_WIN
+# define NOMINMAX // windows.h is pulled, sanitize
+# ifndef APIENTRY
+# define APIENTRY
+# endif
+# ifndef WINGDIAPI
+# define WINGDIAPI
+# endif
+# endif // Q_OS_WIN
# include <@GL_H@>
#endif // QT_NO_OPENGL
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
index 468ce51bc..85ad6129e 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
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..b8b0ec143 100644
--- a/sources/pyside2/tests/QtCore/CMakeLists.txt
+++ b/sources/pyside2/tests/QtCore/CMakeLists.txt
@@ -105,6 +105,7 @@ 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(repr_test.py)
PYSIDE_TEST(setprop_on_ctor_test.py)
PYSIDE_TEST(staticMetaObject_test.py)
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/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 b5fcb8d12..74775528c 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