summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-02-16 11:37:45 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:53:59 -0300
commit75937124c2e8b567e226d7675265a87562d4a1c7 (patch)
treec4065652837f26c4e1b63fbc0f01cd91b3b08832
parent861e26665da05bc6fbc28ed3503fdcc4b8bd9fb6 (diff)
Updated CMake files to use the "--drop-type-entries" generator option.
Instead of maintaining a complex CMake scheme to remove optional type system entries, the generation will rely on the new generator capability of dropping entries given via command line. Reviewed by Bruno Araújo <bruno.araujo@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--PySide/QtCore/CMakeLists.txt7
-rw-r--r--PySide/QtDeclarative/CMakeLists.txt9
-rw-r--r--PySide/QtGui/CMakeLists.txt42
-rw-r--r--PySide/QtGui/optional/QAbstractPageSetupDialog.xml1
-rw-r--r--PySide/QtGui/optional/QAbstractPrintDialog.xml6
-rw-r--r--PySide/QtGui/optional/QGtkStyle.xml11
-rw-r--r--PySide/QtGui/optional/QPageSetupDialog.xml5
-rw-r--r--PySide/QtGui/optional/QPrintDialog.xml3
-rw-r--r--PySide/QtGui/optional/QPrintEngine.xml3
-rw-r--r--PySide/QtGui/optional/QPrintPreviewDialog.xml1
-rw-r--r--PySide/QtGui/optional/QPrintPreviewWidget.xml6
-rw-r--r--PySide/QtGui/optional/QPrinter.xml30
-rw-r--r--PySide/QtGui/optional/QPrinterInfo.xml1
-rw-r--r--PySide/QtGui/optional/QSessionManager.xml7
-rw-r--r--PySide/QtGui/optional/QSizeGrip.xml2
-rw-r--r--PySide/QtGui/optional/QSystemTrayIcon.xml10
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml90
-rw-r--r--PySide/QtHelp/CMakeLists.txt3
-rw-r--r--PySide/QtMaemo5/CMakeLists.txt3
-rw-r--r--PySide/QtMultimedia/CMakeLists.txt3
-rw-r--r--PySide/QtNetwork/CMakeLists.txt24
-rw-r--r--PySide/QtNetwork/optional/QSslCertificate.xml1
-rw-r--r--PySide/QtNetwork/optional/QSslCipher.xml1
-rw-r--r--PySide/QtNetwork/optional/QSslConfiguration.xml1
-rw-r--r--PySide/QtNetwork/optional/QSslError.xml4
-rw-r--r--PySide/QtNetwork/optional/QSslKey.xml1
-rw-r--r--PySide/QtNetwork/optional/QSslSocket.xml6
-rw-r--r--PySide/QtNetwork/typesystem_network.xml19
-rw-r--r--PySide/QtOpenGL/CMakeLists.txt3
-rw-r--r--PySide/QtScript/CMakeLists.txt3
-rw-r--r--PySide/QtScriptTools/CMakeLists.txt3
-rw-r--r--PySide/QtSql/CMakeLists.txt3
-rw-r--r--PySide/QtSvg/CMakeLists.txt3
-rw-r--r--PySide/QtTest/CMakeLists.txt3
-rw-r--r--PySide/QtUiTools/CMakeLists.txt3
-rw-r--r--PySide/QtWebKit/CMakeLists.txt3
-rw-r--r--PySide/QtXml/CMakeLists.txt3
-rw-r--r--PySide/QtXmlPatterns/CMakeLists.txt3
-rw-r--r--PySide/phonon/CMakeLists.txt14
-rw-r--r--PySide/phonon/optional/VideoCaptureDevice.xml5
-rw-r--r--PySide/phonon/typesystem_phonon.xml11
-rw-r--r--cmake/Macros/PySideModules.cmake46
42 files changed, 201 insertions, 205 deletions
diff --git a/PySide/QtCore/CMakeLists.txt b/PySide/QtCore/CMakeLists.txt
index 056597cd..c486b7c5 100644
--- a/PySide/QtCore/CMakeLists.txt
+++ b/PySide/QtCore/CMakeLists.txt
@@ -34,8 +34,6 @@ else()
)
endif()
-
-
set(QtCore_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qabstracteventdispatcher_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qabstractfileengine_wrapper.cpp
@@ -60,7 +58,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdiriterator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdynamicpropertychangeevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qevent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qeventloop_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/qfactoryinterface_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfactoryinterface_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfile_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfileinfo_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfilesystemwatcher_wrapper.cpp
@@ -154,5 +152,4 @@ create_pyside_module(QtCore
QtCore_libraries
""
QtCore_typesystem_path
- QtCore_SRC
- "")
+ QtCore_SRC)
diff --git a/PySide/QtDeclarative/CMakeLists.txt b/PySide/QtDeclarative/CMakeLists.txt
index 0fc96d40..591b6aca 100644
--- a/PySide/QtDeclarative/CMakeLists.txt
+++ b/PySide/QtDeclarative/CMakeLists.txt
@@ -1,5 +1,7 @@
project(QtDeclarative)
+set(QtDeclarative_registerType "${CMAKE_CURRENT_SOURCE_DIR}/pysideqmlregistertype.cpp")
+
set(QtDeclarative_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecomponent_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecontext_wrapper.cpp
@@ -19,6 +21,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeproperty_wrapper.cp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativescriptstring_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeview_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qtdeclarative_module_wrapper.cpp
+${QtDeclarative_registerType}
)
set(QtDeclarative_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtDeclarative_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
@@ -49,13 +52,11 @@ set(QtDeclarative_libraries pyside
${QT_QTDECLARATIVE_LIBRARY})
set(QtDeclarative_deps QtGui QtNetwork)
-set(QtDeclarative_registerType "${CMAKE_CURRENT_SOURCE_DIR}/pysideqmlregistertype.cpp")
+
create_pyside_module(QtDeclarative
QtDeclarative_include_dirs
QtDeclarative_libraries
QtDeclarative_deps
QtDeclarative_typesystem_path
- QtDeclarative_SRC
- ""
- QtDeclarative_registerType)
+ QtDeclarative_SRC)
diff --git a/PySide/QtGui/CMakeLists.txt b/PySide/QtGui/CMakeLists.txt
index 4313606e..c25a95e6 100644
--- a/PySide/QtGui/CMakeLists.txt
+++ b/PySide/QtGui/CMakeLists.txt
@@ -5,7 +5,7 @@ if(ENABLE_X11)
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11info_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedcontainer_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedwidget_wrapper.cpp
- )
+ )
if(Q_WS_MAEMO_5)
set(SPECIFIC_OS_FILES
@@ -60,6 +60,22 @@ else()
)
endif ()
+set(QtGui_OPTIONAL_SRC )
+set(QtGui_DROPPED_ENTRIES )
+check_qt_class(QtGui QAbstractPageSetupDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QAbstractPrintDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QGtkStyle QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QPageSetupDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QPrintDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QPrintEngine QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QPrintPreviewDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QPrintPreviewWidget QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QPrinter QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QPrinterInfo QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QSessionManager QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QSizeGrip QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+check_qt_class(QtGui QSystemTrayIcon QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
+
qt4_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside_SOURCE_DIR}/qpytextobject.h")
set(QtGui_SRC
@@ -378,27 +394,13 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qwizard_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qworkspace_wrapper.cpp
${SPECIFIC_OS_FILES}
+${QPYTEXTOBJECT_MOC}
${QtGui_46_SRC}
+${QtGui_OPTIONAL_SRC}
)
-set(TARGET_TYPESYSTEM "${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_gui.xml.in"
- "${TARGET_TYPESYSTEM}" @ONLY)
-
-check_qt_class(QtGui QGtkStyle QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QSessionManager QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QSizeGrip QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QSystemTrayIcon QtGui_SRC ${TARGET_TYPESYSTEM})
-
-check_qt_class(QtGui QAbstractPageSetupDialog QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QAbstractPrintDialog QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QPageSetupDialog QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QPrintDialog QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QPrintPreviewWidget QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QPrintPreviewDialog QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QPrinter QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QPrinterInfo QtGui_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtGui QPrintEngine QtGui_SRC ${TARGET_TYPESYSTEM})
+ "${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY)
set(QtGui_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}")
set(QtGui_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
@@ -421,8 +423,6 @@ create_pyside_module(QtGui
QtGui_deps
QtGui_typesystem_path
QtGui_SRC
- ${TARGET_TYPESYSTEM}
- QPYTEXTOBJECT_MOC)
-
+ ${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml)
install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/)
diff --git a/PySide/QtGui/optional/QAbstractPageSetupDialog.xml b/PySide/QtGui/optional/QAbstractPageSetupDialog.xml
deleted file mode 100644
index 902fb6eb..00000000
--- a/PySide/QtGui/optional/QAbstractPageSetupDialog.xml
+++ /dev/null
@@ -1 +0,0 @@
-<object-type name="QAbstractPageSetupDialog"/>
diff --git a/PySide/QtGui/optional/QAbstractPrintDialog.xml b/PySide/QtGui/optional/QAbstractPrintDialog.xml
deleted file mode 100644
index 373cf305..00000000
--- a/PySide/QtGui/optional/QAbstractPrintDialog.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<object-type name="QAbstractPrintDialog">
- <enum-type name="PrintDialogOption" flags="QAbstractPrintDialog::PrintDialogOptions"/>
- <enum-type name="PrintRange"/>
- <modify-function signature="exec()" rename="exec_" allow-thread="yes" />
-</object-type>
-
diff --git a/PySide/QtGui/optional/QGtkStyle.xml b/PySide/QtGui/optional/QGtkStyle.xml
deleted file mode 100644
index e75e06c9..00000000
--- a/PySide/QtGui/optional/QGtkStyle.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<object-type name="QGtkStyle">
- <modify-function signature="standardPixmap(QStyle::StandardPixmap,const QStyleOption*,const QWidget*)const">
- <modify-argument index="2">
- <replace-default-expression with="0"/>
- </modify-argument>
- <modify-argument index="3">
- <replace-default-expression with="0"/>
- </modify-argument>
- </modify-function>
-</object-type>
-
diff --git a/PySide/QtGui/optional/QPageSetupDialog.xml b/PySide/QtGui/optional/QPageSetupDialog.xml
deleted file mode 100644
index 66fe0645..00000000
--- a/PySide/QtGui/optional/QPageSetupDialog.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<object-type name="QPageSetupDialog">
- <enum-type name="PageSetupDialogOption" flags="QPageSetupDialog::PageSetupDialogOptions"/>
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
-</object-type>
-
diff --git a/PySide/QtGui/optional/QPrintDialog.xml b/PySide/QtGui/optional/QPrintDialog.xml
deleted file mode 100644
index 7b62f484..00000000
--- a/PySide/QtGui/optional/QPrintDialog.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<object-type name="QPrintDialog">
- <modify-function signature="exec()" rename="exec_" allow-thread="yes" />
-</object-type>
diff --git a/PySide/QtGui/optional/QPrintEngine.xml b/PySide/QtGui/optional/QPrintEngine.xml
deleted file mode 100644
index 0f792fc5..00000000
--- a/PySide/QtGui/optional/QPrintEngine.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<object-type name="QPrintEngine">
- <enum-type name="PrintEnginePropertyKey" />
-</object-type>
diff --git a/PySide/QtGui/optional/QPrintPreviewDialog.xml b/PySide/QtGui/optional/QPrintPreviewDialog.xml
deleted file mode 100644
index 635f3906..00000000
--- a/PySide/QtGui/optional/QPrintPreviewDialog.xml
+++ /dev/null
@@ -1 +0,0 @@
-<object-type name="QPrintPreviewDialog"/>
diff --git a/PySide/QtGui/optional/QPrintPreviewWidget.xml b/PySide/QtGui/optional/QPrintPreviewWidget.xml
deleted file mode 100644
index cf60a03a..00000000
--- a/PySide/QtGui/optional/QPrintPreviewWidget.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<object-type name="QPrintPreviewWidget">
- <enum-type name="ViewMode"/>
- <enum-type name="ZoomMode"/>
- <modify-function signature="print()" rename="print_" />
-</object-type>
-
diff --git a/PySide/QtGui/optional/QPrinter.xml b/PySide/QtGui/optional/QPrinter.xml
deleted file mode 100644
index b57416c4..00000000
--- a/PySide/QtGui/optional/QPrinter.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<rejection class="QPrinter" function-name="printerSelectionOption"/>
-<rejection class="QPrinter" function-name="setPrinterSelectionOption"/>
-
-<object-type name="QPrinter" >
- <enum-type name="ColorMode"/>
- <enum-type name="DuplexMode"/>
- <enum-type name="Orientation"/>
- <enum-type name="OutputFormat"/>
- <enum-type name="PageOrder"/>
- <enum-type name="PageSize" />
- <enum-type name="PaperSource"/>
- <enum-type name="PrintRange"/>
- <enum-type name="PrinterMode"/>
- <enum-type name="PrinterState"/>
- <enum-type name="Unit"/>
- <!-- TODO: What to do with this function? -->
- <modify-function signature="getPageMargins(qreal*,qreal*,qreal*,qreal*,QPrinter::Unit)const" remove="all" />
- <modify-function signature="setEngines(QPrintEngine*,QPaintEngine*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <extra-includes>
- <include file-name="QPrinterInfo" location="global"/>
- </extra-includes>
-</object-type>
-
diff --git a/PySide/QtGui/optional/QPrinterInfo.xml b/PySide/QtGui/optional/QPrinterInfo.xml
deleted file mode 100644
index 479c4b45..00000000
--- a/PySide/QtGui/optional/QPrinterInfo.xml
+++ /dev/null
@@ -1 +0,0 @@
-<value-type name="QPrinterInfo" />
diff --git a/PySide/QtGui/optional/QSessionManager.xml b/PySide/QtGui/optional/QSessionManager.xml
deleted file mode 100644
index b8be5e81..00000000
--- a/PySide/QtGui/optional/QSessionManager.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<object-type name="QSessionManager">
- <extra-includes>
- </extra-includes>
- <enum-type name="RestartHint"/>
- <modify-function signature="handle()const" remove="all"/>
-</object-type>
-
diff --git a/PySide/QtGui/optional/QSizeGrip.xml b/PySide/QtGui/optional/QSizeGrip.xml
deleted file mode 100644
index a0792daa..00000000
--- a/PySide/QtGui/optional/QSizeGrip.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<object-type name="QSizeGrip"/>
-
diff --git a/PySide/QtGui/optional/QSystemTrayIcon.xml b/PySide/QtGui/optional/QSystemTrayIcon.xml
deleted file mode 100644
index 43875905..00000000
--- a/PySide/QtGui/optional/QSystemTrayIcon.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<object-type name="QSystemTrayIcon">
- <enum-type name="ActivationReason"/>
- <enum-type name="MessageIcon"/>
- <modify-function signature="setContextMenu(QMenu*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
-</object-type>
-
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 724ac1ec..e1a6f40f 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -6002,4 +6002,94 @@
<suppress-warning text="class not found for setup inheritance 'QMimeSource'"/>
<suppress-warning text="class 'QDropEvent' inherits from unknown base class 'QMimeSource'"/>
+
+ <!-- The following entries may be present in the system or not. Keep this section organized. -->
+ <object-type name="QAbstractPageSetupDialog"/>
+ <object-type name="QAbstractPrintDialog">
+ <enum-type name="PrintDialogOption" flags="QAbstractPrintDialog::PrintDialogOptions"/>
+ <enum-type name="PrintRange"/>
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes" />
+ </object-type>
+
+ <object-type name="QGtkStyle">
+ <modify-function signature="standardPixmap(QStyle::StandardPixmap,const QStyleOption*,const QWidget*)const">
+ <modify-argument index="2">
+ <replace-default-expression with="0"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <replace-default-expression with="0"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QPageSetupDialog">
+ <enum-type name="PageSetupDialogOption" flags="QPageSetupDialog::PageSetupDialogOptions"/>
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ </object-type>
+
+ <object-type name="QPrintDialog">
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes" />
+ </object-type>
+ <object-type name="QPrintEngine">
+ <enum-type name="PrintEnginePropertyKey" />
+ </object-type>
+ <value-type name="QPrinterInfo" />
+ <rejection class="QPrinter" function-name="printerSelectionOption"/>
+ <rejection class="QPrinter" function-name="setPrinterSelectionOption"/>
+
+ <object-type name="QPrinter" >
+ <enum-type name="ColorMode"/>
+ <enum-type name="DuplexMode"/>
+ <enum-type name="Orientation"/>
+ <enum-type name="OutputFormat"/>
+ <enum-type name="PageOrder"/>
+ <enum-type name="PageSize" />
+ <enum-type name="PaperSource"/>
+ <enum-type name="PrintRange"/>
+ <enum-type name="PrinterMode"/>
+ <enum-type name="PrinterState"/>
+ <enum-type name="Unit"/>
+ <!-- TODO: What to do with this function? -->
+ <modify-function signature="getPageMargins(qreal*,qreal*,qreal*,qreal*,QPrinter::Unit)const" remove="all" />
+ <modify-function signature="setEngines(QPrintEngine*,QPaintEngine*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <extra-includes>
+ <include file-name="QPrinterInfo" location="global"/>
+ </extra-includes>
+ </object-type>
+
+ <object-type name="QPrintPreviewDialog"/>
+ <object-type name="QPrintPreviewWidget">
+ <enum-type name="ViewMode"/>
+ <enum-type name="ZoomMode"/>
+ <modify-function signature="print()" rename="print_" />
+ </object-type>
+
+ <object-type name="QSessionManager">
+ <extra-includes>
+ </extra-includes>
+ <enum-type name="RestartHint"/>
+ <modify-function signature="handle()const" remove="all"/>
+ </object-type>
+
+ <object-type name="QSizeGrip"/>
+
+ <object-type name="QSystemTrayIcon">
+ <enum-type name="ActivationReason"/>
+ <enum-type name="MessageIcon"/>
+ <modify-function signature="setContextMenu(QMenu*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <!-- The above entries may be present in the system or not. Keep this section organized. -->
+
</typesystem>
+
diff --git a/PySide/QtHelp/CMakeLists.txt b/PySide/QtHelp/CMakeLists.txt
index 0ca0272a..96c23750 100644
--- a/PySide/QtHelp/CMakeLists.txt
+++ b/PySide/QtHelp/CMakeLists.txt
@@ -38,5 +38,4 @@ create_pyside_module(QtHelp
QtHelp_libraries
QtHelp_deps
QtHelp_typesystem_path
- QtHelp_SRC
- "")
+ QtHelp_SRC)
diff --git a/PySide/QtMaemo5/CMakeLists.txt b/PySide/QtMaemo5/CMakeLists.txt
index 30bf15c6..ff60a8f4 100644
--- a/PySide/QtMaemo5/CMakeLists.txt
+++ b/PySide/QtMaemo5/CMakeLists.txt
@@ -45,6 +45,5 @@ create_pyside_module(QtMaemo5
QtMaemo5_libraries
QtMaemo5_deps
QtMaemo5_typesystem_path
- QtMaemo5_SRC
- "")
+ QtMaemo5_SRC)
diff --git a/PySide/QtMultimedia/CMakeLists.txt b/PySide/QtMultimedia/CMakeLists.txt
index 88238386..22c921db 100644
--- a/PySide/QtMultimedia/CMakeLists.txt
+++ b/PySide/QtMultimedia/CMakeLists.txt
@@ -44,5 +44,4 @@ create_pyside_module(QtMultimedia
QtMultimedia_libraries
QtMultimedia_deps
QtMultimedia_typesystem_path
- QtMultimedia_SRC
- "")
+ QtMultimedia_SRC)
diff --git a/PySide/QtNetwork/CMakeLists.txt b/PySide/QtNetwork/CMakeLists.txt
index 50f8103e..0f2273ad 100644
--- a/PySide/QtNetwork/CMakeLists.txt
+++ b/PySide/QtNetwork/CMakeLists.txt
@@ -10,6 +10,15 @@ else()
set(QtNetwork_47_SRC )
endif ()
+set(QtNetwork_OPTIONAL_SRC )
+set(QtNetwork_DROPPED_ENTRIES )
+check_qt_class(QtNetwork QSslCertificate QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
+check_qt_class(QtNetwork QSslCipher QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
+check_qt_class(QtNetwork QSslConfiguration QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
+check_qt_class(QtNetwork QSslError QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
+check_qt_class(QtNetwork QSslKey QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
+check_qt_class(QtNetwork QSslSocket QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
+
set(QtNetwork_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractnetworkcache_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp
@@ -44,19 +53,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qudpsocket_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qurlinfo_wrapper.cpp
${QtNetwork_47_SRC}
+${QtNetwork_OPTIONAL_SRC}
)
-set(TARGET_TYPESYSTEM "${CMAKE_CURRENT_BINARY_DIR}/typesystem_network.xml")
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_network.xml"
- "${TARGET_TYPESYSTEM}" @ONLY)
-
-check_qt_class(QtNetwork QSslCertificate QtNetwork_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtNetwork QSslCipher QtNetwork_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtNetwork QSslConfiguration QtNetwork_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtNetwork QSslError QtNetwork_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtNetwork QSslKey QtNetwork_SRC ${TARGET_TYPESYSTEM})
-check_qt_class(QtNetwork QSslSocket QtNetwork_SRC ${TARGET_TYPESYSTEM})
-
set(QtNetwork_typesystem_path "${QtCore_SOURCE_DIR}")
set(QtNetwork_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/
@@ -79,4 +78,5 @@ create_pyside_module(QtNetwork
QtNetwork_deps
QtNetwork_typesystem_path
QtNetwork_SRC
- ${TARGET_TYPESYSTEM})
+ ""
+ QtNetwork_DROPPED_ENTRIES)
diff --git a/PySide/QtNetwork/optional/QSslCertificate.xml b/PySide/QtNetwork/optional/QSslCertificate.xml
deleted file mode 100644
index 7acf97c3..00000000
--- a/PySide/QtNetwork/optional/QSslCertificate.xml
+++ /dev/null
@@ -1 +0,0 @@
-<value-type name="QSslCertificate"/>
diff --git a/PySide/QtNetwork/optional/QSslCipher.xml b/PySide/QtNetwork/optional/QSslCipher.xml
deleted file mode 100644
index 15ff59a2..00000000
--- a/PySide/QtNetwork/optional/QSslCipher.xml
+++ /dev/null
@@ -1 +0,0 @@
-<value-type name="QSslCipher"/>
diff --git a/PySide/QtNetwork/optional/QSslConfiguration.xml b/PySide/QtNetwork/optional/QSslConfiguration.xml
deleted file mode 100644
index 31c5e83b..00000000
--- a/PySide/QtNetwork/optional/QSslConfiguration.xml
+++ /dev/null
@@ -1 +0,0 @@
-<value-type name="QSslConfiguration"/>
diff --git a/PySide/QtNetwork/optional/QSslError.xml b/PySide/QtNetwork/optional/QSslError.xml
deleted file mode 100644
index 0e4cf3e5..00000000
--- a/PySide/QtNetwork/optional/QSslError.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<value-type name="QSslError">
- <enum-type name="SslError"/>
-</value-type>
-
diff --git a/PySide/QtNetwork/optional/QSslKey.xml b/PySide/QtNetwork/optional/QSslKey.xml
deleted file mode 100644
index 88a6370d..00000000
--- a/PySide/QtNetwork/optional/QSslKey.xml
+++ /dev/null
@@ -1 +0,0 @@
-<value-type name="QSslKey"/>
diff --git a/PySide/QtNetwork/optional/QSslSocket.xml b/PySide/QtNetwork/optional/QSslSocket.xml
deleted file mode 100644
index 415e6819..00000000
--- a/PySide/QtNetwork/optional/QSslSocket.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<object-type name="QSslSocket">
- <enum-type name="SslMode"/>
- <enum-type name="PeerVerifyMode"/>
- <modify-function signature="connectToHostEncrypted(const QString&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" />
- <modify-function signature="waitForEncrypted(int)" allow-thread="yes" />
-</object-type>
diff --git a/PySide/QtNetwork/typesystem_network.xml b/PySide/QtNetwork/typesystem_network.xml
index 8a677fd1..5b065791 100644
--- a/PySide/QtNetwork/typesystem_network.xml
+++ b/PySide/QtNetwork/typesystem_network.xml
@@ -280,4 +280,23 @@
<value-type name="QNetworkCacheMetaData"/>
<suppress-warning text="Shadowing: QAbstractSocket::*"/>
+
+
+ <!-- The following entries may be present in the system or not. Keep this section organized. -->
+ <value-type name="QSslCertificate"/>
+ <value-type name="QSslCipher"/>
+ <value-type name="QSslConfiguration"/>
+ <value-type name="QSslError">
+ <enum-type name="SslError"/>
+ </value-type>
+
+ <value-type name="QSslKey"/>
+ <object-type name="QSslSocket">
+ <enum-type name="SslMode"/>
+ <enum-type name="PeerVerifyMode"/>
+ <modify-function signature="connectToHostEncrypted(const QString&amp;, quint16, QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes" />
+ <modify-function signature="waitForEncrypted(int)" allow-thread="yes" />
+ </object-type>
+ <!-- The above entries may be present in the system or not. Keep this section organized. -->
</typesystem>
+
diff --git a/PySide/QtOpenGL/CMakeLists.txt b/PySide/QtOpenGL/CMakeLists.txt
index 44ba1c1a..719f46c1 100644
--- a/PySide/QtOpenGL/CMakeLists.txt
+++ b/PySide/QtOpenGL/CMakeLists.txt
@@ -54,5 +54,4 @@ create_pyside_module(QtOpenGL
QtOpenGL_libraries
QtOpenGL_deps
QtOpenGL_typesystem_path
- QtOpenGL_SRC
- "")
+ QtOpenGL_SRC)
diff --git a/PySide/QtScript/CMakeLists.txt b/PySide/QtScript/CMakeLists.txt
index 88b0a06e..b4ec7947 100644
--- a/PySide/QtScript/CMakeLists.txt
+++ b/PySide/QtScript/CMakeLists.txt
@@ -45,5 +45,4 @@ create_pyside_module(QtScript
QtScript_libraries
QtScript_deps
QtScript_typesystem_path
- QtScript_SRC
- "")
+ QtScript_SRC)
diff --git a/PySide/QtScriptTools/CMakeLists.txt b/PySide/QtScriptTools/CMakeLists.txt
index 575dcc36..a110f159 100644
--- a/PySide/QtScriptTools/CMakeLists.txt
+++ b/PySide/QtScriptTools/CMakeLists.txt
@@ -33,5 +33,4 @@ create_pyside_module(QtScriptTools
QtScriptTools_libraries
QtScriptTools_deps
QtScriptTools_typesystem_path
- QtScriptTools_SRC
- "")
+ QtScriptTools_SRC)
diff --git a/PySide/QtSql/CMakeLists.txt b/PySide/QtSql/CMakeLists.txt
index 7da42d43..204058e0 100644
--- a/PySide/QtSql/CMakeLists.txt
+++ b/PySide/QtSql/CMakeLists.txt
@@ -43,5 +43,4 @@ create_pyside_module(QtSql
QtSql_libraries
QtSql_deps
QtSql_typesystem_path
- QtSql_SRC
- "")
+ QtSql_SRC)
diff --git a/PySide/QtSvg/CMakeLists.txt b/PySide/QtSvg/CMakeLists.txt
index b1e54778..a1e3eb67 100644
--- a/PySide/QtSvg/CMakeLists.txt
+++ b/PySide/QtSvg/CMakeLists.txt
@@ -31,5 +31,4 @@ create_pyside_module(QtSvg
QtSvg_libraries
QtSvg_deps
QtSvg_typesystem_path
- QtSvg_SRC
- "")
+ QtSvg_SRC)
diff --git a/PySide/QtTest/CMakeLists.txt b/PySide/QtTest/CMakeLists.txt
index fea841d1..aaf4dd5f 100644
--- a/PySide/QtTest/CMakeLists.txt
+++ b/PySide/QtTest/CMakeLists.txt
@@ -29,5 +29,4 @@ create_pyside_module(QtTest
QtTest_libraries
QtTest_deps
QtTest_typesystem_path
- QtTest_SRC
- "")
+ QtTest_SRC)
diff --git a/PySide/QtUiTools/CMakeLists.txt b/PySide/QtUiTools/CMakeLists.txt
index 195cb816..5c68b11b 100644
--- a/PySide/QtUiTools/CMakeLists.txt
+++ b/PySide/QtUiTools/CMakeLists.txt
@@ -33,6 +33,5 @@ create_pyside_module(QtUiTools
QtUiTools_libraries
QtUiTools_deps
QtUiTools_typesystem_path
- QtUiTools_SRC
- "")
+ QtUiTools_SRC)
diff --git a/PySide/QtWebKit/CMakeLists.txt b/PySide/QtWebKit/CMakeLists.txt
index 83445db0..c13a04a9 100644
--- a/PySide/QtWebKit/CMakeLists.txt
+++ b/PySide/QtWebKit/CMakeLists.txt
@@ -63,6 +63,5 @@ create_pyside_module(QtWebKit
QtWebKit_libraries
QtWebKit_deps
QtWebKit_typesystem_path
- QtWebKit_SRC
- "")
+ QtWebKit_SRC)
diff --git a/PySide/QtXml/CMakeLists.txt b/PySide/QtXml/CMakeLists.txt
index a06c7109..5d9c6a81 100644
--- a/PySide/QtXml/CMakeLists.txt
+++ b/PySide/QtXml/CMakeLists.txt
@@ -56,5 +56,4 @@ create_pyside_module(QtXml
QtXml_libraries
QtXml_deps
QtXml_typesystem_path
- QtXml_SRC
- "")
+ QtXml_SRC)
diff --git a/PySide/QtXmlPatterns/CMakeLists.txt b/PySide/QtXmlPatterns/CMakeLists.txt
index 0d789ff2..85f238e2 100644
--- a/PySide/QtXmlPatterns/CMakeLists.txt
+++ b/PySide/QtXmlPatterns/CMakeLists.txt
@@ -45,6 +45,5 @@ create_pyside_module(QtXmlPatterns
QtXmlPatterns_libraries
QtXmlPatterns_deps
QtXmlPatterns_typesystem_path
- QtXmlPatterns_SRC
- "")
+ QtXmlPatterns_SRC)
diff --git a/PySide/phonon/CMakeLists.txt b/PySide/phonon/CMakeLists.txt
index a3f32d22..2adb25db 100644
--- a/PySide/phonon/CMakeLists.txt
+++ b/PySide/phonon/CMakeLists.txt
@@ -5,6 +5,10 @@ if (NOT QT_PHONON_INCLUDE_DIR AND CMAKE_HOST_APPLE)
set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers")
endif ()
+set(phonon_OPTIONAL_SRC )
+set(phonon_DROPPED_ENTRIES )
+check_qt_class(phonon VideoCaptureDevice phonon_OPTIONAL_SRC phonon_DROPPED_ENTRIES Phonon ObjectDescription)
+
set(phonon_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractaudiooutput_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractmediastream_wrapper.cpp
@@ -42,14 +46,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumefaderinterface_wrapper.cp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumeslider_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_notifierwrapper_wrapper.cpp
+${phonon_OPTIONAL_SRC}
)
-set(TARGET_TYPESYSTEM "${CMAKE_CURRENT_BINARY_DIR}/typesystem_phonon.xml")
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_phonon.xml"
- "${TARGET_TYPESYSTEM}" @ONLY)
-
-check_qt_class("phonon" "VideoCaptureDevice" phonon_SRC ${TARGET_TYPESYSTEM} "Phonon" "ObjectDescription")
-
set(phonon_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
@@ -74,4 +73,5 @@ create_pyside_module(phonon
phonon_deps
phonon_typesystem_path
phonon_SRC
- ${TARGET_TYPESYSTEM})
+ ""
+ phonon_DROPPED_ENTRIES)
diff --git a/PySide/phonon/optional/VideoCaptureDevice.xml b/PySide/phonon/optional/VideoCaptureDevice.xml
deleted file mode 100644
index 9b3e554b..00000000
--- a/PySide/phonon/optional/VideoCaptureDevice.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<value-type name="VideoCaptureDevice">
- <modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
- <modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
- <modify-function signature="fromIndex(int)" remove="all"/>
-</value-type>
diff --git a/PySide/phonon/typesystem_phonon.xml b/PySide/phonon/typesystem_phonon.xml
index a954fcd0..c10fcc00 100644
--- a/PySide/phonon/typesystem_phonon.xml
+++ b/PySide/phonon/typesystem_phonon.xml
@@ -231,6 +231,15 @@
</modify-argument>
</modify-function>
</object-type>
- </namespace-type>
+
+ <!-- The following entries may be present in the system or not. Keep this section organized. -->
+ <value-type name="VideoCaptureDevice">
+ <modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
+ <modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
+ <modify-function signature="fromIndex(int)" remove="all"/>
+ </value-type>
+ <!-- The above entries may be present in the system or not. Keep this section organized. -->
+
+ </namespace-type>
</typesystem>
diff --git a/cmake/Macros/PySideModules.cmake b/cmake/Macros/PySideModules.cmake
index 07c118c8..dc33989b 100644
--- a/cmake/Macros/PySideModules.cmake
+++ b/cmake/Macros/PySideModules.cmake
@@ -1,6 +1,18 @@
-macro(create_pyside_module module_name module_include_dir module_libraries module_deps module_typesystem_path module_sources typesystem_name)
+macro(create_pyside_module module_name module_include_dir module_libraries module_deps module_typesystem_path module_sources)
string(TOLOWER ${module_name} _module)
string(REGEX REPLACE ^qt "" _module ${_module})
+
+ if(${ARGC} GREATER 6)
+ set (typesystem_name ${ARGV6})
+ else()
+ set (typesystem_name "")
+ endif()
+ if(${ARGC} GREATER 7)
+ string(REPLACE ";" "\\;" dropped_entries "${${ARGV7}}")
+ else()
+ set (dropped_entries "")
+ endif()
+
if (NOT EXISTS ${typesystem_name})
set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml)
else()
@@ -16,11 +28,12 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
${typesystem_path}
--api-version=${SUPPORTED_QT_VERSION}
+ --drop-type-entries="${dropped_entries}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${module_name}...")
include_directories(${module_name} ${${module_include_dir}} ${pyside_SOURCE_DIR})
- add_library(${module_name} MODULE ${${module_sources}} ${${ARGN}})
+ add_library(${module_name} MODULE ${${module_sources}})
set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR})
if(WIN32)
set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
@@ -43,25 +56,8 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
endmacro()
-macro(append_class_xml commom_xml class_xml)
- INCLUDE(FindPythonInterp)
- set(REPLACE_PROGRAM "import string; \\
- commomFile = open('${commom_xml}', 'r'); \\
- commomData = commomFile.read(); \\
- commomFile.close(); \\
- objectFile = open('${class_xml}', 'r'); \\
- objectData = objectFile.read(); \\
- objectFile.close(); \\
- commomData = string.replace(commomData, '</typesystem>', '%s\\n</typesystem>' % objectData); \\
- commomFile = open('${commom_xml}', 'w'); \\
- commomFile.write(commomData); \\
- commomFile.close();")
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "${REPLACE_PROGRAM}")
-endmacro()
-
-#macro(check_qt_class_with_namespace module namespace class global_sources commom_xml class_xml [namespace] [module])
-macro(check_qt_class module class global_sources commom_xml)
+#macro(check_qt_class_with_namespace module namespace class optional_source_files dropped_entries [namespace] [module])
+macro(check_qt_class module class optional_source_files dropped_entries)
if (${ARGC} GREATER 4)
set (namespace ${ARGV4})
string(TOLOWER ${namespace} _namespace)
@@ -82,7 +78,9 @@ macro(check_qt_class module class global_sources commom_xml)
endif ()
if (DEFINED PYSIDE_${class})
if (PYSIDE_${class})
- list(APPEND ${global_sources} ${_cppfile})
+ list(APPEND ${optional_source_files} ${_cppfile})
+ else()
+ list(APPEND ${dropped_entries} PySide.${module}.${class})
endif()
else()
if (NOT ${namespace} STREQUAL "" )
@@ -108,10 +106,10 @@ macro(check_qt_class module class global_sources commom_xml)
set("PYSIDE_${class}" ${Q_WORKS} CACHE STRING "Has ${class} class been found?")
if(Q_WORKS)
message(STATUS "Checking for ${class} in ${module} -- found")
- list(APPEND ${global_sources} ${_cppfile})
- append_class_xml(${commom_xml} "${CMAKE_CURRENT_SOURCE_DIR}/optional/${class}.xml")
+ list(APPEND ${optional_source_files} ${_cppfile})
else()
message(STATUS "Checking for ${class} in ${module} -- not found")
+ list(APPEND ${dropped_entries} PySide.${module}.${class})
endif()
endif()
endmacro()