aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-13 14:40:49 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-14 14:04:18 +0000
commitad14f64972d182fca3e180c08750ca020a91b84e (patch)
tree571e5c86a87b800f4a237efc83275f5903c0a74f /sources/pyside2
parent432f25eec11419c64521e7e3c4aa5fd5441bc467 (diff)
Add QAxContainer
Task-number: PYSIDE-487 Change-Id: I5ba8e54f7e496e960fc6017b51eb4f22eb9f54b6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt6
-rw-r--r--sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt46
-rw-r--r--sources/pyside2/PySide2/QtAxContainer/QtAxContainer_global.post.h.in5
-rw-r--r--sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml63
-rw-r--r--sources/pyside2/tests/QtAxContainer/CMakeLists.txt1
6 files changed, 123 insertions, 1 deletions
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index 44e44071e..6a8c612f3 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -283,6 +283,9 @@ if(Qt5UiTools_FOUND)
else()
set(DISABLE_QtUiTools 1)
endif()
+if(WIN32)
+ list(APPEND ALL_OPTIONAL_MODULES AxContainer)
+endif()
list(APPEND ALL_OPTIONAL_MODULES WebChannel WebEngineWidgets WebKit WebKitWidgets WebSockets)
# Modules to be built unless specified by -DMODULES on command line
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
index 3406bd458..ac9b2b27e 100644
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -49,7 +49,11 @@ foreach(shortname IN LISTS all_module_shortnames)
file(READ "${pre_header}" pre_header_content)
set(module_header_content "${pre_header_content}")
endif()
- set(module_header_content "${module_header_content}\n${pyside2_global_contents}\n#include <Qt${shortname}/Qt${shortname}>\n")
+ set(module_header_content "${module_header_content}\n${pyside2_global_contents}")
+ # AxContainer/AxServer from Active Qt do not have module headers
+ if(NOT "${shortname}" STREQUAL "AxContainer")
+ set(module_header_content "${module_header_content}\n#include <Qt${shortname}/Qt${shortname}>")
+ endif()
set(post_header "${CMAKE_CURRENT_BINARY_DIR}/Qt${shortname}/Qt${shortname}_global.post.h")
if(EXISTS "${post_header}")
file(READ "${post_header}" post_header_content)
diff --git a/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt b/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt
new file mode 100644
index 000000000..a3971786b
--- /dev/null
+++ b/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt
@@ -0,0 +1,46 @@
+project(QtAxContainer)
+
+set(QtAxContainer_SRC
+${QtAxContainer_GEN_DIR}/qaxbase_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxobject_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxscript_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxscriptengine_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxscriptmanager_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxselect_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxwidget_wrapper.cpp
+# module is always needed
+${QtAxContainer_GEN_DIR}/qtaxcontainer_module_wrapper.cpp)
+
+configure_file("${QtAxContainer_SOURCE_DIR}/QtAxContainer_global.post.h.in"
+ "${QtAxContainer_BINARY_DIR}/QtAxContainer_global.post.h" @ONLY)
+
+set(QtAxContainer_include_dirs
+ ${QtAxContainer_SOURCE_DIR}
+ ${QtAxContainer_BINARY_DIR}
+ ${pyside2_SOURCE_DIR}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Gui_INCLUDE_DIRS}
+ ${Qt5Widgets_INCLUDE_DIRS}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${SHIBOKEN_PYTHON_INCLUDE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR})
+
+set(QtAxContainer_libraries pyside2
+ ${SHIBOKEN_PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${Qt5AxContainer_LIBRARIES}
+ ${Qt5AxBase_LIBRARIES})
+
+set(QtAxContainer_deps QtWidgets)
+
+create_pyside_module(QtAxContainer
+ QtAxContainer_include_dirs
+ QtAxContainer_libraries
+ QtAxContainer_deps
+ QtAxContainer_SOURCE_DIR
+ QtAxContainer_SRC
+ ""
+ ${QtAxContainer_BINARY_DIR}/typesystem_axcontainer.xml)
diff --git a/sources/pyside2/PySide2/QtAxContainer/QtAxContainer_global.post.h.in b/sources/pyside2/PySide2/QtAxContainer/QtAxContainer_global.post.h.in
new file mode 100644
index 000000000..22e1b0119
--- /dev/null
+++ b/sources/pyside2/PySide2/QtAxContainer/QtAxContainer_global.post.h.in
@@ -0,0 +1,5 @@
+#include <ActiveQt/QAxSelect>
+#include <ActiveQt/QAxScript>
+#include <ActiveQt/QAxScriptEngine>
+#include <ActiveQt/QAxScriptManager>
+#include <ActiveQt/QAxWidget>
diff --git a/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml b/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml
new file mode 100644
index 000000000..a6648f612
--- /dev/null
+++ b/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of PySide2.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide2.QtAxContainer">
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+ <rejection class="*" function-name="connectNotify"/>
+ <rejection class="*" function-name="queryInterface"/>
+ <rejection class="*" function-name="qt_metacall"/>
+ <rejection class="*" function-name="qt_static_metacall"/>
+ <rejection class="*" field-name="qt_meta_stringdata_QAxBase"/>
+ <rejection class="*" field-name="qt_meta_data_QAxBase"/>
+ <object-type name="QAxBase"/>
+ <object-type name="QAxObject"/>
+ <object-type name="QAxScript">
+ <enum-type name="FunctionFlags"/>
+ </object-type>
+ <object-type name="QAxScriptEngine"/>
+ <object-type name="QAxScriptManager">
+ <!-- Ax Servers only -->
+ <modify-function signature="addObject(QObject*)" remove="all"/>
+ </object-type>
+ <object-type name="QAxSelect"/>
+ <object-type name="QAxWidget"/>
+</typesystem>
diff --git a/sources/pyside2/tests/QtAxContainer/CMakeLists.txt b/sources/pyside2/tests/QtAxContainer/CMakeLists.txt
new file mode 100644
index 000000000..2f7cb08b9
--- /dev/null
+++ b/sources/pyside2/tests/QtAxContainer/CMakeLists.txt
@@ -0,0 +1 @@
+# Please add some tests, here