diff options
author | Friedemann Kleint <[email protected]> | 2022-11-25 13:11:56 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2023-02-22 08:33:15 +0100 |
commit | 4a3f337d0154105f924e2e076d8f2cb63b3aca8e (patch) | |
tree | 56bc477467fd0fa4b43de1a10ef98b4d7519195c /sources | |
parent | 76b9c085dcc73dc631483609f59140dba1cf87e4 (diff) |
Add configuration options for some Qt classes
Add entries for classes not present in WebAssembly for QtCore.
Task-number: PYSIDE-962
Change-Id: I0b69ce4cfbbb1172893ccd2e87620b1d7ebb3872
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Reviewed-by: Christian Tismer <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside6/PySide6/QtCore/typesystem_core_common.xml | 31 | ||||
-rw-r--r-- | sources/pyside6/PySide6/QtNetwork/typesystem_network.xml | 56 |
2 files changed, 72 insertions, 15 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml index 3d582e3ad..00c84e2ff 100644 --- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml +++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml @@ -1271,9 +1271,12 @@ </value-type> <value-type name="QTimeZone"> + <configuration condition="QT_CONFIG(timezone)"/> <enum-type name="TimeType"/> <enum-type name="NameType"/> - <value-type name="OffsetData"/> + <value-type name="OffsetData"> + <configuration condition="QT_CONFIG(timezone)"/> + </value-type> </value-type> <value-type name="QUuid"> @@ -1468,6 +1471,7 @@ <modify-function signature="tryLockForWrite(int)" allow-thread="yes"/> </object-type> <object-type name="QReadLocker"> + <configuration condition="QT_CONFIG(thread)"/> <modify-function signature="QReadLocker(QReadWriteLock*)"> <modify-argument index="1"> <reference-count action="set"/> @@ -1482,6 +1486,7 @@ </add-function> </object-type> <object-type name="QWriteLocker"> + <configuration condition="QT_CONFIG(thread)"/> <modify-function signature="QWriteLocker(QReadWriteLock*)"> <modify-argument index="1"> <reference-count action="set"/> @@ -1499,6 +1504,7 @@ <enum-type name="IteratorFlag" flags="IteratorFlags"/> </object-type> <object-type name="QThread"> + <configuration condition="QT_CONFIG(thread)"/> <inject-code file="../glue/qtcore.cpp" class="native" position="beginning" snippet="qthread_pthread_cleanup"/> <enum-type name="Priority"/> <modify-function signature="currentThreadId()" remove="all"/> @@ -2326,6 +2332,7 @@ </object-type> <namespace-type name="QtCoreHelper" visible="no"> <object-type name="QMutexLocker" copyable="no"> + <configuration condition="QT_CONFIG(thread)"/> <!-- PYSIDE-1271: Creating locking capable objects inside sections that contain allow-thread, require the classes to also allow having threads. The lack of the option here, was generating a deadlock when running a @@ -2366,14 +2373,17 @@ <!-- Qt5 addition --> <object-type name="QBasicMutex"> + <configuration condition="QT_CONFIG(thread)"/> <modify-function signature="lock()" allow-thread="yes"/> <modify-function signature="tryLock()" allow-thread="yes"/> </object-type> <object-type name="QMutex"> + <configuration condition="QT_CONFIG(thread)"/> <modify-function signature="tryLock(int)" allow-thread="yes"/> </object-type> <object-type name="QRecursiveMutex"> + <configuration condition="QT_CONFIG(thread)"/> <modify-function signature="lock()" allow-thread="yes"/> <modify-function signature="tryLock(int)" allow-thread="yes"/> </object-type> @@ -2387,10 +2397,13 @@ <modify-function signature="operator()()" remove="all"/> </object-type> <object-type name="QSemaphore"> + <configuration condition="QT_CONFIG(thread)"/> <modify-function signature="acquire(int)" allow-thread="yes"/> <modify-function signature="tryAcquire(int,int)" allow-thread="yes"/> </object-type> - <object-type name="QSemaphoreReleaser"/> + <object-type name="QSemaphoreReleaser"> + <configuration condition="QT_CONFIG(thread)"/> + </object-type> <value-type name="QSocketDescriptor"> <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qsocketdescriptor"/> @@ -2433,6 +2446,7 @@ </modify-function> </object-type> <object-type name="QWaitCondition"> + <configuration condition="QT_CONFIG(thread)"/> <modify-function signature="wait(QMutex*,QDeadlineTimer)" allow-thread="yes"/> <modify-function signature="wait(QMutex*,unsigned long)" allow-thread="yes"/> <modify-function signature="wait(QReadWriteLock*,QDeadlineTimer)" allow-thread="yes"/> @@ -2458,6 +2472,7 @@ </add-function> </object-type> <object-type name="QProcess"> + <configuration condition="QT_CONFIG(process)"/> <enum-type name="ExitStatus"/> <enum-type name="InputChannelMode"/> <enum-type name="ProcessChannel"/> @@ -2847,11 +2862,13 @@ <enum-type name="LocateOption" flags="LocateOptions"/> </object-type> <object-type name="QSystemSemaphore"> + <configuration condition="#ifndef QT_NO_SYSTEMSEMAPHORE"/> <enum-type name="AccessMode"/> <enum-type name="SystemSemaphoreError"/> </object-type> <object-type name="QThreadPool"> + <configuration condition="QT_CONFIG(thread)"/> <modify-function signature="clear()" allow-thread="yes"/> <modify-function signature="activeThreadCount()const" allow-thread="yes"/> <modify-function signature="releaseThread()" allow-thread="yes"/> @@ -2931,19 +2948,23 @@ </value-type> <object-type name="QFutureInterfaceBase"> + <configuration condition="QT_CONFIG(future)"/> <enum-type name="State"/> <enum-type name="CancelMode" since="6.3"/> </object-type> <value-type name="QFuture" generate="no"> <include file-name="QtCore/qfuture.h" location="global"/> + <configuration condition="QT_CONFIG(future)"/> <modify-function signature="waitForFinished()" allow-thread="yes"/> </value-type> <object-type name="QFutureWatcherBase" generate="no"> + <configuration condition="QT_CONFIG(future)"/> <modify-function signature="futureInterface()" remove="all"/> <modify-function signature="futureInterface() const" remove="all"/> </object-type> <object-type name="QFutureWatcher" generate="no"> <include file-name="QtCore/qfuturewatcher.h" location="global"/> + <configuration condition="QT_CONFIG(future)"/> </object-type> <!--// FIXME PYSIDE 7: Remove in favor of QtCoreHelper::QGenericArgumentHolder for @@ -3136,6 +3157,7 @@ <object-type name="QPauseAnimation" since="4.6"/> <value-type name="QProcessEnvironment" since="4.6"> + <configuration condition="QT_CONFIG(processenvironment)"/> <enum-type name="Initialization" since="6.3"/> </value-type> @@ -3198,12 +3220,15 @@ </add-function> <object-type name="QFactoryInterface"/> - <object-type name="QRunnable"/> + <object-type name="QRunnable"> + <configuration condition="QT_CONFIG(thread)"/> + </object-type> <object-type name="QPluginLoader"/> <object-type name="QStringListModel"/> <object-type name="QSharedMemory"> + <configuration condition="#ifndef QT_NO_SHAREDMEMORY"/> <enum-type name="AccessMode"/> <enum-type name="SharedMemoryError"/> <modify-function signature="data()"> diff --git a/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml b/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml index 55fddf34f..f70021d8d 100644 --- a/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml +++ b/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml @@ -8,9 +8,15 @@ <rejection class="dtlsopenssl"/> - <enum-type name="QDtlsError"/> - <enum-type name="QOcspCertificateStatus"/> - <enum-type name="QOcspRevocationReason"/> + <enum-type name="QDtlsError"> + <configuration condition="QT_CONFIG(ssl)"/> + </enum-type> + <enum-type name="QOcspCertificateStatus"> + <configuration condition="QT_CONFIG(ssl)"/> + </enum-type> + <enum-type name="QOcspRevocationReason"> + <configuration condition="QT_CONFIG(ssl)"/> + </enum-type> <namespace-type name="QPasswordDigestor"> <extra-includes> @@ -66,8 +72,11 @@ <object-type name="QDtls"> <enum-type name="HandshakeState"/> + <configuration condition="QT_CONFIG(dtls)"/> + </object-type> + <object-type name="QDtlsClientVerifier"> + <configuration condition="QT_CONFIG(dtls)"/> </object-type> - <object-type name="QDtlsClientVerifier"/> <value-type name="QHstsPolicy"> <enum-type name="PolicyFlag" flags="PolicyFlags"/> @@ -96,7 +105,9 @@ </inject-code> </modify-function> </object-type> - <value-type name="QOcspResponse"/> + <value-type name="QOcspResponse"> + <configuration condition="QT_CONFIG(ssl)"/> + </value-type> <object-type name="QTcpSocket"/> <object-type name="QUdpSocket"> <modify-function signature="readDatagram(char*,qint64,QHostAddress*,quint16*)" allow-thread="yes"> @@ -198,11 +209,13 @@ <value-type name="QNetworkAddressEntry"> <enum-type name="DnsEligibilityStatus"/> + <configuration condition="#ifndef QT_NO_NETWORKINTERFACE"/> </value-type> <value-type name="QNetworkInterface"> <enum-type name="InterfaceFlag" flags="InterfaceFlags"/> <enum-type name="InterfaceType"/> + <configuration condition="#ifndef QT_NO_NETWORKINTERFACE"/> </value-type> <value-type name="QNetworkProxy"> @@ -249,31 +262,45 @@ <object-type name="QNetworkDiskCache"/> <value-type name="QNetworkCacheMetaData"/> - <object-type name="QSctpServer"/> - <object-type name="QSctpSocket"/> + <object-type name="QSctpServer"> + <configuration condition="QT_CONFIG(sctp)"/> + </object-type> + <object-type name="QSctpSocket"> + <configuration condition="QT_CONFIG(sctp)"/> + </object-type> <!-- The following entries may be present in the system or not. Keep this section organized. --> <value-type name="QSslCertificate"> <enum-type name="PatternSyntax"/> <enum-type name="SubjectInfo"/> + <configuration condition="QT_CONFIG(ssl)"/> </value-type> - <value-type name="QSslCertificateExtension"/> + <value-type name="QSslCertificateExtension"> + <configuration condition="QT_CONFIG(ssl)"/> + </value-type> - <value-type name="QSslCipher"/> + <value-type name="QSslCipher"> + <configuration condition="QT_CONFIG(ssl)"/> + </value-type> <value-type name="QSslConfiguration"> <enum-type name="NextProtocolNegotiationStatus"/> + <configuration condition="QT_CONFIG(ssl)"/> </value-type> <value-type name="QSslDiffieHellmanParameters"> <enum-type name="Error"/> + <configuration condition="QT_CONFIG(ssl)"/> </value-type> - <value-type name="QSslEllipticCurve"/> + <value-type name="QSslEllipticCurve"> + <configuration condition="QT_CONFIG(ssl)"/> + </value-type> <value-type name="QSslError"> <enum-type name="SslError"/> + <configuration condition="QT_CONFIG(ssl)"/> </value-type> <value-type name="QSslKey"/> @@ -282,11 +309,16 @@ <enum-type name="PeerVerifyMode"/> <modify-function signature="connectToHostEncrypted(const QString&,quint16,QFlags<QIODeviceBase::OpenModeFlag>,QAbstractSocket::NetworkLayerProtocol)" allow-thread="yes"/> <modify-function signature="waitForEncrypted(int)" allow-thread="yes"/> + <configuration condition="QT_CONFIG(ssl)"/> </object-type> - <value-type name="QSslPreSharedKeyAuthenticator"/> + <value-type name="QSslPreSharedKeyAuthenticator"> + <configuration condition="QT_CONFIG(ssl)"/> + </value-type> - <object-type name="QSslServer" since="6.4"/> + <object-type name="QSslServer" since="6.4"> + <configuration condition="QT_CONFIG(ssl)"/> + </object-type> <!-- The above entries may be present in the system or not. Keep this section organized. --> </typesystem> |