diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-04 08:15:17 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-04 08:29:54 +0000 |
commit | 9768da0be5a09632c60c4e4035fa52b9c55376df (patch) | |
tree | d9e0d8545e08597f208cda183787b51028fa0680 | |
parent | f47818b5c710aa6ae5f76809046105cb8c3d9f7f (diff) |
Remove QtScript, QtXmlPatterns
They are obsolete in Qt 6.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: I70816b3c3270a1db65ad3b3871a09c62d31420e5
Reviewed-by: Christian Tismer <tismer@stackless.com>
41 files changed, 1 insertions, 2091 deletions
diff --git a/examples/script/README.md b/examples/script/README.md deleted file mode 100644 index 6133f4302..000000000 --- a/examples/script/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# About QtScript - -The QtScript module is deprecated since Qt 5.5, -and hence is not being distributed through our wheels. - -However, it is possible to access the module -when using a local build of PySide2 which was built -against a Qt installation containing the Qt Script module -(ALL_OPTIONAL_MODULES in `sources/pyside2/CMakeLists.txt`). diff --git a/examples/script/helloscript.py b/examples/script/helloscript.py deleted file mode 100644 index 2f0379a7e..000000000 --- a/examples/script/helloscript.py +++ /dev/null @@ -1,60 +0,0 @@ - -############################################################################# -## -## Copyright (C) 2016 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$ -## -############################################################################# - -"""PySide2 port of the script/helloscript example from Qt v5.x""" - -import sys -from PySide2 import QtWidgets, QtScript - - -app = QtWidgets.QApplication(sys.argv) - -engine = QtScript.QScriptEngine() - -button = QtWidgets.QPushButton() -scriptButton = engine.newQObject(button) -engine.globalObject().setProperty("button", scriptButton) - -engine.evaluate("button.text = 'Hello World from PySide2!'") -engine.evaluate("button.styleSheet = 'font-style: italic'") -engine.evaluate("button.show()") - -sys.exit(app.exec_()) diff --git a/examples/script/script.pyproject b/examples/script/script.pyproject deleted file mode 100644 index 5beba8c3a..000000000 --- a/examples/script/script.pyproject +++ /dev/null @@ -1,3 +0,0 @@ -{ - "files": ["README.md", "helloscript.py"] -} diff --git a/examples/xmlpatterns/schema/files/contact.xsd b/examples/xmlpatterns/schema/files/contact.xsd deleted file mode 100644 index 3e1b5704c..000000000 --- a/examples/xmlpatterns/schema/files/contact.xsd +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - <xsd:element name="contact"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="givenName" type="xsd:string"/> - <xsd:element name="familyName" type="xsd:string"/> - <xsd:element name="birthdate" type="xsd:date" minOccurs="0"/> - <xsd:element name="homeAddress" type="address"/> - <xsd:element name="workAddress" type="address" minOccurs="0"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - - <xsd:complexType name="address"> - <xsd:sequence> - <xsd:element name="street" type="xsd:string"/> - <xsd:element name="zipCode" type="xsd:string"/> - <xsd:element name="city" type="xsd:string"/> - <xsd:element name="country" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> - -</xsd:schema> diff --git a/examples/xmlpatterns/schema/files/invalid_contact.xml b/examples/xmlpatterns/schema/files/invalid_contact.xml deleted file mode 100644 index 42f1edd67..000000000 --- a/examples/xmlpatterns/schema/files/invalid_contact.xml +++ /dev/null @@ -1,11 +0,0 @@ -<contact> - <givenName>John</givenName> - <familyName>Doe</familyName> - <title>Prof.</title> - <workAddress> - <street>Sandakerveien 116</street> - <zipCode>N-0550</zipCode> - <city>Oslo</city> - <country>Norway</country> - </workAddress> -</contact> diff --git a/examples/xmlpatterns/schema/files/invalid_order.xml b/examples/xmlpatterns/schema/files/invalid_order.xml deleted file mode 100644 index 8ffc5fda4..000000000 --- a/examples/xmlpatterns/schema/files/invalid_order.xml +++ /dev/null @@ -1,13 +0,0 @@ -<order> - <customerId>234219</customerId> - <article> - <articleId>21692</articleId> - <count>3</count> - </article> - <article> - <articleId>24749</articleId> - <count>9</count> - </article> - <deliveryDate>2009-01-23</deliveryDate> - <payed>yes</payed> -</order> diff --git a/examples/xmlpatterns/schema/files/invalid_recipe.xml b/examples/xmlpatterns/schema/files/invalid_recipe.xml deleted file mode 100644 index 4d75af6a1..000000000 --- a/examples/xmlpatterns/schema/files/invalid_recipe.xml +++ /dev/null @@ -1,14 +0,0 @@ -<recipe> - <title>Cheese on Toast</title> - <ingredient name="Bread" quantity="2" unit="slices"/> - <ingredient name="Cheese" quantity="2" unit="slices"/> - <time quantity="3" unit="days"/> - <method> - <step>1. Slice the bread and cheese.</step> - <step>2. Grill one side of each slice of bread.</step> - <step>3. Turn over the bread and place a slice of cheese on each piece.</step> - <step>4. Grill until the cheese has started to melt.</step> - <step>5. Serve and enjoy!</step> - </method> - <comment>Tell your friends about it!</comment> -</recipe> diff --git a/examples/xmlpatterns/schema/files/order.xsd b/examples/xmlpatterns/schema/files/order.xsd deleted file mode 100644 index 405cafe43..000000000 --- a/examples/xmlpatterns/schema/files/order.xsd +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - <xsd:element name="order"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="customerId" type="xsd:positiveInteger"/> - <xsd:element name="article" type="articleType" maxOccurs="unbounded"/> - <xsd:element name="deliveryDate" type="xsd:date"/> - <xsd:element name="payed" type="xsd:boolean"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - - <xsd:complexType name="articleType"> - <xsd:sequence> - <xsd:element name="articleId" type="xsd:positiveInteger"/> - <xsd:element name="count" type="xsd:positiveInteger"/> - <xsd:element name="comment" type="xsd:string" minOccurs="0"/> - </xsd:sequence> - </xsd:complexType> - -</xsd:schema> diff --git a/examples/xmlpatterns/schema/files/recipe.xsd b/examples/xmlpatterns/schema/files/recipe.xsd deleted file mode 100644 index bbbafd9a3..000000000 --- a/examples/xmlpatterns/schema/files/recipe.xsd +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - - <xsd:element name="recipe"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="title" type="xsd:string"/> - <xsd:element name="ingredient" type="ingredientType" maxOccurs="unbounded"/> - <xsd:element name="time" type="timeType"/> - <xsd:element name="method"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="step" type="xsd:string" maxOccurs="unbounded"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - - <xsd:complexType name="ingredientType"> - <xsd:attribute name="name" type="xsd:string"/> - <xsd:attribute name="quantity" type="xsd:positiveInteger"/> - <xsd:attribute name="unit" type="xsd:string"/> - </xsd:complexType> - - <xsd:complexType name="timeType"> - <xsd:attribute name="quantity" type="xsd:positiveInteger"/> - <xsd:attribute name="unit"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="seconds"/> - <xsd:enumeration value="minutes"/> - <xsd:enumeration value="hours"/> - </xsd:restriction> - </xsd:simpleType> - </xsd:attribute> - </xsd:complexType> - -</xsd:schema> diff --git a/examples/xmlpatterns/schema/files/valid_contact.xml b/examples/xmlpatterns/schema/files/valid_contact.xml deleted file mode 100644 index 53c04d4b5..000000000 --- a/examples/xmlpatterns/schema/files/valid_contact.xml +++ /dev/null @@ -1,11 +0,0 @@ -<contact> - <givenName>John</givenName> - <familyName>Doe</familyName> - <birthdate>1977-12-25</birthdate> - <homeAddress> - <street>Sandakerveien 116</street> - <zipCode>N-0550</zipCode> - <city>Oslo</city> - <country>Norway</country> - </homeAddress> -</contact> diff --git a/examples/xmlpatterns/schema/files/valid_order.xml b/examples/xmlpatterns/schema/files/valid_order.xml deleted file mode 100644 index f83c36cb1..000000000 --- a/examples/xmlpatterns/schema/files/valid_order.xml +++ /dev/null @@ -1,18 +0,0 @@ -<order> - <customerId>194223</customerId> - <article> - <articleId>22242</articleId> - <count>5</count> - </article> - <article> - <articleId>32372</articleId> - <count>12</count> - <comment>without stripes</comment> - </article> - <article> - <articleId>23649</articleId> - <count>2</count> - </article> - <deliveryDate>2009-01-23</deliveryDate> - <payed>true</payed> -</order> diff --git a/examples/xmlpatterns/schema/files/valid_recipe.xml b/examples/xmlpatterns/schema/files/valid_recipe.xml deleted file mode 100644 index f6499ba21..000000000 --- a/examples/xmlpatterns/schema/files/valid_recipe.xml +++ /dev/null @@ -1,13 +0,0 @@ -<recipe> - <title>Cheese on Toast</title> - <ingredient name="Bread" quantity="2" unit="slices"/> - <ingredient name="Cheese" quantity="2" unit="slices"/> - <time quantity="3" unit="minutes"/> - <method> - <step>1. Slice the bread and cheese.</step> - <step>2. Grill one side of each slice of bread.</step> - <step>3. Turn over the bread and place a slice of cheese on each piece.</step> - <step>4. Grill until the cheese has started to melt.</step> - <step>5. Serve and enjoy!</step> - </method> -</recipe> diff --git a/examples/xmlpatterns/schema/schema.py b/examples/xmlpatterns/schema/schema.py deleted file mode 100644 index d3c22c184..000000000 --- a/examples/xmlpatterns/schema/schema.py +++ /dev/null @@ -1,286 +0,0 @@ - -############################################################################# -## -## Copyright (C) 2013 Riverbank Computing Limited. -## Copyright (C) 2016 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$ -## -############################################################################# - -from PySide2 import QtCore, QtGui, QtWidgets, QtXmlPatterns - -import schema_rc -from ui_schema import Ui_SchemaMainWindow - - -try: - # Python v2. - unicode - - def encode_utf8(ba): - return unicode(ba, encoding='utf8') - - def decode_utf8(qs): - return QtCore.QByteArray(str(qs)) - -except NameError: - # Python v3. - - def encode_utf8(ba): - return str(ba.data(), encoding='utf8') - - def decode_utf8(qs): - return QtCore.QByteArray(bytes(qs, encoding='utf8')) - - -class XmlSyntaxHighlighter(QtGui.QSyntaxHighlighter): - - def __init__(self, parent=None): - super(XmlSyntaxHighlighter, self).__init__(parent) - - self.highlightingRules = [] - - # Tag format. - format = QtGui.QTextCharFormat() - format.setForeground(QtCore.Qt.darkBlue) - format.setFontWeight(QtGui.QFont.Bold) - pattern = QtCore.QRegularExpression(r'(<[a-zA-Z:]+\b|<\?[a-zA-Z:]+\b|\?>|>|/>|</[a-zA-Z:]+>)') - assert pattern.isValid() - self.highlightingRules.append((pattern, format)) - - # Attribute format. - format = QtGui.QTextCharFormat() - format.setForeground(QtCore.Qt.darkGreen) - pattern = QtCore.QRegularExpression('[a-zA-Z:]+=') - assert pattern.isValid() - self.highlightingRules.append((pattern, format)) - - # Attribute content format. - format = QtGui.QTextCharFormat() - format.setForeground(QtCore.Qt.red) - pattern = QtCore.QRegularExpression("(\"[^\"]*\"|'[^']*')") - assert pattern.isValid() - self.highlightingRules.append((pattern, format)) - - # Comment format. - self.commentFormat = QtGui.QTextCharFormat() - self.commentFormat.setForeground(QtCore.Qt.lightGray) - self.commentFormat.setFontItalic(True) - - self.commentStartExpression = QtCore.QRegularExpression("<!--") - assert self.commentStartExpression.isValid() - self.commentEndExpression = QtCore.QRegularExpression("-->") - assert self.commentEndExpression.isValid() - - def highlightBlock(self, text): - for pattern, format in self.highlightingRules: - match = pattern.match(text) - while match.hasMatch(): - index = match.capturedStart() - length = match.capturedLength(0) - self.setFormat(index, length, format) - match = pattern.match(text, index + length) - - self.setCurrentBlockState(0) - - startIndex = 0 - if self.previousBlockState() != 1: - match = self.commentStartExpression.match(text) - startIndex = match.capturedStart(0) if match.hasMatch() else -1 - - while startIndex >= 0: - match = self.commentEndExpression.match(text, startIndex) - endIndex = match.capturedStart(0) if match.hasMatch() else -1 - if match.hasMatch(): - endIndex = match.capturedStart(0) - length = match.capturedLength(0) - commentLength = endIndex - startIndex + length - else: - self.setCurrentBlockState(1) - commentLength = text.length() - startIndex - - self.setFormat(startIndex, commentLength, self.commentFormat) - match = self.commentStartExpression.match(text, startIndex + commentLength) - startIndex = match.capturedStart(0) if match.hasMatch() else -1 - - -class MessageHandler(QtXmlPatterns.QAbstractMessageHandler): - - def __init__(self): - super(MessageHandler, self).__init__() - - self.m_description = "" - self.m_sourceLocation = QtXmlPatterns.QSourceLocation() - - def statusMessage(self): - return self.m_description - - def line(self): - return self.m_sourceLocation.line() - - def column(self): - return self.m_sourceLocation.column() - - def handleMessage(self, type, description, identifier, sourceLocation): - self.m_description = description - self.m_sourceLocation = sourceLocation - - -class MainWindow(QtWidgets.QMainWindow, Ui_SchemaMainWindow): - - def __init__(self): - QtWidgets.QMainWindow.__init__(self) - - self.setupUi(self) - - XmlSyntaxHighlighter(self.schemaView.document()) - XmlSyntaxHighlighter(self.instanceEdit.document()) - - self.schemaSelection.addItem("Contact Schema") - self.schemaSelection.addItem("Recipe Schema") - self.schemaSelection.addItem("Order Schema") - - self.instanceSelection.addItem("Valid Contact Instance") - self.instanceSelection.addItem("Invalid Contact Instance") - - self.schemaSelection.currentIndexChanged[int].connect(self.schemaSelected) - self.instanceSelection.currentIndexChanged[int].connect(self.instanceSelected) - self.validateButton.clicked.connect(self.validate) - self.instanceEdit.textChanged.connect(self.textChanged) - - self.validationStatus.setAlignment(QtCore.Qt.AlignCenter | QtCore.Qt.AlignVCenter) - - self.schemaSelected(0) - self.instanceSelected(0) - - def schemaSelected(self, index): - self.instanceSelection.clear() - - if index == 0: - self.instanceSelection.addItem("Valid Contact Instance") - self.instanceSelection.addItem("Invalid Contact Instance") - elif index == 1: - self.instanceSelection.addItem("Valid Recipe Instance") - self.instanceSelection.addItem("Invalid Recipe Instance") - elif index == 2: - self.instanceSelection.addItem("Valid Order Instance") - self.instanceSelection.addItem("Invalid Order Instance") - - self.textChanged() - - schemaFile = QtCore.QFile(':/schema_%d.xsd' % index) - schemaFile.open(QtCore.QIODevice.ReadOnly) - schemaData = schemaFile.readAll() - self.schemaView.setPlainText(encode_utf8(schemaData)) - - self.validate() - - def instanceSelected(self, index): - if index == -1: - return - - index += 2 * self.schemaSelection.currentIndex() - instanceFile = QtCore.QFile(':/instance_%d.xml' % index) - instanceFile.open(QtCore.QIODevice.ReadOnly) - instanceData = instanceFile.readAll() - self.instanceEdit.setPlainText(encode_utf8(instanceData)) - - self.validate() - - def validate(self): - schemaData = decode_utf8(self.schemaView.toPlainText()) - instanceData = decode_utf8(self.instanceEdit.toPlainText()) - - messageHandler = MessageHandler() - - schema = QtXmlPatterns.QXmlSchema() - schema.setMessageHandler(messageHandler) - schema.load(schemaData, QtCore.QUrl()) - - errorOccurred = False - if not schema.isValid(): - errorOccurred = True - else: - validator = QtXmlPatterns.QXmlSchemaValidator(schema) - if not validator.validate(instanceData): - errorOccurred = True - - if errorOccurred: - self.validationStatus.setText(messageHandler.statusMessage()) - self.moveCursor(messageHandler.line(), messageHandler.column()) - background = QtCore.Qt.red - else: - self.validationStatus.setText("validation successful") - background = QtCore.Qt.green - - styleSheet = 'QLabel {background: %s; padding: 3px}' % QtGui.QColor(background).lighter(160).name() - self.validationStatus.setStyleSheet(styleSheet) - - def textChanged(self): - self.instanceEdit.setExtraSelections([]) - - def moveCursor(self, line, column): - self.instanceEdit.moveCursor(QtGui.QTextCursor.Start) - - for i in range(1, line): - self.instanceEdit.moveCursor(QtGui.QTextCursor.Down) - - for i in range(1, column): - self.instanceEdit.moveCursor(QtGui.QTextCursor.Right) - - extraSelections = [] - selection = QtWidgets.QTextEdit.ExtraSelection() - - lineColor = QtGui.QColor(QtCore.Qt.red).lighter(160) - selection.format.setBackground(lineColor) - selection.format.setProperty(QtGui.QTextFormat.FullWidthSelection, True) - selection.cursor = self.instanceEdit.textCursor() - selection.cursor.clearSelection() - extraSelections.append(selection) - - self.instanceEdit.setExtraSelections(extraSelections) - - self.instanceEdit.setFocus() - - -if __name__ == '__main__': - - import sys - - app = QtWidgets.QApplication(sys.argv) - window = MainWindow() - window.show() - sys.exit(app.exec_()) diff --git a/examples/xmlpatterns/schema/schema.pyproject b/examples/xmlpatterns/schema/schema.pyproject deleted file mode 100644 index 697e58d70..000000000 --- a/examples/xmlpatterns/schema/schema.pyproject +++ /dev/null @@ -1,4 +0,0 @@ -{ - "files": ["schema.qrc", "schema.py", "schema.ui", "ui_schema.py", - "schema_rc.py"] -} diff --git a/examples/xmlpatterns/schema/schema.qrc b/examples/xmlpatterns/schema/schema.qrc deleted file mode 100644 index eb7ddfd7c..000000000 --- a/examples/xmlpatterns/schema/schema.qrc +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource> - <file alias="schema_0.xsd">files/contact.xsd</file> - <file alias="schema_1.xsd">files/recipe.xsd</file> - <file alias="schema_2.xsd">files/order.xsd</file> - <file alias="instance_0.xml">files/valid_contact.xml</file> - <file alias="instance_1.xml">files/invalid_contact.xml</file> - <file alias="instance_2.xml">files/valid_recipe.xml</file> - <file alias="instance_3.xml">files/invalid_recipe.xml</file> - <file alias="instance_4.xml">files/valid_order.xml</file> - <file alias="instance_5.xml">files/invalid_order.xml</file> -</qresource> -</RCC> diff --git a/examples/xmlpatterns/schema/schema.ui b/examples/xmlpatterns/schema/schema.ui deleted file mode 100644 index b67f444d2..000000000 --- a/examples/xmlpatterns/schema/schema.ui +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>SchemaMainWindow</class> - <widget class="QMainWindow" name="SchemaMainWindow"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>417</width> - <height>594</height> - </rect> - </property> - <property name="windowTitle"> - <string>XML Schema Validation</string> - </property> - <widget class="QWidget" name="centralwidget"> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0" colspan="2"> - <widget class="QLabel" name="schemaLabel"> - <property name="text"> - <string>XML Schema Document:</string> - </property> - </widget> - </item> - <item row="0" column="2" colspan="2"> - <widget class="QComboBox" name="schemaSelection"/> - </item> - <item row="1" column="0" colspan="4"> - <widget class="QTextBrowser" name="schemaView"/> - </item> - <item row="2" column="0" colspan="2"> - <widget class="QLabel" name="instanceLabel"> - <property name="text"> - <string>XML Instance Document:</string> - </property> - </widget> - </item> - <item row="2" column="2" colspan="2"> - <widget class="QComboBox" name="instanceSelection"/> - </item> - <item row="3" column="0" colspan="4"> - <widget class="QTextEdit" name="instanceEdit"/> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Status:</string> - </property> - </widget> - </item> - <item row="4" column="1" colspan="2"> - <widget class="QLabel" name="validationStatus"> - <property name="text"> - <string>not validated</string> - </property> - </widget> - </item> - <item row="4" column="3"> - <widget class="QPushButton" name="validateButton"> - <property name="text"> - <string>Validate</string> - </property> - </widget> - </item> - </layout> - </widget> - <widget class="QStatusBar" name="statusbar"/> - </widget> - <resources/> - <connections/> -</ui> diff --git a/examples/xmlpatterns/schema/schema_rc.py b/examples/xmlpatterns/schema/schema_rc.py deleted file mode 100644 index 0c607af97..000000000 --- a/examples/xmlpatterns/schema/schema_rc.py +++ /dev/null @@ -1,394 +0,0 @@ -# Resource object code (Python 3) -# Created by: object code -# Created by: The Resource Compiler for Qt version 5.14.0 -# WARNING! All changes made in this file will be lost! - -from PySide2 import QtCore - -qt_resource_data = b"\ -\x00\x00\x01\x81\ -\x00\ -\x00\x06\x05x\x9c\xbdT\xc1r\xc2 \x10\xbd\xfb\x15\x0c\ -\x1f`\xb4\xbd9F\xcf\x9di\xa7\x87\xf6\xd0+\x92\x1d\ -\xc3L\x80\x08\x8b\x89\x7f_\x82\x1am\x0cI\xbc\x94C\ -&\xc3\xbe\xf7\xd8]\x1e\xbb\xde\xd6\xb2 G0Vh\ -\x95\xd2\xe5|A\xb7\x9b\xd9\xba\xb6\xd9\xca\xf2\x1c$#\ ->\xae\xec\xcao\xa44G,WIRU\xd5\xbcz\ -\x9dk\xb3O^\x16\x8be\xf2\xf3\xf1\xfe\x15\xb0t3\ -\x9b\x11\xbf\x02\x1d\x0a\x90\xa0\x90(&!\xa5\x06\xb8(\ -\xc1\x03\xc8e\x05\x0c\xd7\xb2,\xa0\xfe>\x95p\x8b\xb4\ -Q\x0b\x07\x07\x8awB\x91\x03P`\x01\x94\xa0\x97J\ -i`\xa3\x11jO\x93Il\x8f4\x90\x09\xbfq\x95\ -\xb8\xed4\xd9Q\x22Y\xfd\xc9\xb936\xa5N\xed\xb4\ -S\x19d\x13\xc5Q\xc86\xb3\xe6?\x08N\xa3J\xc0\ -\x5cg\xf4\x11;\xde\xc2'\xda9\x92\x84E({:\ -;\xb9%\xadt2\x9e\xc6\x193X\xd4\x19rI\xb1\ -c\x9b\xc8\x09\x11\xd5\x8e\xd2\xcd\xbbw\xc8\x07\x83\x84\xdb\ -\xeb\xf8\x98\xa1o\xc9\xce\xe1\x15\xdd|\x87\xbd\xd8K;\ -8\xa6\xbc\x8fO\xf7\xd4R[\x81\xe2\x08o\x0aa\x0f\ -fT\xc3)\x81\xf1\xa3{\x1a1Tu\xeb\xd6\xffJ\ -\xbco\x0a\x88&\xab\x88\x15\x1a\x80\x81\xa6F\x8e~\x80\ -\x91\x1d\xb3\x7f\xeb\x1ex9\xa0\x9c\x04\xc3\x02\xef\xc8\x0a\ -\xd78\x1d\xb8V\x99\x8d\x998F\x93B\xf9:\x9e\xa6\ -\xe5\xda\xbf\x9d\xdeA\x90t\xea\xeauyO_\xce\x91\ -\xb6\xb3\xf1;\xbfH\x84\xa9\xbd\x99\xfd\x02,\xd8\xc0\x1d\ -\ -\x00\x00\x02U\ -<\ -recipe>\x0a <tit\ -le>Cheese on Toa\ -st</title>\x0a <\ -ingredient name=\ -\x22Bread\x22 quantity\ -=\x222\x22 unit=\x22slice\ -s\x22/>\x0a <ingred\ -ient name=\x22Chees\ -e\x22 quantity=\x222\x22 \ -unit=\x22slices\x22/>\x0a\ - <time quanti\ -ty=\x223\x22 unit=\x22day\ -s\x22/>\x0a <method\ ->\x0a <step>\ -1. Slice the bre\ -ad and cheese.</\ -step>\x0a <s\ -tep>2. Grill one\ - side of each sl\ -ice of bread.</s\ -tep>\x0a <st\ -ep>3. Turn over \ -the bread and pl\ -ace a slice of c\ -heese on each pi\ -ece.</step>\x0a \ - <step>4. Gri\ -ll until the che\ -ese has started \ -to melt.</step>\x0a\ - <step>5.\ - Serve and enjoy\ -!</step>\x0a </m\ -ethod>\x0a <comm\ -ent>Tell your fr\ -iends about it!<\ -/comment>\x0a</reci\ -pe>\x0a\ -\x00\x00\x03\xbb\ -<\ -?xml version=\x221.\ -0\x22?>\x0a<xsd:schema\ - xmlns:xsd=\x22http\ -://www.w3.org/20\ -01/XMLSchema\x22>\x0a\x0a\ - <xsd:element\ - name=\x22contact\x22>\ -\x0a <xsd:co\ -mplexType>\x0a \ - <xsd:sequ\ -ence>\x0a \ - <xsd:eleme\ -nt name=\x22givenNa\ -me\x22 type=\x22xsd:st\ -ring\x22/>\x0a \ - <xsd:ele\ -ment name=\x22famil\ -yName\x22 type=\x22xsd\ -:string\x22/>\x0a \ - <xsd:\ -element name=\x22bi\ -rthdate\x22 type=\x22x\ -sd:date\x22 minOccu\ -rs=\x220\x22/>\x0a \ - <xsd:el\ -ement name=\x22home\ -Address\x22 type=\x22a\ -ddress\x22/>\x0a \ - <xsd:e\ -lement name=\x22wor\ -kAddress\x22 type=\x22\ -address\x22 minOccu\ -rs=\x220\x22/>\x0a \ - </xsd:seque\ -nce>\x0a </x\ -sd:complexType>\x0a\ - </xsd:elemen\ -t>\x0a\x0a <xsd:com\ -plexType name=\x22a\ -ddress\x22>\x0a \ - <xsd:sequence>\x0a\ - <xsd\ -:element name=\x22s\ -treet\x22 type=\x22xsd\ -:string\x22/>\x0a \ - <xsd:elem\ -ent name=\x22zipCod\ -e\x22 type=\x22xsd:str\ -ing\x22/>\x0a \ - <xsd:element \ -name=\x22city\x22 type\ -=\x22xsd:string\x22/>\x0a\ - <xsd\ -:element name=\x22c\ -ountry\x22 type=\x22xs\ -d:string\x22/>\x0a \ - </xsd:sequen\ -ce>\x0a </xsd:co\ -mplexType>\x0a\x0a</xs\ -d:schema>\x0a\ -\x00\x00\x02%\ -<\ -recipe>\x0a <tit\ -le>Cheese on Toa\ -st</title>\x0a <\ -ingredient name=\ -\x22Bread\x22 quantity\ -=\x222\x22 unit=\x22slice\ -s\x22/>\x0a <ingred\ -ient name=\x22Chees\ -e\x22 quantity=\x222\x22 \ -unit=\x22slices\x22/>\x0a\ - <time quanti\ -ty=\x223\x22 unit=\x22min\ -utes\x22/>\x0a <met\ -hod>\x0a <st\ -ep>1. Slice the \ -bread and cheese\ -.</step>\x0a \ - <step>2. Grill \ -one side of each\ - slice of bread.\ -</step>\x0a \ -<step>3. Turn ov\ -er the bread and\ - place a slice o\ -f cheese on each\ - piece.</step>\x0a \ - <step>4. \ -Grill until the \ -cheese has start\ -ed to melt.</ste\ -p>\x0a <step\ ->5. Serve and en\ -joy!</step>\x0a \ -</method>\x0a</reci\ -pe>\x0a\ -\x00\x00\x01\x1d\ -<\ -contact>\x0a <gi\ -venName>John</gi\ -venName>\x0a <fa\ -milyName>Doe</fa\ -milyName>\x0a <t\ -itle>Prof.</titl\ -e>\x0a <workAddr\ -ess>\x0a <st\ -reet>Sandakervei\ -en 116</street>\x0a\ - <zipCode\ ->N-0550</zipCode\ ->\x0a <city>\ -Oslo</city>\x0a \ - <country>Nor\ -way</country>\x0a \ - </workAddress>\ -\x0a</contact>\x0a\ -\x00\x00\x01.\ -<\ -order>\x0a <cust\ -omerId>234219</c\ -ustomerId>\x0a <\ -article>\x0a \ - <articleId>2169\ -2</articleId>\x0a \ - <count>3</\ -count>\x0a </art\ -icle>\x0a <artic\ -le>\x0a <art\ -icleId>24749</ar\ -ticleId>\x0a \ - <count>9</count\ ->\x0a </article>\ -\x0a <deliveryDa\ -te>2009-01-23</d\ -eliveryDate>\x0a \ - <payed>yes</pay\ -ed>\x0a</order>\x0a\ -\x00\x00\x01*\ -<\ -contact>\x0a <gi\ -venName>John</gi\ -venName>\x0a <fa\ -milyName>Doe</fa\ -milyName>\x0a <b\ -irthdate>1977-12\ --25</birthdate>\x0a\ - <homeAddress\ ->\x0a <stree\ -t>Sandakerveien \ -116</street>\x0a \ - <zipCode>N-\ -0550</zipCode>\x0a \ - <city>Osl\ -o</city>\x0a \ - <country>Norway\ -</country>\x0a <\ -/homeAddress>\x0a</\ -contact>\x0a\ -\x00\x00\x03g\ -<\ -?xml version=\x221.\ -0\x22?>\x0a<xsd:schema\ - xmlns:xsd=\x22http\ -://www.w3.org/20\ -01/XMLSchema\x22>\x0a\x0a\ - <xsd:element\ - name=\x22order\x22>\x0a \ - <xsd:comp\ -lexType>\x0a \ - <xsd:sequen\ -ce>\x0a \ - <xsd:element\ - name=\x22customerI\ -d\x22 type=\x22xsd:pos\ -itiveInteger\x22/>\x0a\ - \ -<xsd:element nam\ -e=\x22article\x22 type\ -=\x22articleType\x22 m\ -axOccurs=\x22unboun\ -ded\x22/>\x0a \ - <xsd:elem\ -ent name=\x22delive\ -ryDate\x22 type=\x22xs\ -d:date\x22/>\x0a \ - <xsd:e\ -lement name=\x22pay\ -ed\x22 type=\x22xsd:bo\ -olean\x22/>\x0a \ - </xsd:seque\ -nce>\x0a </x\ -sd:complexType>\x0a\ - </xsd:elemen\ -t>\x0a\x0a <xsd:com\ -plexType name=\x22a\ -rticleType\x22>\x0a \ - <xsd:sequen\ -ce>\x0a \ -<xsd:element nam\ -e=\x22articleId\x22 ty\ -pe=\x22xsd:positive\ -Integer\x22/>\x0a \ - <xsd:elem\ -ent name=\x22count\x22\ - type=\x22xsd:posit\ -iveInteger\x22/>\x0a \ - <xsd:e\ -lement name=\x22com\ -ment\x22 type=\x22xsd:\ -string\x22 minOccur\ -s=\x220\x22/>\x0a \ -</xsd:sequence>\x0a\ - </xsd:comple\ -xType>\x0a\x0a</xsd:sc\ -hema>\x0a\ -\x00\x00\x01\xb6\ -<\ -order>\x0a <cust\ -omerId>194223</c\ -ustomerId>\x0a <\ -article>\x0a \ - <articleId>2224\ -2</articleId>\x0a \ - <count>5</\ -count>\x0a </art\ -icle>\x0a <artic\ -le>\x0a <art\ -icleId>32372</ar\ -ticleId>\x0a \ - <count>12</coun\ -t>\x0a <comm\ -ent>without stri\ -pes</comment>\x0a \ - </article>\x0a \ - <article>\x0a \ - <articleId>23\ -649</articleId>\x0a\ - <count>2\ -</count>\x0a </a\ -rticle>\x0a <del\ -iveryDate>2009-0\ -1-23</deliveryDa\ -te>\x0a <payed>t\ -rue</payed>\x0a</or\ -der>\x0a\ -" - -qt_resource_name = b"\ -\x00\x0c\ -\x08\x13\x87\xf4\ -\x00s\ -\x00c\x00h\x00e\x00m\x00a\x00_\x001\x00.\x00x\x00s\x00d\ -\x00\x0e\ -\x00sJ\x1c\ -\x00i\ -\x00n\x00s\x00t\x00a\x00n\x00c\x00e\x00_\x003\x00.\x00x\x00m\x00l\ -\x00\x0c\ -\x08\x10\x87\xf4\ -\x00s\ -\x00c\x00h\x00e\x00m\x00a\x00_\x000\x00.\x00x\x00s\x00d\ -\x00\x0e\ -\x00pJ\x1c\ -\x00i\ -\x00n\x00s\x00t\x00a\x00n\x00c\x00e\x00_\x002\x00.\x00x\x00m\x00l\ -\x00\x0e\ -\x00yJ\x1c\ -\x00i\ -\x00n\x00s\x00t\x00a\x00n\x00c\x00e\x00_\x001\x00.\x00x\x00m\x00l\ -\x00\x0e\ -\x00uJ\x1c\ -\x00i\ -\x00n\x00s\x00t\x00a\x00n\x00c\x00e\x00_\x005\x00.\x00x\x00m\x00l\ -\x00\x0e\ -\x00vJ\x1c\ -\x00i\ -\x00n\x00s\x00t\x00a\x00n\x00c\x00e\x00_\x000\x00.\x00x\x00m\x00l\ -\x00\x0c\ -\x08\x16\x87\xf4\ -\x00s\ -\x00c\x00h\x00e\x00m\x00a\x00_\x002\x00.\x00x\x00s\x00d\ -\x00\x0e\ -\x00rJ\x1c\ -\x00i\ -\x00n\x00s\x00t\x00a\x00n\x00c\x00e\x00_\x004\x00.\x00x\x00m\x00l\ -" - -qt_resource_struct = b"\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x09\x00\x00\x00\x01\ -\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00^\x00\x00\x00\x00\x00\x01\x00\x00\x07\x9d\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -\x00\x00\x01\x04\x00\x00\x00\x00\x00\x01\x00\x00\x10\xb2\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x01\x85\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x01\x00\x00\x0a\xe7\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x01\x00\x00\x0c\x19\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -\x00\x00\x00\x80\x00\x00\x00\x00\x00\x01\x00\x00\x09\xc6\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -\x00\x00\x00@\x00\x00\x00\x00\x00\x01\x00\x00\x03\xde\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -\x00\x00\x00\xe6\x00\x00\x00\x00\x00\x01\x00\x00\x0dG\ -\x00\x00\x01e\xaf\x16\xd2\xa1\ -" - -def qInitResources(): - QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) - -def qCleanupResources(): - QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) - -qInitResources() diff --git a/examples/xmlpatterns/schema/ui_schema.py b/examples/xmlpatterns/schema/ui_schema.py deleted file mode 100644 index f9cc751eb..000000000 --- a/examples/xmlpatterns/schema/ui_schema.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- - -################################################################################ -## Form generated from reading UI file 'schema.ui' -## -## Created by: Qt User Interface Compiler version 5.14.0 -## -## WARNING! All changes made in this file will be lost when recompiling UI file! -################################################################################ - -from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint, - QRect, QSize, QUrl, Qt) -from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap) -from PySide2.QtWidgets import * - -class Ui_SchemaMainWindow(object): - def setupUi(self, SchemaMainWindow): - if SchemaMainWindow.objectName(): - SchemaMainWindow.setObjectName(u"SchemaMainWindow") - SchemaMainWindow.resize(417, 594) - self.centralwidget = QWidget(SchemaMainWindow) - self.centralwidget.setObjectName(u"centralwidget") - self.gridLayout = QGridLayout(self.centralwidget) - self.gridLayout.setObjectName(u"gridLayout") - self.schemaLabel = QLabel(self.centralwidget) - self.schemaLabel.setObjectName(u"schemaLabel") - - self.gridLayout.addWidget(self.schemaLabel, 0, 0, 1, 2) - - self.schemaSelection = QComboBox(self.centralwidget) - self.schemaSelection.setObjectName(u"schemaSelection") - - self.gridLayout.addWidget(self.schemaSelection, 0, 2, 1, 2) - - self.schemaView = QTextBrowser(self.centralwidget) - self.schemaView.setObjectName(u"schemaView") - - self.gridLayout.addWidget(self.schemaView, 1, 0, 1, 4) - - self.instanceLabel = QLabel(self.centralwidget) - self.instanceLabel.setObjectName(u"instanceLabel") - - self.gridLayout.addWidget(self.instanceLabel, 2, 0, 1, 2) - - self.instanceSelection = QComboBox(self.centralwidget) - self.instanceSelection.setObjectName(u"instanceSelection") - - self.gridLayout.addWidget(self.instanceSelection, 2, 2, 1, 2) - - self.instanceEdit = QTextEdit(self.centralwidget) - self.instanceEdit.setObjectName(u"instanceEdit") - - self.gridLayout.addWidget(self.instanceEdit, 3, 0, 1, 4) - - self.label = QLabel(self.centralwidget) - self.label.setObjectName(u"label") - - self.gridLayout.addWidget(self.label, 4, 0, 1, 1) - - self.validationStatus = QLabel(self.centralwidget) - self.validationStatus.setObjectName(u"validationStatus") - - self.gridLayout.addWidget(self.validationStatus, 4, 1, 1, 2) - - self.validateButton = QPushButton(self.centralwidget) - self.validateButton.setObjectName(u"validateButton") - - self.gridLayout.addWidget(self.validateButton, 4, 3, 1, 1) - - SchemaMainWindow.setCentralWidget(self.centralwidget) - self.statusbar = QStatusBar(SchemaMainWindow) - self.statusbar.setObjectName(u"statusbar") - SchemaMainWindow.setStatusBar(self.statusbar) - - self.retranslateUi(SchemaMainWindow) - - QMetaObject.connectSlotsByName(SchemaMainWindow) - # setupUi - - def retranslateUi(self, SchemaMainWindow): - SchemaMainWindow.setWindowTitle(QCoreApplication.translate("SchemaMainWindow", u"XML Schema Validation", None)) - self.schemaLabel.setText(QCoreApplication.translate("SchemaMainWindow", u"XML Schema Document:", None)) - self.instanceLabel.setText(QCoreApplication.translate("SchemaMainWindow", u"XML Instance Document:", None)) - self.label.setText(QCoreApplication.translate("SchemaMainWindow", u"Status:", None)) - self.validationStatus.setText(QCoreApplication.translate("SchemaMainWindow", u"not validated", None)) - self.validateButton.setText(QCoreApplication.translate("SchemaMainWindow", u"Validate", None)) - # retranslateUi - diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index 678983a50..d7eaf84d6 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -514,15 +514,11 @@ <rejection class="" enum-name="enum_1"/> <rejection class="" enum-name="enum_2"/> <rejection class="" enum-name="QtValidLicenseForXmlModule"/> - <rejection class="" enum-name="QtValidLicenseForXmlPatternsModule"/> <rejection class="" enum-name="QtValidLicenseForActiveQtModule"/> <rejection class="" enum-name="QtValidLicenseForCoreModule"/> - <rejection class="" enum-name="QtValidLicenseForQt3SupportLightModule"/> - <rejection class="" enum-name="QtValidLicenseForQt3SupportModule"/> <rejection class="" enum-name="QtValidLicenseForNetworkModule"/> <rejection class="" enum-name="QtValidLicenseForSvgModule"/> <rejection class="" enum-name="QtValidLicenseForGuiModule"/> - <rejection class="" enum-name="QtValidLicenseForScriptModule"/> <rejection class="" enum-name="QtValidLicenseForHelpModule"/> <!-- Internal --> <rejection class="QAbstractFileEngine"/> <!-- diff --git a/sources/pyside2/PySide2/QtScript/CMakeLists.txt b/sources/pyside2/PySide2/QtScript/CMakeLists.txt deleted file mode 100644 index 81d6c03d3..000000000 --- a/sources/pyside2/PySide2/QtScript/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -project(QtScript) - -set(QtScript_SRC -${QtScript_GEN_DIR}/qscriptable_wrapper.cpp -${QtScript_GEN_DIR}/qscriptclass_wrapper.cpp -${QtScript_GEN_DIR}/qscriptclasspropertyiterator_wrapper.cpp -${QtScript_GEN_DIR}/qscriptcontext_wrapper.cpp -${QtScript_GEN_DIR}/qscriptcontextinfo_wrapper.cpp -${QtScript_GEN_DIR}/qscriptengineagent_wrapper.cpp -${QtScript_GEN_DIR}/qscriptprogram_wrapper.cpp -${QtScript_GEN_DIR}/qscriptengine_wrapper.cpp -${QtScript_GEN_DIR}/qscriptextensioninterface_wrapper.cpp -${QtScript_GEN_DIR}/qscriptextensionplugin_wrapper.cpp -${QtScript_GEN_DIR}/qscriptstring_wrapper.cpp -${QtScript_GEN_DIR}/qscriptvalue_wrapper.cpp -${QtScript_GEN_DIR}/qscriptvalueiterator_wrapper.cpp -# module is always needed -${QtScript_GEN_DIR}/qtscript_module_wrapper.cpp -) - -set(QtScript_glue_sources - "${QtScript_SOURCE_DIR}/qscript_value_iterator_glue.cpp" -) - -set(QtScript_include_dirs ${QtScript_SOURCE_DIR} - ${QtScript_BINARY_DIR} - ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} - ${Qt${QT_MAJOR_VERSION}Script_INCLUDE_DIRS} - ${libpyside_SOURCE_DIR} - ${QtCore_GEN_DIR} - ) -set(QtScript_libraries pyside2 - ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}Script_LIBRARIES}) -set(QtScript_deps QtCore) -create_pyside_module(NAME QtScript - INCLUDE_DIRS QtScript_include_dirs - LIBRARIES QtScript_libraries - DEPS QtScript_deps - TYPESYSTEM_PATH QtScript_SOURCE_DIR - SOURCES QtScript_SRC - GLUE_SOURCES QtScript_glue_sources) diff --git a/sources/pyside2/PySide2/QtScript/qscript_value_iterator_glue.cpp b/sources/pyside2/PySide2/QtScript/qscript_value_iterator_glue.cpp deleted file mode 100644 index 11dfd19b0..000000000 --- a/sources/pyside2/PySide2/QtScript/qscript_value_iterator_glue.cpp +++ /dev/null @@ -1,3 +0,0 @@ -%PYARG_0 = Shiboken::Object::newObject( - reinterpret_cast<SbkObjectType *>(Shiboken::SbkType< ::QScriptValueIterator >()), - new QScriptValueIterator(*%CPPSELF), true, true); diff --git a/sources/pyside2/PySide2/QtScript/typesystem_script.xml b/sources/pyside2/PySide2/QtScript/typesystem_script.xml deleted file mode 100644 index 1fdad5d47..000000000 --- a/sources/pyside2/PySide2/QtScript/typesystem_script.xml +++ /dev/null @@ -1,105 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt for Python. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ ---> -<typesystem package="PySide2.QtScript"> - <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/> - - <object-type name="QScriptable"/> - <object-type name="QScriptClass"> - <enum-type name="Extension"/> - <enum-type name="QueryFlag"/> - </object-type> - <object-type name="QScriptClassPropertyIterator"/> - <object-type name="QScriptContext"> - <enum-type name="Error"/> - <enum-type name="ExecutionState"/> - </object-type> - <value-type name="QScriptContextInfo"> - <enum-type name="FunctionType"/> - </value-type> - <object-type name="QScriptEngineAgent"> - <enum-type name="Extension"/> - </object-type> - <object-type name="QScriptEngine"> - <enum-type name="QObjectWrapOption" flags="QObjectWrapOptions"/> - <enum-type name="ValueOwnership"/> - <!-- Not supported BUG #957--> - <modify-function signature="scriptValueFromQMetaObject()" remove="all"/> - </object-type> - <object-type name="QScriptExtensionInterface"/> - <object-type name="QScriptExtensionPlugin"/> - <value-type name="QScriptProgram" since="4.7"/> - <value-type name="QScriptString"> - <modify-function signature="toArrayIndex(bool*)const"> - <modify-argument index="1"> - <remove-argument/> - </modify-argument> - <inject-code class="target" position="beginning"> - <insert-template name="fix_bool*"/> - </inject-code> - </modify-function> - </value-type> - <value-type name="QScriptValue"> - <enum-type name="PropertyFlag" flags="PropertyFlags"/> - <enum-type name="ResolveFlag" flags="ResolveFlags"/> - <enum-type name="SpecialValue"/> - <add-function signature="__repr__" return-type="PyObject*"> - <inject-code class="target" position="beginning" file="../glue/qtscript.cpp" snippet="qscriptvalue-repr"/> - </add-function> - <add-function signature="__mgetitem__"> - <inject-code file="../glue/qtscript.cpp" snippet="qscriptvalue-mgetitem"/> - </add-function> - <add-function signature="__iter__()" return-type="PyObject*"> - <inject-code file="qscript_value_iterator_glue.cpp"/> - </add-function> - </value-type> - <object-type name="QScriptValueIterator"> - <add-function signature="__iter__()" return-type="PyObject*"> - <inject-code> - <insert-template name="__iter__"/> - </inject-code> - </add-function> - <add-function signature="__next__()" return-type="PyObject*"> - <inject-code file="../glue/qtscript.cpp" snippet="qscriptvalueiterator-next"/> - </add-function> - </object-type> -</typesystem> - diff --git a/sources/pyside2/PySide2/QtScriptTools/CMakeLists.txt b/sources/pyside2/PySide2/QtScriptTools/CMakeLists.txt deleted file mode 100644 index 7c19856cb..000000000 --- a/sources/pyside2/PySide2/QtScriptTools/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -project(QtScriptTools) - -set(QtScriptTools_SRC -${QtScriptTools_GEN_DIR}/qscriptenginedebugger_wrapper.cpp -# module is always needed -${QtScriptTools_GEN_DIR}/qtscripttools_module_wrapper.cpp -) - -set(QtScriptTools_include_dirs ${QtScriptTools_SOURCE_DIR} - ${QtScriptTools_BINARY_DIR} - ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} - ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS} - ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS} - ${Qt${QT_MAJOR_VERSION}Script_INCLUDE_DIRS} - ${Qt${QT_MAJOR_VERSION}ScriptTools_INCLUDE_DIRS} - ${libpyside_SOURCE_DIR} - ${QtCore_GEN_DIR} - ${QtGui_GEN_DIR} - ${QtWidgets_GEN_DIR} - ${QtScript_GEN_DIR} - ) - -set(QtScriptTools_libraries pyside2 - ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}Script_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}ScriptTools_LIBRARIES}) - -set(QtScriptTools_deps QtCore QtScript QtGui QtWidgets) - -create_pyside_module(NAME QtScriptTools - INCLUDE_DIRS QtScriptTools_include_dirs - LIBRARIES QtScriptTools_libraries - DEPS QtScriptTools_deps - TYPESYSTEM_PATH QtScriptTools_SOURCE_DIR - SOURCES QtScriptTools_SRC) diff --git a/sources/pyside2/PySide2/QtScriptTools/typesystem_scripttools.xml b/sources/pyside2/PySide2/QtScriptTools/typesystem_scripttools.xml deleted file mode 100644 index eefa09a54..000000000 --- a/sources/pyside2/PySide2/QtScriptTools/typesystem_scripttools.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt for Python. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ ---> -<typesystem package="PySide2.QtScriptTools"> - <load-typesystem name="QtScript/typesystem_script.xml" generate="no"/> - <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/> - <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/> - - <object-type name="QScriptEngineDebugger"> - <enum-type name="DebuggerAction"/> - <enum-type name="DebuggerState" since="4.6"/> - <enum-type name="DebuggerWidget"/> - <extra-includes> - <include file-name="QScriptEngine" location="global"/> - </extra-includes> - </object-type> -</typesystem> diff --git a/sources/pyside2/PySide2/QtXmlPatterns/CMakeLists.txt b/sources/pyside2/PySide2/QtXmlPatterns/CMakeLists.txt deleted file mode 100644 index adc1be516..000000000 --- a/sources/pyside2/PySide2/QtXmlPatterns/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -project(QtXmlPatterns) - -set(QtXmlPatterns_SRC -${QtXmlPatterns_GEN_DIR}/qabstractmessagehandler_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qabstracturiresolver_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qabstractxmlnodemodel_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qabstractxmlreceiver_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qsourcelocation_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlformatter_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlitem_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlnamepool_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlname_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlnodemodelindex_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlquery_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlresultitems_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlschemavalidator_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlschema_wrapper.cpp -${QtXmlPatterns_GEN_DIR}/qxmlserializer_wrapper.cpp -## always needed -${QtXmlPatterns_GEN_DIR}/qtxmlpatterns_module_wrapper.cpp -) - -set(QtXmlPatterns_include_dirs ${QtXmlPatterns_SOURCE_DIR} - ${QtXmlPatterns_BINARY_DIR} - ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} - ${Qt${QT_MAJOR_VERSION}XmlPatterns_INCLUDE_DIRS} - ${libpyside_SOURCE_DIR} - ${QtCore_GEN_DIR} - ) -set(QtXmlPatterns_libraries pyside2 - ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}XmlPatterns_LIBRARIES}) -set(QtXmlPatterns_deps QtCore) - -create_pyside_module(NAME QtXmlPatterns - INCLUDE_DIRS QtXmlPatterns_include_dirs - LIBRARIES QtXmlPatterns_libraries - DEPS QtXmlPatterns_deps - TYPESYSTEM_PATH QtXmlPatterns_SOURCE_DIR - SOURCES QtXmlPatterns_SRC) - diff --git a/sources/pyside2/PySide2/QtXmlPatterns/typesystem_xmlpatterns.xml b/sources/pyside2/PySide2/QtXmlPatterns/typesystem_xmlpatterns.xml deleted file mode 100644 index 1e8eec083..000000000 --- a/sources/pyside2/PySide2/QtXmlPatterns/typesystem_xmlpatterns.xml +++ /dev/null @@ -1,122 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt for Python. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ ---> -<typesystem package="PySide2.QtXmlPatterns"> - <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/> - - <object-type name="QXmlSchema" since="4.6"/> <!-- Qt scoped pointer does not allow declare this as value type --> - <object-type name="QXmlSchemaValidator" since="4.6"> - <modify-function signature="schema()const"> - <modify-argument index="return"> - <replace-type modified-type="QXmlSchema*"/> - <define-ownership owner="target"/> - </modify-argument> - <inject-code file="../glue/qtxmlpatterns.cpp" snippet="qxmlschemavalidator-schema"/> - </modify-function> - </object-type> - <object-type name="QAbstractMessageHandler"/> - <object-type name="QAbstractUriResolver"/> - <object-type name="QAbstractXmlNodeModel"> - <enum-type name="NodeCopySetting"/> - <enum-type name="SimpleAxis"/> - </object-type> - <object-type name="QAbstractXmlReceiver"/> - <value-type name="QSourceLocation"/> - <object-type name="QXmlFormatter"/> - <value-type name="QXmlItem"/> - <value-type name="QXmlName"> - <primitive-type name="NamespaceCode"/> - <primitive-type name="PrefixCode"/> - <primitive-type name="LocalNameCode"/> - <!-- ### These methods aren't part of Qt public API --> - <modify-function signature="QXmlName(QXmlName::NamespaceCode,QXmlName::LocalNameCode,QXmlName::PrefixCode)" remove="all"/> - <modify-function signature="setNamespaceURI(QXmlName::NamespaceCode)" remove="all"/> - <modify-function signature="localName()const" remove="all"/> - <modify-function signature="prefix()const" remove="all"/> - <modify-function signature="hasPrefix()const" remove="all"/> - <modify-function signature="hasNamespace()const" remove="all"/> - <modify-function signature="namespaceURI()const" remove="all"/> - <modify-function signature="isLexicallyEqual(const QXmlName&)const" remove="all"/> - <modify-function signature="setPrefix(QXmlName::PrefixCode)" remove="all"/> - <modify-function signature="setLocalName(QXmlName::LocalNameCode)" remove="all"/> - <modify-function signature="code()const" remove="all"/> - <!-- ### --> - </value-type> - <value-type name="QXmlNamePool"/> - - <rejection class="QXmlNodeModelIndex" function-name="type"/> - <rejection class="QXmlNodeModelIndex" function-name="sequencedTypedValue"/> - <rejection class="QXmlNodeModelIndex" function-name="iterate"/> - <!-- ### This enum isn't part of Qt public API --> - <suppress-warning text="Enum 'QXmlNodeModelIndex::Axis' (class: QXmlNodeModelIndex) does not have a type entry"/> - <value-type name="QXmlNodeModelIndex"> - <enum-type name="DocumentOrder"/> - <enum-type name="NodeKind"/> - <!-- ### Qt internal methods --> - <modify-function signature="name()const" remove="all"/> - <modify-function signature="root()const" remove="all"/> - <modify-function signature="documentUri()const" remove="all"/> - <modify-function signature="baseUri()const" remove="all"/> - <modify-function signature="kind()const" remove="all"/> - <modify-function signature="isDeepEqual(const QXmlNodeModelIndex&)const" remove="all"/> - <modify-function signature="compareOrder(const QXmlNodeModelIndex &)const" remove="all"/> - <modify-function signature="sendNamespaces(QAbstractXmlReceiver*const)const" remove="all"/> - <modify-function signature="namespaceBindings()const" remove="all"/> - <modify-function signature="namespaceForPrefix(QXmlName::PrefixCode)const" remove="all"/> - <modify-function signature="stringValue()const" remove="all"/> - <modify-function signature="is(const QXmlNodeModelIndex &)const" remove="all"/> - <modify-function signature="reset()" remove="all"/> - <!-- ### --> - </value-type> - - <value-type name="QXmlQuery"> - <!-- ### TODO: must evaluate if anything other than removal is needed. --> - <enum-type name="QueryLanguage"/> - <modify-function signature="evaluateTo(QStringList*)const" remove="all"/> - <modify-function signature="evaluateTo(QString*)const" remove="all"/> - <!-- ### --> - </value-type> - <object-type name="QXmlResultItems"/> - <object-type name="QXmlSerializer"/> - - <suppress-warning text="class 'QAbstractXmlNodeModel' inherits from unknown base class 'QSharedData'"/> - <suppress-warning text="class not found for setup inheritance 'QSharedData'"/> -</typesystem> diff --git a/sources/pyside2/doc/modules.rst b/sources/pyside2/doc/modules.rst index bb4b112a1..f42fac636 100644 --- a/sources/pyside2/doc/modules.rst +++ b/sources/pyside2/doc/modules.rst @@ -78,10 +78,6 @@ Qt Modules Provides information about the X display configuration. - :mod:`Qt Xml <PySide2.QtXml>` Provides C++ implementations of SAX and DOM. - * - :mod:`Qt XmlPatterns <PySide2.QtXmlPatterns>` - Provides support for XPath, XQuery, XSLTi, and XML Schema validation. - - :mod:`Qt 3D Core <PySide2.Qt3DCore>` - Contains functionality to support near-realtime simulation systems. * - :mod:`Qt 3D Extras <PySide2.Qt3DExtras>` Provides a set of prebuilt elements to help you get started with Qt 3D. - :mod:`Qt 3D Input <PySide2.Qt3DInput>` diff --git a/sources/pyside2/doc/qtmodules/pyside-qtxmlpatterns.qdocconf.in b/sources/pyside2/doc/qtmodules/pyside-qtxmlpatterns.qdocconf.in deleted file mode 100644 index 9e132ff24..000000000 --- a/sources/pyside2/doc/qtmodules/pyside-qtxmlpatterns.qdocconf.in +++ /dev/null @@ -1,2 +0,0 @@ -include(@QT_SRC_DIR@/../qtxmlpatterns/src/xmlpatterns/doc/qtxmlpatterns.qdocconf) -include(../pyside-config.qdocconf) diff --git a/sources/pyside2/tests/QtScript/CMakeLists.txt b/sources/pyside2/tests/QtScript/CMakeLists.txt deleted file mode 100644 index dfea68df0..000000000 --- a/sources/pyside2/tests/QtScript/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -PYSIDE_TEST(base_test.py) -PYSIDE_TEST(bug_1022.py) -PYSIDE_TEST(engine_test.py) -PYSIDE_TEST(property_test.py) -PYSIDE_TEST(qscriptvalue_test.py) diff --git a/sources/pyside2/tests/QtScript/base_test.py b/sources/pyside2/tests/QtScript/base_test.py deleted file mode 100644 index 3cde8ad83..000000000 --- a/sources/pyside2/tests/QtScript/base_test.py +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -import os -import sys - -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from init_paths import init_test_paths -init_test_paths(False) - -from PySide2 import QtScript - - -#only test if the module import works fine bug #278 diff --git a/sources/pyside2/tests/QtScript/bug_1022.py b/sources/pyside2/tests/QtScript/bug_1022.py deleted file mode 100644 index 2c2699de6..000000000 --- a/sources/pyside2/tests/QtScript/bug_1022.py +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -import os -import sys -import unittest - -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from init_paths import init_test_paths -init_test_paths(False) - -from PySide2.QtCore import * -from PySide2.QtScript import * - -class QScriptValueTest(unittest.TestCase): - def testQScriptValue(self): - app = QCoreApplication([]) - engine = QScriptEngine() - repr(engine.evaluate('1 + 1')) - -if __name__ == '__main__': - unittest.main() diff --git a/sources/pyside2/tests/QtScript/engine_test.py b/sources/pyside2/tests/QtScript/engine_test.py deleted file mode 100644 index f88b98d69..000000000 --- a/sources/pyside2/tests/QtScript/engine_test.py +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -import os -import sys -import unittest - -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from init_paths import init_test_paths -init_test_paths(False) - -from PySide2.QtCore import QObject -from PySide2.QtScript import QScriptEngine - -class QScriptEngineTest(unittest.TestCase): - - def testQScriptEngine(self): - engine = QScriptEngine() - obj = engine.evaluate("({ unitName: 'Celsius', toKelvin: function(x) { return x + 273; } })") - toKelvin = obj.property("toKelvin") - result = toKelvin.call(obj, [100]) - self.assertEqual(result.toNumber(), 373) diff --git a/sources/pyside2/tests/QtScript/property_test.py b/sources/pyside2/tests/QtScript/property_test.py deleted file mode 100644 index 372bba2ba..000000000 --- a/sources/pyside2/tests/QtScript/property_test.py +++ /dev/null @@ -1,96 +0,0 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -import os -import sys -import unittest - -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from init_paths import init_test_paths -init_test_paths(False) - -from PySide2.QtCore import QObject, Property, QCoreApplication -from PySide2.QtScript import QScriptEngine - -class MyObject(QObject): - def __init__(self, parent = None): - QObject.__init__(self, parent) - self._p = 100 - - def setX(self, value): - self._p = value - - def getX(self): - return self._p - - def resetX(self): - self._p = 100 - - def delX(self): - self._p = 0 - - x = Property(int, getX, setX, resetX, delX) - - -class QPropertyTest(unittest.TestCase): - - def testSimple(self): - o = MyObject() - self.assertEqual(o.x, 100) - o.x = 42 - self.assertEqual(o.x, 42) - - def testHasProperty(self): - o = MyObject() - o.setProperty("x", 10) - self.assertEqual(o.x, 10) - self.assertEqual(o.property("x"), 10) - - def testMetaProperty(self): - o = MyObject() - m = o.metaObject() - found = False - for i in range(m.propertyCount()): - mp = m.property(i) - if mp.name() == "x": - found = True - break - self.assertTrue(found) - - def testScriptQProperty(self): - qapp = QCoreApplication([]) - myEngine = QScriptEngine() - obj = MyObject() - scriptObj = myEngine.newQObject(obj) - myEngine.globalObject().setProperty("obj", scriptObj) - myEngine.evaluate("obj.x = 42") - self.assertEqual(scriptObj.property("x").toInt32(), 42) - self.assertEqual(obj.property("x"), 42) - -if __name__ == '__main__': - unittest.main() diff --git a/sources/pyside2/tests/QtScript/qscriptvalue_test.py b/sources/pyside2/tests/QtScript/qscriptvalue_test.py deleted file mode 100644 index 06a029232..000000000 --- a/sources/pyside2/tests/QtScript/qscriptvalue_test.py +++ /dev/null @@ -1,78 +0,0 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -from __future__ import print_function - -import os -import sys -import unittest - -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from init_paths import init_test_paths -init_test_paths(False) - -from PySide2.QtScript import * - -# Required for eval() to work -import PySide2.QtScript - -from helper.usesqapplication import UsesQApplication - -class TestQScriptValue (UsesQApplication): - - def testOperator(self): - engine = QScriptEngine() - value = engine.evaluate('x = {"a": 1, "b":2}') - self.assertEqual(value['a'], 1) - self.assertRaises(KeyError, value.__getitem__, 'c') - value = engine.evaluate('x = ["x", "y", "z"]') - self.assertEqual(value[2], 'z') - self.assertRaises(IndexError, value.__getitem__, 23) - - def testRepr(self): - value = QScriptValue("somePerson = { firstName: 'John', lastName: 'Doe' }") - print(repr(value)) - value2 = eval(repr(value)) - self.assertEqual(value.toString(), value2.toString()) - self.assertEqual(value.toVariant(), value2.toVariant()) - - def testIteratorProtocol(self): - engine = QScriptEngine() - value = engine.evaluate('x = {"a": 1, "b":2}') - d = {} - for k, v in QScriptValueIterator(value): - d[k] = v - self.assertEqual(d, {'a': 1, 'b': 2}) - - d = {} - for k, v in value: - d[k] = v - self.assertEqual(d, {'a': 1, 'b': 2}) - -if __name__ == '__main__': - unittest.main() diff --git a/sources/pyside2/tests/QtScriptTools/CMakeLists.txt b/sources/pyside2/tests/QtScriptTools/CMakeLists.txt deleted file mode 100644 index ee22737c6..000000000 --- a/sources/pyside2/tests/QtScriptTools/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -PYSIDE_TEST(debugger_test.py) diff --git a/sources/pyside2/tests/QtScriptTools/debugger_test.py b/sources/pyside2/tests/QtScriptTools/debugger_test.py deleted file mode 100644 index cefe48f5b..000000000 --- a/sources/pyside2/tests/QtScriptTools/debugger_test.py +++ /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 test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -import os -import sys -import unittest - -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from init_paths import init_test_paths -init_test_paths(False) - -from PySide2.QtCore import SIGNAL, QTimer -from PySide2.QtScript import QScriptEngine -from PySide2.QtScriptTools import QScriptEngineDebugger - -from helper.usesqapplication import UsesQApplication - -class DebuggerTest(UsesQApplication): - - def setUp(self): - UsesQApplication.setUp(self) - self.engine = QScriptEngine() - self.debugger = QScriptEngineDebugger() - self.has_suspended = 0 - self.has_resumed = 0 - self.count = 3 - - def suspended(self): - self.has_suspended += 1 - # Will emit evaluationResumed until there are more instructions to be run - QTimer.singleShot(100, self.debugger.action(QScriptEngineDebugger.StepIntoAction).trigger) - - def resumed(self): - # Will be called when debugger.state() change from Suspended to Running - # except for the first time. - self.has_resumed += 1 - - def testBasic(self): - '''Interrupt and resume evaluation with QScriptEngineDebugger''' - - self.debugger.attachTo(self.engine) - self.debugger.setAutoShowStandardWindow(False) - self.debugger.connect(SIGNAL('evaluationSuspended()'), self.suspended) - self.debugger.connect(SIGNAL('evaluationResumed()'), self.resumed) - - # For some reason StepIntoAction does not actually continue execution, and thus interrupting - # causes the test to hang. The same behavior is present in a Qt5.6 C++ code equivalent. It - # seems like a bug in QtScript, thus the interruption is commented out for now, which will - # force the test to fail. - #self.debugger.action(QScriptEngineDebugger.InterruptAction).trigger() - self.engine.evaluate("3+4\n2+1\n5+1") - self.assertTrue(self.has_resumed >= 1) - self.assertTrue(self.has_suspended >= 1) - -if __name__ == '__main__': - unittest.main() diff --git a/sources/pyside2/tests/QtXmlPatterns/CMakeLists.txt b/sources/pyside2/tests/QtXmlPatterns/CMakeLists.txt deleted file mode 100644 index 7f570f156..000000000 --- a/sources/pyside2/tests/QtXmlPatterns/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -PYSIDE_TEST(import_test.py) diff --git a/sources/pyside2/tests/QtXmlPatterns/import_test.py b/sources/pyside2/tests/QtXmlPatterns/import_test.py deleted file mode 100644 index e60034e0d..000000000 --- a/sources/pyside2/tests/QtXmlPatterns/import_test.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/python - -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -import os -import sys -import unittest - -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from init_paths import init_test_paths -init_test_paths(False) - -from PySide2.QtCore import * -from PySide2.QtXmlPatterns import QXmlSchema -from helper.usesqcoreapplication import UsesQCoreApplication - - -class QXmlPatternsTest(UsesQCoreApplication): - - def testSchema(self): - data = QByteArray(py3k.b('''<?xml version=\"1.0\" encoding=\"UTF-8\"?> - <xsd:schema - xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" - xmlns=\"http://qt.nokia.com/xmlschematest\" - targetNamespace=\"http://qt.nokia.com/xmlschematest\" - version=\"1.0\" - elementFormDefault=\"qualified\"> - </xsd:schema>''')) - - buf = QBuffer(data) - buf.open(QIODevice.ReadOnly) - - schema = QXmlSchema() - schema.load(buf) - self.assertTrue(schema.isValid()) - - -if __name__ == '__main__': - unittest.main() - diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt index 1e135a46e..ec6f0ff18 100644 --- a/sources/shiboken2/ApiExtractor/CMakeLists.txt +++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt @@ -31,7 +31,6 @@ parser/enumvalue.cpp xmlutils.cpp ) -find_package(Qt${QT_MAJOR_VERSION}XmlPatterns 5.12) find_package(Qt${QT_MAJOR_VERSION}Xml 5.12) find_package(LibXml2 2.6.32) find_package(LibXslt 1.1.19) @@ -41,7 +40,7 @@ if (LIBXSLT_FOUND AND LIBXML2_FOUND) set(HAS_LIBXSLT 1) endif() -if(NOT Qt${QT_MAJOR_VERSION}XmlPatterns_FOUND AND NOT HAS_LIBXSLT) +if(NOT HAS_LIBXSLT) set(DISABLE_DOCSTRINGS TRUE) message(WARNING "Documentation will not be built due to missing dependency (no Qt5XmlPatterns found).") @@ -67,20 +66,10 @@ if (HAS_LIBXSLT) PRIVATE ${LIBXSLT_LIBRARIES} ${LIBXML2_LIBRARIES}) endif() -if (Qt${QT_MAJOR_VERSION}XmlPatterns_FOUND) - target_compile_definitions(apiextractor PUBLIC HAVE_QTXMLPATTERNS) - target_sources(apiextractor PRIVATE xmlutils_qt.cpp) - target_link_libraries(apiextractor PUBLIC Qt${QT_MAJOR_VERSION}::Xml Qt${QT_MAJOR_VERSION}::XmlPatterns) -endif() - if (NOT DISABLE_DOCSTRINGS) target_sources(apiextractor PRIVATE docparser.cpp doxygenparser.cpp qtdocparser.cpp) - if (NOT HAS_LIBXSLT) - message(WARNING - "libxslt and/or libxml not found, falling back to QtXmlPatterns (QTBUG-66925)") - endif() endif() target_compile_definitions(apiextractor PRIVATE CMAKE_CXX_COMPILER="${CMAKE_CXX_COMPILER}") diff --git a/sources/shiboken2/ApiExtractor/xmlutils.cpp b/sources/shiboken2/ApiExtractor/xmlutils.cpp index a179412a7..6edca2fa5 100644 --- a/sources/shiboken2/ApiExtractor/xmlutils.cpp +++ b/sources/shiboken2/ApiExtractor/xmlutils.cpp @@ -28,7 +28,6 @@ #include "xmlutils.h" -#include "xmlutils_qt.h" #include "xmlutils_libxslt.h" XQuery::XQuery() = default; @@ -47,8 +46,6 @@ QSharedPointer<XQuery> XQuery::create(const QString &focus, QString *errorMessag { #if defined(HAVE_LIBXSLT) return libXml_createXQuery(focus, errorMessage); -#elif defined(HAVE_QTXMLPATTERNS) - return qt_createXQuery(focus, errorMessage); #else *errorMessage = QLatin1String(__FUNCTION__) + QLatin1String(" is not implemented."); return QSharedPointer<XQuery>(); @@ -59,8 +56,6 @@ QString xsl_transform(const QString &xml, const QString &xsl, QString *errorMess { #if defined(HAVE_LIBXSLT) return libXslt_transform(xml, xsl, errorMessage); -#elif defined(HAVE_QTXMLPATTERNS) - return qt_xsl_transform(xml, xsl, errorMessage); #else *errorMessage = QLatin1String(__FUNCTION__) + QLatin1String(" is not implemented."); return xml; diff --git a/sources/shiboken2/ApiExtractor/xmlutils_qt.cpp b/sources/shiboken2/ApiExtractor/xmlutils_qt.cpp deleted file mode 100644 index f703bc5f9..000000000 --- a/sources/shiboken2/ApiExtractor/xmlutils_qt.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt for Python. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "xmlutils.h" -#include "xmlutils_qt.h" - -#include <QtXmlPatterns/QXmlQuery> - -#include <QtCore/QDir> -#include <QtCore/QUrl> - -class QtXQuery : public XQuery -{ -public: - QtXQuery() = default; - - bool setFocus(const QString &fileName) - { return m_xquery.setFocus(QUrl::fromLocalFile(fileName)); } - -protected: - QString doEvaluate(const QString &xPathExpression, QString *errorMessage) override; - -private: - QXmlQuery m_xquery; -}; - -QString QtXQuery::doEvaluate(const QString &xPathExpression, QString *errorMessage) -{ - m_xquery.setQuery(xPathExpression); - if (!m_xquery.isValid()) { - *errorMessage = QLatin1String("QXmlQuery: Bad query: \"") + xPathExpression - + QLatin1Char('"'); - return QString(); - } - - QString result; - m_xquery.evaluateTo(&result); - return result; -} - -QSharedPointer<XQuery> qt_createXQuery(const QString &focus, QString *errorMessage) -{ - QSharedPointer<QtXQuery> result(new QtXQuery); - if (!result->setFocus(focus)) { - *errorMessage = QLatin1String("QXmlQuery: Cannot set focus to ") + QDir::toNativeSeparators(focus); - result.reset(); - } - return std::move(result); -} - -// XSLT transformation - -static const char xsltPrefix[] = R"(<?xml version="1.0" encoding="UTF-8"?> - <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -)"; - -QString qt_xsl_transform(const QString &xml, QString xsl, QString *errorMessage) -{ - QXmlQuery query(QXmlQuery::XSLT20); - if (!xsl.startsWith(QLatin1String("<?xml"))) { - xsl.prepend(QLatin1String(xsltPrefix)); - xsl.append(QLatin1String("</xsl:stylesheet>")); - } - query.setFocus(xml); - query.setQuery(xsl); - if (!query.isValid()) { - *errorMessage = QLatin1String("QXmlQuery: Invalid query \"") + xsl - + QLatin1String("\"."); - return xml; - } - QString result; - if (!query.evaluateTo(&result)) { - *errorMessage = QLatin1String("QXmlQuery: evaluate() failed."); - return xml; - } - return result.trimmed(); -} |