diff options
Diffstat (limited to 'sources/pyside6')
6 files changed, 36 insertions, 9 deletions
diff --git a/sources/pyside6/PySide6/QtCore/CMakeLists.txt b/sources/pyside6/PySide6/QtCore/CMakeLists.txt index d559f9d96..fff6cc8b0 100644 --- a/sources/pyside6/PySide6/QtCore/CMakeLists.txt +++ b/sources/pyside6/PySide6/QtCore/CMakeLists.txt @@ -19,9 +19,6 @@ if(ENABLE_WIN) set(SPECIFIC_OS_FILES ${QtCore_GEN_DIR}/qwineventnotifier_wrapper.cpp ) -else() - set(SPECIFIC_OS_FILES - ${QtCore_GEN_DIR}/qprocess_unixprocessparameters_wrapper.cpp) endif() set(QtCore_SRC @@ -130,8 +127,6 @@ ${QtCore_GEN_DIR}/qpersistentmodelindex_wrapper.cpp ${QtCore_GEN_DIR}/qpluginloader_wrapper.cpp ${QtCore_GEN_DIR}/qpoint_wrapper.cpp ${QtCore_GEN_DIR}/qpointf_wrapper.cpp -${QtCore_GEN_DIR}/qprocess_wrapper.cpp -${QtCore_GEN_DIR}/qprocessenvironment_wrapper.cpp ${QtCore_GEN_DIR}/qpropertyanimation_wrapper.cpp ${QtCore_GEN_DIR}/qrandomgenerator64_wrapper.cpp ${QtCore_GEN_DIR}/qrandomgenerator_wrapper.cpp @@ -236,6 +231,23 @@ else() list(APPEND QtCore_SRC ${QtCore_GEN_DIR}/qsharedmemory_wrapper.cpp) endif() +if("process" IN_LIST QtCore_disabled_features) + list(APPEND QtCore_DROPPED_ENTRIES QProcess) + message(STATUS "Qt${QT_MAJOR_VERSION}Core: Dropping QProcess") +else() + list(APPEND QtCore_SRC ${QtCore_GEN_DIR}/qprocess_wrapper.cpp) + if(NOT ENABLE_WIN) + list(APPEND QtCore_SRC ${QtCore_GEN_DIR}/qprocess_unixprocessparameters_wrapper.cpp) + endif() +endif() + +if("processenvironment" IN_LIST QtCore_disabled_features) + list(APPEND QtCore_DROPPED_ENTRIES QProcessEnvironment) + message(STATUS "Qt${QT_MAJOR_VERSION}Core: Dropping QProcessEnvironment") +else() + list(APPEND QtCore_SRC ${QtCore_GEN_DIR}/qprocessenvironment_wrapper.cpp) +endif() + configure_file("${QtCore_SOURCE_DIR}/QtCore_global.post.h.in" "${QtCore_BINARY_DIR}/QtCore_global.post.h" @ONLY) diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml index c3130ccb2..26c3ecab1 100644 --- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml +++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml @@ -2669,7 +2669,9 @@ <?if !windows?> <enum-type name="UnixProcessFlag" flags="UnixProcessFlags" since="6.6"/> - <value-type name="UnixProcessParameters" since="6.6"/> + <value-type name="UnixProcessParameters"> + <configuration condition="QT_CONFIG(process)"/> + </value-type> <?endif?> <modify-function signature="waitForStarted(int)" allow-thread="yes"/> diff --git a/sources/pyside6/cmake/PySideSetup.cmake b/sources/pyside6/cmake/PySideSetup.cmake index 45a63a1a0..a3bc1c738 100644 --- a/sources/pyside6/cmake/PySideSetup.cmake +++ b/sources/pyside6/cmake/PySideSetup.cmake @@ -246,6 +246,7 @@ ENDIF() set(GENERATOR_EXTRA_FLAGS ${SHIBOKEN_GENERATOR_EXTRA_FLAGS} ${debug_level} + "--platform=${CMAKE_SYSTEM_NAME}" ${UNOPTIMIZE} --generator-set=shiboken --enable-parent-ctor-heuristic diff --git a/sources/pyside6/libpyside/pysidevariantutils.cpp b/sources/pyside6/libpyside/pysidevariantutils.cpp index 7dbfb3afc..729557919 100644 --- a/sources/pyside6/libpyside/pysidevariantutils.cpp +++ b/sources/pyside6/libpyside/pysidevariantutils.cpp @@ -125,8 +125,12 @@ QMetaType resolveMetaType(PyTypeObject *type) // PYSIDE-1887, PYSIDE-86: Skip QObject base class of QGraphicsObject; // it needs to use always QGraphicsItem as a QVariant type for // QGraphicsItem::itemChange() to work. - if (qstrcmp(typeName, "QGraphicsObject*") == 0) - ++i; + if (qstrcmp(typeName, "QGraphicsObject*") == 0 && size > 1) { + auto *firstBaseType = reinterpret_cast<PyTypeObject *>(PyTuple_GetItem(type->tp_bases, 0)); + const char *firstBaseTypeName = Shiboken::ObjectType::getOriginalName(firstBaseType); + if (firstBaseTypeName != nullptr && qstrcmp(firstBaseTypeName, "QObject*") == 0) + ++i; + } for ( ; i < size; ++i) { auto baseType = reinterpret_cast<PyTypeObject *>(PyTuple_GetItem(type->tp_bases, i)); const QMetaType derived = resolveMetaType(baseType); diff --git a/sources/pyside6/tests/QtWidgets/qgraphicsobjectreimpl_test.py b/sources/pyside6/tests/QtWidgets/qgraphicsobjectreimpl_test.py index 91b405aaf..7ae29d1f7 100644 --- a/sources/pyside6/tests/QtWidgets/qgraphicsobjectreimpl_test.py +++ b/sources/pyside6/tests/QtWidgets/qgraphicsobjectreimpl_test.py @@ -53,8 +53,16 @@ class QGraphicsObjectReimpl(UsesQApplication): # See also PYSIDE-1887, PYSIDE-3069 gobjA = GObjA() gobjA.setParentItem(w) + print(gobjA.parentItem()) self.assertIs(type(w), type(gobjA.parentItem())) + # PYSIDE-3115: QVariant conversion of the parent + # (Python class inheriting QGraphicsObject). + parentA = GObjA() + gobjA = GObjA() + gobjA.setParentItem(parentA) + self.assertIs(type(parentA), type(gobjA.parentItem())) + gobjB = GObjB() gobjB.setParentItem(w) self.assertIs(type(w), type(gobjB.parentItem())) diff --git a/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py b/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py index 120c54af3..14330726a 100644 --- a/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py +++ b/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py @@ -36,7 +36,7 @@ class DeployTestBase(unittest.TestCase): android_requirements_file = pyside_tools / "requirements-android.txt" with open(android_requirements_file, 'r', encoding='UTF-8') as file: while line := file.readline(): - dependent_package = line.rstrip() + dependent_package = line.rstrip().split('==')[0] if not bool(importlib.util.find_spec(dependent_package)): command = [sys.executable, "-m", "pip", "install", dependent_package] subprocess.run(command) |