diff options
Diffstat (limited to 'sources/pyside2')
15 files changed, 24 insertions, 20 deletions
diff --git a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml index ca7646421..5932365a7 100644 --- a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml +++ b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml @@ -72,7 +72,7 @@ <object-type name="QChart" since="5.7"> <enum-type name="ChartType"/> <enum-type name="ChartTheme"/> - <enum-type name="AnimationOption"/> + <enum-type name="AnimationOption" flags="AnimationOptions"/> <modify-function signature="addSeries(QAbstractSeries*)"> <modify-argument index="1"> <parent index="this" action="add"/> diff --git a/sources/pyside2/PySide2/QtCore/CMakeLists.txt b/sources/pyside2/PySide2/QtCore/CMakeLists.txt index f2770f802..5a8a41ec5 100644 --- a/sources/pyside2/PySide2/QtCore/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtCore/CMakeLists.txt @@ -121,6 +121,7 @@ ${QtCore_GEN_DIR}/qstatemachine_signalevent_wrapper.cpp ${QtCore_GEN_DIR}/qstatemachine_wrappedevent_wrapper.cpp ${QtCore_GEN_DIR}/qstatemachine_wrapper.cpp ${QtCore_GEN_DIR}/qstorageinfo_wrapper.cpp +${QtCore_GEN_DIR}/qstringlistmodel_wrapper.cpp ${QtCore_GEN_DIR}/qsysinfo_wrapper.cpp ${QtCore_GEN_DIR}/qsystemsemaphore_wrapper.cpp ${QtCore_GEN_DIR}/qt_wrapper.cpp diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index 2b838945d..360cc3983 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -4226,6 +4226,7 @@ s1.addTransition(button.clicked, s1h)</code> <object-type name="QRunnable"/> <object-type name="QPluginLoader"/> + <object-type name="QStringListModel"/> <suppress-warning text="Unable to decide type of property: 'QLibrary::LoadHints' in class 'QPluginLoader'" /> <suppress-warning text="enum '_ISalnum' does not have a type entry or is not an enum" /> diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt index 784280ca6..807f9b31e 100644 --- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt @@ -121,7 +121,6 @@ ${QtGui_GEN_DIR}/qshowevent_wrapper.cpp ${QtGui_GEN_DIR}/qstandarditem_wrapper.cpp ${QtGui_GEN_DIR}/qstandarditemmodel_wrapper.cpp ${QtGui_GEN_DIR}/qstatustipevent_wrapper.cpp -${QtGui_GEN_DIR}/qstringlistmodel_wrapper.cpp ${QtGui_GEN_DIR}/qopenglbuffer_wrapper.cpp ${QtGui_GEN_DIR}/qopenglcontext_wrapper.cpp ${QtGui_GEN_DIR}/qaccessible_wrapper.cpp diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml index 0f6d48968..0c43fde1f 100644 --- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml +++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml @@ -1655,7 +1655,6 @@ <!-- ??? --> <modify-function signature="operator<(QStandardItem)const" remove="all"/> </object-type> - <object-type name="QStringListModel"/> <object-type name="QSyntaxHighlighter"> <modify-function signature="setCurrentBlockUserData(QTextBlockUserData*)"> <modify-argument index="1"> @@ -1762,7 +1761,7 @@ <object-type name="QDropEvent" polymorphic-id-expression="%1->type() == QEvent::Drop"> <modify-function signature="source() const"> <modify-argument index="return"> - <define-ownership owner="target"/> + <define-ownership class="target" owner="default" /> </modify-argument> </modify-function> </object-type> diff --git a/sources/pyside2/doc/inheritance_diagram.py b/sources/pyside2/doc/inheritance_diagram.py index 038c22f29..054cb7be9 100644 --- a/sources/pyside2/doc/inheritance_diagram.py +++ b/sources/pyside2/doc/inheritance_diagram.py @@ -47,10 +47,9 @@ except ImportError: from md5 import md5 from docutils import nodes -from docutils.parsers.rst import directives +from docutils.parsers.rst import directives, Directive from sphinx.ext.graphviz import render_dot_html, render_dot_latex -from sphinx.util.compat import Directive class InheritanceException(Exception): pass diff --git a/sources/pyside2/tests/QtGui/CMakeLists.txt b/sources/pyside2/tests/QtGui/CMakeLists.txt index eeb7c7e36..b487a2401 100644 --- a/sources/pyside2/tests/QtGui/CMakeLists.txt +++ b/sources/pyside2/tests/QtGui/CMakeLists.txt @@ -3,7 +3,6 @@ PYSIDE_TEST(bug_300_test.py) PYSIDE_TEST(bug_367.py) PYSIDE_TEST(bug_480.py) -PYSIDE_TEST(bug_500.py) PYSIDE_TEST(bug_606.py) PYSIDE_TEST(bug_617.py) PYSIDE_TEST(bug_652.py) diff --git a/sources/pyside2/tests/QtGui/bug_300_test.py b/sources/pyside2/tests/QtGui/bug_300_test.py index 1ab71569a..e8adca014 100644 --- a/sources/pyside2/tests/QtGui/bug_300_test.py +++ b/sources/pyside2/tests/QtGui/bug_300_test.py @@ -26,8 +26,7 @@ ## ############################################################################# -from PySide2.QtGui import QStringListModel -from PySide2.QtCore import QModelIndex +from PySide2.QtCore import QModelIndex, QStringListModel import unittest class TestQAbstractItemModelSignals(unittest.TestCase): diff --git a/sources/pyside2/tests/QtGui/bug_716.py b/sources/pyside2/tests/QtGui/bug_716.py index 49a329bc2..8bf07d6e2 100644 --- a/sources/pyside2/tests/QtGui/bug_716.py +++ b/sources/pyside2/tests/QtGui/bug_716.py @@ -26,8 +26,7 @@ ## ############################################################################# -from PySide2.QtCore import Qt, QPersistentModelIndex -from PySide2.QtGui import QStringListModel +from PySide2.QtCore import Qt, QPersistentModelIndex, QStringListModel if __name__ == '__main__': stringListModel = QStringListModel(['one', 'two']) diff --git a/sources/pyside2/tests/QtPrintSupport/CMakeLists.txt b/sources/pyside2/tests/QtPrintSupport/CMakeLists.txt index 2f7cb08b9..510c5fe0b 100644 --- a/sources/pyside2/tests/QtPrintSupport/CMakeLists.txt +++ b/sources/pyside2/tests/QtPrintSupport/CMakeLists.txt @@ -1 +1,2 @@ -# Please add some tests, here +PYSIDE_TEST(bug_500.py) +PYSIDE_TEST(returnquadruplesofnumbers_test.py) diff --git a/sources/pyside2/tests/QtGui/bug_500.py b/sources/pyside2/tests/QtPrintSupport/bug_500.py index b6f941633..b6f941633 100644 --- a/sources/pyside2/tests/QtGui/bug_500.py +++ b/sources/pyside2/tests/QtPrintSupport/bug_500.py diff --git a/sources/pyside2/tests/QtWidgets/returnquadruplesofnumbers_test.py b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py index 6e4cfeb63..f6f2490f0 100644 --- a/sources/pyside2/tests/QtWidgets/returnquadruplesofnumbers_test.py +++ b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py @@ -30,7 +30,7 @@ from __future__ import print_function import unittest from PySide2.QtGui import QTextCursor -from PySide2.QtPrintSupport import QPrinter +from PySide2.QtPrintSupport import QPrinter, QPrinterInfo from PySide2.QtWidgets import QLayout, QWidget, QGraphicsLayout, QGraphicsLayoutItem from helper import UsesQApplication @@ -81,14 +81,22 @@ class ReturnsQuadruplesOfNumbers(UsesQApplication): self.assertEqual(obj.selectedTableCells(), (-1, -1, -1, -1)) def testQPrinterGetPageMargins(self): - # Bug #742 - obj = QPrinter() + # Bug #742. Find a printer like PDF/XPS on which arbitrary margins can be set. + printer = None + for printerInfo in QPrinterInfo.availablePrinters(): + name = printerInfo.printerName().lower() + if "xps" in name or "pdf" in name: + printer = QPrinter(printerInfo) + break + if not printer: + printer = QPrinter() # On macOS the minimum margin of a page is ~12, setting something lower than that will # actually fail to set all the margins. values = (15.0, 16.0, 17.0, 18.0, QPrinter.Point) - obj.setPageMargins(*values) - print(obj.getPageMargins(QPrinter.Point), values[:-1]) - self.assertTrue(self.compareTuples(obj.getPageMargins(QPrinter.Point), values[:-1])) + printer.setPageMargins(*values) + actual = printer.getPageMargins(QPrinter.Point) + print(printer.printerName(), actual, values[:-1]) + self.assertTrue(self.compareTuples(actual, values[:-1])) if __name__ == "__main__": unittest.main() diff --git a/sources/pyside2/tests/QtTest/CMakeLists.txt b/sources/pyside2/tests/QtTest/CMakeLists.txt index 2a95b70f7..cf72dfa5c 100644 --- a/sources/pyside2/tests/QtTest/CMakeLists.txt +++ b/sources/pyside2/tests/QtTest/CMakeLists.txt @@ -2,3 +2,4 @@ PYSIDE_TEST(click_test.py) PYSIDE_TEST(eventfilter_test.py) # The test is currently permanently broken, needs to be fixed. #PYSIDE_TEST(touchevent_test.py) +PYSIDE_TEST(qvalidator_test.py) diff --git a/sources/pyside2/tests/QtWidgets/qvalidator_test.py b/sources/pyside2/tests/QtTest/qvalidator_test.py index dd5eaadb3..dd5eaadb3 100644 --- a/sources/pyside2/tests/QtWidgets/qvalidator_test.py +++ b/sources/pyside2/tests/QtTest/qvalidator_test.py diff --git a/sources/pyside2/tests/QtWidgets/CMakeLists.txt b/sources/pyside2/tests/QtWidgets/CMakeLists.txt index 4efd9d803..fa64d1c3b 100644 --- a/sources/pyside2/tests/QtWidgets/CMakeLists.txt +++ b/sources/pyside2/tests/QtWidgets/CMakeLists.txt @@ -123,13 +123,11 @@ PYSIDE_TEST(qtextedit_signal_test.py) PYSIDE_TEST(qtreeview_test.py) PYSIDE_TEST(qtoolbar_test.py) PYSIDE_TEST(qtoolbox_test.py) -PYSIDE_TEST(qvalidator_test.py) PYSIDE_TEST(qvariant_test.py) PYSIDE_TEST(qwidget_setlayout_test.py) PYSIDE_TEST(qwidget_test.py) PYSIDE_TEST(qcolormap_test.py) PYSIDE_TEST(reference_count_test.py) -PYSIDE_TEST(returnquadruplesofnumbers_test.py) PYSIDE_TEST(standardpixmap_test.py) PYSIDE_TEST(test_module_template.py) PYSIDE_TEST(virtual_protected_inheritance_test.py) |