diff options
42 files changed, 201 insertions, 205 deletions
diff --git a/PySide/QtCore/CMakeLists.txt b/PySide/QtCore/CMakeLists.txt index 056597c..c486b7c 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 0fc96d4..591b6ac 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 4313606..c25a95e 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 902fb6e..0000000 --- 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 373cf30..0000000 --- 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 e75e06c..0000000 --- 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 66fe064..0000000 --- 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 7b62f48..0000000 --- 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 0f792fc..0000000 --- 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 635f390..0000000 --- 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 cf60a03..0000000 --- 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 b57416c..0000000 --- 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 479c4b4..0000000 --- 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 b8be5e8..0000000 --- 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 a0792da..0000000 --- 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 4387590..0000000 --- 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 724ac1e..e1a6f40 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 0ca0272..96c2375 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 30bf15c..ff60a8f 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 8823838..22c921d 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 50f8103..0f2273a 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 7acf97c..0000000 --- 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 15ff59a..0000000 --- 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 31c5e83..0000000 --- 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 0e4cf3e..0000000 --- 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 88a6370..0000000 --- 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 415e681..0000000 --- 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&, quint16, QFlags<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 8a677fd..5b06579 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&, quint16, QFlags<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 44ba1c1..719f46c 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 88b0a06..b4ec794 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 575dcc3..a110f15 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 7da42d4..204058e 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 b1e5477..a1e3eb6 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 fea841d..aaf4dd5 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 195cb81..5c68b11 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 83445db..c13a04a 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 a06c710..5d9c6a8 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 0d789ff..85f238e 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 a3f32d2..2adb25d 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 9b3e554..0000000 --- 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 a954fcd..c10fcc0 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 8b1d20a..fb74c5b 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() |