aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-03 17:09:39 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-03 17:09:39 +0200
commitafaf0d2fde9afa9be363e78d027e4db764838763 (patch)
tree8507b461657b4e2b01c29ff12774f87dfa105953 /sources
parenta755d3fcabaaeee5416ac00bebe4f9f09a8c0949 (diff)
parentfff6ea0059b7394869166a01674a9afa230bc3a9 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside2/doc/tutorials/index.rst3
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial1.pngbin203229 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial2.pngbin249451 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial3.pngbin283378 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial4.gifbin1687445 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-samegame.pngbin124904 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/index.rst35
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame.tar.bz2bin60105 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/Block.qml63
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/Button.qml93
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/samegame.qml92
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/samegame1.qmlproject16
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/Block.qml61
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/Button.qml91
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame.js63
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame.qml95
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame2.qmlproject16
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Block.qml73
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Button.qml91
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Dialog.qml81
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame.js174
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame.qml119
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame3.qmlproject16
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/BoomBlock.qml132
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/Button.qml91
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/Dialog.qml117
-rwxr-xr-xsources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/samegame.js225
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/README1
-rwxr-xr-xsources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/score_data.xml2
-rwxr-xr-xsources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/score_style.xsl28
-rwxr-xr-xsources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/scores.php31
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/samegame.qml125
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/samegame4.qmlproject16
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/background.jpgbin36473 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/blueStar.pngbin278 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/blueStone.pngbin3054 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/greenStar.pngbin273 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/greenStone.pngbin2932 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/redStar.pngbin274 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/redStone.pngbin2902 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/star.pngbin262 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/yellowStone.pngbin3056 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame1.rst71
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame2.rst70
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame3.rst124
-rw-r--r--sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame4.rst233
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/main.py113
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/qmlintegration.rst111
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/qtquickcontrols2.conf10
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/style.qrc5
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/textproperties_default.pngbin0 -> 19347 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/textproperties_material.pngbin0 -> 21170 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/view.qml183
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial1.pngbin3577 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial2.pngbin3913 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial3_animation.gifbin301974 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/helloworld.tar.bz2bin2401 -> 0 bytes
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/helloworld/Cell.qml82
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial1.qml73
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial2.qml82
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial3.qml101
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/index.rst25
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/step1.rst66
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/step2.rst81
-rw-r--r--sources/pyside2/doc/tutorials/qmltutorial/step3.rst46
-rw-r--r--sources/shiboken2/ApiExtractor/CMakeLists.txt1
-rw-r--r--sources/shiboken2/ApiExtractor/doc/CMakeLists.txt10
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_templates/index.html27
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_templates/layout.html39
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/searchbox.html12
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/bg_header.pngbin36012 -> 0 bytes
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/bg_topo.jpgbin14237 -> 0 bytes
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/fakebar.pngbin101 -> 0 bytes
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_openbossa.pngbin4702 -> 0 bytes
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_python.jpgbin2660 -> 0 bytes
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_qt.pngbin4618 -> 0 bytes
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/pysidedocs.css409
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/pysidelogo.pngbin4936 -> 0 bytes
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/relbar_bg.pngbin130 -> 0 bytes
-rw-r--r--sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/theme.conf7
-rw-r--r--sources/shiboken2/ApiExtractor/doc/conf.py.in158
-rw-r--r--sources/shiboken2/ApiExtractor/doc/contents.rst9
-rw-r--r--sources/shiboken2/ApiExtractor/doc/dependency-apiextractor.svg360
-rw-r--r--sources/shiboken2/ApiExtractor/doc/overview.rst15
-rw-r--r--sources/shiboken2/ApiExtractor/doc/ownership.rst85
-rw-r--r--sources/shiboken2/doc/CMakeLists.txt1
-rw-r--r--sources/shiboken2/doc/codeinjectionsemantics.rst4
-rw-r--r--sources/shiboken2/doc/conf.py.in4
-rw-r--r--sources/shiboken2/doc/contents.rst1
-rw-r--r--sources/shiboken2/doc/faq.rst2
-rw-r--r--sources/shiboken2/doc/ownership.rst74
-rw-r--r--sources/shiboken2/doc/typeconverters.rst14
-rw-r--r--sources/shiboken2/doc/typesystem.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem.rst)4
-rw-r--r--sources/shiboken2/doc/typesystem_arguments.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem_arguments.rst)0
-rw-r--r--sources/shiboken2/doc/typesystem_conversionrule.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem_conversionrule.rst)0
-rw-r--r--sources/shiboken2/doc/typesystem_documentation.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem_documentation.rst)0
-rw-r--r--sources/shiboken2/doc/typesystem_manipulating_objects.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem_manipulating_objects.rst)0
-rw-r--r--sources/shiboken2/doc/typesystem_modify_function.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem_modify_function.rst)0
-rw-r--r--sources/shiboken2/doc/typesystem_solving_compilation.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem_solving_compilation.rst)0
-rw-r--r--sources/shiboken2/doc/typesystem_specifying_types.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst)2
-rw-r--r--sources/shiboken2/doc/typesystem_templates.rst (renamed from sources/shiboken2/ApiExtractor/doc/typesystem_templates.rst)0
-rw-r--r--sources/shiboken2/doc/typesystemvariables.rst4
-rw-r--r--sources/shiboken2/generator/generator.cpp22
-rw-r--r--sources/shiboken2/generator/main.cpp3
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp2
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp3
-rw-r--r--sources/shiboken2/libshiboken/embed/embedding_generator.py1
107 files changed, 529 insertions, 4170 deletions
diff --git a/sources/pyside2/doc/tutorials/index.rst b/sources/pyside2/doc/tutorials/index.rst
index e394c4d24..af7e88873 100644
--- a/sources/pyside2/doc/tutorials/index.rst
+++ b/sources/pyside2/doc/tutorials/index.rst
@@ -26,7 +26,6 @@ Tutorials
basictutorial/clickablebutton.rst
basictutorial/dialog.rst
basictutorial/uifiles.rst
- qmltutorial/index.rst
- qmladvancedtutorial/index.rst
datavisualize/index.rst
qmlapp/qmlapplication.rst
+ qmlintegration/qmlintegration.rst
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial1.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial1.png
deleted file mode 100644
index 1699ab0e4..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial1.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial2.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial2.png
deleted file mode 100644
index ba27c442c..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial2.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial3.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial3.png
deleted file mode 100644
index d500434d1..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial3.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial4.gif b/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial4.gif
deleted file mode 100644
index 827458daa..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-adv-tutorial4.gif
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-samegame.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-samegame.png
deleted file mode 100644
index 2232df204..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/declarative-samegame.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/index.rst b/sources/pyside2/doc/tutorials/qmladvancedtutorial/index.rst
deleted file mode 100644
index d40af59d7..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/index.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-.. _qmladvancedtutorial:
-
-QML Advanced Tutorial
-*********************
-
-This tutorial walks you through the steps of creating an application using QML.
-It assumes that you already know the basics of QML (for example, from reading the
-:ref:`qmltutorial`.
-
-In this tutorial, you will develop the game, *Same Game*. It is based on the
-Same Game application included in the declarative demos directory, and looks
-like this:
-
-.. figure:: declarative-samegame.png
- :align: center
-
-The tutorial covers concepts related to producing a fully functional application,
-including JavaScript integration, using QML states and behaviors to manage
-components and enhance your interface, and storing persistent application data.
-
-Prior knowledge of JavaScript is useful to understand parts of this
-tutorial, but if you don't know it, you can still get a feel of
-integrating the backend logic that creates and controls QML items.
-
-Tutorial chapters:
-
-.. toctree::
- :maxdepth: 1
-
- samegame1.rst
- samegame2.rst
- samegame3.rst
- samegame4.rst
-
-All the code in this tutorial can be found :download:`here <samegame.tar.bz2>`.
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame.tar.bz2 b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame.tar.bz2
deleted file mode 100644
index f33983d0a..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/Block.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/Block.qml
deleted file mode 100644
index 18d0c2e9e..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/Block.qml
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: block
-
- Image {
- id: img
- anchors.fill: parent
- source: "../shared/pics/redStone.png"
- }
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/Button.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/Button.qml
deleted file mode 100644
index 0c07904ab..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/Button.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Rectangle {
- id: container
-
- property string text: "Button"
-
- signal clicked
-
- width: buttonLabel.width + 20; height: buttonLabel.height + 5
- border { width: 1; color: Qt.darker(activePalette.button) }
- smooth: true
- radius: 8
-
- // color the button with a gradient
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: {
- if (mouseArea.pressed)
- return activePalette.dark
- else
- return activePalette.light
- }
- }
- GradientStop { position: 1.0; color: activePalette.button }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: container.clicked();
- }
-
- Text {
- id: buttonLabel
- anchors.centerIn: container
- color: activePalette.buttonText
- text: container.text
- }
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/samegame.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/samegame.qml
deleted file mode 100644
index 36b087d40..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/samegame.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Rectangle {
- id: screen
-
- width: 490; height: 720
-
- SystemPalette { id: activePalette }
-
- Item {
- width: parent.width
- anchors { top: parent.top; bottom: toolBar.top }
-
- Image {
- id: background
- anchors.fill: parent
- source: "../shared/pics/background.jpg"
- fillMode: Image.PreserveAspectCrop
- }
- }
-
- Rectangle {
- id: toolBar
- width: parent.width; height: 30
- color: activePalette.window
- anchors.bottom: screen.bottom
-
- Button {
- anchors { left: parent.left; verticalCenter: parent.verticalCenter }
- text: "New Game"
- onClicked: console.log("This doesn't do anything yet...")
- }
-
- Text {
- id: score
- anchors { right: parent.right; verticalCenter: parent.verticalCenter }
- text: "Score: Who knows?"
- }
- }
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/samegame1.qmlproject b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/samegame1.qmlproject
deleted file mode 100644
index d4909f868..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame1/samegame1.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/Block.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/Block.qml
deleted file mode 100644
index fbbf6a983..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/Block.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: block
-
- Image {
- id: img
- anchors.fill: parent
- source: "../shared/pics/redStone.png"
- }
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/Button.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/Button.qml
deleted file mode 100644
index ffdd2d46e..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/Button.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: container
-
- property string text: "Button"
-
- signal clicked
-
- width: buttonLabel.width + 20; height: buttonLabel.height + 5
- border { width: 1; color: Qt.darker(activePalette.button) }
- smooth: true
- radius: 8
-
- // color the button with a gradient
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: {
- if (mouseArea.pressed)
- return activePalette.dark
- else
- return activePalette.light
- }
- }
- GradientStop { position: 1.0; color: activePalette.button }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: container.clicked();
- }
-
- Text {
- id: buttonLabel
- anchors.centerIn: container
- color: activePalette.buttonText
- text: container.text
- }
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame.js b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame.js
deleted file mode 100644
index c749dc17b..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame.js
+++ /dev/null
@@ -1,63 +0,0 @@
-//![0]
-var blockSize = 40;
-var maxColumn = 10;
-var maxRow = 15;
-var maxIndex = maxColumn * maxRow;
-var board = new Array(maxIndex);
-var component;
-
-//Index function used instead of a 2D array
-function index(column, row) {
- return column + (row * maxColumn);
-}
-
-function startNewGame() {
- //Delete blocks from previous game
- for (var i = 0; i < maxIndex; i++) {
- if (board[i] != null)
- board[i].destroy();
- }
-
- //Calculate board size
- maxColumn = Math.floor(background.width / blockSize);
- maxRow = Math.floor(background.height / blockSize);
- maxIndex = maxRow * maxColumn;
-
- //Initialize Board
- board = new Array(maxIndex);
- for (var column = 0; column < maxColumn; column++) {
- for (var row = 0; row < maxRow; row++) {
- board[index(column, row)] = null;
- createBlock(column, row);
- }
- }
-}
-
-function createBlock(column, row) {
- if (component == null)
- component = Qt.createComponent("Block.qml");
-
- // Note that if Block.qml was not a local file, component.status would be
- // Loading and we should wait for the component's statusChanged() signal to
- // know when the file is downloaded and ready before calling createObject().
- if (component.status == Component.Ready) {
- var dynamicObject = component.createObject(background);
- if (dynamicObject == null) {
- console.log("error creating block");
- console.log(component.errorString());
- return false;
- }
- dynamicObject.x = column * blockSize;
- dynamicObject.y = row * blockSize;
- dynamicObject.width = blockSize;
- dynamicObject.height = blockSize;
- board[index(column, row)] = dynamicObject;
- } else {
- console.log("error loading block component");
- console.log(component.errorString());
- return false;
- }
- return true;
-}
-//![0]
-
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame.qml
deleted file mode 100644
index 6ed5bca1b..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame.qml
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-//![2]
-import "samegame.js" as SameGame
-//![2]
-
-Rectangle {
- id: screen
-
- width: 490; height: 720
-
- SystemPalette { id: activePalette }
-
- Item {
- width: parent.width
- anchors { top: parent.top; bottom: toolBar.top }
-
- Image {
- id: background
- anchors.fill: parent
- source: "../shared/pics/background.jpg"
- fillMode: Image.PreserveAspectCrop
- }
- }
-
- Rectangle {
- id: toolBar
- width: parent.width; height: 32
- color: activePalette.window
- anchors.bottom: screen.bottom
-
-//![1]
- Button {
- anchors { left: parent.left; verticalCenter: parent.verticalCenter }
- text: "New Game"
- onClicked: SameGame.startNewGame()
- }
-//![1]
-
- Text {
- id: score
- anchors { right: parent.right; verticalCenter: parent.verticalCenter }
- text: "Score: Who knows?"
- }
- }
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame2.qmlproject b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame2.qmlproject
deleted file mode 100644
index d4909f868..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame2/samegame2.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Block.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Block.qml
deleted file mode 100644
index 33a58688c..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Block.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: block
-
- property int type: 0
-
- Image {
- id: img
-
- anchors.fill: parent
- source: {
- if (type == 0)
- return "../shared/pics/redStone.png";
- else if (type == 1)
- return "../shared/pics/blueStone.png";
- else
- return "../shared/pics/greenStone.png";
- }
- }
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Button.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Button.qml
deleted file mode 100644
index ffdd2d46e..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Button.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: container
-
- property string text: "Button"
-
- signal clicked
-
- width: buttonLabel.width + 20; height: buttonLabel.height + 5
- border { width: 1; color: Qt.darker(activePalette.button) }
- smooth: true
- radius: 8
-
- // color the button with a gradient
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: {
- if (mouseArea.pressed)
- return activePalette.dark
- else
- return activePalette.light
- }
- }
- GradientStop { position: 1.0; color: activePalette.button }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: container.clicked();
- }
-
- Text {
- id: buttonLabel
- anchors.centerIn: container
- color: activePalette.buttonText
- text: container.text
- }
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Dialog.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Dialog.qml
deleted file mode 100644
index bb4c362cd..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/Dialog.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Rectangle {
- id: container
-
- function show(text) {
- dialogText.text = text;
- container.opacity = 1;
- }
-
- function hide() {
- container.opacity = 0;
- }
-
- width: dialogText.width + 20
- height: dialogText.height + 20
- opacity: 0
-
- Text {
- id: dialogText
- anchors.centerIn: parent
- text: ""
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: hide();
- }
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame.js b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame.js
deleted file mode 100644
index df5bdfb04..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame.js
+++ /dev/null
@@ -1,174 +0,0 @@
-/* This script file handles the game logic */
-var maxColumn = 10;
-var maxRow = 15;
-var maxIndex = maxColumn * maxRow;
-var board = new Array(maxIndex);
-var component;
-
-//Index function used instead of a 2D array
-function index(column, row) {
- return column + (row * maxColumn);
-}
-
-function startNewGame() {
- //Calculate board size
- maxColumn = Math.floor(gameCanvas.width / gameCanvas.blockSize);
- maxRow = Math.floor(gameCanvas.height / gameCanvas.blockSize);
- maxIndex = maxRow * maxColumn;
-
- //Close dialogs
- dialog.hide();
-
- //Initialize Board
- board = new Array(maxIndex);
- gameCanvas.score = 0;
- for (var column = 0; column < maxColumn; column++) {
- for (var row = 0; row < maxRow; row++) {
- board[index(column, row)] = null;
- createBlock(column, row);
- }
- }
-}
-
-function createBlock(column, row) {
- if (component == null)
- component = Qt.createComponent("Block.qml");
-
- // Note that if Block.qml was not a local file, component.status would be
- // Loading and we should wait for the component's statusChanged() signal to
- // know when the file is downloaded and ready before calling createObject().
- if (component.status == Component.Ready) {
- var dynamicObject = component.createObject(gameCanvas);
- if (dynamicObject == null) {
- console.log("error creating block");
- console.log(component.errorString());
- return false;
- }
- dynamicObject.type = Math.floor(Math.random() * 3);
- dynamicObject.x = column * gameCanvas.blockSize;
- dynamicObject.y = row * gameCanvas.blockSize;
- dynamicObject.width = gameCanvas.blockSize;
- dynamicObject.height = gameCanvas.blockSize;
- board[index(column, row)] = dynamicObject;
- } else {
- console.log("error loading block component");
- console.log(component.errorString());
- return false;
- }
- return true;
-}
-
-var fillFound; //Set after a floodFill call to the number of blocks found
-var floodBoard; //Set to 1 if the floodFill reaches off that node
-
-//![1]
-function handleClick(xPos, yPos) {
- var column = Math.floor(xPos / gameCanvas.blockSize);
- var row = Math.floor(yPos / gameCanvas.blockSize);
- if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
- return;
- if (board[index(column, row)] == null)
- return;
- //If it's a valid block, remove it and all connected (does nothing if it's not connected)
- floodFill(column, row, -1);
- if (fillFound <= 0)
- return;
- gameCanvas.score += (fillFound - 1) * (fillFound - 1);
- shuffleDown();
- victoryCheck();
-}
-//![1]
-
-function floodFill(column, row, type) {
- if (board[index(column, row)] == null)
- return;
- var first = false;
- if (type == -1) {
- first = true;
- type = board[index(column, row)].type;
-
- //Flood fill initialization
- fillFound = 0;
- floodBoard = new Array(maxIndex);
- }
- if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
- return;
- if (floodBoard[index(column, row)] == 1 || (!first && type != board[index(column, row)].type))
- return;
- floodBoard[index(column, row)] = 1;
- floodFill(column + 1, row, type);
- floodFill(column - 1, row, type);
- floodFill(column, row + 1, type);
- floodFill(column, row - 1, type);
- if (first == true && fillFound == 0)
- return; //Can't remove single blocks
- board[index(column, row)].opacity = 0;
- board[index(column, row)] = null;
- fillFound += 1;
-}
-
-function shuffleDown() {
- //Fall down
- for (var column = 0; column < maxColumn; column++) {
- var fallDist = 0;
- for (var row = maxRow - 1; row >= 0; row--) {
- if (board[index(column, row)] == null) {
- fallDist += 1;
- } else {
- if (fallDist > 0) {
- var obj = board[index(column, row)];
- obj.y += fallDist * gameCanvas.blockSize;
- board[index(column, row + fallDist)] = obj;
- board[index(column, row)] = null;
- }
- }
- }
- }
- //Fall to the left
- var fallDist = 0;
- for (var column = 0; column < maxColumn; column++) {
- if (board[index(column, maxRow - 1)] == null) {
- fallDist += 1;
- } else {
- if (fallDist > 0) {
- for (var row = 0; row < maxRow; row++) {
- var obj = board[index(column, row)];
- if (obj == null)
- continue;
- obj.x -= fallDist * gameCanvas.blockSize;
- board[index(column - fallDist, row)] = obj;
- board[index(column, row)] = null;
- }
- }
- }
- }
-}
-
-//![2]
-function victoryCheck() {
- //Award bonus points if no blocks left
- var deservesBonus = true;
- for (var column = maxColumn - 1; column >= 0; column--)
- if (board[index(column, maxRow - 1)] != null)
- deservesBonus = false;
- if (deservesBonus)
- gameCanvas.score += 500;
-
- //Check whether game has finished
- if (deservesBonus || !(floodMoveCheck(0, maxRow - 1, -1)))
- dialog.show("Game Over. Your score is " + gameCanvas.score);
-}
-//![2]
-
-//only floods up and right, to see if it can find adjacent same-typed blocks
-function floodMoveCheck(column, row, type) {
- if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
- return false;
- if (board[index(column, row)] == null)
- return false;
- var myType = board[index(column, row)].type;
- if (type == myType)
- return true;
- return floodMoveCheck(column + 1, row, myType) || floodMoveCheck(column, row - 1, board[index(column, row)].type);
-}
-
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame.qml
deleted file mode 100644
index 18a938302..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame.qml
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-import "samegame.js" as SameGame
-
-Rectangle {
- id: screen
-
- width: 490; height: 720
-
- SystemPalette { id: activePalette }
-
- Item {
- width: parent.width
- anchors { top: parent.top; bottom: toolBar.top }
-
- Image {
- id: background
- anchors.fill: parent
- source: "../shared/pics/background.jpg"
- fillMode: Image.PreserveAspectCrop
- }
-
-//![1]
- Item {
- id: gameCanvas
-
- property int score: 0
- property int blockSize: 40
-
- width: parent.width - (parent.width % blockSize)
- height: parent.height - (parent.height % blockSize)
- anchors.centerIn: parent
-
- MouseArea {
- anchors.fill: parent
- onClicked: SameGame.handleClick(mouse.x, mouse.y)
- }
- }
-//![1]
- }
-
-//![2]
- Dialog {
- id: dialog
- anchors.centerIn: parent
- z: 100
- }
-//![2]
-
- Rectangle {
- id: toolBar
- width: parent.width; height: 30
- color: activePalette.window
- anchors.bottom: screen.bottom
-
- Button {
- anchors { left: parent.left; verticalCenter: parent.verticalCenter }
- text: "New Game"
- onClicked: SameGame.startNewGame()
- }
-
- Text {
- id: score
- anchors { right: parent.right; verticalCenter: parent.verticalCenter }
- text: "Score: Who knows?"
- }
- }
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame3.qmlproject b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame3.qmlproject
deleted file mode 100644
index d4909f868..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame3/samegame3.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/BoomBlock.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/BoomBlock.qml
deleted file mode 100644
index d400fa402..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/BoomBlock.qml
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.particles 1.0
-
-Item {
- id: block
-
- property int type: 0
- property bool dying: false
-
- //![1]
- property bool spawned: false
-
- Behavior on x {
- enabled: spawned;
- SpringAnimation{ spring: 2; damping: 0.2 }
- }
- Behavior on y {
- SpringAnimation{ spring: 2; damping: 0.2 }
- }
- //![1]
-
- //![2]
- Image {
- id: img
-
- anchors.fill: parent
- source: {
- if (type == 0)
- return "../../shared/pics/redStone.png";
- else if (type == 1)
- return "../../shared/pics/blueStone.png";
- else
- return "../../shared/pics/greenStone.png";
- }
- opacity: 0
-
- Behavior on opacity {
- NumberAnimation { properties:"opacity"; duration: 200 }
- }
- }
- //![2]
-
- //![3]
- Particles {
- id: particles
-
- width: 1; height: 1
- anchors.centerIn: parent
-
- emissionRate: 0
- lifeSpan: 700; lifeSpanDeviation: 600
- angle: 0; angleDeviation: 360;
- velocity: 100; velocityDeviation: 30
- source: {
- if (type == 0)
- return "../../shared/pics/redStar.png";
- else if (type == 1)
- return "../../shared/pics/blueStar.png";
- else
- return "../../shared/pics/greenStar.png";
- }
- }
- //![3]
-
- //![4]
- states: [
- State {
- name: "AliveState"
- when: spawned == true && dying == false
- PropertyChanges { target: img; opacity: 1 }
- },
-
- State {
- name: "DeathState"
- when: dying == true
- StateChangeScript { script: particles.burst(50); }
- PropertyChanges { target: img; opacity: 0 }
- StateChangeScript { script: block.destroy(1000); }
- }
- ]
- //![4]
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/Button.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/Button.qml
deleted file mode 100644
index ffdd2d46e..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/Button.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: container
-
- property string text: "Button"
-
- signal clicked
-
- width: buttonLabel.width + 20; height: buttonLabel.height + 5
- border { width: 1; color: Qt.darker(activePalette.button) }
- smooth: true
- radius: 8
-
- // color the button with a gradient
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: {
- if (mouseArea.pressed)
- return activePalette.dark
- else
- return activePalette.light
- }
- }
- GradientStop { position: 1.0; color: activePalette.button }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: container.clicked();
- }
-
- Text {
- id: buttonLabel
- anchors.centerIn: container
- color: activePalette.buttonText
- text: container.text
- }
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/Dialog.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/Dialog.qml
deleted file mode 100644
index 0cdb04f7d..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/Dialog.qml
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-//![0]
-Rectangle {
- id: container
-//![0]
-
-//![1]
- property string inputText: textInput.text
- signal closed
-
- function show(text) {
- dialogText.text = text;
- container.opacity = 1;
- textInput.opacity = 0;
- }
-
- function showWithInput(text) {
- show(text);
- textInput.opacity = 1;
- textInput.focus = true;
- textInput.text = ""
- }
-
- function hide() {
- textInput.focus = false;
- container.opacity = 0;
- container.closed();
- }
-//![1]
-
- width: dialogText.width + textInput.width + 20
- height: dialogText.height + 20
- opacity: 0
- visible: opacity > 0
-
- Text {
- id: dialogText
- anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: 10 }
- text: ""
- }
-
-//![2]
- TextInput {
- id: textInput
- anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
- width: 80
- text: ""
-
- onAccepted: container.hide() // close dialog when Enter is pressed
- }
-//![2]
-
- MouseArea {
- anchors.fill: parent
-
- onClicked: {
- if (textInput.text == "" && textInput.opacity > 0)
- textInput.openSoftwareInputPanel();
- else
- hide();
- }
- }
-
-//![3]
-}
-//![3]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/samegame.js b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/samegame.js
deleted file mode 100755
index 79ff0c19b..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/content/samegame.js
+++ /dev/null
@@ -1,225 +0,0 @@
-/* This script file handles the game logic */
-var maxColumn = 10;
-var maxRow = 15;
-var maxIndex = maxColumn * maxRow;
-var board = new Array(maxIndex);
-var component;
-var scoresURL = "";
-var gameDuration;
-
-//Index function used instead of a 2D array
-function index(column, row) {
- return column + (row * maxColumn);
-}
-
-function startNewGame() {
- //Delete blocks from previous game
- for (var i = 0; i < maxIndex; i++) {
- if (board[i] != null)
- board[i].destroy();
- }
-
- //Calculate board size
- maxColumn = Math.floor(gameCanvas.width / gameCanvas.blockSize);
- maxRow = Math.floor(gameCanvas.height / gameCanvas.blockSize);
- maxIndex = maxRow * maxColumn;
-
- //Close dialogs
- nameInputDialog.hide();
- dialog.hide();
-
- //Initialize Board
- board = new Array(maxIndex);
- gameCanvas.score = 0;
- for (var column = 0; column < maxColumn; column++) {
- for (var row = 0; row < maxRow; row++) {
- board[index(column, row)] = null;
- createBlock(column, row);
- }
- }
-
- gameDuration = new Date();
-}
-
-function createBlock(column, row) {
- if (component == null)
- component = Qt.createComponent("content/BoomBlock.qml");
-
- // Note that if Block.qml was not a local file, component.status would be
- // Loading and we should wait for the component's statusChanged() signal to
- // know when the file is downloaded and ready before calling createObject().
- if (component.status == Component.Ready) {
- var dynamicObject = component.createObject(gameCanvas);
- if (dynamicObject == null) {
- console.log("error creating block");
- console.log(component.errorString());
- return false;
- }
- dynamicObject.type = Math.floor(Math.random() * 3);
- dynamicObject.x = column * gameCanvas.blockSize;
- dynamicObject.y = row * gameCanvas.blockSize;
- dynamicObject.width = gameCanvas.blockSize;
- dynamicObject.height = gameCanvas.blockSize;
- dynamicObject.spawned = true;
- board[index(column, row)] = dynamicObject;
- } else {
- console.log("error loading block component");
- console.log(component.errorString());
- return false;
- }
- return true;
-}
-
-var fillFound; //Set after a floodFill call to the number of blocks found
-var floodBoard; //Set to 1 if the floodFill reaches off that node
-
-function handleClick(xPos, yPos) {
- var column = Math.floor(xPos / gameCanvas.blockSize);
- var row = Math.floor(yPos / gameCanvas.blockSize);
- if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
- return;
- if (board[index(column, row)] == null)
- return;
- //If it's a valid block, remove it and all connected (does nothing if it's not connected)
- floodFill(column, row, -1);
- if (fillFound <= 0)
- return;
- gameCanvas.score += (fillFound - 1) * (fillFound - 1);
- shuffleDown();
- victoryCheck();
-}
-
-function floodFill(column, row, type) {
- if (board[index(column, row)] == null)
- return;
- var first = false;
- if (type == -1) {
- first = true;
- type = board[index(column, row)].type;
-
- //Flood fill initialization
- fillFound = 0;
- floodBoard = new Array(maxIndex);
- }
- if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
- return;
- if (floodBoard[index(column, row)] == 1 || (!first && type != board[index(column, row)].type))
- return;
- floodBoard[index(column, row)] = 1;
- floodFill(column + 1, row, type);
- floodFill(column - 1, row, type);
- floodFill(column, row + 1, type);
- floodFill(column, row - 1, type);
- if (first == true && fillFound == 0)
- return; //Can't remove single blocks
- board[index(column, row)].dying = true;
- board[index(column, row)] = null;
- fillFound += 1;
-}
-
-function shuffleDown() {
- //Fall down
- for (var column = 0; column < maxColumn; column++) {
- var fallDist = 0;
- for (var row = maxRow - 1; row >= 0; row--) {
- if (board[index(column, row)] == null) {
- fallDist += 1;
- } else {
- if (fallDist > 0) {
- var obj = board[index(column, row)];
- obj.y = (row + fallDist) * gameCanvas.blockSize;
- board[index(column, row + fallDist)] = obj;
- board[index(column, row)] = null;
- }
- }
- }
- }
- //Fall to the left
- fallDist = 0;
- for (column = 0; column < maxColumn; column++) {
- if (board[index(column, maxRow - 1)] == null) {
- fallDist += 1;
- } else {
- if (fallDist > 0) {
- for (row = 0; row < maxRow; row++) {
- obj = board[index(column, row)];
- if (obj == null)
- continue;
- obj.x = (fallDist - column) * gameCanvas.blockSize;
- board[index(column - fallDist, row)] = obj;
- board[index(column, row)] = null;
- }
- }
- }
- }
-}
-
-//![3]
-function victoryCheck() {
-//![3]
- //Award bonus points if no blocks left
- var deservesBonus = true;
- for (var column = maxColumn - 1; column >= 0; column--)
- if (board[index(column, maxRow - 1)] != null)
- deservesBonus = false;
- if (deservesBonus)
- gameCanvas.score += 500;
-
-//![4]
- //Check whether game has finished
- if (deservesBonus || !(floodMoveCheck(0, maxRow - 1, -1))) {
- gameDuration = new Date() - gameDuration;
- nameInputDialog.showWithInput("You won! Please enter your name: ");
- }
-}
-//![4]
-
-//only floods up and right, to see if it can find adjacent same-typed blocks
-function floodMoveCheck(column, row, type) {
- if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
- return false;
- if (board[index(column, row)] == null)
- return false;
- var myType = board[index(column, row)].type;
- if (type == myType)
- return true;
- return floodMoveCheck(column + 1, row, myType) || floodMoveCheck(column, row - 1, board[index(column, row)].type);
-}
-
-//![2]
-function saveHighScore(name) {
- if (scoresURL != "")
- sendHighScore(name);
-
- var db = openDatabaseSync("SameGameScores", "1.0", "Local SameGame High Scores", 100);
- var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)";
- var data = [name, gameCanvas.score, maxColumn + "x" + maxRow, Math.floor(gameDuration / 1000)];
- db.transaction(function(tx) {
- tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(name TEXT, score NUMBER, gridSize TEXT, time NUMBER)');
- tx.executeSql(dataStr, data);
-
- var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "12x17" ORDER BY score desc LIMIT 10');
- var r = "\nHIGH SCORES for a standard sized grid\n\n"
- for (var i = 0; i < rs.rows.length; i++) {
- r += (i + 1) + ". " + rs.rows.item(i).name + ' got ' + rs.rows.item(i).score + ' points in ' + rs.rows.item(i).time + ' seconds.\n';
- }
- dialog.show(r);
- });
-}
-//![2]
-
-//![1]
-function sendHighScore(name) {
- var postman = new XMLHttpRequest()
- var postData = "name=" + name + "&score=" + gameCanvas.score + "&gridSize=" + maxColumn + "x" + maxRow + "&time=" + Math.floor(gameDuration / 1000);
- postman.open("POST", scoresURL, true);
- postman.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- postman.onreadystatechange = function() {
- if (postman.readyState == postman.DONE) {
- dialog.show("Your score has been uploaded.");
- }
- }
- postman.send(postData);
-}
-//![1]
-
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/README b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/README
deleted file mode 100644
index eaa00fae3..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/README
+++ /dev/null
@@ -1 +0,0 @@
-The SameGame example can interface with a simple PHP script to store XML high score data on a remote server. We do not have a publically accessible server available for this use, but if you have access to a PHP capable webserver you can copy the files (score_data.xml, score.php, score_style.xsl) to it and alter the highscore_server variable at the top of the samegame.js file to point to it.
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/score_data.xml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/score_data.xml
deleted file mode 100755
index c3fd90d9c..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/score_data.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<record><score>1000000</score><name>Alan the Tester</name><gridSize>0x0</gridSize><seconds>0</seconds></record>
-<record><score>6213</score><name>Alan</name><gridSize>12x17</gridSize><seconds>51</seconds></record>
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/score_style.xsl b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/score_style.xsl
deleted file mode 100755
index 670354c96..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/score_style.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:template match="/">
- <html>
- <head><title>SameGame High Scores</title></head>
- <body>
- <h2>SameGame High Scores</h2>
- <table border="1">
- <tr bgcolor="lightsteelblue">
- <th>Name</th>
- <th>Score</th>
- <th>Grid Size</th>
- <th>Time, s</th>
- </tr>
- <xsl:for-each select="records/record">
- <xsl:sort select="score" data-type="number" order="descending"/>
- <tr>
- <td><xsl:value-of select="name"/></td>
- <td><xsl:value-of select="score"/></td>
- <td><xsl:value-of select="gridSize"/></td>
- <td><xsl:value-of select="seconds"/></td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
-</xsl:template>
-</xsl:stylesheet>
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/scores.php b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/scores.php
deleted file mode 100755
index daf480e21..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/highscores/scores.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
- $score = $_POST["score"];
- echo "<html>";
- echo "<head><title>SameGame High Scores</title></head><body>";
- if($score > 0){#Sending in a new high score
- $name = $_POST["name"];
- $grid = $_POST["gridSize"];
- $time = $_POST["time"];
- if($name == "")
- $name = "Anonymous";
- $file = fopen("score_data.xml", "a");
- $ret = fwrite($file, "<record><score>". $score . "</score><name>"
- . $name . "</name><gridSize>" . $grid . "</gridSize><seconds>"
- . $time . "</seconds></record>\n");
- echo "Your score has been recorded. Thanks for playing!";
- if($ret == False)
- echo "<br/> There was an error though, so don't expect to see that score again.";
- }else{#Read high score list
- #Now uses XSLT to display. So just print the file. With XML cruft added.
- #Note that firefox at least won't apply the XSLT on a php file. So redirecting
- $file = fopen("scores.xml", "w");
- $ret = fwrite($file, '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n"
- . '<?xml-stylesheet type="text/xsl" href="score_style.xsl"?>' . "\n"
- . "<records>\n" . file_get_contents("score_data.xml") . "</records>\n");
- if($ret == False)
- echo "There was an internal error. Sorry.";
- else
- echo '<script type="text/javascript">window.location.replace("scores.xml")</script>';
- }
- echo "</body></html>";
-?>
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/samegame.qml b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/samegame.qml
deleted file mode 100644
index 3e514f86a..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/samegame.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "content"
-import "content/samegame.js" as SameGame
-
-Rectangle {
- id: screen
-
- width: 490; height: 720
-
- SystemPalette { id: activePalette }
-
- Item {
- width: parent.width
- anchors { top: parent.top; bottom: toolBar.top }
-
- Image {
- id: background
- anchors.fill: parent
- source: "../shared/pics/background.jpg"
- fillMode: Image.PreserveAspectCrop
- }
-
- Item {
- id: gameCanvas
- property int score: 0
- property int blockSize: 40
-
- anchors.centerIn: parent
- width: parent.width - (parent.width % blockSize);
- height: parent.height - (parent.height % blockSize);
-
- MouseArea {
- anchors.fill: parent; onClicked: SameGame.handleClick(mouse.x,mouse.y);
- }
- }
- }
-
- Dialog {
- id: dialog
- anchors.centerIn: parent
- z: 100
- }
-
- //![0]
- Dialog {
- id: nameInputDialog
- anchors.centerIn: parent
- z: 100
-
- onClosed: {
- if (nameInputDialog.inputText != "")
- SameGame.saveHighScore(nameInputDialog.inputText);
- }
- }
- //![0]
-
- Rectangle {
- id: toolBar
- width: parent.width; height: 30
- color: activePalette.window
- anchors.bottom: screen.bottom
-
- Button {
- anchors { left: parent.left; verticalCenter: parent.verticalCenter }
- text: "New Game"
- onClicked: SameGame.startNewGame()
- }
-
- Text {
- id: score
- anchors { right: parent.right; verticalCenter: parent.verticalCenter }
- text: "Score: " + gameCanvas.score
- }
- }
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/samegame4.qmlproject b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/samegame4.qmlproject
deleted file mode 100644
index d4909f868..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/samegame4/samegame4.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/background.jpg b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/background.jpg
deleted file mode 100644
index 903d395c8..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/background.jpg
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/blueStar.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/blueStar.png
deleted file mode 100644
index ff9588f80..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/blueStar.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/blueStone.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/blueStone.png
deleted file mode 100644
index 20e43c75b..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/blueStone.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/greenStar.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/greenStar.png
deleted file mode 100644
index cd0685471..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/greenStar.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/greenStone.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/greenStone.png
deleted file mode 100644
index b568a1900..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/greenStone.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/redStar.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/redStar.png
deleted file mode 100644
index 0a4dffe58..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/redStar.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/redStone.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/redStone.png
deleted file mode 100644
index 36b09a268..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/redStone.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/star.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/star.png
deleted file mode 100644
index defbde53c..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/star.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/yellowStone.png b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/yellowStone.png
deleted file mode 100644
index b1ce76212..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame/shared/pics/yellowStone.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame1.rst b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame1.rst
deleted file mode 100644
index f48c0672b..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame1.rst
+++ /dev/null
@@ -1,71 +0,0 @@
-.. _samegame1:
-
-QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks
-*************************************************************
-
-Creating the application screen
-===============================
-
-The first step is to create the basic QML items in your application.
-
-To begin with, create a main screen like this:
-
-.. figure:: declarative-adv-tutorial1.png
- :align: center
-
-This is defined by the main application file, ``samegame.qml``, which looks like this:
-
-.. pysideinclude:: samegame/samegame1/samegame.qml
- :snippet: 0
-
-It gives a basic game window that includes the main canvas for the
-blocks, a "New Game" button, and a score display.
-
-One item you may not recognize here is the SystemPalette item. This provides
-access to the Qt system palette and is used to give the button a more native
-look-and-feel.
-
-Notice the anchors for the ``Item``, ``Button``, and ``Text`` items are set using
-group notation for readability.
-
-Adding button and block components
-==================================
-
-The ``Button`` item in the code above is defined in a separate component file named ``Button.qml``.
-To create a functional button, use the Text and MouseArea QML types inside a Rectangle.
-Here is the ``Button.qml`` code:
-
-.. pysideinclude:: samegame/samegame1/Button.qml
- :snippet: 0
-
-This essentially defines a rectangle that contains text and can be clicked. The MouseArea
-has an ``onClicked()`` handler that is implemented to emit the ``clicked()`` signal of the
-``container`` when the area is clicked.
-
-In Same Game, the screen is filled with small blocks when the game begins.
-Each block is an item that contains an image. The block
-is defined in the ``Block.qml`` file:
-
-.. pysideinclude:: samegame/samegame1/Block.qml
- :snippet: 0
-
-At the moment, the block doesn't do anything; it is just an image. As the
-tutorial progresses, you will animate and give behaviors to the blocks.
-You have not added any code yet to create the blocks; this
-will be done in the next chapter.
-
-You have set the image to be the size of its parent Item using ``anchors.fill: parent``.
-This means that when you dynamically create and resize the block items
-later on in the tutorial, the image will be scaled automatically to the
-correct size.
-
-Notice the relative path for the Image item's ``source`` property.
-It is relative to the location of the file that contains the Image item.
-Alternatively, you could set the Image source to an absolute file path or a URL
-that contains an image.
-
-You should be familiar with the code so far, as you have created some basic
-items to get started. In the next chapter, you will populate the game canvas
-with some blocks.
-
-[Previous :ref:`qmladvancedtutorial`] [Next :ref:`samegame2`]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame2.rst b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame2.rst
deleted file mode 100644
index 7f3ee8845..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame2.rst
+++ /dev/null
@@ -1,70 +0,0 @@
-.. _samegame2:
-
-QML Advanced Tutorial 2 - Populating the Game Canvas
-****************************************************
-
-Generating the blocks in JavaScript
-===================================
-
-Now that the basic elements are in place, start writing the game.
-
-The first task is to generate the game blocks. Each time the New Game button
-is clicked, the game canvas is populated with a new, random set of
-blocks that are generated dynamically. You can achieve this by creating
-the blocks using JavaScript intead of a Repeater.
-
-Here is the JavaScript code for generating the blocks, contained in a new
-file, ``samegame.js``. The code is explained below.
-
-.. pysideinclude:: samegame/samegame2/samegame.js
- :snippet: 0
-
-The ``startNewGame()`` function deletes the blocks created in the previous game and
-calculates the number of rows and columns of blocks required to fill the game window for the new game.
-Then, it creates an array to store all the game
-blocks, and calls ``createBlock()`` to create enough blocks to fill the game window.
-
-The ``createBlock()`` function creates a block from the ``Block.qml`` file
-and moves the new block to its position on the game canvas. This involves several steps:
-
-* ``Qt.createComponent()`` is called to
- generate an instance of ``Block.qml``. If the component is ready,
- we can call ``createObject()`` to create an instance of the ``Block``
- item.
-
-* If ``createObject()`` returned null (that is, if there was an error
- while loading the object), print the error information.
-
-* Place the block in its position on the board and set its width and
- height. Also, store it in the blocks array for future reference.
-
-* Finally, print error information to the console if the component
- could not be loaded for some reason (for example, if the file is
- missing).
-
-Connecting JavaScript components to QML
-=======================================
-
-Now, call the JavaScript code in ``samegame.js`` from your QML files.
-To do this, add the following line to ``samegame.qml`` to import
-the JavaScript file as a module:
-
-.. pysideinclude:: samegame/samegame2/samegame.qml
- :snippet: 2
-
-This lets you to refer to any functions within ``samegame.js`` using "SameGame"
-as a prefix: for example, ``SameGame.startNewGame()`` or ``SameGame.createBlock()``.
-This means you can now connect the New Game button's ``onClicked`` handler to the ``startNewGame()``
-function, like this:
-
-.. pysideinclude:: samegame/samegame2/samegame.qml
- :snippet: 1
-
-So, when you click the New Game button, ``startNewGame()`` is called to generate a field of blocks, like this:
-
-.. figure:: declarative-adv-tutorial2.png
- :align: center
-
-Now that the screen of blocks is ready, you can start adding the game mechanics.
-
-[Previous :ref:`samegame1`] [Next :ref:`samegame3`]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame3.rst b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame3.rst
deleted file mode 100644
index b3c794ec2..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame3.rst
+++ /dev/null
@@ -1,124 +0,0 @@
-.. _samegame3:
-
-QML Advanced Tutorial 3 - Implementing the Game Logic
-*****************************************************
-
-Making a playable game
-======================
-
-Now that all the UI components are ready, add the game logic that
-dictates how a player interacts with the blocks and plays the game,
-until it is won or lost.
-
-To achieve this, add the following functions to ``samegame.js``:
-
-
-* ``handleClick(x,y)``
-* ``floodFill(xIdx,yIdx,type)``
-* ``shuffleDown()``
-* ``victoryCheck()``
-* ``floodMoveCheck(xIdx, yIdx, type)``
-
-As this is a tutorial about QML, not game design, only the ``handleClick()``
-and ``victoryCheck()`` functions that interface directly with the QML items
-are discussed.
-
-.. Note:: Although the game logic here is written in JavaScript,
- it could have been written in Python and then exposed to QML.
-
-Enabling mouse click interaction
-================================
-
-To make it easier for the JavaScript code to interface with the QML items,
-an Item called ``gameCanvas`` is added to ``samegame.qml``. It replaces the
-background as the item which contains the blocks. It also accepts mouse input
-from the user. Here is the item code:
-
-.. pysideinclude:: samegame/samegame3/samegame.qml
- :snippet: 1
-
-The ``gameCanvas`` item is of the same size as the board, and has a ``score``
-property and a MouseArea to handle mouse clicks. The blocks are now created as
-its children, and its dimensions are used to determine the board size
-so that the application scales to the available screen size. As the item's size
-is bound to a multiple of ``blockSize``, ``blockSize`` is moved into ``samegame.qml``
-from ``samegame.js``, as a QML property.
-
-.. Note:: The ``blockSize`` can still be accessed from the script.
-
-When clicked, the MouseArea calls ``handleClick()`` in ``samegame.js``, which
-determines whether the player's click should cause any blocks to be removed,
-and updates ``gameCanvas.score`` with the current score if necessary. Here is
-the ``handleClick()`` function:
-
-.. pysideinclude:: samegame/samegame3/samegame.js
- :snippet: 1
-
-.. Note:: If ``score`` was a global variable in the ``samegame.js`` file,
- you would not be able to bind to it. You can only bind to QML properties.
-
-Updating the score
-==================
-
-When the player clicks a block and triggers \c handleClick(), \c handleClick()
-also calls \c victoryCheck() to update the score and to check whether the
-player has completed the game. Here is the \c victoryCheck() code:
-
-.. pysideinclude:: samegame/samegame3/samegame.js
- :snippet: 2
-
-This updates the ``gameCanvas.score`` value and displays a "Game Over" dialog
-if the game is finished.
-
-The Game Over dialog is created using a ``Dialog`` item that is defined in
-``Dialog.qml``. Here is the ``Dialog.qml`` code:
-
-.. pysideinclude:: samegame/samegame3/Dialog.qml
- :snippet: 0
-
-Notice how it is designed to be usable imperatively from the script file, via
-the functions and signals. And this is how it is used in the main
-``samegame.qml`` file:
-
-.. pysideinclude:: samegame/samegame3/samegame.qml
- :snippet: 2
-
-Give the dialog a ``z`` value of 100 to ensure it is displayed on top of our
-other components. The default ``z`` value for an item is 0.
-
-
-A dash of color
----------------
-
-It's not much fun to play Same Game if all the blocks are of the same color, so
-the ``createBlock()`` function in ``samegame.js`` randomly changes the color
-to create a different type of block (for either red, green or blue) each time
-it is called. ``Block.qml`` has also changed so that each block contains a
-different image depending on its type:
-
-.. pysideinclude:: samegame/samegame3/Block.qml
- :snippet: 0
-
-
-A working game
-==============
-
-You now have a working game! The blocks can be clicked, the player can
-score, and the game can end (and then you can start a new one).
-Here is a screenshot of what has been accomplished so far:
-
-.. figure:: declarative-adv-tutorial3.png
- :align: center
-
-This is what ``samegame.qml`` looks like now:
-
-.. pysideinclude:: samegame/samegame3/samegame.qml
- :snippet: 0
-
-The game works, but it's a little boring right now. Where are the smooth
-animated transitions? Where are the high scores?
-If you were a QML expert, you could have written these in the first
-iteration, but in this tutorial they've been saved until the next chapter
-- where your application becomes alive!
-
-[Previous :ref:`samegame2`] [Next :ref:`samegame4`]
diff --git a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame4.rst b/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame4.rst
deleted file mode 100644
index 5ea38a5ad..000000000
--- a/sources/pyside2/doc/tutorials/qmladvancedtutorial/samegame4.rst
+++ /dev/null
@@ -1,233 +0,0 @@
-.. _samegame4:
-
-QML Advanced Tutorial 4 - Finishing Touches
-*******************************************
-
-Adding some flair
-=================
-
-In this chapter, you are going to do two things to enhance the game
-experience: animate the blocks and add a High Score system.
-
-You should clean up the directory structure, now that there are a
-lot of files. Move all the JavaScript and QML files outside of ``samegame.qml``
-into a new sub-directory named "content".
-
-In anticipation of the new block animations, ``Block.qml`` file is now renamed
-to ``BoomBlock.qml``.
-
-Animating block movement
-------------------------
-
-First, you will animate the blocks so that they move in a fluid manner. QML has
-a number of methods for adding fluid movement, and in this case you are going to
-use the Behavior type to add a SpringAnimation. In ``BoomBlock.qml``, apply a
-SpringAnimation behavior to the ``x`` and ``y`` properties so that the
-block follows and animate its movement in a spring-like fashion towards the
-specified position (whose values are set by ``samegame.js``). Here is the code
-added to ``BoomBlock.qml``:
-
-.. pysideinclude:: samegame/samegame4/content/BoomBlock.qml
- :snippet: 1
-
-The ``spring`` and ``damping`` values can be changed to modify the spring-like
-effect of the animation.
-
-The ``enabled: spawned`` setting refers to the ``spawned`` value that comes from
-the ``createBlock()`` function in ``samegame.js``. This ensures that the
-SpringAnimation on ``x`` is only enabled after ``createBlock()`` has set the
-block to the correct position. Otherwise, the blocks will slide out of the
-corner (0,0) when a game begins, instead of falling from the top in rows.
-Try commenting out the line, ``enabled: spawned``, and see the effect for
-yourself.
-
-Animating block opacity changes
--------------------------------
-
-Next, add a smooth exit animation. For this, use a Behavior type, which
-allows us to specify a default animation when a property change occurs. In this
-case, when the ``opacity`` of a Block changes, animate the opacity value so that
-it gradually fades in and out, instead of abruptly changing between fully
-visible and invisible. To do this, apply a Behavior on the ``opacity`` property
-of the ``Image`` item in ``BoomBlock.qml``:
-
-.. pysideinclude:: samegame/samegame4/content/BoomBlock.qml
- :snippet: 2
-
-Note the ``opacity: 0``, which means the block is transparent when it is first
-created. You could set the opacity in ``samegame.js`` when we create and
-destroy the blocks, but use states instead, as this is useful for the next
-animation you are going to add. Initially, add these States to the root
-item of ``BoomBlock.qml``:
-
-::
-
- property bool dying: false
- states: [
- State{ name: "AliveState"; when: spawned == true && dying == false
- PropertyChanges { target: img; opacity: 1 }
- },
- State{ name: "DeathState"; when: dying == true
- PropertyChanges { target: img; opacity: 0 }
- }
- ]
-
-Now blocks will automatically fade in, as ``spawned`` is set to true when
-you implemented the block animations. To fade out, set ``dying`` to true
-instead of setting opacity to 0 when a block is destroyed (in the
-``floodFill()`` function).
-
-Adding particle effects
------------------------
-
-Finally, add a cool-looking particle effect to the blocks when they are
-destroyed. To do this, first add a Particles item in
-``BoomBlock.qml``, like this:
-
-.. pysideinclude:: samegame/samegame4/content/BoomBlock.qml
- :snippet: 3
-
-To fully understand this you should read the Particles documentation,
-but it's important to note that ``emissionRate`` is set to zero so that
-particles are not emitted normally. Also, extend the ``dying`` State,
-which creates a burst of particles by calling the ``burst()`` method on the
-particles item. The code for the states now look like this:
-
-.. pysideinclude:: samegame/samegame4/content/BoomBlock.qml
- :snippet: 4
-
-Now the gaming experience is pleasing with these animations. With a few
-more simple animations for all of the player's actions, it will look even better.
-The end result is shown below, with a different set of images to demonstrate
-the basic theme:
-
-.. figure:: declarative-adv-tutorial4.gif
- :align: center
-
-The theme change here is produced simply by replacing the block images. This
-can be done at runtime by changing the ``source`` property of the Image. You
-could go a step further and add a button that toggles between themes with
-different images.
-
-Keeping a high scores table
-===========================
-
-Another feature you might want to add to the game is a method of storing and
-retrieving high scores.
-
-To do this, show a dialog when the game is over to request the player's name
-and add it to a High Scores table. This requires a few changes to
-``Dialog.qml``. In addition to a ``Text`` item, it now has a ``TextInput``
-child item for receiving keyboard text input:
-
-.. pysideinclude:: samegame/samegame4/content/Dialog.qml
- :snippet: 2
- :prepend: Rectangle {
- ...
- :append: ...
- }
-
-
-Also, add a ``showWithInput()`` function. The text input will only be visible if
-this function is called instead of ``show()``. When the dialog is closed, it
-emits a ``closed()`` signal, and other items can retrieve the text entered by
-the user through the ``inputText`` property:
-
-.. pysideinclude:: samegame/samegame4/content/Dialog.qml
- :snippet: 1
- :prepend: Rectangle {
- ...
- :append: ...
- }
-
-Now the dialog can be used in ``samegame.qml``:
-
-.. pysideinclude:: samegame/samegame4/samegame.qml
- :snippet: 0
-
-When the dialog emits the ``closed`` signal, we call the new ``saveHighScore()``
-function in ``samegame.js``, to store the high score locally in an SQL database
-and also send the score to an online database if possible.
-
-The ``nameInputDialog`` is activated in the ``victoryCheck()`` function in
-``samegame.js``:
-
-.. pysideinclude:: samegame/samegame4/content/samegame.js
- :snippet: 4
- :prepend: function vitoryCheck() {
- ...
-
-Storing high scores offline
----------------------------
-
-Now, you need to implement the functionality to actually save the High Scores table.
-
-Here is the ``saveHighScore()`` function in ``samegame.js``:
-
-.. pysideinclude:: samegame/samegame4/content/samegame.js
- :snippet: 2
-
-First, call ``sendHighScore()`` to send the high scores to an online database.
-
-Then, use the Offline Storage API to maintain a persistent SQL database, unique
-to this application. Create an offline storage database for the high scores
-using ``openDatabase()``, then prepare the data and SQL query that we want to use
-to save it. The offline storage API uses SQL queries for data manipulation and
-retrieval. The ``db.transaction()`` uses three SQL queries:
- * To initialize the database, if necessary.
- * To add high scores to the database.
- * To retrieve the high score records.
-
-To use the returned records, turn it into a string with one line per row, and show
-a dialog containing that string.
-
-This is one way of storing and displaying high scores locally, but certainly
-not the only way. A more complex alternative would be to create a high score
-dialog component, and pass it the results for processing and display (instead
-of reusing the ``Dialog``). This allows for a more themeable dialog that could
-present the high scores in a better way. If you are using QML-based UI for a
-Python application, you can also pass the score to a function that stores it
-locally in a variety of ways. This can be a simple format without SQL, or in
-another SQL database.
-
-Storing high scores online
---------------------------
-
-You've seen how you can store high scores locally, but it is also easy to
-integrate a web-enabled high score storage into your application. The
-implementation we've done here is very simple: the high score data is posted to
-a php script running on a server somewhere, and that server then stores it and
-displays it to visitors. You could also request an XML or QML file, which
-contains and displays the scores, but that's beyond the scope of this tutorial.
-The php script used here is available in the ``examples`` directory.
-
-If the player entered their name, you can send the data to an online database
-service. The following code snippet from ``samegame.js`` demonstrates this well:
-
-.. pysideinclude:: samegame/samegame4/content/samegame.js
- :snippet: 1
-
-The XMLHttpRequest in this code is the same as the ``XMLHttpRequest()`` as you'll
-find in standard browser JavaScript, and can be used in the same way to
-dynamically get XML or QML from the web service to display the high scores. We don't worry about the response in this case - we just post the high
-score data to the web server. If it had returned a QML file (or a URL to a QML file) you could instantiate it in much the same
-way as you did with the blocks.
-
-An alternate way to access and submit web-based data would be to use QML items designed for this purpose. XmlListModel
-makes it very easy to fetch and display XML based data such as RSS in a QML application (see the Flickr demo for an example).
-
-
-That's it!
-==========
-
-By following this tutorial you've seen how you can write a fully functional application in QML:
-
-* Build your application with QML items.
-* Add application logic with JavaScript code.
-* Add animations with Behaviors and states.
-* Store persistent application data using, for example, the Offline Storage API or XMLHttpRequest.
-
-There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the
-demos and examples and the documentation to see all the things you can do with QML!
-
-[Previous :ref:`samegame3`]
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/main.py b/sources/pyside2/doc/tutorials/qmlintegration/main.py
new file mode 100644
index 000000000..3451c65b5
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/qmlintegration/main.py
@@ -0,0 +1,113 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "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
+## notice, this list of conditions and the following disclaimer.
+## * 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
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from os.path import abspath, dirname, join
+
+from PySide2.QtCore import QObject, Slot
+from PySide2.QtGui import QGuiApplication
+from PySide2.QtQml import QQmlApplicationEngine
+
+from style_rc import *
+
+
+class Bridge(QObject):
+
+ @Slot(str, result=str)
+ def getColor(self, color_name):
+ if color_name.lower() == "red":
+ return "#ef9a9a"
+ elif color_name.lower() == "green":
+ return "#a5d6a7"
+ elif color_name.lower() == "blue":
+ return "#90caf9"
+ else:
+ return "white"
+
+ @Slot(float, result=int)
+ def getSize(self, s):
+ size = int(s * 42) # Maximum font size
+ if size <= 0:
+ return 1
+ else:
+ return size
+
+ @Slot(str, result=bool)
+ def getItalic(self, s):
+ if s.lower() == "italic":
+ return True
+ else:
+ return False
+
+ @Slot(str, result=bool)
+ def getBold(self, s):
+ if s.lower() == "bold":
+ return True
+ else:
+ return False
+
+ @Slot(str, result=bool)
+ def getUnderline(self, s):
+ if s.lower() == "underline":
+ return True
+ else:
+ return False
+
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ engine = QQmlApplicationEngine()
+
+ # Instance of the Python object
+ bridge = Bridge()
+
+ # Expose the Python object to QML
+ context = engine.rootContext()
+ context.setContextProperty("con", bridge)
+
+ # Get the path of the current directory, and then add the name
+ # of the QML file, to load it.
+ qmlFile = join(dirname(__file__), 'view.qml')
+ engine.load(abspath(qmlFile))
+
+ if not engine.rootObjects():
+ sys.exit(-1)
+
+ sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/qmlintegration.rst b/sources/pyside2/doc/tutorials/qmlintegration/qmlintegration.rst
new file mode 100644
index 000000000..36a12381d
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/qmlintegration/qmlintegration.rst
@@ -0,0 +1,111 @@
+########################
+QML Integration Tutorial
+########################
+
+This tutorial provides a quick walk-through of a python application that loads, and interacts with
+a QML file. QML is a declarative language that lets you design UIs faster than a traditional
+language, such as C++. The QtQml and QtQuick modules provides the necessary infrastructure for
+QML-based UIs.
+
+In this tutorial, you will learn how to integrate Python with a QML application through a context
+property. This mechanism will help us to understand how to use Python as a backend for certain
+signals from the UI elements in the QML interface. Additionally, you will learn how to provide
+a modern look to your QML application using one of the features from Qt Quick Controls 2.
+
+The tutorial is based on an application that allow you to set many text properties, like increasing
+the font size, changing the color, changing the style, and so on. Before you begin, install the
+`PySide2 <https://pypi.org/project/PySide2/>`_ Python packages.
+
+The following step-by-step process will guide you through the key elements of the QML based
+application and PySide2 integration:
+
+#. First, let's start with the following QML-based UI:
+
+ .. image:: textproperties_default.png
+
+ The design is based on a `GridLayout`, containing two `ColumnLayout`.
+ Inside the UI you will find many `RadioButton`, `Button`, and a `Slider`.
+
+#. With the QML file in place, you can load it from Python:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 98-108
+ :emphasize-lines: 103,107
+
+ Notice that we specify the name of the context property, **con**,
+ and also we explicitly load our QML file.
+
+#. Define the `Bridge` class, containing all the logic for the context property:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 51-91
+
+#. Now, go back to the QML file and connect the signals to the slots defined in the `Bridge` class:
+
+ .. literalinclude:: view.qml
+ :linenos:
+ :lines: 85-93
+ :emphasize-lines: 89-91
+
+ The properties *Italic*, *Bold*, and *Underline* are mutually
+ exclusive, this means only one can be active at any time.
+ To achieve this each time we select one of these options, we
+ check the three properties via the context property as you can
+ see in the above snippet.
+ Only one of the three will return *True*, while the other two
+ will return *False*, that is how we make sure only one is being
+ applied to the text.
+
+#. Each slot verifies if the selected option contains the text associated
+ to the property:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 79-84
+ :emphasize-lines: 82,84
+
+ Returning *True* or *False* allows you to activate and deactivate
+ the properties of the QML UI elements.
+
+ It is also possible to return other values that are not *Boolean*,
+ like the slot in charge of returning the font size:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 64-70
+
+#. Now, for changing the look of our application, you have two options:
+
+ 1. Use the command line: execute the python file adding the option, `--style`::
+
+ python main.py --style material
+
+ 2. Use a `qtquickcontrols2.conf` file:
+
+ .. literalinclude:: qtquickcontrols2.conf
+ :linenos:
+
+ Then add it to your `.qrc` file:
+
+ .. literalinclude:: style.qrc
+ :linenos:
+
+ Generate the *rc* file running, `pyside2-rcc style.qrc > style_rc.py`
+ And finally import it from your `main.py` script.
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 41-48
+ :emphasize-lines: 48
+
+ You can read more about this configuration file
+ `here <https://doc.qt.io/qt-5/qtquickcontrols2-configuration.html>`_.
+
+ The final look of your application will be:
+
+ .. image:: textproperties_material.png
+
+You can download `view.qml <view.qml>`_ and `main.py <main.py>`_
+to try this example.
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/qtquickcontrols2.conf b/sources/pyside2/doc/tutorials/qmlintegration/qtquickcontrols2.conf
new file mode 100644
index 000000000..850646021
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/qmlintegration/qtquickcontrols2.conf
@@ -0,0 +1,10 @@
+[Controls]
+Style=Material
+
+[Universal]
+Theme=System
+Accent=Red
+
+[Material]
+Theme=Dark
+Accent=Red
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/style.qrc b/sources/pyside2/doc/tutorials/qmlintegration/style.qrc
new file mode 100644
index 000000000..e313f5ed6
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/qmlintegration/style.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>qtquickcontrols2.conf</file>
+</qresource>
+</RCC>
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/textproperties_default.png b/sources/pyside2/doc/tutorials/qmlintegration/textproperties_default.png
new file mode 100644
index 000000000..cfeac9368
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/qmlintegration/textproperties_default.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/textproperties_material.png b/sources/pyside2/doc/tutorials/qmlintegration/textproperties_material.png
new file mode 100644
index 000000000..47866c10e
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/qmlintegration/textproperties_material.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/view.qml b/sources/pyside2/doc/tutorials/qmlintegration/view.qml
new file mode 100644
index 000000000..97968d691
--- /dev/null
+++ b/sources/pyside2/doc/tutorials/qmlintegration/view.qml
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt for Python examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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
+** notice, this list of conditions and the following disclaimer.
+** * 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
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.12
+import QtQuick.Controls 2.12
+import QtQuick.Window 2.12
+import QtQuick.Controls.Material 2.12
+
+ApplicationWindow {
+ id: page
+ width: 800
+ height: 400
+ visible: true
+
+ GridLayout {
+ id: grid
+ columns: 2
+ rows: 3
+
+ ColumnLayout {
+ spacing: 2
+ Layout.preferredWidth: 400
+
+ Text {
+ id: leftlabel
+ Layout.alignment: Qt.AlignHCenter
+ color: "white"
+ font.pointSize: 16
+ text: "Qt for Python"
+ Layout.preferredHeight: 100
+ Material.accent: Material.Green
+ }
+
+ RadioButton {
+ id: italic
+ text: "Italic"
+ onToggled: {
+ leftlabel.font.italic = con.getItalic(italic.text)
+ leftlabel.font.bold = con.getBold(italic.text)
+ leftlabel.font.underline = con.getUnderline(italic.text)
+
+ }
+ }
+ RadioButton {
+ id: bold
+ text: "Bold"
+ onToggled: {
+ leftlabel.font.italic = con.getItalic(bold.text)
+ leftlabel.font.bold = con.getBold(bold.text)
+ leftlabel.font.underline = con.getUnderline(bold.text)
+ }
+ }
+ RadioButton {
+ id: underline
+ text: "Underline"
+ onToggled: {
+ leftlabel.font.italic = con.getItalic(underline.text)
+ leftlabel.font.bold = con.getBold(underline.text)
+ leftlabel.font.underline = con.getUnderline(underline.text)
+ }
+ }
+ RadioButton {
+ id: noneradio
+ text: "None"
+ checked: true
+ onToggled: {
+ leftlabel.font.italic = con.getItalic(noneradio.text)
+ leftlabel.font.bold = con.getBold(noneradio.text)
+ leftlabel.font.underline = con.getUnderline(noneradio.text)
+ }
+ }
+ }
+
+ ColumnLayout {
+ id: rightcolumn
+ spacing: 2
+ Layout.columnSpan: 1
+ Layout.preferredWidth: 400
+ Layout.preferredHeight: 400
+ Layout.fillWidth: true
+
+ RowLayout {
+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
+
+
+ Button {
+ id: red
+ text: "Red"
+ highlighted: true
+ Material.accent: Material.Red
+ onClicked: {
+ leftlabel.color = con.getColor(red.text)
+ }
+ }
+ Button {
+ id: green
+ text: "Green"
+ highlighted: true
+ Material.accent: Material.Green
+ onClicked: {
+ leftlabel.color = con.getColor(green.text)
+ }
+ }
+ Button {
+ id: blue
+ text: "Blue"
+ highlighted: true
+ Material.accent: Material.Blue
+ onClicked: {
+ leftlabel.color = con.getColor(blue.text)
+ }
+ }
+ Button {
+ id: nonebutton
+ text: "None"
+ highlighted: true
+ Material.accent: Material.BlueGrey
+ onClicked: {
+ leftlabel.color = con.getColor(nonebutton.text)
+ }
+ }
+ }
+ RowLayout {
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
+ Text {
+ id: rightlabel
+ color: "white"
+ text: "Font size"
+ Material.accent: Material.White
+ }
+ Slider {
+ width: rightcolumn.width*0.6
+ Layout.alignment: Qt.AlignRight
+ id: slider
+ value: 0.5
+ onValueChanged: {
+ leftlabel.font.pointSize = con.getSize(value)
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial1.png b/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial1.png
deleted file mode 100644
index c9d3844cb..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial1.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial2.png b/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial2.png
deleted file mode 100644
index 835484aa4..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial2.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial3_animation.gif b/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial3_animation.gif
deleted file mode 100644
index 80b78dea9..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/declarative-tutorial3_animation.gif
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/helloworld.tar.bz2 b/sources/pyside2/doc/tutorials/qmltutorial/helloworld.tar.bz2
deleted file mode 100644
index 001a5258d..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/helloworld.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/helloworld/Cell.qml b/sources/pyside2/doc/tutorials/qmltutorial/helloworld/Cell.qml
deleted file mode 100644
index 78ff12dd5..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/helloworld/Cell.qml
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-//![1]
-Item {
- id: container
-//![4]
- property alias cellColor: rectangle.color
-//![4]
-//![5]
- signal clicked(color cellColor)
-//![5]
-
- width: 40; height: 25
-//![1]
-
-//![2]
- Rectangle {
- id: rectangle
- border.color: "white"
- anchors.fill: parent
- }
-//![2]
-
-//![3]
- MouseArea {
- anchors.fill: parent
- onClicked: container.clicked(container.cellColor)
- }
-//![3]
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial1.qml b/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial1.qml
deleted file mode 100644
index 381aeb8c4..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial1.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-//![3]
-import QtQuick 2.0
-//![3]
-
-//![1]
-Rectangle {
- id: page
- width: 500; height: 200
- color: "lightgray"
-//![1]
-
-//![2]
- Text {
- id: helloText
- text: "Hello world!"
- y: 30
- anchors.horizontalCenter: page.horizontalCenter
- font.pointSize: 24; font.bold: true
- }
-//![2]
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial2.qml b/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial2.qml
deleted file mode 100644
index 4fd0cbf98..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial2.qml
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Rectangle {
- id: page
- width: 500; height: 200
- color: "lightgray"
-
- Text {
- id: helloText
- text: "Hello world!"
- y: 30
- anchors.horizontalCenter: page.horizontalCenter
- font.pointSize: 24; font.bold: true
- }
-
- Grid {
- id: colorPicker
- x: 4; anchors.bottom: page.bottom; anchors.bottomMargin: 4
- rows: 2; columns: 3; spacing: 3
-
-//![1]
- Cell { cellColor: "red"; onClicked: helloText.color = cellColor }
-//![1]
- Cell { cellColor: "green"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "blue"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "yellow"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "steelblue"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "black"; onClicked: helloText.color = cellColor }
- }
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial3.qml b/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial3.qml
deleted file mode 100644
index fcd7d388c..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/helloworld/tutorial3.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "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
-** notice, this list of conditions and the following disclaimer.
-** * 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
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Rectangle {
- id: page
- width: 500; height: 200
- color: "lightgray"
-
- Text {
- id: helloText
- text: "Hello world!"
- y: 30
- anchors.horizontalCenter: page.horizontalCenter
- font.pointSize: 24; font.bold: true
-
-//![1]
- MouseArea { id: mouseArea; anchors.fill: parent }
-//![1]
-
-//![2]
- states: State {
- name: "down"; when: mouseArea.pressed == true
- PropertyChanges { target: helloText; y: 160; rotation: 180; color: "red" }
- }
-//![2]
-
-//![3]
- transitions: Transition {
- from: ""; to: "down"; reversible: true
- ParallelAnimation {
- NumberAnimation { properties: "y,rotation"; duration: 500; easing.type: Easing.InOutQuad }
- ColorAnimation { duration: 500 }
- }
- }
-//![3]
- }
-
- Grid {
- id: colorPicker
- x: 4; anchors.bottom: page.bottom; anchors.bottomMargin: 4
- rows: 2; columns: 3; spacing: 3
-
- Cell { cellColor: "red"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "green"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "blue"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "yellow"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "steelblue"; onClicked: helloText.color = cellColor }
- Cell { cellColor: "black"; onClicked: helloText.color = cellColor }
- }
-}
-//![0]
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/index.rst b/sources/pyside2/doc/tutorials/qmltutorial/index.rst
deleted file mode 100644
index 45a6842bc..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/index.rst
+++ /dev/null
@@ -1,25 +0,0 @@
-
-.. _qmltutorial:
-
-QML Tutorial
-************
-
-This tutorial gives an introduction to QML, the mark up language for Qt Quick. It doesn't cover everything;
-the emphasis is on teaching the key principles, and features are introduced as needed.
-
-Through the different steps of this tutorial you will learn about QML basic types, create our own QML component
-with properties and signals, and create a simple animation with the help of states and transitions.
-
-Chapter one starts with a minimal "Hello world" program and the following chapters introduce new concepts.
-
-The tutorial's source code can be downloaded :download:`here<helloworld.tar.bz2>`.
-
-Tutorial chapters:
-
-.. toctree::
- :maxdepth: 1
-
- step1.rst
- step2.rst
- step3.rst
-
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/step1.rst b/sources/pyside2/doc/tutorials/qmltutorial/step1.rst
deleted file mode 100644
index bca69d9f4..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/step1.rst
+++ /dev/null
@@ -1,66 +0,0 @@
-.. _qmlbasictypes:
-
-QML Tutorial 1 - Basic Types
-****************************
-
-This first program is a very simple "Hello world" example that introduces some basic QML concepts.
-The following image is a screenshot of this program.
-
-.. figure:: declarative-tutorial1.png
- :align: center
-
-Here is the QML code for the application:
-
-.. pysideinclude:: helloworld/tutorial1.qml
- :snippet: 0
-
-Walkthrough
-===========
-
-Import
-------
-
-First, you need to import the types that are required for this example. Most QML files import the built-in QML
-types (like Rectangle, Image, ...) that come with Qt, using the following statement:
-
-.. pysideinclude:: helloworld/tutorial1.qml
- :snippet: 3
-
-Rectangle element
------------------
-
-.. pysideinclude:: helloworld/tutorial1.qml
- :snippet: 1
-
-Declare a root element using the Rectangle type, which is one of the basic building blocks to create an application in QML.
-Give it an ``id`` so that you can refer to it later. For example, call it "page", and also set its ``width``,
-``height``, and ``color`` properties.
-
-Text element
-------------
-
-.. pysideinclude code/tutorial1.qml
- :snippet: 2
-
-Add a Text element as the child of the Rectangle element to display the text, 'Hello world!'.
-
-Use its ``y`` property to position it at 30 pixels from the top of its parent.
-
-The ``anchors.horizontalCenter`` property refers to the horizontal center of an element.
-In this case, specify that the text element must be horizontally centered in the *page* element.
-
-The ``font.pointSize`` and ``font.bold properties`` are related to fonts and use the dot notation.
-
-
-Viewing the example
--------------------
-
-To view what you have created, run the ``qmlscene`` tool (located in the ``bin directory`` of your Qt installation) with your
-QML filename as the first argument. For example, to run the Tutorial 1 example from the install
-location, you would type:
-
-::
-
- > [QT_INSTALL_DIR]\bin\qmlscene tutorial1.qml
-
-[Previous :ref:`qmltutorial`][Next :ref:`qmlcomponents`]
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/step2.rst b/sources/pyside2/doc/tutorials/qmltutorial/step2.rst
deleted file mode 100644
index 5b48ca63f..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/step2.rst
+++ /dev/null
@@ -1,81 +0,0 @@
-.. _qmlcomponents:
-
-QML Tutorial 2 - QML Components
-*******************************
-
-In this chapter, you are going to add a color picker to change the color of the text.
-
-.. figure:: declarative-tutorial2.png
- :align: center
-
-The color picker is made of six cells with different colors.
-To avoid writing the same code multiple times for each cell, create a new ``Cell`` component.
-A component provides a way of defining a new type that you can re-use in other QML files.
-A QML component is like a black-box that interacts with the outside world through its properties, signals,
-and functions, and is generally defined in its own QML file.
-The component's filename must always start with a capital letter.
-
-Here is the QML code for ``Cell``:
-
-.. pysideinclude:: helloworld/Cell.qml
- :snippet: 0
-
-Walkthrough
-===========
-
-The Cell Component
-------------------
-
-.. pysideinclude:: helloworld/Cell.qml
- :snippet: 1
-
-The root element of the component is an Item with the ``id``, *container*.
-An Item is the most basic visual element in QML and is often used as a container for other elements.
-
-.. pysideinclude:: helloworld/Cell.qml
- :snippet: 4
-
-Its ``cellColor`` property is accessible from *outside* the component, allowing you
-to instantiate cells with different colors. It is an alias to the existing color property of the rectangle
-that composes the cell.
-
-.. pysideinclude:: helloworld/Cell.qml
- :snippet: 5
-
-The Cell has a signal called *clicked* with the *cellColor* parameter of type *color*.
-You need this signal to change the color of the text in the main QML file later.
-
-.. pysideinclude:: helloworld/Cell.qml
- :snippet: 2
-
-The cell component is basically a colored rectangle with the ``id``, *rectangle*.
-
-Its ``anchors.fill`` property is a convenient way to set the size of an element.
-In this case the rectangle will have the same size as its parent.
-
-.. pysideinclude:: helloworld/Cell.qml
- :snippet: 3
-
-In order to change the color of the text when the cell is clicked, a MouseArea element with
-the same size as its parent is used.
-
-A MouseArea enables you to react to mouse events such as clicked, hover, and so on. In this case, when the MouseArea *clicked*
-signal is reported, the Cell's *clicked* signal is emitted.
-
-The main QML file
------------------
-
-In the main QML file, use the ``Cell`` component to create the color picker:
-
-.. pysideinclude:: helloworld/tutorial2.qml
- :snippet: 0
-
-Create the color picker by putting 6 cells with different colors in a grid.
-
-.. pysideinclude:: helloworld/tutorial2.qml
- :snippet: 1
-
-When the *clicked* signal of a cell is triggered, set the color of the text to the *cellColor* passed as a parameter.
-You can react to a signal of a component through a handler of the name, *'onSignalName'*.
-
-[Previous :ref:`qmlbasictypes`][Next :ref:`qmlstatesandtransitions`]
diff --git a/sources/pyside2/doc/tutorials/qmltutorial/step3.rst b/sources/pyside2/doc/tutorials/qmltutorial/step3.rst
deleted file mode 100644
index 6d5a72f13..000000000
--- a/sources/pyside2/doc/tutorials/qmltutorial/step3.rst
+++ /dev/null
@@ -1,46 +0,0 @@
-.. _qmlstatesandtransitions:
-
-QML Tutorial 3 - States and Transitions
-***************************************
-
-In this chapter, you are guided through the steps to make the example a little more dynamic by
-introducing states and transitions. For example, moving the text to the bottom of the screen,
-rotate, and change its color when clicked.
-
-.. figure:: declarative-tutorial3_animation.gif
- :align: center
-
-Here is the QML code for such a behavior:
-
-.. pysideinclude:: helloworld/tutorial3.qml
- :snippet: 0
-
-Walkthrough
-===========
-
-.. pysideinclude:: helloworld/tutorial3.qml
- :snippet: 2
-
-First, create a new *down* state for the text element.
-Pressing the MouseArea activates this new state and releasing it deactivates the state.
-
-The *down* state includes a set of property changes from the implicit *default state*
-(the items as they were initially defined in the QML).
-Specifically, set the ``y`` property of the text to ``160``, rotation to ``180``, and ``color`` to red.
-
-.. pysideinclude:: helloworld/tutorial3.qml
- :snippet: 3
-
-To make the application even better, add a transiton between the two states so that switching between these
-two states look smooth and nice.
-
-The ``from`` and ``to`` properties of the Transition element define the states between which the transition will run.
-In this case, you want a transition from the default state to the *down* state.
-
-To have a similar transition effect when changing back from the *down* state to the default state,
-set the ``reversible`` property to ``true``. This is equivalent to writing two transitions.
-
-The ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time.
-You could also run them one after the other by using SequentialAnimation instead.
-
-[Previous :ref:`qmlcomponents`]
diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt
index add5221c9..4c0ac7b30 100644
--- a/sources/shiboken2/ApiExtractor/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt
@@ -81,7 +81,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Qt5Xml_INCLUDE_DIRS}
)
-add_subdirectory(doc)
add_library(apiextractor STATIC ${apiextractor_SRC} ${apiextractor_RCCS_SRC})
target_link_libraries(apiextractor
${Qt5Xml_LIBRARIES}
diff --git a/sources/shiboken2/ApiExtractor/doc/CMakeLists.txt b/sources/shiboken2/ApiExtractor/doc/CMakeLists.txt
deleted file mode 100644
index a1995e96f..000000000
--- a/sources/shiboken2/ApiExtractor/doc/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-message("Building ApiExtractor documentation")
-find_program(SPHINX sphinx-build DOC "Path to sphinx-build binary.")
-
-if (SPHINX)
- message(STATUS "sphinx-build - found")
- configure_file(conf.py.in conf.py @ONLY)
- add_custom_target(doc_apiextractor ${SPHINX} -b html -c . ${CMAKE_CURRENT_SOURCE_DIR} html )
-else()
- message(STATUS "sphinx-build - not found! doc_apiextractor target disabled")
-endif()
diff --git a/sources/shiboken2/ApiExtractor/doc/_templates/index.html b/sources/shiboken2/ApiExtractor/doc/_templates/index.html
deleted file mode 100644
index 4aa14ede5..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_templates/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-{% extends "layout.html" %}
-{% set title = 'Overview' %}
-{% block body %}
-<div class="section">
- <h1>API Extractor {{ version }}</h1>
-
- <p>API Extractor is a tool that eases the development of bindings of Qt-based libraries for high
- level languages by automating most of the process.
-
- <p>API Extractor is based on the
- <a href="http://labs.trolltech.com/page/Projects/QtScript/Generator">QtScriptGenerator</a> project.</p>
-
- <h2>Documentation</h2>
- <table class="contentstable"><tr>
- <td width="50%">
- <p class="biglink"><a href="{{ pathto("overview") }}">Overview</a><br/>
- <span class="linkdescr">how API Extractor works</span></p>
- <p class="biglink"><a href="{{ pathto("typesystem") }}">Typesystem reference</a><br/>
- <span class="linkdescr">reference for all typesystem tags</span></p>
- </td>
- <td width="50%">
- <p class="biglink"><a href="{{ pathto("contents") }}">Contents</a><br/>
- <span class="linkdescr">for a complete overview</span></p>
- </td></tr>
- </table>
-</div>
-{% endblock %}
diff --git a/sources/shiboken2/ApiExtractor/doc/_templates/layout.html b/sources/shiboken2/ApiExtractor/doc/_templates/layout.html
deleted file mode 100644
index d99d3f0cf..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_templates/layout.html
+++ /dev/null
@@ -1,39 +0,0 @@
-{% extends "!layout.html" %}
-
-# Invert sidebars
-{%- block sidebar1 %}{{ sidebar() }}{%- endblock %}
-{%- block sidebar2 %}{%- endblock %}
-
-{%- block header %}
-<div id="container">
-<div class="header">
- <div class="header_container">
- <div class="logo"><a href="http://www.pyside.org"><img alt="Qt for Python (PySide2)" src="{{ pathto('_static/pysidelogo.png', 1) }}" width="199" height="102" /></a></div>
- <div class="related">
- <ul>
- {%- block rootrellink %}
- <li><a href="{{ pathto( 'index' ) }}">{{ shorttitle|e }}</a></li>
- {%- endblock %}
- {%- for parent in parents %}
- <li>{{ reldelim1 }} <a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a></li>
- {%- endfor %}
- {%- block relbaritems %} {% endblock %}
- </ul>
- </div>
- </div>
-</div>
-{%- endblock -%}
-
-{%- block footer %}
- <div class="footer">
- <a href="https://qt.io/"><img src="{{ pathto('_static/logo_qt.png', 1) }}" alt="Qt" border="0" /></a>
- <a href="http://www.python.org"><img src="{{ pathto('_static/logo_python.jpg', 1) }}" alt="Python" border="0" /></a>
- </div>
-</div>
-{%- endblock %}
-
-# No top relbar.
-{%- block relbar1 %}{%- endblock %}
-
-# No bottom relbar.
-{%- block relbar2 %}{%- endblock %}
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/searchbox.html b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/searchbox.html
deleted file mode 100644
index 55a972156..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/searchbox.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{%- if pagename != "search" %}
-<div id="searchbox" style="display: none">
- <h3>{{ _('Quick search') }}</h3>
- <form class="search" action="{{ pathto('search') }}" method="get">
- <input type="text" name="q" id="q" size="18" />
- <input type="submit" value="{{ _('Go') }}" id="search_button" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-{%- endif %}
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/bg_header.png b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/bg_header.png
deleted file mode 100644
index 843e7e2c5..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/bg_header.png
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/bg_topo.jpg b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/bg_topo.jpg
deleted file mode 100644
index 4229ae8db..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/bg_topo.jpg
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/fakebar.png b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/fakebar.png
deleted file mode 100644
index b45830e00..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/fakebar.png
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_openbossa.png b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_openbossa.png
deleted file mode 100644
index 51e868d6e..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_openbossa.png
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_python.jpg b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_python.jpg
deleted file mode 100644
index cd474efba..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_python.jpg
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_qt.png b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_qt.png
deleted file mode 100644
index 37800f454..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/logo_qt.png
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/pysidedocs.css b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/pysidedocs.css
deleted file mode 100644
index fd81f4379..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/pysidedocs.css
+++ /dev/null
@@ -1,409 +0,0 @@
-* {
- font: 100% Verdana, Arial, Helvetica, sans-serif;
- font-size:12px;
-}
-
-html {
- height: 100%;
-}
-
-body {
- margin: 0;
- padding: 0;
- text-align: center;
- background-color: #EBEBEB;
- height: 100%;
- color: #333;
-}
-
-strong {
- font-weight:bold;
-}
-
-.document {
- padding-bottom: 90px;
-}
-
-#container {
- position: relative;
- min-height: 100%;
- background-image: url(fakebar.png);
- background-repeat: repeat-y;
- background-color: white;
-}
-
-.footer {
- position: absolute;
- bottom: 0px;
- margin-top: 50px;
- text-align:center;
- background-color: white;
- border-top: 2px solid #e0e0e0;
- white-space: nowrap;
- height: 90px;
- width: 100%;
-}
-
-.footer img {
- margin-left: 8px;
- margin-right: 8px;
-}
-
-.sphinxsidebar {
- float: left;
- width: 250px;
- padding: 0px 10px 0px 10px;
- text-align: left;
-}
-
-.sphinxsidebar ul {
- padding: 0px;
- margin: 0px;
- list-style-position: inside;
-}
-
-.sphinxsidebar > ul {
- padding: 0px;
- margin: 0px;
-}
-
-.sphinxsidebar ul li {
- margin-left: 10px;
- padding: 0px;
-}
-
-.sphinxsidebar h3, .sphinxsidebar h3 a {
- font-weight: bold;
- color: #333;
-}
-
-.documentwrapper {
- margin-left: 270px;
- text-align: left;
- background-color: #ffffff;
- border-left: 1px solid #989898;
- font-size:18px;
- padding: 10px 50px 15px 50px;
- height: 100%;
-}
-
-h1 {
- font-size:18px;
- padding-left: 50px;
- padding-bottom: 15px;
- padding-top: 15px;
- border-bottom: 1px solid #c2c2c2;
- text-transform:uppercase;
- margin-right: -100px;
- position: relative;
- left: -50px;
- top: -10px;
-}
-
-h2 {
- font-size:12px;
- font-weight:bold;
- border-left-width: 1px;
- border-right-width: 1px;
- border-top-width: 1px;
- border-bottom-width: 2px;
- border-style: solid;
- border-left-color: #b1b1b1;
- border-right-color: #b1b1b1;
- border-top-color: #b1b1b1;
- border-bottom-color: #009491;
- background-color: #e0e0e0;
- padding:5px;
- margin-top: 20px;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- -khtml-border-radius:5px;
-}
-
-h3, h4 {
- font-weight: bolder;
-}
-
-pre {
- border-top: 1px solid #e0e0e0;
- border-bottom: 1px solid #e0e0e0;
- background-color: #fafafa;
- padding: 5px;
- font: 100% monospace;
- overflow: auto;
-}
-
-pre * {
- font: 100% monospace;
-}
-
-.headerlink {
- font-size: 100%;
- color: inherit;
- float: right;
- visibility: Hidden;
-}
-
-h1 .headerlink {
- padding-right: 50px;
-}
-
-h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink {
- visibility: Visible;
-}
-
-a, a:visited {
- color: #009491;
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-/* -- admonitions ----------------------------------------------------------- */
-
-div.admonition {
- margin-top: 10px;
- margin-bottom: 10px;
- padding: 7px;
-}
-
-div.admonition dt {
- font-weight: bold;
-}
-
-div.admonition dl {
- margin-bottom: 0;
-}
-
-p.admonition-title {
- margin: 0px 10px 5px 0px;
- font-weight: bold;
-}
-
-div.body p.centered {
- text-align: center;
- margin-top: 25px;
-}
-
-div.warning {
- background-color: #ffe4e4;
- border: 1px solid #f66;
-}
-
-div.note {
- border: 1px solid #e3e3e3;
-}
-
-table.docutils {
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 10px;
- border: none;
-}
-
-table.docutils td {
- border: none;
-}
-
-table.docutils th {
- border: none;
- font-weight: bold;
- vertical-align: top;
-}
-
-h2 em {
- float: right;
- font-size: 10px;
- position: relative;
- top: -20px;
-}
-
-/* Table of pymaemo components */
-
-#development table.docutils td {
- border-bottom: 1px solid #EBEBEB;
-}
-
-#development th {
- background-color: #EBEBEB;
- color: #FC7E00;
- padding: 5px;
-}
-
-#development th:first-child {
- -moz-border-radius: 20px 0px 0px 0px;
- -webkit-border-radius: 20px 0px 0px 0px;
- -khtml-border-radius: 20px 0px 0px 0px;
- padding-left: 10px;
-}
-#development th:last-child {
- -moz-border-radius: 0px 20px 0px 0px;
- -webkit-border-radius: 0px 20px 0px 0px;
- -khtml-border-radius: 0px 20px 0px 0px;
- padding-right: 10px;
- width: 100px;
-}
-
-hr {
- border: none;
- border-bottom: 1px dashed #EBEBEB;
- width: 70%
-}
-
-.oldnews {
- text-align: right;
-}
-
-/******************* TOPO *****************************/
-.header {
- background-image: url(bg_topo.jpg);
- background-repeat: repeat-x;
- height: 147px;
-}
-
-.header_container {
- background-image: url(bg_header.png);
- background-repeat: no-repeat;
- background-position: 100px 0px;
-}
-
-.logo {
- text-align: left;
- margin-bottom: 10px;
-}
-
-#searchbox {
- border-top: 1px solid #989898;
- padding-top: 10px;
- margin-left: -10px;
- margin-right: -10px;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-#search_button {
- border: 1px solid #3A393A;
- background-color: #3A393A;
- color: white;
- cursor: pointer;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
-
-}
-
-form {
- margin: 0px;
- padding: 0px;
-}
-
-/* search field */
-form #q {
- width: 136px;
-/* height: 22px; */
- border: none;
- margin: 0px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
- margin-top: 2px;
- padding: 4px;
- line-height: 22px
-}
-
-#search-results h2 {
- display: none;
-}
-
-#search-results h2 {
- display: none;
-}
-
-#search-results ul.search {
- margin: 0px;
- padding: 0px;
-}
-
-ul.search div.context {
- padding-left: 40px;
-}
-
-#installation td {
- text-align: center;
- font-weight: bold;
-}
-
-em {
- color: inherit;
- font-style:italic;
-}
-
-/******** REL bar *********/
-
-.related {
- display: inline;
-}
-
-.related ul {
- padding: 0px 0px 0px 10px;
- margin: 0px;
- text-align: left;
- background-image: url(relbar_bg.png);
-}
-
-.related li {
- display: inline;
- color: white;
- font-weight: bold;
-}
-
-.related li a {
- color: inherit;
- line-height: 35px;
- font-weight: bold;
- vertical-align: middle;
-}
-
-.related li.right {
- float: right;
- margin-right: 5px;
-}
-
-.related h3 {
- display: none;
-}
-
-.align-center {
- text-align: center;
-}
-
-.contentstable {
- width: 100%;
-}
-
-.contentstable td {
- padding-left: 30px;
- vertical-align: top;
-}
-
-p.biglink a {
- font-size: 20px;
-}
-
-dt:target, .highlight {
- background-color: #fbe54e;
-}
-
-img {
- border: 0px;
-}
-
-.figure .caption {
- font-style:italic;
-}
-
-table.footnote {
- margin: 0px;
-}
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/pysidelogo.png b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/pysidelogo.png
deleted file mode 100644
index 3a2f2bd17..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/pysidelogo.png
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/relbar_bg.png b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/relbar_bg.png
deleted file mode 100644
index 4036733a7..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/static/relbar_bg.png
+++ /dev/null
Binary files differ
diff --git a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/theme.conf b/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/theme.conf
deleted file mode 100644
index e0a652a5d..000000000
--- a/sources/shiboken2/ApiExtractor/doc/_themes/pysidedocs/theme.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[theme]
-inherit = default
-stylesheet = pysidedocs.css
-pygments_style = none
-
-[options]
-nosidebar = false
diff --git a/sources/shiboken2/ApiExtractor/doc/conf.py.in b/sources/shiboken2/ApiExtractor/doc/conf.py.in
deleted file mode 100644
index 185709590..000000000
--- a/sources/shiboken2/ApiExtractor/doc/conf.py.in
+++ /dev/null
@@ -1,158 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# ApiExtractor documentation build configuration file, created by
-# sphinx-quickstart on Wed Apr 22 15:04:20 2009.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.append(os.path.abspath('.'))
-
-# -- General configuration -----------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
- 'sphinx.ext.ifconfig', 'sphinx.ext.coverage']
-
-rst_epilog = """
-.. |project| replace:: API Extractor
-"""
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-source_encoding = 'utf-8'
-
-# The master toctree document.
-#master_doc = 'contents'
-
-# General information about the project.
-project = u'API Extractor'
-copyright = u'© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/license/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '@apiextractor_MAJOR_VERSION@.@apiextractor_MINOR_VERSION@'
-# The full version, including alpha/beta/rc tags.
-release = '@apiextractor_VERSION@'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = ['_build']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'pysidedocs'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {
-#}
-
-# Add any paths that contain custom themes here, relative to this directory.
-html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = { '' : ''}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-html_additional_pages = { 'index' : 'index.html'}
-
-# If false, no index is generated.
-html_use_index = False
-
-# If true, the index is split into individual pages for each letter.
-html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-html_show_sourcelink = False
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
-
diff --git a/sources/shiboken2/ApiExtractor/doc/contents.rst b/sources/shiboken2/ApiExtractor/doc/contents.rst
deleted file mode 100644
index 83a4889fe..000000000
--- a/sources/shiboken2/ApiExtractor/doc/contents.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-Table of contents
-*****************
-.. toctree::
- :numbered:
- :maxdepth: 3
-
- overview.rst
- ownership.rst
- typesystem.rst
diff --git a/sources/shiboken2/ApiExtractor/doc/dependency-apiextractor.svg b/sources/shiboken2/ApiExtractor/doc/dependency-apiextractor.svg
deleted file mode 100644
index 6bec8b5a8..000000000
--- a/sources/shiboken2/ApiExtractor/doc/dependency-apiextractor.svg
+++ /dev/null
@@ -1,360 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="750"
- height="230"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- version="1.0"
- sodipodi:docname="dependency-apiextractor.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="/tmp/dependency-pyside.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4">
- <marker
- inkscape:stockid="Arrow1Lstart"
- orient="auto"
- refY="0"
- refX="0"
- id="Arrow1Lstart"
- style="overflow:visible">
- <path
- id="path3270"
- d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z"
- style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
- transform="matrix(0.8,0,0,0.8,10,0)" />
- </marker>
- <marker
- inkscape:stockid="Arrow1Lend"
- orient="auto"
- refY="0"
- refX="0"
- id="Arrow1Lend"
- style="overflow:visible">
- <path
- id="path3679"
- d="M 0,0 L 5,-5 L -12.5,0 L 5,5 L 0,0 z"
- style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
- transform="matrix(-0.8,0,0,-0.8,-10,0)" />
- </marker>
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective10" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.6315754"
- inkscape:cx="375"
- inkscape:cy="115"
- inkscape:document-units="px"
- inkscape:current-layer="svg2"
- showgrid="false"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:window-width="1278"
- inkscape:window-height="949"
- inkscape:window-x="1330"
- inkscape:window-y="25">
- <sodipodi:guide
- orientation="1,0"
- position="384.28571,590"
- id="guide2601" />
- <sodipodi:guide
- orientation="1,0"
- position="678.57143,491.42857"
- id="guide2603" />
- <sodipodi:guide
- orientation="1,0"
- position="78.571429,257.14286"
- id="guide2605" />
- <sodipodi:guide
- orientation="1,0"
- position="93.571429,280.71429"
- id="guide7565" />
- <sodipodi:guide
- orientation="1,0"
- position="148.57143,216.42857"
- id="guide7567" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-250.44576,-308.53365)" />
- <g
- id="g2664"
- transform="translate(-162.03535,-115.53321)">
- <path
- inkscape:connector-type="polyline"
- id="path2869"
- d="M 439.27375,270.21407 L 594.99083,193.03351"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);marker-end:none;stroke-opacity:1" />
- <g
- transform="translate(166.24286,-190.07976)"
- id="g2606">
- <rect
- style="fill:#e3e2db;stroke:#000000;stroke-opacity:1"
- id="rect7541"
- width="211.42857"
- height="124.28571"
- x="6.6142678"
- y="308.16089"
- ry="17.142857" />
- <text
- xml:space="preserve"
- style="font-size:20.61732101px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="76.614265"
- y="339.74512"
- id="text7543"><tspan
- sodipodi:role="line"
- id="tspan7545"
- x="76.614265"
- y="339.74512">Boost</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:20.61732101px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="76.614265"
- y="372.67505"
- id="text7547"><tspan
- sodipodi:role="line"
- id="tspan7549"
- x="76.614265"
- y="372.67505">Qt Software</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:20.61732101px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="76.614265"
- y="408.38055"
- id="text7551"><tspan
- sodipodi:role="line"
- id="tspan7553"
- x="76.614265"
- y="408.38055">INdT/Nokia</tspan></text>
- <rect
- style="fill:#aaeeff;fill-opacity:1;stroke:#000000;stroke-width:0.64285713;stroke-opacity:1"
- id="rect7555"
- width="43.163269"
- height="22.5"
- x="21.614267"
- y="321.55374"
- ry="6.4285707" />
- <rect
- style="fill:#b3ff80;fill-opacity:1;stroke:#000000;stroke-width:0.64285713;stroke-opacity:1"
- id="rect7561"
- width="43.163269"
- height="22.5"
- x="21.614267"
- y="355.4823"
- ry="6.4285707" />
- <rect
- style="fill:#e9ddaf;fill-opacity:1;stroke:#000000;stroke-width:0.64285713;stroke-opacity:1"
- id="rect7563"
- width="43.163269"
- height="22.5"
- x="21.614267"
- y="390.4823"
- ry="6.4285707" />
- </g>
- <path
- inkscape:connector-type="polyline"
- id="path2604"
- d="M 782.79015,270.0418 L 627.07307,192.86124"
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);marker-end:none;stroke-opacity:1" />
- <g
- transform="translate(234.84929,-73.143707)"
- id="g5193">
- <rect
- ry="9.2689295"
- style="fill:#b3ff80;fill-rule:evenodd;stroke:#2a7800;stroke-width:0.96558368px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- id="rect2417"
- width="274.18781"
- height="73.282379"
- x="78.571426"
- y="342.86383"
- rx="8.3239012" />
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="88.822823"
- y="359.67014"
- id="text2419"><tspan
- sodipodi:role="line"
- id="tspan2421"
- x="88.822823"
- y="359.67014">Qt 4.5</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="88.822823"
- y="375.33484"
- id="text2423"><tspan
- sodipodi:role="line"
- id="tspan2425"
- x="88.822823"
- y="375.33484">4.5</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="88.822823"
- y="390.87479"
- id="text2427"><tspan
- sodipodi:role="line"
- id="tspan2429"
- x="88.822823"
- y="390.87479">headers and libraries - compile-time and run-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="88.822823"
- y="400.84058"
- id="text2431"><tspan
- sodipodi:role="line"
- id="tspan2433"
- x="88.822823"
- y="400.84058">GNU General Public License v3 /</tspan><tspan
- id="tspan2472"
- sodipodi:role="line"
- x="88.822823"
- y="411.1687">GNU Lesser General Public Licence v2.1</tspan></text>
- </g>
- <g
- transform="translate(101.41581,-378.37135)"
- id="g5120">
- <rect
- rx="10.404889"
- ry="13.104635"
- style="fill:#e9ddaf;fill-rule:evenodd;stroke:#5f5019;stroke-width:0.96620417px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- id="rect2441"
- width="274.54263"
- height="73.281754"
- x="384.28571"
- y="496.43558" />
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="389.17969"
- y="513.59869"
- id="text2443"><tspan
- sodipodi:role="line"
- id="tspan2445"
- x="389.17969"
- y="513.59869">libapiextractor</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="389.17969"
- y="529.26337"
- id="text2447"><tspan
- sodipodi:role="line"
- id="tspan2449"
- x="389.17969"
- y="529.26337">0.2</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="389.17969"
- y="544.80334"
- id="text2451"><tspan
- sodipodi:role="line"
- x="389.17969"
- y="544.80334"
- id="tspan2453">headers and libraries - compile-time and run-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="389.17969"
- y="560.12628"
- id="text2455"><tspan
- sodipodi:role="line"
- id="tspan2457"
- x="389.17969"
- y="560.12628">LGPL version 2.1</tspan></text>
- </g>
- <g
- transform="translate(242.40213,-378.858)"
- id="g5182">
- <rect
- ry="11.287985"
- style="fill:#aaeeff;fill-rule:evenodd;stroke:#006078;stroke-width:0.96620417px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- id="rect2563"
- width="274.54263"
- height="73.281754"
- x="384.28571"
- y="648.57843"
- rx="10.404877" />
- <text
- xml:space="preserve"
- style="font-size:16.27989578px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="389.17969"
- y="665.74158"
- id="text2565"><tspan
- sodipodi:role="line"
- id="tspan2567"
- x="389.17969"
- y="665.74158">boost::graph</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.40044498px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="389.17969"
- y="681.40625"
- id="text2569"><tspan
- sodipodi:role="line"
- id="tspan2571"
- x="389.17969"
- y="681.40625">1.38.0</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:9.33067703px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="389.17969"
- y="696.94623"
- id="text2573"><tspan
- sodipodi:role="line"
- x="389.17969"
- y="696.94623"
- id="tspan2575">headers and libraries - compile-time and run-time</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:8.26250458px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
- x="389.17969"
- y="712.26917"
- id="text2577"><tspan
- sodipodi:role="line"
- id="tspan2579"
- x="389.17969"
- y="712.26917">Boost Software License 1.0</tspan></text>
- </g>
- </g>
-</svg>
diff --git a/sources/shiboken2/ApiExtractor/doc/overview.rst b/sources/shiboken2/ApiExtractor/doc/overview.rst
deleted file mode 100644
index 89c0d2c00..000000000
--- a/sources/shiboken2/ApiExtractor/doc/overview.rst
+++ /dev/null
@@ -1,15 +0,0 @@
-.. _gen-overview:
-
-**********************
-API Extractor Overview
-**********************
-
-The **API Extractor** library is used by the binding generator to parse headers
-of a given library and merge this data with information provided by
-typesystem (XML) files, resulting in a representation of how the API should be
-exported to the chosen target language. The generation of source code for the
-bindings is performed by specific generators using the API Extractor library.
-
-The API Extractor is based on QtScriptGenerator_ codebase.
-
-.. _QtScriptGenerator: http://code.qt.io/cgit/qt-labs/qtscriptgenerator.git/
diff --git a/sources/shiboken2/ApiExtractor/doc/ownership.rst b/sources/shiboken2/ApiExtractor/doc/ownership.rst
deleted file mode 100644
index 4e28f1427..000000000
--- a/sources/shiboken2/ApiExtractor/doc/ownership.rst
+++ /dev/null
@@ -1,85 +0,0 @@
-Ownership Management
-********************
-
-Among the various types of instances interactions, sometimes an object
-may be *owned* by another object, so that the owner is responsible for
-destroying the owned object, like in Qt's object system [#]_.
-This kind of relationship has a big role on interfacing with the target language, like
-with Python's reference counting.
-
-
-Ownership transfers
--------------------
-
-From C++ to target
-^^^^^^^^^^^^^^^^^^
-
- When an object currently owned by C++ has its ownership transferred
- back to the target language, the binding can know for sure when the object will be deleted and
- tie the C++ instance existence to the wrapper, calling the C++ destructor normally when the
- wrapper is deleted.
-
- .. code-block:: xml
-
- <modify-argument index="1">
- <define-ownership class="target" owner="target" />
- </modify-argument>
-
-
-From target to C++
-^^^^^^^^^^^^^^^^^^
-
- In the opposite direction, when an object ownership is transferred from the target language
- to C++, the native code takes full control of the object life and you don't
- know when that object will be deleted, rendering the wrapper object invalid,
- unless you're wrapping an object with a virtual destructor,
- so you can override it and be notified of its destruction.
-
- By default it's safer to just render the wrapper
- object invalid and raise some error if the user tries to access
- one of this objects members or pass it as argument to some function, to avoid unpleasant segfaults.
- Also you should avoid calling the C++ destructor when deleting the wrapper.
-
- .. code-block:: xml
-
- <modify-argument index="1">
- <define-ownership class="target" owner="c++" />
- </modify-argument>
-
-
-Parent-child relationship
--------------------------
-
-One special type of relationship is the parent-child. When an object is called
-the parent of another object (the child), the former is in charge of deleting its
-child when deleted and the target language can trust that the child will be alive
-as long as the parent is, unless some other method can take the C++ ownership away from the parent.
-
-One of the main uses of this scheme is Qt's object system, with ownership among QObject-derived
-classes, creating "trees" of instances.
-
- .. code-block:: xml
-
- <modify-argument index="this">
- <parent index="1" action="add">
- </modify-argument>
-
-In this example, the instance with the method that is being invoked (indicated by 'index="this"' on
-modify-argument) will be marked as a child
-of the first argument using the `parent` tag. To remove ownership, just use "remove" in the action attribute. **Removing
-parentship also transfers the ownership back to python.**
-
-Invalidation after use
-----------------------
-
-Sometimes an object is created as a virtual method call argument and destroyed after the
-call returned. In this case, you should use the ``invalidate-after-use`` attribute in the
-``modify-argument`` tag to mark the wrapper as invalid right after the virtual method returns.
-
- .. code-block:: xml
-
- <modify-argument index="2" invalidate-after-use="yes"/>
-
-In this example the second argument will be invalidated after this method call.
-
-.. [#] See *Object Trees and Object Ownership* http://doc.qt.io/qt-5/objecttrees.html
diff --git a/sources/shiboken2/doc/CMakeLists.txt b/sources/shiboken2/doc/CMakeLists.txt
index bb5ad8607..5903e9dfc 100644
--- a/sources/shiboken2/doc/CMakeLists.txt
+++ b/sources/shiboken2/doc/CMakeLists.txt
@@ -4,7 +4,6 @@ if (SPHINX)
message("-- sphinx-build - found")
configure_file(conf.py.in conf.py @ONLY)
add_custom_target(doc ${SPHINX} -b html -c . ${CMAKE_CURRENT_SOURCE_DIR} html )
- add_dependencies(doc doc_apiextractor)
else()
message("-- sphinx-build - not found! doc target disabled")
if (WIN32)
diff --git a/sources/shiboken2/doc/codeinjectionsemantics.rst b/sources/shiboken2/doc/codeinjectionsemantics.rst
index 0051c63df..beb2997a3 100644
--- a/sources/shiboken2/doc/codeinjectionsemantics.rst
+++ b/sources/shiboken2/doc/codeinjectionsemantics.rst
@@ -2,8 +2,8 @@
Code Injection Semantics
************************
-:std:doc:`API Extractor <apiextractor:overview>` provides the
-:ref:`inject-code <apiextractor:inject-code>` tag
+:std:doc:`API Extractor <overview>` provides the
+:ref:`inject-code <inject-code>` tag
allowing the user to put custom written code to on specific locations of the generated code.
Yet this is only part of what is needed to generate proper binding code, where the custom code
should be written to depends upon the technology used on the generated binding code.
diff --git a/sources/shiboken2/doc/conf.py.in b/sources/shiboken2/doc/conf.py.in
index d3aa95c0b..e158abbbe 100644
--- a/sources/shiboken2/doc/conf.py.in
+++ b/sources/shiboken2/doc/conf.py.in
@@ -23,7 +23,7 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig',
-'sphinx.ext.coverage', 'sphinx.ext.intersphinx']
+'sphinx.ext.coverage']
rst_epilog = """
.. |project| replace:: Shiboken
@@ -158,5 +158,3 @@ html_show_sourcelink = False
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
-
-intersphinx_mapping = {'apiextractor': ('ApiExtractor','@CMAKE_BINARY_DIR@/ApiExtractor/doc/html/objects.inv')}
diff --git a/sources/shiboken2/doc/contents.rst b/sources/shiboken2/doc/contents.rst
index a0b40effb..7cdc0063e 100644
--- a/sources/shiboken2/doc/contents.rst
+++ b/sources/shiboken2/doc/contents.rst
@@ -15,3 +15,4 @@ Table of contents
wordsofadvice.rst
shibokenmodule.rst
faq.rst
+ typesystem.rst
diff --git a/sources/shiboken2/doc/faq.rst b/sources/shiboken2/doc/faq.rst
index 3653b8654..eb77e5822 100644
--- a/sources/shiboken2/doc/faq.rst
+++ b/sources/shiboken2/doc/faq.rst
@@ -45,7 +45,7 @@ What do I have to do to create my bindings?
-------------------------------------------
Most of the work is already done by the API Extractor.
-The developer creates a :std:doc:`typesystem <apiextractor:typesystem>`
+The developer creates a :std:doc:`typesystem <typesystem>`
file with any customization wanted in
the generated code, like removing classes or changing method signatures.
The generator will output the *.h* and *.cpp* files with the CPython code that
diff --git a/sources/shiboken2/doc/ownership.rst b/sources/shiboken2/doc/ownership.rst
index f3744a537..59fdb9d66 100644
--- a/sources/shiboken2/doc/ownership.rst
+++ b/sources/shiboken2/doc/ownership.rst
@@ -151,3 +151,77 @@ Not saving unowned objects references
renderer.render()
+Ownership Management in the Typesystem
+=======================================
+
+Ownership transfer from C++ to target
+-------------------------------------
+
+ When an object currently owned by C++ has its ownership transferred
+ back to the target language, the binding can know for sure when the object will be deleted and
+ tie the C++ instance existence to the wrapper, calling the C++ destructor normally when the
+ wrapper is deleted.
+
+ .. code-block:: xml
+
+ <modify-argument index="1">
+ <define-ownership class="target" owner="target" />
+ </modify-argument>
+
+Ownership transfer from target to C++
+-------------------------------------
+
+ In the opposite direction, when an object ownership is transferred from the target language
+ to C++, the native code takes full control of the object life and you don't
+ know when that object will be deleted, rendering the wrapper object invalid,
+ unless you're wrapping an object with a virtual destructor,
+ so you can override it and be notified of its destruction.
+
+ By default it's safer to just render the wrapper
+ object invalid and raise some error if the user tries to access
+ one of this objects members or pass it as argument to some function, to avoid unpleasant segfaults.
+ Also you should avoid calling the C++ destructor when deleting the wrapper.
+
+ .. code-block:: xml
+
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++" />
+ </modify-argument>
+
+
+Parent-child relationship
+-------------------------
+
+One special type of relationship is the parent-child. When an object is called
+the parent of another object (the child), the former is in charge of deleting its
+child when deleted and the target language can trust that the child will be alive
+as long as the parent is, unless some other method can take the C++ ownership away from the parent.
+
+One of the main uses of this scheme is Qt's object system, with ownership among QObject-derived
+classes, creating "trees" of instances.
+
+ .. code-block:: xml
+
+ <modify-argument index="this">
+ <parent index="1" action="add">
+ </modify-argument>
+
+In this example, the instance with the method that is being invoked (indicated by 'index="this"' on
+modify-argument) will be marked as a child
+of the first argument using the `parent` tag. To remove ownership, just use "remove" in the action attribute. **Removing
+parentship also transfers the ownership back to python.**
+
+Invalidation after use
+----------------------
+
+Sometimes an object is created as a virtual method call argument and destroyed after the
+call returned. In this case, you should use the ``invalidate-after-use`` attribute in the
+``modify-argument`` tag to mark the wrapper as invalid right after the virtual method returns.
+
+ .. code-block:: xml
+
+ <modify-argument index="2" invalidate-after-use="yes"/>
+
+In this example the second argument will be invalidated after this method call.
+
+.. [#] See *Object Trees and Object Ownership* http://doc.qt.io/qt-5/objecttrees.html
diff --git a/sources/shiboken2/doc/typeconverters.rst b/sources/shiboken2/doc/typeconverters.rst
index 6b29bdb4f..872daa187 100644
--- a/sources/shiboken2/doc/typeconverters.rst
+++ b/sources/shiboken2/doc/typeconverters.rst
@@ -58,22 +58,22 @@ the "<conversion-rule>" tag must be used.
The details will be given later, but the gist of it are the tags
-:ref:`native-to-target <apiextractor:native-to-target>`, which has only one conversion from C++ to Python, and
-:ref:`native-to-native <apiextractor:target-to-native>`, that may define the conversion of multiple Python types
+:ref:`native-to-target <native-to-target>`, which has only one conversion from C++ to Python, and
+:ref:`native-to-native <target-to-native>`, that may define the conversion of multiple Python types
to C++'s "Complex" type.
.. image:: images/converter.png
:height: 240px
:align: center
-|project| expects the code for :ref:`native-to-target <apiextractor:native-to-target>`, to directly return the
+|project| expects the code for :ref:`native-to-target <native-to-target>`, to directly return the
Python result of the conversion, and the added conversions inside the
-:ref:`target-to-native <apiextractor:target-to-native>` must attribute the Python to C++ conversion result to
+:ref:`target-to-native <target-to-native>` must attribute the Python to C++ conversion result to
the :ref:`%out <out>` variable.
Expanding on the last example, if the binding developer want a Python 2-tuple
of numbers to be accepted by wrapped C++ functions with "Complex" arguments,
-an :ref:`add-conversion <apiextractor:add-conversion>` tag and a custom check must be added.
+an :ref:`add-conversion <add-conversion>` tag and a custom check must be added.
Here's how to do it:
.. code-block:: xml
@@ -130,7 +130,7 @@ Here's how to do it:
Container Conversions
=====================
-Converters for :ref:`container-type <apiextractor:container-type>` are pretty much the same as for other type,
+Converters for :ref:`container-type <container-type>` are pretty much the same as for other type,
except that they make use of the type system variables
:ref:`%INTYPE_# <intype_n>` and :ref:`%OUTTYPE_# <outtype_n>`.
|project| combines the conversion code for containers with the conversion
@@ -286,6 +286,6 @@ In this case, the parts of the implementation that will be used in the new
conversion-rule are the ones in the two last method
``static inline PyObject* toPython(const Complex& cpx)`` and
``static inline Complex toCpp(PyObject* pyobj)``. The ``isConvertible`` method
-is gone, and the ``checkType`` is now an attribute of the :ref:`add-conversion <apiextractor:add-conversion>`
+is gone, and the ``checkType`` is now an attribute of the :ref:`add-conversion <add-conversion>`
tag. Refer back to the first example in this page and you will be able to
correlate the above template with the new scheme of conversion rule definition.
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem.rst b/sources/shiboken2/doc/typesystem.rst
index b56d21164..7674129cd 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem.rst
+++ b/sources/shiboken2/doc/typesystem.rst
@@ -1,5 +1,5 @@
-The API Extractor Type System
-*****************************
+Type System Reference
+*********************
The typesystem is used by a binding generator or any other software using the APIExtractor library
to map a C++ library API onto a higher level language.
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_arguments.rst b/sources/shiboken2/doc/typesystem_arguments.rst
index 28a5c80bc..28a5c80bc 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_arguments.rst
+++ b/sources/shiboken2/doc/typesystem_arguments.rst
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_conversionrule.rst b/sources/shiboken2/doc/typesystem_conversionrule.rst
index 27e7a72de..27e7a72de 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_conversionrule.rst
+++ b/sources/shiboken2/doc/typesystem_conversionrule.rst
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_documentation.rst b/sources/shiboken2/doc/typesystem_documentation.rst
index d73e43cb1..d73e43cb1 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_documentation.rst
+++ b/sources/shiboken2/doc/typesystem_documentation.rst
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_manipulating_objects.rst b/sources/shiboken2/doc/typesystem_manipulating_objects.rst
index 12b866ad7..12b866ad7 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_manipulating_objects.rst
+++ b/sources/shiboken2/doc/typesystem_manipulating_objects.rst
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_modify_function.rst b/sources/shiboken2/doc/typesystem_modify_function.rst
index 071cea4f5..071cea4f5 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_modify_function.rst
+++ b/sources/shiboken2/doc/typesystem_modify_function.rst
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_solving_compilation.rst b/sources/shiboken2/doc/typesystem_solving_compilation.rst
index 23ab9012d..23ab9012d 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_solving_compilation.rst
+++ b/sources/shiboken2/doc/typesystem_solving_compilation.rst
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst b/sources/shiboken2/doc/typesystem_specifying_types.rst
index ce66f77fe..f4016bc2c 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_specifying_types.rst
+++ b/sources/shiboken2/doc/typesystem_specifying_types.rst
@@ -358,7 +358,7 @@ typedef-type
<typesystem>
<typedef-type name="..."
source="..."
- since="..."
+ since="..." />
</typesystem>
The **source** attribute is the source. Example:
diff --git a/sources/shiboken2/ApiExtractor/doc/typesystem_templates.rst b/sources/shiboken2/doc/typesystem_templates.rst
index 31b155c5a..31b155c5a 100644
--- a/sources/shiboken2/ApiExtractor/doc/typesystem_templates.rst
+++ b/sources/shiboken2/doc/typesystem_templates.rst
diff --git a/sources/shiboken2/doc/typesystemvariables.rst b/sources/shiboken2/doc/typesystemvariables.rst
index e595f7ddc..a07ba0d8c 100644
--- a/sources/shiboken2/doc/typesystemvariables.rst
+++ b/sources/shiboken2/doc/typesystemvariables.rst
@@ -3,7 +3,7 @@ Type System Variables
*********************
User written code can be placed in arbitrary places using the
-:ref:`inject-code <apiextractor:inject-code>` tag. To ease the binding developer
+:ref:`inject-code <inject-code>` tag. To ease the binding developer
work, the injected code can make use of special variables that will be replaced
by the correct values. This also shields the developer from some |project|
implementation specifics.
@@ -59,7 +59,7 @@ Variables
system), this value will be inserted in the argument list. If you want to remove
the argument so completely that it doesn't appear in any form on the
``%ARGUMENT_NAMES`` replacement, don't forget to remove also its default value
- with the :ref:`remove-default-expression <apiextractor:remove-default-expression>` type system tag.
+ with the :ref:`remove-default-expression <remove-default-expression>` type system tag.
Take the following method and related type system description as an example:
diff --git a/sources/shiboken2/generator/generator.cpp b/sources/shiboken2/generator/generator.cpp
index 154a16ed3..91e940f51 100644
--- a/sources/shiboken2/generator/generator.cpp
+++ b/sources/shiboken2/generator/generator.cpp
@@ -156,7 +156,7 @@ struct Generator::GeneratorPrivate
QString outDir;
// License comment
QString licenseComment;
- QString packageName;
+ QString moduleName;
QStringList instantiatedContainersNames;
QStringList instantiatedSmartPointerNames;
QVector<const AbstractMetaType *> instantiatedContainers;
@@ -182,8 +182,6 @@ bool Generator::setup(const ApiExtractor& extractor)
return false;
}
- m_d->packageName = moduleEntry->name();
-
collectInstantiatedContainersAndSmartPointers();
return doSetup();
@@ -356,13 +354,16 @@ void Generator::setLicenseComment(const QString& licenseComment)
QString Generator::packageName() const
{
- return m_d->packageName;
+ return TypeDatabase::instance()->defaultPackageName();
}
QString Generator::moduleName() const
{
- QString& pkgName = m_d->packageName;
- return QString(pkgName).remove(0, pkgName.lastIndexOf(QLatin1Char('.')) + 1);
+ if (m_d->moduleName.isEmpty()) {
+ m_d->moduleName = packageName();
+ m_d->moduleName.remove(0, m_d->moduleName.lastIndexOf(QLatin1Char('.')) + 1);
+ }
+ return m_d->moduleName;
}
QString Generator::outputDirectory() const
@@ -859,11 +860,12 @@ QString Generator::subDirectoryForClass(const AbstractMetaClass* clazz) const
return subDirectoryForPackage(clazz->package());
}
-QString Generator::subDirectoryForPackage(QString packageName) const
+QString Generator::subDirectoryForPackage(QString packageNameIn) const
{
- if (packageName.isEmpty())
- packageName = m_d->packageName;
- return QString(packageName).replace(QLatin1Char('.'), QDir::separator());
+ if (packageNameIn.isEmpty())
+ packageNameIn = packageName();
+ packageNameIn.replace(QLatin1Char('.'), QDir::separator());
+ return packageNameIn;
}
template<typename T>
diff --git a/sources/shiboken2/generator/main.cpp b/sources/shiboken2/generator/main.cpp
index 9cdc77ca7..094990b64 100644
--- a/sources/shiboken2/generator/main.cpp
+++ b/sources/shiboken2/generator/main.cpp
@@ -28,7 +28,6 @@
#include <QCoreApplication>
#include <QElapsedTimer>
-#include <QLinkedList>
#include <QLibrary>
#include <QtCore/QFile>
#include <QtCore/QDir>
@@ -84,8 +83,6 @@ static void printOptions(QTextStream& s, const OptionDescriptions& options)
}
}
-typedef void (*getGeneratorsFunc)(QLinkedList<Generator*>*);
-
static bool processProjectFile(QFile& projectFile, QMap<QString, QString>& args)
{
QByteArray line = projectFile.readLine().trimmed();
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 039a2928b..2fedf9ae1 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -5508,7 +5508,7 @@ bool CppGenerator::finishGeneration()
}
TypeDatabase* typeDb = TypeDatabase::instance();
- const TypeSystemTypeEntry *moduleEntry = typeDb->findTypeSystemType(packageName());
+ const TypeSystemTypeEntry *moduleEntry = typeDb->defaultTypeSystemType();
Q_ASSERT(moduleEntry);
//Extra includes
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index c572a98d9..b5069db14 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -2489,7 +2489,6 @@ static void getCode(QStringList& code, const TypeEntry* type)
bool ShibokenGenerator::doSetup()
{
- TypeDatabase* td = TypeDatabase::instance();
QStringList snips;
const PrimitiveTypeEntryList &primitiveTypeList = primitiveTypes();
for (const PrimitiveTypeEntry *type : primitiveTypeList)
@@ -2501,7 +2500,7 @@ bool ShibokenGenerator::doSetup()
for (const AbstractMetaClass *metaClass : classList)
getCode(snips, metaClass->typeEntry());
- const TypeSystemTypeEntry *moduleEntry = td->findTypeSystemType(packageName());
+ const TypeSystemTypeEntry *moduleEntry = TypeDatabase::instance()->defaultTypeSystemType();
Q_ASSERT(moduleEntry);
getCode(snips, moduleEntry);
diff --git a/sources/shiboken2/libshiboken/embed/embedding_generator.py b/sources/shiboken2/libshiboken/embed/embedding_generator.py
index 3ee96a1a5..b6bfb1467 100644
--- a/sources/shiboken2/libshiboken/embed/embedding_generator.py
+++ b/sources/shiboken2/libshiboken/embed/embedding_generator.py
@@ -128,6 +128,7 @@ def create_zipfile(limited_api):
tmp.seek(0)
with open(inc_name, "w") as inc:
_embed_file(tmp, inc)
+ tmp.close()
# also generate a simple embeddable .pyc file for signature_bootstrap.pyc
boot_name = "signature_bootstrap.py" if limited_api else "signature_bootstrap.pyc"
with open(boot_name, "rb") as ldr, open("signature_bootstrap.inc", "w") as inc: