diff options
author | Christian Tismer <ctismer@gmail.com> | 2015-07-25 21:53:19 +0200 |
---|---|---|
committer | Christian Tismer <ctismer@gmail.com> | 2015-07-25 21:53:19 +0200 |
commit | bb644dd93db70757b71fffc3cb6c5f1e97771463 (patch) | |
tree | d7c21d6a91fd45f99f26abe3eef6c99d3b4a2219 | |
parent | 7e87675cb5cfa6d4741adb9d3b60b4f136b9cc7d (diff) |
support QtConcurrent, in order to do nothing more than QtCore did before.
Not working, yet. I hope not to open a can of worms...
-rw-r--r-- | PySide/CMakeLists.txt | 1 | ||||
-rw-r--r-- | PySide/QtConcurrent/CMakeLists.txt | 33 | ||||
-rw-r--r-- | PySide/QtConcurrent/curr_errors.txt | 21 | ||||
-rw-r--r-- | PySide/QtConcurrent/typesystem_concurrent.xml | 34 | ||||
-rw-r--r-- | PySide/QtCore/typesystem_core_common.xml | 10 | ||||
-rw-r--r-- | PySide/global.h.in | 1 |
6 files changed, 90 insertions, 10 deletions
diff --git a/PySide/CMakeLists.txt b/PySide/CMakeLists.txt index 8a56c217..70a5acf8 100644 --- a/PySide/CMakeLists.txt +++ b/PySide/CMakeLists.txt @@ -127,6 +127,7 @@ CHECK_PACKAGE_FOUND(Qt5Multimedia) # note: the order of this list is relevant for dependencies. # For instance: Qt5Printsupport must come before Qt5WebKitWidgets HAS_QT_MODULE(Qt5Core_FOUND QtCore) +HAS_QT_MODULE(Qt5Concurrent_FOUND QtConcurrent) HAS_QT_MODULE(Qt5Gui_FOUND QtGui) HAS_QT_MODULE(Qt5Widgets_FOUND QtWidgets) HAS_QT_MODULE(Qt5PrintSupport_FOUND QtPrintSupport) diff --git a/PySide/QtConcurrent/CMakeLists.txt b/PySide/QtConcurrent/CMakeLists.txt new file mode 100644 index 00000000..991ed391 --- /dev/null +++ b/PySide/QtConcurrent/CMakeLists.txt @@ -0,0 +1,33 @@ +project(QtConcurrent) + +set(QtConcurrent_SRC +# module is always needed +${QtConcurrent_GEN_DIR}/qtconcurrent_module_wrapper.cpp +) + +make_path(QtConcurrent_typesystem_path ${QtCore_SOURCE_DIR} + ${QtCore_BINARY_DIR} + ${QtConcurrent_SOURCE_DIR}) + +set(QtConcurrent_include_dirs ${QtConcurrent_SOURCE_DIR} + ${QtConcurrent_BINARY_DIR} + ${Qt5Core_INCLUDE_DIRS} + ${SHIBOKEN_INCLUDE_DIR} + ${libpyside_SOURCE_DIR} + ${SHIBOKEN_PYTHON_INCLUDE_DIR} + ${QtCore_GEN_DIR} + ) +set(QtConcurrent_libraries pyside + ${SHIBOKEN_PYTHON_LIBRARIES} + ${SHIBOKEN_LIBRARY} + ${QtConcurrent_LIBRARIES} + ) +set(QtConcurrent_deps QtCore) + +create_pyside_module(QtConcurrent + QtConcurrent_include_dirs + QtConcurrent_libraries + QtConcurrent_deps + QtConcurrent_typesystem_path + QtConcurrent_SRC + "") diff --git a/PySide/QtConcurrent/curr_errors.txt b/PySide/QtConcurrent/curr_errors.txt new file mode 100644 index 00000000..827ebea5 --- /dev/null +++ b/PySide/QtConcurrent/curr_errors.txt @@ -0,0 +1,21 @@ +Generating class model... [OK] +Generating enum model... [OK] +Generating namespace model... [WARNING] + enum 'QtConcurrent::ThreadFunctionResult' does not have a type entry or is not an enum + enum 'QtConcurrent::ReduceQueueThrottleLimit' does not have a type entry or is not an enum + + +Resolving typedefs... [OK] +Fixing class inheritance... [OK] +Detecting inconsistencies in class model... [OK] +[OK] + +Done, 2 warnings (506 known issues) +Scanning dependencies of target QtConcurrent +[ 21%] Building CXX object PySide/QtConcurrent/CMakeFiles/QtConcurrent.dir/PySide/QtConcurrent/qtconcurrent_module_wrapper.cpp.o +In file included from /Users/tismer/src/pyside-setup2/pyside_build/py3.4-qt5.4.2-64bit-debug/pyside/PySide/QtConcurrent/PySide/QtConcurrent/qtconcurrent_module_wrapper.cpp:30: +/Users/tismer/src/pyside-setup2/pyside_build/py3.4-qt5.4.2-64bit-debug/pyside/PySide/QtConcurrent/PySide/QtConcurrent/pyside_qtconcurrent_python.h:44:10: fatal error: + 'qtconcurrentexception.h' file not found +#include <qtconcurrentexception.h> + ^ +1 error generated. diff --git a/PySide/QtConcurrent/typesystem_concurrent.xml b/PySide/QtConcurrent/typesystem_concurrent.xml new file mode 100644 index 00000000..882a1f8d --- /dev/null +++ b/PySide/QtConcurrent/typesystem_concurrent.xml @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- + This file is part of PySide project. + Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). + Contact: PySide team <contact@pyside.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--> +<typesystem package="PySide.QtConcurrent"> + <load-typesystem name="typesystem_core.xml" generate="no"/> + + <!-- Qt5: this is currently the minimum possible QtConcurrent support, by just extracting + the name space from QtCore --> + <namespace-type name="QtConcurrent" target-type="class"> + <enum-type name="ReduceOption" flags="ReduceOptions"/> + <extra-includes> + <include file-name="qtconcurrentreducekernel.h" location="global"/> + <include file-name="qtconcurrentthreadengine.h" location="global"/> + </extra-includes> + </namespace-type> + +</typesystem> diff --git a/PySide/QtCore/typesystem_core_common.xml b/PySide/QtCore/typesystem_core_common.xml index d08e7ee5..696a20b5 100644 --- a/PySide/QtCore/typesystem_core_common.xml +++ b/PySide/QtCore/typesystem_core_common.xml @@ -775,7 +775,6 @@ <rejection class="" enum-name="QtValidLicenseForGuiModule"/> <rejection class="" enum-name="QtValidLicenseForScriptModule"/> <rejection class="" enum-name="QtValidLicenseForHelpModule"/> - <rejection class="QtConcurrent" enum-name="enum_1"/> <rejection class="QAbstractEventDispatcher" function-name="filterEvent"/> <rejection class="QAbstractEventDispatcher" function-name="filterNativeEvent"/> <rejection class="QAbstractEventDispatcher" function-name="setEventFilter"/> @@ -3672,15 +3671,6 @@ <enum-type name="AccessMode"/> <enum-type name="SystemSemaphoreError"/> </object-type> - <!-- Qt5: move to QtConcurrent module - <namespace-type name="QtConcurrent" target-type="class"> - <enum-type name="ReduceOption" flags="ReduceOptions"/> - <extra-includes> - <include file-name="qtconcurrentreducekernel.h" location="global"/> - <include file-name="qtconcurrentthreadengine.h" location="global"/> - </extra-includes> - </namespace-type> - --> <object-type name="QThreadPool"> <modify-function signature="start(QRunnable*, int)"> diff --git a/PySide/global.h.in b/PySide/global.h.in index f0ab33ca..e140c967 100644 --- a/PySide/global.h.in +++ b/PySide/global.h.in @@ -350,6 +350,7 @@ QT_END_NAMESPACE #define QT_NO_DEBUG #include <QtCore/QtCore> +#include <QtConcurrent/QtConcurrent> #if @ENABLE_MAC@ || @ENABLE_WIN@ // Workaround to parse the QApplication header #define Q_INTERNAL_QAPP_SRC |