aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/samplebinding/CMakeLists.txt20
-rw-r--r--sources/pyside2/PySide2/QtCharts/typesystem_charts.xml13
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml13
-rw-r--r--sources/pyside2/PySide2/glue/qtcore.cpp2
4 files changed, 28 insertions, 20 deletions
diff --git a/examples/samplebinding/CMakeLists.txt b/examples/samplebinding/CMakeLists.txt
index 3852ed36f..cb61358bf 100644
--- a/examples/samplebinding/CMakeLists.txt
+++ b/examples/samplebinding/CMakeLists.txt
@@ -180,6 +180,7 @@ endif()
# ================================= Dubious deployment section ================================
+set(windows_shiboken_shared_libraries)
if(WIN32)
# =========================================================================================
@@ -202,22 +203,12 @@ if(WIN32)
set_target_properties(${bindings_library}
PROPERTIES LINK_FLAGS "${python_additional_link_flags}")
- # Add custom target to hard-link shiboken shared libraries into the build folder, so that
+ # Compile a list of shiboken shared libraries to be installed, so that
# the user doesn't have to set the PATH manually to point to the PySide2 package.
foreach(library_path ${shiboken_shared_libraries})
string(REGEX REPLACE ".lib$" ".dll" library_path ${library_path})
- get_filename_component(base_name ${library_path} NAME)
- file(TO_NATIVE_PATH ${library_path} source_path)
- file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${base_name}" dest_path)
- add_custom_command(OUTPUT "${base_name}"
- COMMAND mklink /H "${dest_path}" "${source_path}"
- DEPENDS ${library_path}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMENT "Creating hardlink to shiboken shared library ${base_name}")
-
- # Fake target that depends on the previous one, but has special ALL keyword, which means
- # it will always be executed.
- add_custom_target("fake_${base_name}" ALL DEPENDS ${base_name})
+ file(TO_CMAKE_PATH ${library_path} library_path)
+ list(APPEND windows_shiboken_shared_libraries "${library_path}")
endforeach()
# =========================================================================================
# !!! End of dubious section.
@@ -233,7 +224,8 @@ endif()
install(TARGETS ${bindings_library} ${sample_library}
LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}
RUNTIME DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}
- )
+ )
+install(FILES ${windows_shiboken_shared_libraries} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
# =============================================================================================
# !!! End of dubious section.
# =============================================================================================
diff --git a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml
index a14177586..967118cd9 100644
--- a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml
+++ b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml
@@ -75,7 +75,18 @@
<enum-type name="SeriesType"/>
</object-type>
<object-type name="QAreaLegendMarker" since="5.7"/>
- <object-type name="QAreaSeries" since="5.7"/>
+ <object-type name="QAreaSeries" since="5.7">
+ <modify-function signature="setUpperSeries(QtCharts::QLineSeries*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setLowerSeries(QtCharts::QLineSeries*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
<object-type name="QBarCategoryAxis" since="5.7"/>
<object-type name="QBarLegendMarker" since="5.7"/>
<object-type name="QBarModelMapper" since="5.7"/>
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
index b418d2689..53ab29382 100644
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
+++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
@@ -2292,7 +2292,13 @@
<enum-type name="LibraryLocation"/>
</object-type>
<object-type name="QMutexLocker" copyable="no">
- <modify-function signature="QMutexLocker(QBasicMutex*)">
+ <!-- PYSIDE-1271: Creating locking capable objects inside sections that
+ contain allow-thread, require the classes to also allow having threads.
+ The lack of the option here, was generating a deadlock when running a
+ QMutexLocker inside a QThread::run.
+ The reason of having this change is due to the new way of handling the GIL
+ in the Qt calls on the whole PySide2 module, that started on 5.14.2-->
+ <modify-function signature="QMutexLocker(QBasicMutex*)" allow-thread="yes">
<modify-argument index="1">
<reference-count action="set" variable-name="mutex()const0"/>
</modify-argument>
@@ -2311,14 +2317,13 @@
<!-- Qt5 addition -->
<object-type name="QBasicMutex">
- <modify-function signature="lock()"/>
- <modify-function signature="tryLock()"/>
+ <modify-function signature="lock()" allow-thread="yes"/>
+ <modify-function signature="tryLock()" allow-thread="yes"/>
</object-type>
<object-type name="QMutex">
<enum-type name="RecursionMode"/>
<modify-function signature="lock()" allow-thread="yes"/>
- <modify-function signature="unlock()" allow-thread="yes"/>
<modify-function signature="tryLock(int)" allow-thread="yes"/>
</object-type>
<object-type name="QRecursiveMutex" since="5.14"/>
diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp
index 169b89cae..834383679 100644
--- a/sources/pyside2/PySide2/glue/qtcore.cpp
+++ b/sources/pyside2/PySide2/glue/qtcore.cpp
@@ -608,7 +608,7 @@ static void msgHandlerCallback(QtMsgType type, const QMessageLogContext &ctx, co
Shiboken::AutoDecRef arglist(PyTuple_New(3));
PyTuple_SET_ITEM(arglist, 0, %CONVERTTOPYTHON[QtMsgType](type));
PyTuple_SET_ITEM(arglist, 1, %CONVERTTOPYTHON[QMessageLogContext &](ctx));
- QByteArray array = msg.toLocal8Bit();
+ QByteArray array = msg.toUtf8(); // Python handler requires UTF-8
char *data = array.data();
PyTuple_SET_ITEM(arglist, 2, %CONVERTTOPYTHON[char *](data));
Shiboken::AutoDecRef ret(PyObject_CallObject(qtmsghandler, arglist));