From d30a8672c3db038886273d194f5bcdcb19cc29bd Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Fri, 30 Dec 2011 15:31:11 -0300 Subject: [PATCH 1/4] Version bump to 1.1.1. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0151eea..696b4e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ endif() set(BINDING_NAME PySide) set(BINDING_API_MAJOR_VERSION "1") set(BINDING_API_MINOR_VERSION "1") -set(BINDING_API_MICRO_VERSION "0") +set(BINDING_API_MICRO_VERSION "1") set(BINDING_API_RELEASE_LEVEL "final") # alpha, beta, rc, or final set(BINDING_API_SERIAL 1) # leave as 0 when release level is final set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide version" FORCE) From db6f1e3306e626b871d6ed1a971638d106648b51 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Tue, 13 Mar 2012 14:26:42 -0300 Subject: [PATCH 2/4] Fix PySide compilation. Change-Id: Ie7a30961232526af59cbc21dbf1b58ab9a4e3e7b Reviewed-by: Hugo Parente Lima --- CMakeLists.txt | 3 +-- cmake/Macros/PySideModules.cmake | 2 +- doc/CMakeLists.txt | 2 +- tests/pysidetest/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 696b4e3..a7ffbd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,8 +5,7 @@ project(pysidebindings) cmake_minimum_required(VERSION 2.6) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Macros/ ${CMAKE_MODULE_PATH}) -find_package(GeneratorRunner 0.6.16 REQUIRED) -find_package(Shiboken 1.1.0 REQUIRED) +find_package(Shiboken 1.1.1 REQUIRED) find_package(Qt4 4.5.0 REQUIRED) find_file(GL_H "gl.h" PATH_SUFFIXES "GL") include(FindQt4Extra) diff --git a/cmake/Macros/PySideModules.cmake b/cmake/Macros/PySideModules.cmake index 9eabd56..4877b12 100644 --- a/cmake/Macros/PySideModules.cmake +++ b/cmake/Macros/PySideModules.cmake @@ -20,7 +20,7 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul endif() add_custom_command(OUTPUT ${${module_sources}} - COMMAND ${GENERATORRUNNER_BINARY} ${GENERATOR_EXTRA_FLAGS} + COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS} ${pyside_BINARY_DIR}/pyside_global.h --include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR} --typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}} diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 61eeb09..967c289 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -23,7 +23,7 @@ configure_file("conf.py.in" "rst/conf.py" @ONLY) configure_file(typesystem_doc.xml.in typesystem_doc.xml @ONLY) add_custom_target("docrsts" - COMMAND ${GENERATORRUNNER_BINARY} --generator-set=qtdoc + COMMAND ${SHIBOKEN_BINARY} --generator-set=qtdoc ${pyside_BINARY_DIR}/pyside_global.h --include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}" --api-version=${SUPPORTED_QT_VERSION} diff --git a/tests/pysidetest/CMakeLists.txt b/tests/pysidetest/CMakeLists.txt index 01d61f7..78c6f95 100644 --- a/tests/pysidetest/CMakeLists.txt +++ b/tests/pysidetest/CMakeLists.txt @@ -34,7 +34,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testbinding_module_wrapper.cpp ) add_custom_command(OUTPUT ${testbinding_SRC} -COMMAND ${GENERATORRUNNER_BINARY} ${GENERATOR_EXTRA_FLAGS} +COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/pysidetest_global.h --include-paths=${pyside_BINARY_DIR}${PATH_SEP}${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${QT_QTCORE_INCLUDE_DIR}${PATH_SEP}${QT_QTGUI_INCLUDE_DIR} --typesystem-paths=${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}${PATH_SEP}${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR} From fe8dc36f90fe64590f7f13843a076f8d2d61f378 Mon Sep 17 00:00:00 2001 From: Juhapekka Piiroinen Date: Tue, 6 Mar 2012 13:57:16 +0200 Subject: [PATCH 3/4] Fix bug PYSIDE-6 This should resolve the issue in PYSIDE-6 "Fix phonon VideoCaptureDevice detection to properly use phonon_ namespace". Changed if check in PySideModules.cmake. Change-Id: Ie30d6858a0fc6073560ec4cd09508504cbeb667d Reviewed-by: Hugo Parente Lima --- cmake/Macros/PySideModules.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Macros/PySideModules.cmake b/cmake/Macros/PySideModules.cmake index 4877b12..2fe6cd1 100644 --- a/cmake/Macros/PySideModules.cmake +++ b/cmake/Macros/PySideModules.cmake @@ -71,7 +71,7 @@ macro(check_qt_class module class optional_source_files dropped_entries) endif () string(TOLOWER ${class} _class) string(TOUPPER ${module} _module) - if (${namespace}) + if (_namespace) set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp) else () set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp) From f011ce2cb9e2b93a748874de007232ec88cc8ac1 Mon Sep 17 00:00:00 2001 From: Juhapekka Piiroinen Date: Mon, 5 Mar 2012 07:59:41 +0200 Subject: [PATCH 4/4] Bug fix for PYSIDE-7 This should resolve the issue in PYSIDE-7 "QDateTime does not support the 6-argument format". Added function signature for 6-argument version and a testcase. Change-Id: I617eefab6a41939c37e2f1bf800857bc2d74b6ee Reviewed-by: Hugo Parente Lima --- PySide/QtCore/typesystem_core_common.xml | 7 +++++++ tests/QtCore/python_conversion.py | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/PySide/QtCore/typesystem_core_common.xml b/PySide/QtCore/typesystem_core_common.xml index 8955612..2e83131 100644 --- a/PySide/QtCore/typesystem_core_common.xml +++ b/PySide/QtCore/typesystem_core_common.xml @@ -1257,6 +1257,13 @@ %0 = new %TYPE(date, time, Qt::TimeSpec(%8)); + + + QDate date(%1, %2, %3); + QTime time(%4, %5, %6); + %0 = new %TYPE(date, time); + + diff --git a/tests/QtCore/python_conversion.py b/tests/QtCore/python_conversion.py index 2472dee..84845c0 100644 --- a/tests/QtCore/python_conversion.py +++ b/tests/QtCore/python_conversion.py @@ -43,5 +43,22 @@ class TestDateTimeConversions (unittest.TestCase): self.assertEqual(dateTime, other.toPython()) + def testQDateTime6arg(self): + dateTime = datetime.datetime(2010, 4, 23, 11, 14, 7) + other = QDateTime(dateTime) + + otherDate = other.date() + self.assertEqual(dateTime.year, otherDate.year()) + self.assertEqual(dateTime.month, otherDate.month()) + self.assertEqual(dateTime.day, otherDate.day()) + + otherTime = other.time() + self.assertEqual(dateTime.hour, otherTime.hour()) + self.assertEqual(dateTime.minute, otherTime.minute()) + self.assertEqual(dateTime.second, otherTime.second()) + self.assertEqual(dateTime.microsecond/1000, otherTime.msec()) + + self.assertEqual(dateTime, other.toPython()) + if __name__ == '__main__': unittest.main()