aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-23 14:32:38 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-02 08:48:43 +0000
commit82934bc00c2de7ea51fd7e95601472fcdf7b6aea (patch)
treececc2542b0c18c5160cd5fb656f684327336352f /sources/pyside2
parent908c89e9c08297ca854e7c2064b93368d215d0b2 (diff)
Adapt to recent changes in qtbase
- Remove QProcess::pid(), adapt test (qtbase/0f8848b7e25e4d8fb9265ff6e0aa31946addd741) - Remove enum from QPrinter - Add enum GrabTransition to QPointingDevice - Remove deprecated functions from QByteArray, QXmlStreamAttributes - Adapt Qml tests - Remove fake property from QLayout Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I98cc90723cbeda15b23c5b22d026cb2ab9a358ff Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml7
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml1
-rw-r--r--sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml1
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml2
-rw-r--r--sources/pyside2/PySide2/glue/qtcore.cpp11
-rw-r--r--sources/pyside2/tests/QtCore/qprocess_test.py2
-rw-r--r--sources/pyside2/tests/QtQml/qquickview_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/qvariant_test.py2
8 files changed, 7 insertions, 26 deletions
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
index 46e3c6fe6..144e16ffc 100644
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
+++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
@@ -1805,7 +1805,6 @@
<!-- ### These overloads must be removed accept strings with \x00 in their contents -->
<modify-function signature="append(const char*)" remove="all"/>
<modify-function signature="prepend(const char*)" remove="all"/>
- <modify-function signature="replace(QByteArray,const char*)" remove="all"/>
<modify-function signature="operator==(const char*,QByteArray)" remove="all"/>
<modify-function signature="operator==(QByteArray,const char*)" remove="all"/>
<modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
@@ -2321,11 +2320,6 @@
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qprocess-startdetached"/>
</modify-function>
- <!-- Function removed because on windows it returns a win32 specific structure -->
- <modify-function signature="pid()const" remove="all"/>
- <add-function signature="pid()" return-type="long">
- <inject-code file="../glue/qtcore.cpp" snippet="qprocess-pid"/>
- </add-function>
</object-type>
<object-type name="QSignalMapper"/>
@@ -2674,7 +2668,6 @@
<modify-function signature="toList()const" remove="all"/>
<!-- Remove methods from QList -->
<modify-function signature="value(qsizetype,const QXmlStreamAttribute&amp;) const" remove="all"/>
- <modify-function signature="value(qsizetype) const" remove="all"/>
<modify-function signature="fromList(const QList&lt;QXmlStreamAttribute&gt; &amp;)" remove="all"/>
<modify-function signature="operator+=(QVector&lt;QXmlStreamAttribute&gt;)" remove="all"/>
<!-- Expose operator==, != inherited from QList, which the parser does
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
index f3456e646..88c19360a 100644
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
+++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
@@ -2803,6 +2803,7 @@
<object-type name="QPdfWriter"/>
<object-type name="QPointingDevice" since="6.0">
<enum-type name="PointerType" flags="PointerTypes"/>
+ <enum-type name="GrabTransition"/>
</object-type>
<value-type name="QPointingDeviceUniqueId"/>
<value-type name="QRawFont">
diff --git a/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml b/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml
index 487103875..f51edf67a 100644
--- a/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml
+++ b/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml
@@ -64,7 +64,6 @@
<object-type name="QPrinter" >
<enum-type name="ColorMode"/>
<enum-type name="DuplexMode"/>
- <enum-type name="Orientation"/>
<enum-type name="OutputFormat"/>
<enum-type name="PageOrder"/>
<enum-type name="PaperSource"/>
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
index be53f97de..d067e1aba 100644
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
+++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
@@ -1182,8 +1182,6 @@
<object-type name="QLayout">
<inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
- <!-- Becomes a real Q_OPROPERTY in Qt 6 -->
- <property name="contentsMargins" type="QMargins" get="contentsMargins" set="setContentsMargins"/>
<enum-type name="SizeConstraint"/>
<modify-function signature="itemAt(int)const">
diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp
index eb8d6dff4..e9c60aeac 100644
--- a/sources/pyside2/PySide2/glue/qtcore.cpp
+++ b/sources/pyside2/PySide2/glue/qtcore.cpp
@@ -1352,17 +1352,6 @@ PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval));
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[qint64](pid));
// @snippet qprocess-startdetached
-// @snippet qprocess-pid
-long result;
-#ifdef WIN32
- _PROCESS_INFORMATION *procInfo = %CPPSELF.%FUNCTION_NAME();
- result = procInfo ? procInfo->dwProcessId : 0;
-#else
- result = %CPPSELF.%FUNCTION_NAME();
-#endif
-%PYARG_0 = %CONVERTTOPYTHON[long](result);
-// @snippet qprocess-pid
-
// @snippet qcoreapplication-init
static void QCoreApplicationConstructor(PyObject *self, PyObject *pyargv, QCoreApplicationWrapper **cptr)
{
diff --git a/sources/pyside2/tests/QtCore/qprocess_test.py b/sources/pyside2/tests/QtCore/qprocess_test.py
index daaf0843b..1667f37b3 100644
--- a/sources/pyside2/tests/QtCore/qprocess_test.py
+++ b/sources/pyside2/tests/QtCore/qprocess_test.py
@@ -50,7 +50,7 @@ class TestQProcess (unittest.TestCase):
p = QProcess()
p.start("dir", [])
p.waitForStarted()
- pid = p.pid()
+ pid = p.processId()
# We can't test the pid method result because it returns 0 when the
# process isn't running
if p.state() == QProcess.Running:
diff --git a/sources/pyside2/tests/QtQml/qquickview_test.py b/sources/pyside2/tests/QtQml/qquickview_test.py
index 0b723612e..9694cf56e 100644
--- a/sources/pyside2/tests/QtQml/qquickview_test.py
+++ b/sources/pyside2/tests/QtQml/qquickview_test.py
@@ -40,7 +40,7 @@ from helper.helper import adjust_filename
from helper.timedqapplication import TimedQApplication
from PySide2.QtCore import QUrl, QObject, Property, Slot
-from PySide2.QtQml import QtQml
+from PySide2.QtQml import QtQml, QQmlEngine
from PySide2.QtQuick import QQuickView
class MyObject(QObject):
@@ -76,8 +76,9 @@ class TestQQuickView(TimedQApplication):
self.assertEqual(view.status(), QQuickView.Ready)
rootObject = view.rootObject()
self.assertTrue(rootObject)
- self.assertTrue(QtQml.qmlEngine(rootObject))
- self.assertTrue(QtQml.qmlContext(rootObject))
+ context = QQmlEngine.contextForObject(rootObject)
+ self.assertTrue(context)
+ self.assertTrue(context.engine())
def testModelExport(self):
view = QQuickView()
diff --git a/sources/pyside2/tests/pysidetest/qvariant_test.py b/sources/pyside2/tests/pysidetest/qvariant_test.py
index 0efece889..547cca441 100644
--- a/sources/pyside2/tests/pysidetest/qvariant_test.py
+++ b/sources/pyside2/tests/pysidetest/qvariant_test.py
@@ -45,7 +45,7 @@ class QVariantTest(UsesQApplication):
def testQKeySequenceQVariantOperator(self):
# bug #775
ks = QKeySequence(Qt.SHIFT, Qt.CTRL, Qt.Key_P, Qt.Key_R)
- self.assertEqual(TestObject.checkType(ks), 75)
+ self.assertEqual(TestObject.checkType(ks), 4107)
if __name__ == '__main__':
unittest.main()