aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/PySide6/QtCore/typesystem_core_common.xml')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml1417
1 files changed, 895 insertions, 522 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index 889756db5..0a08928f5 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -1,62 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-->
<typesystem package="PySide6.QtCore">
+ <load-typesystem name="templates/common.xml" generate="no"/>
<load-typesystem name="templates/core_common.xml" generate="no"/>
- <custom-type name="str"/>
- <custom-type name="PyBytes"/>
- <custom-type name="PyByteArray"/>
- <custom-type name="PyCallable"/>
- <custom-type name="PyObject"/>
- <custom-type name="PyPathLike"/>
- <custom-type name="PySequence"/>
- <custom-type name="PyTypeObject"/>
- <custom-type name="PyUnicode"/>
<custom-type name="list of QAbstractAnimation"/>
<custom-type name="PySideSignalInstance"
check-function="PySide::Signal::checkInstanceType"/>
<!--
<function signature="qChecksum(QByteArrayView data, Qt::ChecksumType)"/>
-->
+ <extra-includes>
+ <include file-name="pysidemetatype.h" location="global"/>
+ <include file-name="pysideutils.h" location="global"/> <!-- QString conversion -->
+ <include file-name="signalmanager.h" location="global"/>
+ <!-- QtCoreHelper::QGenericReturnArgumentHolder -->
+ <include file-name="qtcorehelper.h" location="local"/>
+ </extra-includes>
+
<function signature="qFastCos(qreal)" since="4.6"/>
<function signature="qFastSin(qreal)" since="4.6"/>
<function signature="qFuzzyCompare(double,double)"/>
@@ -67,106 +31,136 @@
<function signature="qIsNull(double)"/>
<!-- Qt5: gone <function signature="qRound(qreal)"/> -->
<function signature="qtTrId(const char*,int)" since="4.6"/>
- <function signature="qVersion()"/>
- <function signature="qCompress(const uchar*,qsizetype,int)"/>
- <function signature="qCompress(const QByteArray&amp;,int)"/>
- <function signature="qUncompress(const uchar*,qsizetype)"/>
- <function signature="qUncompress(const QByteArray&amp;)"/>
- <function signature="qFormatLogMessage(QtMsgType,const QMessageLogContext&amp;,const QString&amp;)"/>
- <function signature="qSetMessagePattern(const QString&amp;)"/>
+ <function signature="qVersion()">
+ <modify-function>
+ <modify-argument index="return" pyi-type="str"/>
+ </modify-function>
+ </function>
+ <!-- Move PyBuffer overload to front to avoid conversion PyBuffer->QByteArray -->
+ <function signature="qCompress(const uchar*,qsizetype,int)" overload-number="0">
+ <modify-function>
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qcompress-buffer"/>
+ </modify-function>
+ </function>
+ <function signature="qCompress(const QByteArray&amp;,int)" overload-number="1"/>
+ <!-- Move PyBuffer overload to front to avoid conversion PyBuffer->QByteArray -->
+ <function signature="qUncompress(const uchar*,qsizetype)" overload-number="0">
+ <modify-function>
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="quncompress-buffer"/>
+ </modify-function>
+ </function>
+ <function signature="qUncompress(const QByteArray&amp;)" overload-number="1"/>
+ <function signature="qFormatLogMessage(QtMsgType,const QMessageLogContext&amp;,const QString&amp;)"
+ doc-file="qtlogging"/>
+ <function signature="qSetMessagePattern(const QString&amp;)" doc-file="qtlogging"/>
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="include-pyside"/>
-
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qarg_helper"/>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="darwin_permission_plugin"/>
<add-function signature="qDebug(const char*)">
<inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="qCritical(const char*)">
<inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="qFatal(const char*)">
<inject-code file="../glue/qtcore.cpp" snippet="qfatal"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="qWarning(const char*)">
<inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ <modify-argument index="1" pyi-type="str"/>
+ </add-function>
+
+ <add-function signature="Q_ARG(PyObject *@type@, PyObject *@value@)"
+ return-type="QtCoreHelper::QGenericArgumentHolder">
+ <inject-code file="../glue/qtcore.cpp" snippet="q_arg"/>
+ <inject-documentation format="target" mode="append">
+ This function takes a type (or a type string) and a value of that type
+ and returns an internal object that can be passed to
+ QMetaObject.invokeMethod(). See also Q_RETURN_ARG().
+ </inject-documentation>
+ </add-function>
+ <add-function signature="Q_RETURN_ARG(PyObject *@type@)"
+ return-type="QtCoreHelper::QGenericReturnArgumentHolder">
+ <inject-code file="../glue/qtcore.cpp" snippet="q_return_arg"/>
+ <inject-documentation format="target" mode="append">
+ This macro takes a type (or a type string) a value of which is then
+ returned by QMetaObject::invokeMethod(). See also Q_ARG().
+ </inject-documentation>
</add-function>
<!-- TODO: We do not support void* or const void* as arg -->
<rejection class="QMetaObject" function-name="activate"/>
<rejection class="QMetaObject" function-name="metacall"/>
<rejection class="QMetaObject" function-name="static_metacall"/>
- <!-- TODO: Support to addGuard(QObject**) -->
- <rejection class="QMetaObject" function-name="addGuard"/>
- <rejection class="QMetaObject" function-name="changeGuard"/>
- <rejection class="QMetaObject" function-name="removeGuard"/>
<rejection class="QAlgorithmsPrivate"/>
<rejection class="QJsonPrivate"/>
- <rejection class="QTextStreamFunctions"/>
<rejection class="QtGlobalStatic"/>
<rejection class="QtMetaTypePrivate"/>
<rejection class="QtPrivate"/>
<rejection class="QtSharedPointer"/>
<rejection class="QtStringBuilder"/>
- <rejection class="QByteArray" field-name="MaxSize"/>
+ <rejection class="q20"/>
+ <rejection class="q23"/>
+ <rejection class="q_has_char8_t"/>
+ <rejection class="QContainerInfo"/>
+ <rejection class="QHashPrivate"/>
+ <rejection class="q_no_char8_t"/>
+ <rejection class="Qt::Literals"/>
+ <rejection class="QtLiterals"/>
+ <rejection class="QtMetaContainerPrivate"/>
+ <rejection class="QtTsan"/>
+ <rejection class="QTypeTraits"/>
+ <rejection class="qxp"/>
+
<rejection class="QChildEvent" field-name="c"/>
<rejection class="QTimerEvent" field-name="id"/>
<rejection class="QEvent" field-name="t"/>
<rejection class="*" function-name="tr"/>
- <rejection class="*" function-name="trUtf8"/>
- <rejection class="*" function-name="qt_metacast"/>
<!-- From Qt4.6 -->
<rejection class="*" field-name="d_ptr"/>
- <rejection class="*" field-name="staticQtMetaObject"/>
- <rejection class="*" function-name="qobject_interface_iid"/>
- <rejection class="*" function-name="qGetPtrHelper"/>
- <rejection class="*" function-name="q_check_ptr"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QTextCodecFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qobject_interface_iid&lt;QFactoryInterface*&gt;"/>
- <rejection class="*" function-name="qRegisterAnimationInterpolator"/>
- <rejection class="*" function-name="qvariant_cast&lt;QVariant&gt;"/>
- <rejection class="*" function-name="qVariantSetValue&lt;QVariant&gt;"/>
- <rejection class="*" function-name="qReallocAligned"/>
- <rejection class="*" function-name="qMallocAligned"/>
- <rejection class="*" function-name="qFreeAligned"/>
<rejection class="QMetaMethod" enum-name="Attributes"/>
+ <rejection class="QMetaMethod" field-name="data"/>
+ <!-- Note: Default parameter values of Disambiguated_t as defined by
+ QT6_DECL_NEW_OVERLOAD_TAIL are not seen by the clang parser since it
+ is relying on code snippets for the values. -->
+ <rejection class="Qt" field-name="Disambiguated"/>
+ <rejection class="" enum-name="QCborNegativeInteger"/>
- <rejection class="*" argument-type="QByteArrayDataPtr"/>
<rejection class="*" argument-type="^qfloat16&amp;?$"/>
- <rejection class="*" argument-type="QHashData"/>
- <rejection class="*" argument-type="QHashData::Node*"/>
- <rejection class="*" argument-type="QLatin1String"/>
- <rejection class="*" argument-type="QLinkedListData*"/>
- <rejection class="*" argument-type="QListData::ArrayCompatibleLayout"/>
- <rejection class="*" argument-type="QListData::Data*"/>
- <rejection class="*" argument-type="QListData::NotArrayCompatibleLayout"/>
- <rejection class="*" argument-type="QList::Node*"/>
<rejection class="*" argument-type="QTSMFI"/>
<rejection class="*" argument-type="QTSMFC"/>
- <rejection class="*" argument-type="QMutexData*"/>
- <rejection class="*" argument-type="QObjectUserData*"/>
<rejection class="*" argument-type="QtPrivate::QSlotObjectBase*"/>
<rejection class="*" argument-type="^Q\w+Private( const)?\&amp;$"/>
<!-- Note: "QHelpModel(QHelpEnginePrivate*)" is needed -->
<rejection class="*" argument-type="^Q[^H]\w+Private( const)?\*$"/>
- <rejection class="*" argument-type="^.*::QPrivateSignal$"/>
<rejection class="*" argument-type="Qt::Initialization"/>
<rejection class="*" argument-type="FILE*"/>
<rejection class="*" argument-type="std::chrono::milliseconds"/>
<rejection class="*" argument-type="^std::nullptr_t&amp;?$"/>
<rejection class="*" argument-type="^std::initializer_list&lt;.*$"/>
- <rejection class="*" argument-type="^std::list&lt;[^&gt;]&gt; const&amp;$"/>
- <rejection class="*" argument-type="std::string const&amp;"/>
- <rejection class="*" argument-type="^std::vector&lt;[^&gt;]&gt; const&amp;$"/>
<!-- From Qt4.6 ^^^ -->
-
- <enum-type name="QtMsgType"/>
- <enum-type name="QCborSimpleType" since="5.12"/>
- <enum-type name="QCborKnownTags" since="5.12"/>
+ <enum-type name="QtMsgType" doc-file="qtlogging"/>
+ <enum-type name="QCborSimpleType" doc-file="qtcborcommon"/>
+ <enum-type name="QCborKnownTags" doc-file="qtcborcommon"/>
+ <enum-type name="QCborTag" doc-file="qtcborcommon"/>
<primitive-type name="qint8"/>
<primitive-type name="qint16"/>
@@ -175,39 +169,26 @@
<primitive-type name="quint16"/>
<primitive-type name="quint32"/>
<primitive-type name="quint64"/>
- <primitive-type name="double"/>
<primitive-type name="qreal"/>
- <primitive-type name="float"/>
<primitive-type name="qint64"/>
- <primitive-type name="unsigned long long"/>
- <primitive-type name="long long"/>
<primitive-type name="qlonglong" target-lang-api-name="PyLong"/>
<primitive-type name="qulonglong" target-lang-api-name="PyLong"/>
<primitive-type name="qsizetype" target-lang-api-name="PyLong"/>
<primitive-type name="size_t" target-lang-api-name="PyLong"/>
- <primitive-type name="short"/>
- <primitive-type name="signed short"/>
- <primitive-type name="signed short int"/>
- <primitive-type name="ushort" target-lang-api-name="PyInt"/>
- <primitive-type name="unsigned short int"/>
- <primitive-type name="unsigned short"/>
- <primitive-type name="char"/>
- <primitive-type name="signed char"/>
+ <primitive-type name="ushort" target-lang-api-name="PyLong"/>
<primitive-type name="uchar"/>
- <primitive-type name="unsigned char"/>
- <primitive-type name="int"/>
- <primitive-type name="signed int"/>
<primitive-type name="uint"/>
<primitive-type name="ulong"/>
- <primitive-type name="unsigned int"/>
- <primitive-type name="signed long"/>
- <primitive-type name="signed long int"/>
- <primitive-type name="long"/>
- <primitive-type name="unsigned long int"/>
- <primitive-type name="unsigned long">
- <!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
- <include file-name="signalmanager.h" location="global"/>
- </primitive-type>
+ <primitive-type name="int8_t"/>
+ <primitive-type name="uint8_t"/>
+ <primitive-type name="int16_t"/>
+ <primitive-type name="uint16_t"/>
+ <primitive-type name="int32_t"/>
+ <primitive-type name="uint32_t"/>
+ <primitive-type name="int64_t"/>
+ <primitive-type name="uint64_t"/>
+ <primitive-type name="intptr_t"/>
+ <primitive-type name="uintptr_t"/>
<?if windows darwin?>
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
@@ -216,21 +197,14 @@
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong"/>
<?endif?>
- <primitive-type name="bool" target-lang-api-name="PyBool">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pybool"/>
- <target-to-native>
- <add-conversion type="PyBool" file="../glue/qtcore.cpp" snippet="conversion-pybool"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
<!-- Qt5: add the new pointer-ish types -->
<primitive-type name="qintptr" target-lang-api-name="PyLong">
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="return-pylong"/>
<target-to-native>
- <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong"/>
+ <add-conversion type="PyLong">
+ <insert-template name="shiboken_conversion_pylong_to_cpp"/>
+ </add-conversion>
</target-to-native>
</conversion-rule>
</primitive-type>
@@ -246,11 +220,20 @@
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="return-pylong"/>
<target-to-native>
- <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong"/>
+ <add-conversion type="PyLong">
+ <insert-template name="shiboken_conversion_pylong_to_cpp"/>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+ <primitive-type name="QFunctionPointer" target-lang-api-name="PyLong">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-qfunctionpointer-pylong"/>
+ <target-to-native>
+ <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong-qfunctionpointer"/>
</target-to-native>
</conversion-rule>
</primitive-type>
-
<primitive-type name="QString" target-lang-api-name="PyUnicode">
<include file-name="QString" location="global"/>
<conversion-rule>
@@ -269,18 +252,39 @@
</conversion-rule>
</primitive-type>
+ <primitive-type name="QLatin1String" target-lang-api-name="PyUnicode">
+ <include file-name="QtCore/qlatin1stringview.h" location="global"/>
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-from-qlatin1string"/>
+ <target-to-native>
+ <add-conversion type="PyString" check="qLatin1StringCheck(%in)"
+ file="../glue/qtcore.cpp" snippet="conversion-pystring-qlatin1string"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <primitive-type name="QAnyStringView" target-lang-api-name="PyUnicode" view-on="QString">
+ <include file-name="QAnyStringView" location="global"/>
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-from-qanystringview"/>
+ </conversion-rule>
+ </primitive-type>
+
<primitive-type name="QChar">
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-qchar"/>
<target-to-native>
<add-conversion type="PyString" check="Shiboken::String::checkChar(%in)" file="../glue/qtcore.cpp" snippet="conversion-pystring-char"/>
- <add-conversion type="PyInt" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
+ <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
</target-to-native>
</conversion-rule>
</primitive-type>
<primitive-type name="QVariant" target-lang-api-name="PyObject">
+ <extra-includes>
+ <include file-name="optional" location="global"/>
+ </extra-includes>
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="return-qvariant"/>
<target-to-native>
@@ -289,10 +293,7 @@
<add-conversion type="QString" check="Shiboken::String::check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qstring"/>
<add-conversion type="QByteArray" file="../glue/qtcore.cpp" snippet="conversion-qbytearray"/>
<add-conversion type="PyFloat" check="PyFloat_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-pyfloat"/>
- <!-- Using PyLong instead of PyInt to support Python2 and 3-->
- <add-conversion type="PyInt" check="PyInt_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
<add-conversion type="PyLong" check="PyLong_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
- <add-conversion type="SbkEnumType" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
<add-conversion type="SbkObject" file="../glue/qtcore.cpp" snippet="conversion-sbkobject"/>
<add-conversion type="PyDict" check="PyDict_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-pydict"/>
<add-conversion type="PyList" check="PyList_Check(%in)" file="../glue/qtcore.cpp" snippet="conversion-pylist"/>
@@ -305,13 +306,13 @@
<include file-name="QStringList" location="global"/>
<conversion-rule>
<native-to-target>
- <insert-template name="cpplist_to_pylist_conversion">
+ <insert-template name="shiboken_conversion_cppsequence_to_pylist">
<replace from="%INTYPE_0" to="QString"/>
</insert-template>
</native-to-target>
<target-to-native>
<add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion">
+ <insert-template name="shiboken_conversion_pyiterable_to_cppsequentialcontainer_reserve">
<replace from="%OUTTYPE_0" to="QString"/>
</insert-template>
</add-conversion>
@@ -319,24 +320,24 @@
</conversion-rule>
</primitive-type>
- <value-type name="QCborError" since="5.12">
+ <value-type name="QCborError">
<enum-type name="Code"/>
<include file-name="qcborcommon.h" location="global"/>
</value-type>
- <value-type name="QCborParserError" since="5.12">
+ <value-type name="QCborParserError">
<include file-name="qcborvalue.h" location="global"/>
</value-type>
- <value-type name="QCborValue" since="5.12">
+ <value-type name="QCborValue">
<enum-type name="EncodingOption" flags="EncodingOptions"/>
<enum-type name="DiagnosticNotationOption" flags="DiagnosticNotationOptions"/>
<enum-type name="Type"/>
</value-type>
- <value-type name="QCborArray" since="5.12"/>
- <value-type name="QCborMap" since="5.12"/>
+ <value-type name="QCborArray"/>
+ <value-type name="QCborMap"/>
- <object-type name="QCborStreamReader" since="5.12">
+ <object-type name="QCborStreamReader">
<enum-type name="StringResultCode"/>
<enum-type name="Type"/>
<include file-name="qcborstream.h" location="global"/>
@@ -346,9 +347,9 @@
<!-- 32bit (qsizetype = int) -->
<modify-function signature="readStringChunk(char*,int)" remove="all"/>
</object-type>
- <typedef-type name="QCborStringResultString" source="QCborStreamReader::StringResult&lt;QString&gt;" since="5.12"/>
- <typedef-type name="QCborStringResultByteArray" source="QCborStreamReader::StringResult&lt;QByteArray&gt;" since="5.12"/>
- <object-type name="QCborStreamWriter" since="5.12">
+ <typedef-type name="QCborStringResultString" source="QCborStreamReader::StringResult&lt;QString&gt;"/>
+ <typedef-type name="QCborStringResultByteArray" source="QCborStreamReader::StringResult&lt;QByteArray&gt;"/>
+ <object-type name="QCborStreamWriter">
<include file-name="qcborstream.h" location="global"/>
</object-type>
@@ -361,11 +362,36 @@
</conversion-rule>
</primitive-type>
- <value-type name="QKeyCombination"/>
+ <value-type name="QKeyCombination">
+ <!-- The following do-nothing function is needed for coercion of constructs like
+ QKeyCombination(Qt.CTRL | Qt.Key_B)
+ -->
+ <add-function signature="QKeyCombination(QKeyCombination)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="keycombination-from-keycombination"/>
+ </add-function>
+ <!-- This is just a copy of KeyModifier to handle Modifier the same -->
+ <add-function signature="QKeyCombination(Qt::Modifier @modifiers@, Qt::Key @key@)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="keycombination-from-modifier"/>
+ </add-function>
+ </value-type>
<value-type name="QMetaType">
- <enum-type name="Type"/>
+ <extra-includes>
+ <include file-name="pysidemetatype.h" location="global"/>
+ </extra-includes>
+ <enum-type name="Type" python-type="IntEnum"/>
<enum-type name="TypeFlag" flags="TypeFlags"/>
+ <add-function signature="QMetaType(PyTypeObject*)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="metatype-from-type"/>
+ </add-function>
+ <!-- PYSIDE-1735: The class QMetaType.Type must be allowed because int is gone -->
+ <add-function signature="QMetaType(QMetaType::Type)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="metatype-from-metatype-type"/>
+ </add-function>
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="conversion-qmetatype-pytypeobject"/>
<target-to-native>
@@ -374,40 +400,27 @@
</conversion-rule>
</value-type>
- <primitive-type name="QModelIndexList">
- <include file-name="qabstractitemmodel.h" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cpplist_to_pylist_conversion">
- <replace from="%INTYPE_0" to="QModelIndex"/>
- </insert-template>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion">
- <replace from="%OUTTYPE_0" to="QModelIndex"/>
- </insert-template>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
+ <value-type name="QNativeIpcKey" since="6.6">
+ <enum-type name="Type"/>
+ </value-type>
<container-type name="QSet" type="set">
<include file-name="QSet" location="global"/>
<conversion-rule>
<native-to-target>
- <insert-template name="cpplist_to_pylist_conversion"/>
+ <insert-template name="shiboken_conversion_cppsequence_to_pyset"/>
</native-to-target>
<target-to-native>
<add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion"/>
+ <insert-template name="shiboken_conversion_pyiterable_to_cppsetcontainer"/>
</add-conversion>
</target-to-native>
</conversion-rule>
</container-type>
<!-- FIXME: Which one is it going to be? -->
- <container-type name="QList" type="list">
+ <container-type name="QList" type="list"
+ opaque-containers="int:QIntList;QPoint:QPointList;QPointF:QPointFList">
<include file-name="QList" location="global"/>
<declare-function signature="append(T)" return-type="void"/>
<declare-function signature="insert(qsizetype,T)" return-type="void"/>
@@ -419,11 +432,11 @@
<!-- operator << needs to be declared in inheriting class -->
<conversion-rule>
<native-to-target>
- <insert-template name="cpplist_to_pylist_conversion"/>
+ <insert-template name="shiboken_conversion_cppsequence_to_pylist"/>
</native-to-target>
<target-to-native>
<add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion"/>
+ <insert-template name="shiboken_conversion_pyiterable_to_cppsequentialcontainer_reserve"/>
</add-conversion>
</target-to-native>
</conversion-rule>
@@ -433,11 +446,11 @@
<include file-name="QStack" location="global"/>
<conversion-rule>
<native-to-target>
- <insert-template name="cpplist_to_pylist_conversion"/>
+ <insert-template name="shiboken_conversion_cppsequence_to_pylist"/>
</native-to-target>
<target-to-native>
<add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion"/>
+ <insert-template name="shiboken_conversion_pyiterable_to_cppsequentialcontainer_reserve"/>
</add-conversion>
</target-to-native>
</conversion-rule>
@@ -447,11 +460,11 @@
<include file-name="QQueue" location="global"/>
<conversion-rule>
<native-to-target>
- <insert-template name="cpplist_to_pylist_conversion"/>
+ <insert-template name="shiboken_conversion_cppsequence_to_pylist"/>
</native-to-target>
<target-to-native>
<add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion"/>
+ <insert-template name="shiboken_conversion_pyiterable_to_cppsequentialcontainer_reserve"/>
</add-conversion>
</target-to-native>
</conversion-rule>
@@ -460,14 +473,13 @@
<container-type name="QHash" type="hash">
<include file-name="QHash" location="global"/>
<!-- Include to make enum flags work. -->
- <include file-name="pysideqflags.h" location="global"/>
<conversion-rule>
<native-to-target>
- <insert-template name="cppmap_to_pymap_conversion"/>
+ <insert-template name="shiboken_conversion_qmap_to_pydict"/>
</native-to-target>
<target-to-native>
<add-conversion type="PyDict">
- <insert-template name="pydict_to_cppmap_conversion"/>
+ <insert-template name="shiboken_conversion_pydict_to_qmap"/>
</add-conversion>
</target-to-native>
</conversion-rule>
@@ -476,28 +488,29 @@
<container-type name="QMultiHash" type="multi-hash">
<include file-name="QMultiHash" location="global"/>
<!-- Include to make enum flags work. -->
- <include file-name="pysideqflags.h" location="global"/>
<conversion-rule>
<native-to-target>
- <insert-template name="cppmultihash_to_pymap_conversion"/>
+ <insert-template name="shiboken_conversion_qmultihash_to_pydict"/>
</native-to-target>
<target-to-native>
<add-conversion type="PyDict">
- <insert-template name="pydict_to_cppmultimap_conversion"/>
+ <insert-template name="shiboken_conversion_pydict_to_qmultihash"/>
</add-conversion>
</target-to-native>
</conversion-rule>
</container-type>
+ <value-type name="QHashSeed" since="6.2"/>
+
<container-type name="QMap" type="map">
<include file-name="QMap" location="global"/>
<conversion-rule>
<native-to-target>
- <insert-template name="cppmap_to_pymap_conversion"/>
+ <insert-template name="shiboken_conversion_qmap_to_pydict"/>
</native-to-target>
<target-to-native>
<add-conversion type="PyDict">
- <insert-template name="pydict_to_cppmap_conversion"/>
+ <insert-template name="shiboken_conversion_pydict_to_qmap"/>
</add-conversion>
</target-to-native>
</conversion-rule>
@@ -506,11 +519,11 @@
<include file-name="QMultiMap" location="global"/>
<conversion-rule>
<native-to-target>
- <insert-template name="cppmultimap_to_pymap_conversion"/>
+ <insert-template name="shiboken_conversion_qmultimap_to_pydict"/>
</native-to-target>
<target-to-native>
<add-conversion type="PyDict">
- <insert-template name="pydict_to_cppmultimap_conversion"/>
+ <insert-template name="shiboken_conversion_pydict_to_qmultihash"/>
</add-conversion>
</target-to-native>
</conversion-rule>
@@ -519,19 +532,13 @@
<container-type name="QPair" type="pair">
<include file-name="QPair" location="global"/>
<conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-qpair"/>
- <target-to-native>
- <add-conversion type="PySequence" file="../glue/qtcore.cpp" snippet="conversion-qpair-pysequence"/>
- </target-to-native>
- </conversion-rule>
- </container-type>
-
- <!-- QPair is implemented with std::pair since Qt 6 -->
- <container-type name="std::pair" type="pair">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-qpair"/>
+ <native-to-target>
+ <insert-template name="shiboken_conversion_cpppair_to_pytuple"/>
+ </native-to-target>
<target-to-native>
- <add-conversion type="PySequence" file="../glue/qtcore.cpp" snippet="conversion-qpair-pysequence"/>
+ <add-conversion type="PySequence">
+ <insert-template name="shiboken_conversion_pysequence_to_cpppair"/>
+ </add-conversion>
</target-to-native>
</conversion-rule>
</container-type>
@@ -544,53 +551,29 @@
<rejection class="*" field-name="d"/>
<rejection class="*" field-name="staticMetaObject"/>
<!-- not support array in property -->
- <rejection class="QTextCodec::ConverterState" field-name="state_data"/>
<rejection class="QUuid" field-name="data1"/>
<rejection class="QUuid" field-name="data2"/>
<rejection class="QUuid" field-name="data3"/>
<rejection class="QUuid" field-name="data4"/>
- <rejection class="" enum-name="QtValidLicenseForTestModule"/>
- <rejection class="" enum-name="QtValidLicenseForDBusModule"/>
- <rejection class="" enum-name="QtValidLicenseForSqlModule"/>
- <rejection class="" enum-name="QtValidLicenseForOpenGLModule"/>
- <rejection class="" enum-name="QtValidLicenseForScriptToolsModule"/>
- <rejection class="" enum-name="__codecvt_result"/>
- <rejection class="" enum-name="enum_1"/>
- <rejection class="" enum-name="enum_2"/>
- <rejection class="" enum-name="QtValidLicenseForXmlModule"/>
- <rejection class="" enum-name="QtValidLicenseForActiveQtModule"/>
- <rejection class="" enum-name="QtValidLicenseForCoreModule"/>
- <rejection class="" enum-name="QtValidLicenseForNetworkModule"/>
- <rejection class="" enum-name="QtValidLicenseForSvgModule"/>
- <rejection class="" enum-name="QtValidLicenseForGuiModule"/>
- <rejection class="" enum-name="QtValidLicenseForHelpModule"/>
<!-- Internal -->
- <rejection class="QAbstractFileEngine"/> <!--
- <rejection class="QAbstractFileEngine" function-name="endEntryList"/>
- <rejection class="QAbstractFileEngine" function-name="extension"/> XXX -->
<rejection class="QCoreApplication" function-name="compressEvent"/>
- <rejection class="QCoreApplication" function-name="eventFilter"/>
- <rejection class="QCoreApplication" function-name="filterEvent"/>
- <rejection class="QCoreApplication" function-name="setEventFilter"/>
- <rejection class="QFile" function-name="setDecodingFunction"/>
- <rejection class="QFile" function-name="setEncodingFunction"/>
- <rejection class="QRegion" function-name="cleanUp"/>
- <rejection class="QSettings" function-name="registerFormat"/>
- <rejection class="Qt" function-name="qt_getEnumMetaObject"/>
- <rejection class="Qt" function-name="qt_getEnumName"/>
<namespace-type name="Qt">
- <enum-type name="AlignmentFlag" flags="Alignment"/>
+ <extra-includes>
+ <include file-name="QtCore/QProperty" location="global"/>
+ </extra-includes>
+ <enum-type name="AlignmentFlag" python-type="IntFlag" flags="Alignment"/>
<enum-type name="AnchorPoint" since="4.6"/>
+ <enum-type name="ColorScheme" since="6.5"/>
<enum-type name="ApplicationAttribute"/>
- <enum-type name="ApplicationState" flags="ApplicationStates" since="5.1"/>
+ <enum-type name="ApplicationState" flags="ApplicationStates"/>
<enum-type name="ArrowType"/>
<enum-type name="AspectRatioMode"/>
<enum-type name="Axis"/>
<enum-type name="BGMode"/>
<enum-type name="BrushStyle"/>
<enum-type name="CaseSensitivity"/>
- <enum-type name="ChecksumType" since="5.9"/>
+ <enum-type name="ChecksumType"/>
<enum-type name="CheckState"/>
<enum-type name="ClipOperation"/>
<enum-type name="ConnectionType"/>
@@ -603,57 +586,58 @@
<enum-type name="DockWidgetArea" flags="DockWidgetAreas"/>
<enum-type name="DockWidgetAreaSizes"/>
<enum-type name="DropAction" flags="DropActions"/>
- <enum-type name="Edge" flags="Edges" since="5.1"/>
+ <enum-type name="Edge" flags="Edges"/>
<enum-type name="EventPriority"/>
<enum-type name="FillRule"/>
- <enum-type name="FindChildOption" flags="FindChildOptions" since="5.0"/>
- <enum-type name="FocusPolicy"/>
+ <enum-type name="FindChildOption" flags="FindChildOptions"/>
+ <enum-type name="FocusPolicy" python-type="IntFlag"/>
<enum-type name="FocusReason"/>
<enum-type name="GestureFlag" flags="GestureFlags" since="4.6"/>
<enum-type name="GestureState" since="4.6"/>
- <enum-type name="GestureType" since="4.6"/>
+ <enum-type name="GestureType" python-type="IntEnum" since="4.6"/>
<enum-type name="GlobalColor"/>
- <enum-type name="HighDpiScaleFactorRoundingPolicy" since="5.14"/>
+ <enum-type name="HighDpiScaleFactorRoundingPolicy"/>
<enum-type name="HitTestAccuracy"/>
<enum-type name="ImageConversionFlag" flags="ImageConversionFlags"/>
<enum-type name="InputMethodHint" flags="InputMethodHints" since="4.6"/>
<enum-type name="InputMethodQuery" flags="InputMethodQueries"/>
- <enum-type name="EnterKeyType" since="5.6"/>
- <enum-type name="ItemDataRole"/>
+ <enum-type name="EnterKeyType"/>
+ <enum-type name="ItemDataRole" python-type="IntEnum"/>
<enum-type name="ItemFlag" flags="ItemFlags"/>
<enum-type name="ItemSelectionMode"/>
- <enum-type name="ItemSelectionOperation" since="5.5"/>
- <enum-type name="Key"/>
+ <enum-type name="ItemSelectionOperation"/>
+ <enum-type name="Key" python-type="IntEnum"/>
<enum-type name="KeyboardModifier" flags="KeyboardModifiers"/>
<enum-type name="LayoutDirection"/>
<enum-type name="MaskMode"/>
<enum-type name="MatchFlag" flags="MatchFlags"/>
- <enum-type name="Modifier"/>
+ <enum-type name="Modifier" python-type="Flag"/>
<enum-type name="MouseButton" flags="MouseButtons"/>
- <enum-type name="MouseEventFlag" flags="MouseEventFlags" since="5.3"/>
- <enum-type name="MouseEventSource" since="5.3"/>
- <enum-type name="NativeGestureType" since="5.0"/>
+ <enum-type name="MouseEventFlag" flags="MouseEventFlags"/>
+ <enum-type name="MouseEventSource"/>
+ <enum-type name="NativeGestureType"/>
<enum-type name="NavigationMode" since="4.6"/>
<enum-type name="Orientation" flags="Orientations"/>
<enum-type name="PenCapStyle"/>
<enum-type name="PenJoinStyle"/>
<enum-type name="PenStyle"/>
- <enum-type name="ReturnByValueConstant" since="6.0"/>
- <enum-type name="ScreenOrientation" flags="ScreenOrientations" since="5.0"/>
+ <enum-type name="PermissionStatus" since="6.5"/>
+ <enum-type name="ReturnByValueConstant"/>
+ <enum-type name="ScreenOrientation" flags="ScreenOrientations"/>
<enum-type name="ScrollBarPolicy"/>
- <enum-type name="ScrollPhase" since="5.2"/>
+ <enum-type name="ScrollPhase"/>
<enum-type name="ShortcutContext"/>
<enum-type name="SizeHint"/>
<enum-type name="SizeMode"/>
<enum-type name="SortOrder"/>
- <enum-type name="SplitBehaviorFlags" flags="SplitBehavior" since="5.14"/>
- <enum-type name="TabFocusBehavior" since="5.5"/>
+ <enum-type name="SplitBehaviorFlags" flags="SplitBehavior"/>
+ <enum-type name="TabFocusBehavior"/>
<enum-type name="TextElideMode"/>
- <enum-type name="TextFlag"/>
+ <enum-type name="TextFlag" python-type="IntFlag"/>
<enum-type name="TextFormat"/>
<enum-type name="TextInteractionFlag" flags="TextInteractionFlags"/>
<enum-type name="TileRule" since="4.6"/>
- <enum-type name="TimerType" since="5.0"/>
+ <enum-type name="TimerType"/>
<enum-type name="TimeSpec"/>
<enum-type name="ToolBarArea" flags="ToolBarAreas"/>
<enum-type name="ToolBarAreaSizes"/>
@@ -666,9 +650,11 @@
<enum-type name="WindowFrameSection"/>
<enum-type name="WindowModality"/>
<enum-type name="WindowState" flags="WindowStates"/>
- <enum-type name="WindowType" flags="WindowFlags"/>
+ <enum-type name="WindowType" python-type="IntFlag" flags="WindowFlags"/>
<enum-type name="CursorMoveStyle" since="4.8" revision="4800"/>
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp"
+ snippet="qt-modifier"/>
</namespace-type>
<add-function signature="QEnum(PyObject*)" return-type="PyObject*">
@@ -686,7 +672,6 @@
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qabs"/>
</add-function>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qt-postroutine"/>
<add-function signature="qAddPostRoutine(PyObject*)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-addpostroutine"/>
</add-function>
@@ -704,11 +689,13 @@
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-pysideinit"/>
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qt-messagehandler"/>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qlatin1string-check"/>
<add-function signature="qInstallMessageHandler(PyObject)" return-type="PyObject">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-installmessagehandler"/>
</add-function>
- <value-type name="QDeadlineTimer" since="5.8">
+ <value-type name="QDeadlineTimer">
<enum-type name="ForeverConstant"/>
</value-type>
@@ -716,13 +703,17 @@
<enum-type name="ClockType" since="4.7"/>
</value-type>
- <object-type name="QAbstractTableModel" polymorphic-id-expression="qobject_cast&lt;QAbstractTableModel*&gt;(%1)">
+ <object-type name="QAbstractTableModel"
+ polymorphic-id-expression="qobject_cast&lt;QAbstractTableModel*&gt;(%B)">
<extra-includes>
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
</object-type>
<value-type name="QLine" hash-function="PySide::hash">
+ <extra-includes>
+ <include file-name="pysideqhash.h" location="global"/>
+ </extra-includes>
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -783,14 +774,14 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[PySide6.QtCore.QLineF.IntersectionType, PySide6.QtCore.QPointF]">
<replace-type modified-type="(intersectType, intersectionPoint)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qlinef-intersect"/>
</modify-function>
</value-type>
<object-type name="QResource">
- <enum-type name="Compression" since="5.13"/>
+ <enum-type name="Compression"/>
<modify-function signature="data()const">
<inject-documentation format="target">
Returns a read only buffer object pointing to the segment of data that this resource represents. If the resource is compressed the data returns is compressed and qUncompress() must be used to access the data. If the resource is a directory None is returned.
@@ -817,24 +808,20 @@
<object-type name="QBasicTimer"/>
<value-type name="QByteArrayMatcher"/>
- <value-type name="QCalendar" since="5.14">
- <!-- Avoid clashes between size_t/enum System -->
- <modify-function signature="QCalendar(QCalendar::System)" overload-number="0"/>
- <modify-function signature="QCalendar(QStringView)" overload-number="1"/>
- <modify-function signature="QCalendar(size_t)" overload-number="2"/>
+ <value-type name="QCalendar">
+ <object-type name="SystemId"/> <!-- not default-constructible -->
<value-type name="YearMonthDay"/>
<enum-type name="System"/>
+ <enum-type identified-by-value="Unspecified"/>
</value-type>
- <value-type name="QDate" hash-function="PySide::hash" >
- <inject-code class="native" position="beginning">
- <insert-template name="pydatetime_importandcheck_function">
- <replace from="$DATETIMETYPE" to="PyDate"/>
- </insert-template>
- </inject-code>
+ <value-type name="QDate">
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="core-snippets-p-h"/>
<conversion-rule>
<target-to-native>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- <add-conversion type="PyDate" check="PyDateTime_ImportAndCheck(%in)" file="../glue/qtcore.cpp" snippet="conversion-qdate-pydate"/>
+ <add-conversion type="PyDate" check="PyDate_ImportAndCheck(%in)"
+ file="../glue/qtcore.cpp" snippet="conversion-qdate-pydate"/>
</target-to-native>
</conversion-rule>
<extra-includes>
@@ -870,7 +857,7 @@
<modify-argument index="3">
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, int, int]">
<replace-type modified-type="(year, month, day)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-getdate"/>
@@ -879,38 +866,38 @@
<modify-argument index="1">
<remove-argument/>
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, int]">
<replace-type modified-type="(week, yearNumber)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-weeknumber"/>
</modify-function>
</value-type>
- <value-type name="QDateTime" hash-function="PySide::hash">
- <enum-type name="YearRange" since="5.14"/>
- <inject-code class="native" position="beginning">
- <insert-template name="pydatetime_importandcheck_function">
- <replace from="$DATETIMETYPE" to="PyDateTime"/>
- </insert-template>
- </inject-code>
+ <value-type name="QDateTime">
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="core-snippets-p-h"/>
+ <enum-type name="YearRange"/>
+ <enum-type name="TransitionResolution" since="6.7"/>
<conversion-rule>
<target-to-native>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- <add-conversion type="PyDateTime" check="PyDateTime_ImportAndCheck(%in)" file="../glue/qtcore.cpp" snippet="conversion-qdatetime-pydatetime"/>
+ <add-conversion type="PyDateTime" check="PyDateTime_ImportAndCheck(%in)"
+ file="../glue/qtcore.cpp" snippet="conversion-qdatetime-pydatetime"/>
</target-to-native>
</conversion-rule>
<extra-includes>
<include file-name="datetime.h" location="global"/>
</extra-includes>
<!-- Somewhat internal constructor used to pickle QDateTime -->
- <add-function signature="QDateTime(int,int,int,int,int,int,int,int)">
- <modify-argument index="8">
- <replace-default-expression with="Qt::LocalTime"/>
- </modify-argument>
+ <add-function signature="QDateTime(int,int,int,int,int,int,int,int=Qt::LocalTime)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-1"/>
</add-function>
<add-function signature="QDateTime(int,int,int,int,int,int)">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-2"/>
</add-function>
+ <!-- PYSIDE-1735: Qt::TimeSpec is no more compatible with int -->
+ <add-function signature="QDateTime(int,int,int,int,int,int,int,Qt::TimeSpec=Qt::LocalTime)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-3"/>
+ </add-function>
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -968,7 +955,34 @@
</add-function>
</value-type>
- <value-type name="QPoint" hash-function="PySide::hash">
+ <value-type name="QPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ </value-type>
+ <value-type name="QBluetoothPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ <enum-type name="CommunicationMode" flags="CommunicationModes" since="6.6"/>
+ </value-type>
+ <value-type name="QCalendarPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ <enum-type name="AccessMode"/>
+ </value-type>
+ <value-type name="QCameraPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ </value-type>
+ <value-type name="QContactsPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ <enum-type name="AccessMode"/>
+ </value-type>
+ <value-type name="QLocationPermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ <enum-type name="Accuracy"/>
+ <enum-type name="Availability"/>
+ </value-type>
+ <value-type name="QMicrophonePermission" since="6.5">
+ <configuration condition="QT_CONFIG(permissions)"/>
+ </value-type>
+
+ <value-type name="QPoint">
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -986,7 +1000,6 @@
</insert-template>
</inject-code>
</add-function>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qpoint"/>
<add-function signature="toTuple" return-type="PyObject*">
<inject-code class="target" position="beginning">
@@ -1035,7 +1048,7 @@
<modify-function signature="ry()" remove="all"/>
<!--### -->
</value-type>
- <value-type name="QRect" hash-function="PySide::hash">
+ <value-type name="QRect">
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -1052,7 +1065,6 @@
</insert-template>
</inject-code>
</add-function>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qrect"/>
<modify-function signature="getCoords(int*,int*,int*,int*)const">
<modify-argument index="return">
@@ -1166,7 +1178,7 @@
</inject-code>
</modify-function>
</value-type>
- <value-type name="QSize" hash-function="PySide::hash">
+ <value-type name="QSize">
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -1184,7 +1196,6 @@
</insert-template>
</inject-code>
</add-function>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qsize"/>
<add-function signature="toTuple" return-type="PyObject*">
<inject-code class="target" position="beginning">
@@ -1234,16 +1245,14 @@
<!--### -->
</value-type>
- <value-type name="QTime" hash-function="PySide::hash">
- <inject-code class="native" position="beginning">
- <insert-template name="pydatetime_importandcheck_function">
- <replace from="$DATETIMETYPE" to="PyTime"/>
- </insert-template>
- </inject-code>
+ <value-type name="QTime">
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="core-snippets-p-h"/>
<conversion-rule>
<target-to-native>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- <add-conversion type="PyTime" check="PyDateTime_ImportAndCheck(%in)" file="../glue/qtcore.cpp" snippet="conversion-qtime-pytime"/>
+ <add-conversion type="PyTime" check="PyTime_ImportAndCheck(%in)"
+ file="../glue/qtcore.cpp" snippet="conversion-qtime-pytime"/>
</target-to-native>
</conversion-rule>
@@ -1271,7 +1280,14 @@
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtime-topython"/>
</add-function>
</value-type>
- <value-type name="QPersistentModelIndex" hash-function="qHash">
+ <value-type name="QPersistentModelIndex">
+ <extra-includes>
+ <include file-name="QtCore/QList" location="global"/>
+ </extra-includes>
+ <!-- For signal QAbstractItemModel::layoutAboutToBeChanged(QList<QPersistentModelIndex>) -->
+ <inject-code class="target" position="end">
+ qRegisterMetaType&lt;QList&lt;QPersistentModelIndex&gt; &gt;("QList_QPersistentModelIndex");
+ </inject-code>
<modify-function signature="internalPointer()const">
<inject-code class="target" position="beginning">
<insert-template name="return_internal_pointer" />
@@ -1285,13 +1301,17 @@
</value-type>
<value-type name="QTimeZone">
+ <configuration condition="QT_CONFIG(timezone)"/>
+ <enum-type name="Initialization" since="6.5"/>
<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">
- <enum-type name="StringFormat" since="5.11"/>
+ <enum-type name="StringFormat"/>
<enum-type name="Variant"/>
<enum-type name="Version"/>
<add-function signature="__repr__" return-type="PyObject*">
@@ -1312,17 +1332,19 @@
</add-function>
</value-type>
- <value-type name="QMimeType" since="5.0"/>
- <object-type name="QMimeDatabase" since="5.0">
+ <value-type name="QMimeType"/>
+ <object-type name="QMimeDatabase">
<enum-type name="MatchMode"/>
</object-type>
<value-type name="QLocale">
+ <enum-type name="TagSeparator" since="6.7"/>
<enum-type name="Country"/>
- <enum-type name="DataSizeFormat" flags="DataSizeFormats" since="5.10"/>
- <enum-type name="FloatingPointPrecisionOption" since="5.7"/>
+ <enum-type name="DataSizeFormat" flags="DataSizeFormats"/>
+ <enum-type name="FloatingPointPrecisionOption" python-type="IntEnum"/>
<enum-type name="FormatType"/>
<enum-type name="Language"/>
+ <enum-type name="LanguageCodeType" python-type="IntFlag" flags="LanguageCodeTypes" since="6.3"/>
<enum-type name="MeasurementSystem"/>
<enum-type name="NumberOption" flags="NumberOptions"/>
<enum-type name="Script" since="4.8" revision="4800"/>
@@ -1332,26 +1354,60 @@
<modify-function signature="toString(qulonglong)const" remove="all"/>
<modify-function signature="toString(ushort)const" remove="all"/>
<modify-function signature="toString(unsigned int)const" remove="all"/>
+ <modify-function signature="system()" remove="all"/>
<!--### -->
<extra-includes>
<include file-name="QDate" location="global"/>
</extra-includes>
+ <add-function signature="system()" return-type="QLocale" static="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qlocale_system"/>
+ <inject-documentation mode="append" format="target">
+ Returns a QLocale object initialized to the system locale.
+
+ The system locale may use system-specific sources for locale data, where available,
+ otherwise falling back on QLocale's built-in database entry for the language, script and
+ territory the system reports.
+
+ For example, on Windows, this locale will use the decimal/grouping characters and
+ date/time formats specified in the system configuration panel.
+
+ .. note:: Qt for Python on macOS will not reflect the user's region and language
+ preferences though QLocale::system(), but will instead reflect the environment
+ variables POSIX uses to specify locale, similar to Python's locale module. If the
+ system locale cannot be determined, which can be due to none of the variables 'LC_ALL',
+ 'LC_CTYPE', 'LANG' or 'LANGUAGE' being set by your environment, then the default POSIX
+ locale or 'C' locale is returned.
+
+ See also c().
+ </inject-documentation>
+ </add-function>
<modify-function signature="toTime(QString,QLocale::FormatType)const">
<modify-argument index="2">
<rename to="format"/>
</modify-argument>
</modify-function>
- <modify-function signature="toDate(QString,QLocale::FormatType)const">
+ <modify-function signature="toDate(QString,QLocale::FormatType,int)const">
<modify-argument index="2">
<rename to="format"/>
</modify-argument>
</modify-function>
+ <modify-function signature="^toDate(Time)?\(QString,[^,]+,int\)const$">
+ <modify-argument index="3">
+ <replace-default-expression with="1900"/> <!-- private FirstTwoDigitYear -->
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="^toDate(Time)?\(QString,[^,]+,QCalendar,int\)const$">
+ <modify-argument index="4">
+ <replace-default-expression with="1900"/> <!-- private FirstTwoDigitYear -->
+ </modify-argument>
+ </modify-function>
<modify-function signature="toUInt(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1363,7 +1419,7 @@
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1375,7 +1431,7 @@
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[float, bool]">
<replace-type modified-type="(float, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1387,7 +1443,7 @@
<remove-argument />
<remove-default-expression />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[float, bool]">
<replace-type modified-type="(float, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1398,7 +1454,7 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1409,7 +1465,18 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
+ <replace-type modified-type="(int, bool ok)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,bool*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toLong(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1420,7 +1487,7 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
@@ -1431,15 +1498,20 @@
<modify-argument index="2">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
<replace-type modified-type="(int, bool ok)"/>
</modify-argument>
<inject-code class="target" position="beginning">
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
+ <!-- PYSIDE-2133, 2168 remove unsigned overloads of to(Currency)?String() to
+ ensure float overloads are used -->
+ <modify-function signature="^to(Currency)?String\(q?u.*$" remove="all"/>
+ <modify-function signature="^to(Currency)?String\(.*short.*$" remove="all"/>
+ <modify-function signature="^to.*\(.*QStringView.*$" remove="all"/>
</value-type>
- <value-type name="QBitArray" hash-function="qHash" >
+ <value-type name="QBitArray">
<add-function signature="__len__">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-len"/>
</add-function>
@@ -1457,10 +1529,22 @@
<modify-function signature="removeStaleLockFile()" allow-thread="yes"/>
<modify-function signature="tryLock(int)" allow-thread="yes"/>
<modify-function signature="unlock()" allow-thread="yes"/>
+ <modify-function signature="getLockInfo(qint64*,QString*,QString*)const">
+ <modify-argument index="return" pyi-type="Tuple[int, str, str]">
+ <replace-type modified-type="(int, str, str)"/>
+ </modify-argument>
+ <modify-argument index="1"><remove-argument/></modify-argument>
+ <modify-argument index="2"><remove-argument/></modify-argument>
+ <modify-argument index="3"><remove-argument/></modify-argument>
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp" snippet="qlockfile-getlockinfo"/>
+ </modify-function>
</object-type>
<object-type name="QMessageAuthenticationCode"/>
<object-type name="QSignalBlocker">
- <add-function signature="__enter__()"/>
+ <add-function signature="__enter__()" return-type="QSignalBlocker">
+ <inject-code file="../glue/qtcore.cpp" snippet="default-enter"/>
+ </add-function>
<add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
<inject-code file="../glue/qtcore.cpp" snippet="qsignalblocker-unblock"/>
</add-function>
@@ -1475,25 +1559,31 @@
<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"/>
</modify-argument>
</modify-function>
<modify-function signature="relock()" allow-thread="yes"/>
- <add-function signature="__enter__()"/>
+ <add-function signature="__enter__()" return-type="QReadLocker">
+ <inject-code file="../glue/qtcore.cpp" snippet="default-enter"/>
+ </add-function>
<add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
<inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
</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"/>
</modify-argument>
</modify-function>
<modify-function signature="relock()" allow-thread="yes"/>
- <add-function signature="__enter__()"/>
+ <add-function signature="__enter__()" return-type="QWriteLocker">
+ <inject-code file="../glue/qtcore.cpp" snippet="default-enter"/>
+ </add-function>
<add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
<inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
</add-function>
@@ -1502,6 +1592,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"/>
@@ -1525,6 +1616,9 @@
<modify-argument index="1">
<rename to="priority"/>
</modify-argument>
+ <!-- PYSIDE-535: PyPy 7.3.8 needs this call, which is actually a no-op in Python 3.10 -->
+ <inject-code file="../glue/qtcore.cpp" class="target" position="beginning"
+ snippet="qthread_init_pypy"/>
</modify-function>
<modify-function signature="exit(int)" allow-thread="yes"/>
</object-type>
@@ -1532,7 +1626,7 @@
<value-type name="QModelRoleData"/>
<object-type name="QAbstractItemModel">
- <enum-type name="CheckIndexOption" flags="CheckIndexOptions" since="5.11"/>
+ <enum-type name="CheckIndexOption" flags="CheckIndexOptions"/>
<enum-type name="LayoutChangeHint"/>
<!-- This function was replaced by a added function -->
<modify-function signature="createIndex(int,int,const void*)const" remove="all"/>
@@ -1542,16 +1636,7 @@
<replace-default-expression with="0"/>
</modify-argument>
</modify-function>
- <add-function signature="createIndex(int,int,PyObject*)const" return-type="QModelIndex">
- <modify-argument index="1">
- <rename to="row"/>
- </modify-argument>
- <modify-argument index="2">
- <rename to="column"/>
- </modify-argument>
- <modify-argument index="3">
- <rename to="ptr"/>
- </modify-argument>
+ <add-function signature="createIndex(int@row@,int@column@,PyObject*@ptr@)const" return-type="QModelIndex">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qabstractitemmodel-createindex"/>
<inject-documentation mode="append" format="target">
Creates a model index for the given row and column with the internal pointer ptr.
@@ -1567,7 +1652,7 @@
</inject-documentation>
</add-function>
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qabstractitemmodel"/>
- <modify-function signature="mimeData(QModelIndexList)const">
+ <modify-function signature="mimeData(QList&lt;QModelIndex&gt;)const">
<modify-argument index="return">
<define-ownership class="native" owner="c++"/>
<define-ownership class="target" owner="default"/>
@@ -1595,8 +1680,7 @@
tag in Qt6? -->
<declare-function signature="QItemSelection()" return-type="QItemSelection" />
<!-- The __add__ function creates a result list, instead of using the inherited type.
- Solved for now by removing and re-adding with the correct type. -->
- <modify-function signature="operator+(QList&lt;QItemSelectionRange&gt;)const" remove="all" />
+ Fixed by adding with the correct type. -->
<add-function signature="operator+(QItemSelection)" return-type="QItemSelection">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qitemselection-add"/>
</add-function>
@@ -1611,14 +1695,15 @@
<value-type name="QItemSelectionRange">
</value-type>
- <object-type name="QAbstractProxyModel" polymorphic-id-expression="qobject_cast&lt;QAbstractProxyModel*&gt;(%1)">
+ <object-type name="QAbstractProxyModel"
+ polymorphic-id-expression="qobject_cast&lt;QAbstractProxyModel*&gt;(%B)">
<extra-includes>
<include file-name="QItemSelection" location="global"/>
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
</object-type>
- <object-type name="QConcatenateTablesProxyModel" since="5.13"/>
+ <object-type name="QConcatenateTablesProxyModel"/>
<object-type name="QSortFilterProxyModel">
<extra-includes>
<include file-name="QItemSelection" location="global"/>
@@ -1632,21 +1717,25 @@
</modify-function>
</object-type>
<object-type name="QIdentityProxyModel"/>
- <object-type name="QTransposeProxyModel" since="5.13"/>
+ <object-type name="QTransposeProxyModel"/>
<!-- QObject is created manually -->
- <object-type name="QObject">
+ <object-type name="QObject" parent-management="true">
<extra-includes>
<include file-name="QThread" location="global"/>
<include file-name="QCoreApplication" location="global"/>
<include file-name="signalmanager.h" location="local"/>
</extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="core-snippets-p-h"/>
<modify-function signature="metaObject()const">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-metaobject"/>
<modify-argument index="return">
<reference-count action="set"/>
</modify-argument>
</modify-function>
-
+ <!-- FIXME PYSIDE 7: Remove this (QT6_DECL_NEW_OVERLOAD_TAIL) -->
+ <modify-function signature="^moveToThread\(.*\)" remove="all"/>
+ <declare-function signature="moveToThread(QThread*)" return-type="bool"/>
<modify-function signature="deleteLater()">
<modify-argument index="this">
<define-ownership owner="c++"/>
@@ -1681,66 +1770,66 @@
<modify-argument index="this">
<parent index="1" action="add"/>
</modify-argument>
+ <modify-argument index="1" pyi-type="Optional[PySide6.QtCore.QObject]"/>
</modify-function>
- <modify-function signature="connect(const QObject*,const char*,const char*,Qt::ConnectionType)const">
- <modify-argument index="4">
- <rename to="type"/>
- </modify-argument>
+ <!-- Manual overload order fixes PYSIDE-2627
+
+ The addition of the qobject-connect-4-context overload resulted in an
+ automatic overload ordering that prevented the right overload from
+ ever being called if the callable was a QObject. Set a manual order to
+ fix this. -->
+ <modify-function signature="connect(const QObject*,const char*,const char*,Qt::ConnectionType)const"
+ overload-number="0">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-1"/>
</modify-function>
<!-- static version -->
- <modify-function signature="connect(const QObject*,QMetaMethod,const QObject*,QMetaMethod,Qt::ConnectionType)">
- <modify-argument index="5">
- <rename to="type"/>
- </modify-argument>
+ <modify-function signature="connect(const QObject*,QMetaMethod,const QObject*,QMetaMethod,Qt::ConnectionType)"
+ overload-number="1">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-2"/>
</modify-function>
- <modify-function signature="connect(const QObject*,const char*,const QObject*,const char*,Qt::ConnectionType)">
+ <modify-function signature="connect(const QObject*,const char*,const QObject*,const char*,Qt::ConnectionType)"
+ overload-number="2">
<modify-argument index="5">
<rename to="type"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-3"/>
</modify-function>
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect"/>
- <add-function signature="connect(const QObject*,const char*,PyCallable*,Qt::ConnectionType)"
- return-type="QMetaObject::Connection" static="yes">
- <modify-argument index="4">
- <rename to="type"/>
- <replace-default-expression with="Qt::AutoConnection"/>
- </modify-argument>
+ <add-function signature="connect(const QObject*@sender@,const char*@signal@,PyCallable*@functor@,Qt::ConnectionType@type@=Qt::AutoConnection)"
+ return-type="QMetaObject::Connection" static="yes" overload-number="3">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-4"/>
</add-function>
+ <add-function signature="connect(const QObject*@sender@,const char*@signal@,const QObject*@context@,PyCallable*@functor@,Qt::ConnectionType@type@=Qt::AutoConnection)"
+ return-type="QMetaObject::Connection" static="yes" overload-number="4">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-4-context"/>
+ </add-function>
<!-- static version -->
- <add-function signature="connect(const char*,PyCallable*,Qt::ConnectionType)"
- return-type="QMetaObject::Connection">
- <modify-argument index="3">
- <rename to="type"/>
- <replace-default-expression with="Qt::AutoConnection"/>
- </modify-argument>
+ <add-function signature="connect(const char*@signal@,PyCallable*@functor@,Qt::ConnectionType@type@=Qt::AutoConnection)"
+ return-type="QMetaObject::Connection" overload-number="5">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-5"/>
</add-function>
- <add-function signature="connect(const char*,const QObject*,const char*,Qt::ConnectionType)"
- return-type="QMetaObject::Connection">
- <modify-argument index="4">
- <rename to="type"/>
- <replace-default-expression with="Qt::AutoConnection"/>
- </modify-argument>
+ <add-function signature="connect(const char*@signal@,const QObject*@receiver@,const char*@method@,Qt::ConnectionType@type@=Qt::AutoConnection)"
+ return-type="QMetaObject::Connection" overload-number="6">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-6"/>
</add-function>
<add-function signature="emit(const char*,...)" return-type="bool">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-emit"/>
</add-function>
- <add-function signature="disconnect(const char*,PyCallable*)" return-type="bool">
+ <add-function signature="disconnect(const char*@signal@,PyCallable*@functor@)" return-type="bool">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-disconnect-1"/>
</add-function>
- <add-function signature="disconnect(const QObject*,const char*,PyCallable*)" return-type="bool" static="yes">
+ <add-function signature="disconnect(const QObject*@sender@,const char*@signal@,PyCallable*@functor@)" return-type="bool" static="yes">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-disconnect-2"/>
</add-function>
+ <modify-function signature="disconnect(QMetaObject::Connection)">
+ <modify-argument index="1">
+ <rename to="connection"/>
+ </modify-argument>
+ </modify-function>
- <inject-code class="native" file="../glue/qtcore.cpp" snippet="qobject-findchild-1"/>
- <add-function signature="findChild(PyTypeObject*@type@,const QString&amp;@name@,Qt::FindChildOptions@options@=Qt::FindChildrenRecursively)"
+ <add-function signature="findChild(PyTypeObject*@type@,const QString&amp;@name@={},Qt::FindChildOptions@options@=Qt::FindChildrenRecursively)"
return-type="PyObject*">
<inject-documentation format="target" mode="append">
To find the child of a certain QObject, the first argument of this function should be the child's type, and the second the name of the child:
@@ -1759,11 +1848,8 @@
<modify-argument index="return">
<parent index="this" action="add"/>
</modify-argument>
- <modify-argument index="2">
- <replace-default-expression with="QString()"/>
- </modify-argument>
</add-function>
- <add-function signature="findChildren(PyTypeObject*@type@,const QString&amp;@name@,Qt::FindChildOptions@options@=Qt::FindChildrenRecursively)"
+ <add-function signature="findChildren(PyTypeObject*@type@,const QString&amp;@name@={},Qt::FindChildOptions@options@=Qt::FindChildrenRecursively)"
return-type="PySequence*" >
<inject-documentation format="target" mode="append">
Like the method *findChild*, the first parameter should be the child's type.
@@ -1772,9 +1858,6 @@
<modify-argument index="return">
<parent index="this" action="add"/>
</modify-argument>
- <modify-argument index="2">
- <replace-default-expression with="QString()"/>
- </modify-argument>
</add-function>
<add-function signature="findChildren(PyTypeObject*@type@,const QRegularExpression&amp;@pattern@,Qt::FindChildOptions@options@=Qt::FindChildrenRecursively)"
return-type="PySequence*" >
@@ -1791,10 +1874,6 @@
</modify-argument>
</add-function>
- <modify-function signature="receivers(const char*)const">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-receivers"/>
- </modify-function>
-
<modify-function signature="destroyed(QObject*)" allow-thread="yes">
<modify-argument index="1">
<rename to="object"/>
@@ -1805,6 +1884,7 @@
<modify-argument index="return">
<define-ownership owner="default"/>
</modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-sender"/>
</modify-function>
<!-- This is not supported due the lack of information durring the call with no arguments, this can cause a memory leak -->
@@ -1820,21 +1900,23 @@
</modify-argument>
</modify-function>
</object-type>
- <object-type name="QAbstractListModel" polymorphic-id-expression="qobject_cast&lt;QAbstractListModel*&gt;(%1)">
+ <object-type name="QAbstractListModel"
+ polymorphic-id-expression="qobject_cast&lt;QAbstractListModel*&gt;(%B)">
<extra-includes>
<include file-name="QStringList" location="global"/>
<include file-name="QSize" location="global"/>
</extra-includes>
</object-type>
- <value-type name="QUrlQuery" since="5.0"/>
+ <value-type name="QUrlQuery"/>
- <value-type name="QUrl" hash-function="PySide::hash">
+ <value-type name="QUrl">
<!-- Qt5: lots of changes -->
- <enum-type name="ComponentFormattingOption" flags="ComponentFormattingOptions,FormattingOptions"/>
+ <enum-type name="ComponentFormattingOption" python-type="IntFlag" flags="ComponentFormattingOptions,FormattingOptions"/>
<!-- note: above duplication of attribute is not by default XML compliant! -->
- <enum-type name="UrlFormattingOption"/>
+ <enum-type name="UrlFormattingOption" python-type="IntFlag"/>
<enum-type name="UserInputResolutionOption" flags="UserInputResolutionOptions"/>
<enum-type name="ParsingMode"/>
+ <enum-type name="AceProcessingOption" flags="AceProcessingOptions" since="6.3"/>
<extra-includes>
<include file-name="QStringList" location="global"/>
</extra-includes>
@@ -1862,7 +1944,7 @@
</value-type>
<value-type name="QRegularExpression">
- <enum-type name="WildcardConversionOption" flags="WildcardConversionOptions" since="6.0"/>
+ <enum-type name="WildcardConversionOption" flags="WildcardConversionOptions"/>
<enum-type name="MatchOption" flags="MatchOptions"/>
<enum-type name="MatchType"/>
<enum-type name="PatternOption" flags="PatternOptions"/>
@@ -1901,10 +1983,12 @@
</add-function>
</value-type>
- <value-type name="QByteArray" hash-function="qHash">
- <enum-type name="Base64Option" flags="Base64Options" since="5.2"/>
- <enum-type name="Base64DecodingStatus" since="5.15"/>
- <value-type name="FromBase64Result" since="5.15"/>
+ <!-- PYSIDE-1913: Disable isNull() for bool cast; __len__ should be used
+ instead so that b"" yields False. -->
+ <value-type name="QByteArray" isNull="false">
+ <enum-type name="Base64Option" flags="Base64Options"/>
+ <enum-type name="Base64DecodingStatus"/>
+ <value-type name="FromBase64Result"/>
<conversion-rule>
<target-to-native>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
@@ -2144,7 +2228,7 @@
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-msetitem"/>
</add-function>
</value-type>
- <primitive-type name="QByteArrayView" view-on="QByteArray" since="6.0">
+ <primitive-type name="QByteArrayView" view-on="QByteArray">
<conversion-rule>
<native-to-target file="../glue/qtcore.cpp" snippet="return-pybytes"/>
</conversion-rule>
@@ -2194,9 +2278,9 @@
<modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes"/>
<modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>,int)" allow-thread="yes"/>
</object-type>
- <object-type name="QFileDevice" since="5.0">
+ <object-type name="QFileDevice">
<enum-type name="FileError"/>
- <enum-type name="FileTime" since="5.10"/>
+ <enum-type name="FileTime"/>
<enum-type name="MemoryMapFlag" flags="MemoryMapFlags"/>
<enum-type name="Permission" flags="Permissions"/>
<enum-type name="FileHandleFlag" flags="FileHandleFlags"/>
@@ -2277,12 +2361,21 @@
<modify-function signature="write(const QByteArray&amp;)" allow-thread="yes"/>
<modify-function signature="waitForReadyRead(int)" allow-thread="yes"/>
<modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
- <!-- ### peek(qint64) do the job -->
<modify-function signature="peek(char*,qint64)" remove="all"/>
- <!-- ### read(qint64) do the job -->
+ <add-function signature="peek(PyBuffer@buffer@,qint64@maxlen@)" return-type="qint64">
+ <modify-argument index="1" pyi-type="bytearray"/>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qiodevice-bufferedread"/>
+ </add-function>
<modify-function signature="read(char*,qint64)" remove="all"/>
- <!-- ### readLine(qint64) do the job -->
+ <add-function signature="read(PyBuffer@buffer@,qint64@maxlen@)" return-type="qint64">
+ <modify-argument index="1" pyi-type="bytearray"/>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qiodevice-bufferedread"/>
+ </add-function>
<modify-function signature="readLine(char*,qint64)" remove="all"/>
+ <add-function signature="readLine(PyBuffer@buffer@,qint64@maxlen@)" return-type="qint64">
+ <modify-argument index="1" pyi-type="bytearray"/>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qiodevice-bufferedread"/>
+ </add-function>
<!-- ### write(str) do the job -->
<modify-function signature="write(const char*,qint64)" remove="all"/>
<modify-function signature="write(const char*)" remove="all"/>
@@ -2316,9 +2409,9 @@
<inject-code class="native" position="end" file="../glue/qtcore.cpp" snippet="return-readData"/>
</modify-function>
</object-type>
- <value-type name="QIODeviceBase" since="6.0">
+ <object-type name="QIODeviceBase">
<enum-type name="OpenModeFlag" flags="OpenMode"/>
- </value-type>
+ </object-type>
<object-type name="QCryptographicHash">
<enum-type name="Algorithm"/>
<modify-function signature="addData(const char*,qsizetype)">
@@ -2328,9 +2421,13 @@
<inject-code file="../glue/qtcore.cpp" snippet="qcryptographichash-adddata"/>
</modify-function>
</object-type>
- <value-type name="QOperatingSystemVersion" since="5.9">
+ <value-type name="QOperatingSystemVersionBase" since="6.3">
<enum-type name="OSType"/>
</value-type>
+ <value-type name="QOperatingSystemVersionUnexported" since="6.3" generate="false"/>
+ <value-type name="QOperatingSystemVersion">
+ <modify-function signature="QOperatingSystemVersion(const QOperatingSystemVersionBase&amp;)" remove="all"/>
+ </value-type>
<object-type name="QLibrary">
<enum-type name="LoadHint" flags="LoadHints"/>
</object-type>
@@ -2342,6 +2439,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
@@ -2369,51 +2467,58 @@
<reference-count action="set"/>
</modify-argument>
</modify-function>
- <add-function signature="__enter__()"/>
+ <add-function signature="__enter__()" return-type="QtCoreHelper::QMutexLocker">
+ <inject-code file="../glue/qtcore.cpp" snippet="default-enter"/>
+ </add-function>
<add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
<inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
</add-function>
</object-type>
+ <object-type name="QIOPipe"/>
+ <value-type name="QGenericArgumentHolder"/>
+ <value-type name="QGenericReturnArgumentHolder"/>
</namespace-type>
<!-- 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" since="5.14">
+ <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>
- <object-type name="QRandomGenerator" since="5.10">
+ <object-type name="QRandomGenerator">
<modify-function signature="global()" rename="global_"/>
<modify-function signature="operator()()" remove="all"/>
<modify-function signature="generate(quint32*,quint32*)" remove="all"/>
</object-type>
- <object-type name="QRandomGenerator64" since="5.10">
+ <object-type name="QRandomGenerator64">
<modify-function signature="global()" rename="global_"/>
<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" since="5.10"/>
+ <object-type name="QSemaphoreReleaser">
+ <configuration condition="QT_CONFIG(thread)"/>
+ </object-type>
- <value-type name="QSocketDescriptor" since="5.15">
+ <value-type name="QSocketDescriptor">
<inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qsocketdescriptor"/>
</value-type>
<object-type name="QSocketNotifier">
<enum-type name="Type"/>
- <add-function signature="QSocketNotifier(PyObject*, QSocketNotifier::Type, QObject*)">
- <modify-argument index="3">
- <replace-default-expression with="0"/>
- <rename to="parent"/>
- </modify-argument>
+ <add-function signature="QSocketNotifier(PyObject*, QSocketNotifier::Type, QObject*@parent@=nullptr)">
<inject-code file="../glue/qtcore.cpp" snippet="qsocketnotifier"/>
</add-function>
</object-type>
@@ -2449,6 +2554,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"/>
@@ -2461,19 +2567,28 @@
</object-type>
<object-type name="QBuffer">
<!-- ### setData(QByteArray) do the job -->
- <modify-function signature="setData(const char*,int)" remove="all"/>
+ <modify-function signature="setData(const char*,qsizetype)" remove="all"/>
<!-- Disambiguate from Qt3DRender/qbuffer.h -->
<include file-name="QtCore/qbuffer.h" location="global"/>
</object-type>
<object-type name="QTimer">
+ <extra-includes>
+ <include file-name="pysidestaticstrings.h" location="global"/>
+ </extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qtimer-singleshot-functorclass"/>
<modify-function signature="singleShot(int,const QObject*,const char*)">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-1"/>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-direct-mapping"/>
</modify-function>
- <add-function signature="singleShot(int,PyCallable*)" static="yes">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-2"/>
+ <add-function signature="singleShot(int@msec@,PyCallable*@functor@)" static="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-functor"/>
+ </add-function>
+ <add-function signature="singleShot(int@msec@,const QObject*@context@,PyCallable*@functor@)" static="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-functor-context"/>
</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"/>
@@ -2481,6 +2596,11 @@
<enum-type name="ProcessError"/>
<enum-type name="ProcessState"/>
+ <?if !windows?>
+ <enum-type name="UnixProcessFlag" flags="UnixProcessFlags" since="6.6"/>
+ <value-type name="UnixProcessParameters" since="6.6"/>
+ <?endif?>
+
<modify-function signature="waitForStarted(int)" allow-thread="yes"/>
<modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
<modify-function signature="waitForFinished(int)" allow-thread="yes"/>
@@ -2491,7 +2611,7 @@
<modify-argument index="4">
<remove-argument />
</modify-argument>
- <modify-argument index="return">
+ <modify-argument index="return" pyi-type="Tuple[bool, int]">
<replace-type modified-type="(retval, pid)"/>
</modify-argument>
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qprocess-startdetached"/>
@@ -2499,14 +2619,14 @@
</object-type>
<object-type name="QSignalMapper"/>
- <object-type name="QCollatorSortKey" since="5.2"/>
- <object-type name="QCollator" since="5.2"/>
+ <object-type name="QCollatorSortKey"/>
+ <object-type name="QCollator"/>
- <object-type name="QCommandLineOption" since="5.2">
- <enum-type name="Flag" flags="Flags" since="5.8"/>
+ <object-type name="QCommandLineOption">
+ <enum-type name="Flag" flags="Flags"/>
</object-type>
- <object-type name="QCommandLineParser" since="5.2">
- <enum-type name="OptionsAfterPositionalArgumentsMode" since="5.6"/>
+ <object-type name="QCommandLineParser">
+ <enum-type name="OptionsAfterPositionalArgumentsMode"/>
<enum-type name="SingleDashWordOptionMode"/>
</object-type>
@@ -2516,21 +2636,20 @@
<extra-includes>
<include file-name="QStringList" location="global"/>
<include file-name="QTranslator" location="global"/>
+ <include file-name="pysidecleanup.h" location="global"/>
+ <include file-name="pysideqapp.h" location="global"/>
</extra-includes>
- <!-- constructor documentation -->
- <inject-documentation format="target" mode="append">
-.. class:: QCoreApplication(args)
-
- Constructs a Qt kernel application. Kernel applications are applications
- without a graphical user interface. These type of applications are used
- at the console or as server processes.
-
- The *args* argument is processed by the application, and made available
- in a more convenient form by the :meth:`~QCoreApplication.arguments()`
- method.
- </inject-documentation>
- <add-function signature="QCoreApplication(QStringList)">
+ <add-function signature="QCoreApplication(QStringList@args@)">
<inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-1"/>
+ <inject-documentation format="target" mode="append">
+ Constructs a Qt kernel application. Kernel applications are applications
+ without a graphical user interface. These type of applications are used
+ at the console or as server processes.
+
+ The *args* argument is processed by the application, and made available
+ in a more convenient form by the :meth:`~PySide6.QtCore.QCoreApplication.arguments()`
+ method.
+ </inject-documentation>
</add-function>
<add-function signature="QCoreApplication()">
<inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-2"/>
@@ -2566,6 +2685,43 @@
<define-ownership owner="c++"/>
</modify-argument>
</modify-function>
+ <modify-function signature="translate(const char*,const char*,const char *,int)">
+ <modify-argument index="1" pyi-type="str"/>
+ <modify-argument index="2" pyi-type="str"/>
+ <modify-argument index="3" pyi-type="Optional[str]"/>
+ </modify-function>
+ <?if !no_QPermission?>
+ <declare-function signature="checkPermission(const QBluetoothPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QCalendarPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QCameraPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QContactsPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QLocationPermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <declare-function signature="checkPermission(const QMicrophonePermission &amp; @permission@)" return-type="Qt::PermissionStatus" since="6.5" />
+ <add-function signature="requestPermission(const QBluetoothPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QCalendarPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QCameraPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QContactsPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QLocationPermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <add-function signature="requestPermission(const QMicrophonePermission &amp; @permission@, const QObject* @context@, PyCallable* @functor@)" since="6.5">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qcoreapplication-requestpermission"/>
+ </add-function>
+ <?endif?>
</object-type>
<object-type name="QSettings">
<enum-type name="Format"/>
@@ -2574,10 +2730,12 @@
<extra-includes>
<include file-name="QStringList" location="global"/>
</extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="settings-value-helpers"/>
<!-- PYSIDE-1010:
We remove the original implementation of value() to include the optional parameter -->
- <modify-function signature="value(const QString&amp;,const QVariant&amp;)const" remove="all"/>
- <add-function signature="value(const QString&amp;, const QVariant&amp; @defaultValue@ = 0, PyObject* @type@ = 0)" return-type="PyObject*">
+ <modify-function signature="value(QAnyStringView,const QVariant&amp;)const" remove="all"/>
+ <add-function signature="value(const QString&amp;, const QVariant&amp; @defaultValue@ = {}, PyObject* @type@ = nullptr)" return-type="PyObject*">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qsettings-value"/>
<inject-documentation mode="append" format="target">
Custom overload that adds an optional named parameter to the function ``value()``
@@ -2602,24 +2760,32 @@
</inject-documentation>
</add-function>
</object-type>
- <object-type name="QEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::None">
- <enum-type name="Type"/>
+ <object-type name="QEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::None"
+ qt-register-metatype="base">
+ <enum-type name="Type" python-type="IntEnum"/>
+ <add-function signature="__repr__" return-type="PyObject">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp" snippet="repr-qevent"/>
+ </add-function>
</object-type>
- <object-type name="QChildEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ChildAdded || %1-&gt;type() == QEvent::ChildPolished || %1-&gt;type() == QEvent::ChildRemoved">
+ <object-type name="QChildEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::ChildAdded || %B-&gt;type() == QEvent::ChildPolished || %B-&gt;type() == QEvent::ChildRemoved">
<modify-function signature="child()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
</object-type>
- <object-type name="QTimerEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Timer"/>
- <object-type name="QDynamicPropertyChangeEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DynamicPropertyChange"/>
+ <object-type name="QTimerEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::Timer"/>
+ <object-type name="QDynamicPropertyChangeEvent"
+ polymorphic-id-expression="%B-&gt;type() == QEvent::DynamicPropertyChange"/>
<object-type name="QDataStream" stream="yes">
<enum-type name="FloatingPointPrecision" since="4.6"/>
<enum-type name="Status"/>
- <enum-type name="Version"/>
+ <enum-type name="Version" python-type="IntEnum"/>
<enum-type name="ByteOrder"/>
<extra-includes>
<include file-name="QtCore/QtCore" location="global"/>
@@ -2681,13 +2847,19 @@
<add-function signature="readQVariant()" return-type="QVariant">
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
</add-function>
- <modify-function signature="readRawData(char*,int)">
+ <modify-function signature="readRawData(char*,qint64)">
+ <modify-argument index="return" pyi-type="bytes"/>
<modify-argument index="1">
<remove-argument />
</modify-argument>
<inject-code class="target" file="../glue/qtcore.cpp" snippet="qdatastream-readrawdata"/>
</modify-function>
- <modify-function signature="writeRawData(const char*,int)">
+ <add-function signature="writeRawData(PyBuffer)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp" snippet="qdatastream-writerawdata-pybuffer"/>
+ </add-function>
+ <modify-function signature="writeRawData(const char*,qint64)">
+ <modify-argument index="1" pyi-type="str"/>
<modify-argument index="2">
<remove-argument />
</modify-argument>
@@ -2768,10 +2940,31 @@
<add-function signature="writeString(QString)">
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
</add-function>
-
- <!-- ### deprecated method -->
+ <modify-function signature="readBytes(char*&amp;,qint64&amp;)">
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <modify-argument index="1">
+ <remove-argument />
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatastream-read-bytes"/>
+ </modify-function>
<modify-function signature="readBytes(char*&amp;,uint&amp;)" remove="all"/>
- <modify-function signature="writeBytes(const char*,uint)" remove="all"/>
+
+ <modify-function signature="writeBytes(const char*,qint64)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ <conversion-rule class="native">
+ <insert-template name="pybuffer_const_char"/>
+ </conversion-rule>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ <conversion-rule class="native">
+ <insert-template name="uint_remove"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
</object-type>
<value-type name="QTextStreamManipulator" default-constructor="QTextStreamManipulator(0, 0)">
@@ -2788,7 +2981,7 @@
<!-- Removed because it expect QString to be mutable -->
<modify-function signature="QTextStream(QString*,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" remove="all"/>
<!-- Qt5.5: Removed because it expect QString to be mutable -->
- <modify-function signature="readLineInto(QString*,qint64)" since="5.5" remove="all"/>
+ <modify-function signature="readLineInto(QString*,qint64)"/>
<!-- Removed because we use the non-const version -->
<modify-function signature="QTextStream(const QByteArray&amp;,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" remove="all"/>
@@ -2831,16 +3024,18 @@
<modify-function signature="readLine(qint64)" allow-thread="yes"/>
<modify-function signature="readAll()" allow-thread="yes"/>
</object-type>
- <object-type name="QStandardPaths" since="5.0">
+ <object-type name="QStandardPaths">
<enum-type name="StandardLocation"/>
<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"/>
@@ -2852,11 +3047,27 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
+ <add-function signature="start(PyCallable,int @priority@=0)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp"
+ snippet="std-function-void-lambda"/>
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp"
+ snippet="qthreadpool-start"/>
+ </add-function>
<modify-function signature="tryStart(QRunnable*)" allow-thread="yes">
<modify-argument index="1">
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
+ <add-function signature="tryStart(PyCallable)" return-type="bool">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp"
+ snippet="std-function-void-lambda"/>
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp"
+ snippet="qthreadpool-trystart"/>
+ </add-function>
<modify-function signature="tryTake(QRunnable*)" allow-thread="yes"/>
<modify-function signature="globalInstance()" >
@@ -2890,7 +3101,7 @@
<!-- Removed because it expect QString to be mutable -->
<modify-function signature="QXmlStreamWriter(QString*)" remove="all"/>
</object-type>
- <value-type name="QModelIndex" hash-function="qHash">
+ <value-type name="QModelIndex">
<modify-function signature="internalPointer()const">
<inject-code class="target" position="beginning">
<insert-template name="return_internal_pointer" />
@@ -2904,20 +3115,28 @@
</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
+ QMetaObject.invokeMethod? It was left as is in case someone has some hack
+ with a void pointer for this, but it does not really make sense (PYSIDE-1898). -->
<value-type name="QGenericArgument">
<include file-name="qobjectdefs.h" location="global"/>
</value-type>
@@ -2926,22 +3145,104 @@
<include file-name="qobjectdefs.h" location="global"/>
</value-type>
- <object-type name="QMessageLogContext" since="5.14"/>
-
- <object-type name="QMessageLogContext" since="5.9" until="5.13.2">
- <modify-function signature="copy(const QMessageLogContext &amp;)" remove="all"/>
- </object-type>
+ <object-type name="QMessageLogContext"/>
<value-type name="QMetaMethod">
+ <extra-includes>
+ <include file-name="pysidesignal.h" location="global"/>
+ <include file-name="glue/core_snippets_p.h" location="local"/>
+ </extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke-helpers"/>
<enum-type name="Access"/>
<enum-type name="MethodType"/>
+ <add-function signature="fromSignal(PySideSignalInstance@signal@)"
+ return-type="QMetaMethod" static="true">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-from-signal"/>
+ <inject-documentation format="target" mode="append">
+ Returns the meta-method that corresponds to the given signal, or an invalid QMetaMethod
+ if signal is not a signal of the class.
+ </inject-documentation>
+ </add-function>
+ <add-function signature="invoke(QObject*@object@,Qt::ConnectionType@type@,
+ QtCoreHelper::QGenericReturnArgumentHolder@ret@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke-conn-type-return-arg"/>
+ </add-function>
+ <add-function signature="invoke(QObject*@object@,
+ QtCoreHelper::QGenericReturnArgumentHolder@ret@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke-return-arg"/>
+ </add-function>
+ <add-function signature="invoke(QObject*@object@,Qt::ConnectionType@type@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke-conn-type"/>
+ </add-function>
+ <add-function signature="invoke(QObject*@object@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetamethod-invoke"/>
+ </add-function>
<!-- This isn't part of Qt public API -->
<modify-function signature="attributes()const" remove="all"/>
<modify-function signature="getParameterTypes(int*)const" remove="all"/>
+ <modify-field name="mobj" remove="yes"/>
</value-type>
<object-type name="QMetaObject">
<enum-type name="Call"/>
<include file-name="qobjectdefs.h" location="global"/>
+ <extra-includes>
+ <include file-name="dynamicqmetaobject.h" location="global"/>
+ <include file-name="pysidemetatype.h" location="global"/>
+ <include file-name="glue/core_snippets_p.h" location="local"/>
+ <include file-name="pysideutils.h" location="global"/> <!-- QString conversion -->
+ </extra-includes>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetaobject-invokemethod-helpers"/>
<!-- This isn't part of Qt public API -->
<modify-function signature="connect(const QObject*,int,const QObject*,int,int,int*)" remove="all"/>
<value-type name="Connection" operator-bool="true">
@@ -2950,10 +3251,99 @@
<declare-function signature="operator bool() const" return-type="bool"/>
</value-type>
<modify-function signature="^invokeMethod\(" allow-thread="yes"/>
+ <add-function signature="invokeMethod(QObject*@object@,const char *@member@,Qt::ConnectionType@type@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ static="yes" return-type="bool">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetaobject-invokemethod-conn-type-arg"/>
+ </add-function>
+ <add-function signature="invokeMethod(QObject*@object@,const char *@member@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ static="yes" return-type="bool">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetaobject-invokemethod-arg"/>
+ </add-function>
+ <add-function signature="invokeMethod(QObject*@object@,const char *@member@,Qt::ConnectionType@type@,
+ QtCoreHelper::QGenericReturnArgumentHolder@ret@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ static="yes" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetaobject-invokemethod-conn-type-return-arg"/>
+ </add-function>
+ <add-function signature="invokeMethod(QObject*@object@,const char *@member@,
+ QtCoreHelper::QGenericReturnArgumentHolder@ret@,
+ QtCoreHelper::QGenericArgumentHolder@val0@={},
+ QtCoreHelper::QGenericArgumentHolder@val1@={},
+ QtCoreHelper::QGenericArgumentHolder@val2@={},
+ QtCoreHelper::QGenericArgumentHolder@val3@={},
+ QtCoreHelper::QGenericArgumentHolder@val4@={},
+ QtCoreHelper::QGenericArgumentHolder@val5@={},
+ QtCoreHelper::QGenericArgumentHolder@val6@={},
+ QtCoreHelper::QGenericArgumentHolder@val7@={},
+ QtCoreHelper::QGenericArgumentHolder@val8@={},
+ QtCoreHelper::QGenericArgumentHolder@val9@={})"
+ static="yes" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp"
+ snippet="qmetaobject-invokemethod-return-arg"/>
+ </add-function>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qmetaobject-repr"/>
+ </add-function>
+ <modify-function signature="indexOfClassInfo(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfConstructor(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfEnumerator(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfMethod(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfProperty(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfSignal(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
+ <modify-function signature="indexOfSlot(const char *)">
+ <modify-argument index="1" pyi-type="str"/>
+ </modify-function>
</object-type>
<value-type name="QMetaProperty" >
<!-- This isn't part of Qt public API -->
<modify-function signature="enclosingMetaObject()const" remove="all"/>
+ <modify-function signature="write(QObject*,const QVariant &amp;)const">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qmetaproperty_write_enum"/>
+ </modify-function>
</value-type>
<value-type name="QMetaClassInfo">
<!-- This isn't part of Qt public API -->
@@ -3068,13 +3458,16 @@
</value-type>
<value-type name="QMargins" since="4.6"/>
- <value-type name="QMarginsF" since="5.3"/>
+ <value-type name="QMarginsF"/>
<object-type name="QParallelAnimationGroup" since="4.6"/>
<object-type name="QPauseAnimation" since="4.6"/>
- <value-type name="QProcessEnvironment" since="4.6"/>
+ <value-type name="QProcessEnvironment" since="4.6">
+ <configuration condition="QT_CONFIG(processenvironment)"/>
+ <enum-type name="Initialization" since="6.3"/>
+ </value-type>
<object-type name="QPropertyAnimation" since="4.6"/>
@@ -3082,8 +3475,8 @@
<object-type name="QVariantAnimation" since="4.6"/>
- <value-type name="QVersionNumber" since="5.6">
- <modify-function signature="fromString(const QString &amp;,int*)">
+ <value-type name="QVersionNumber">
+ <modify-function signature="fromString(QAnyStringView,qsizetype*)">
<modify-argument index="2">
<remove-argument/>
</modify-argument>
@@ -3094,10 +3487,12 @@
<add-function signature="SIGNAL(const char*)" return-type="str">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-signal"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="SLOT(const char*)" return-type="str">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-slot"/>
+ <modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="QT_TR_NOOP(PyObject)" return-type="PyObject*">
@@ -3135,12 +3530,18 @@
</add-function>
<object-type name="QFactoryInterface"/>
- <object-type name="QRunnable"/>
+ <object-type name="QRunnable">
+ <configuration condition="QT_CONFIG(thread)"/>
+ <add-function signature="create(PyObject* @functionToRun@)" static="yes" return-type="QRunnable*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qrunnable_create"/>
+ </add-function>
+ </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()">
@@ -3171,82 +3572,54 @@
<enum-type name="Sizes"/>
</object-type>
- <suppress-warning text="Unable to decide type of property: 'QLibrary::LoadHints' in class 'QPluginLoader'"/>
- <suppress-warning text="enum '_ISalnum' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'Qt::Initialization' does not have a type entry or is not an enum"/>
- <suppress-warning text="Visibility of function '*' modified in class '*'"/>
- <suppress-warning text="hiding of function '*' in class '*'"/>
- <suppress-warning text="namespace '*' does not have a type entry"/>
- <suppress-warning text="Shadowing: QObject::parent()const and QAbstractItemModel::parent() const"/>
- <suppress-warning text="namespace '*' for enum 'QtMsgType' is not declared"/>
- <suppress-warning text="horribly broken type 'imaxdiv_t'"/>
- <suppress-warning text="horribly broken type '__off64_t'"/>
- <suppress-warning text="horribly broken type 'div_t'"/>
- <suppress-warning text="horribly broken type 'fd_set*'"/>
- <suppress-warning text="horribly broken type 'ldiv_t'"/>
- <suppress-warning text="horribly broken type 'lldiv_t'"/>
- <suppress-warning text="signal '*' in class '*' is overloaded."/>
- <suppress-warning text="enum 'enum_3' does not have a type entry or is not an enum"/>
- <suppress-warning text="Shadowing: QFile::fileName() const and QTemporaryFile::fileName() const"/>
- <suppress-warning text="unhandled enum value: ~0u in Qt::GestureType"/>
- <suppress-warning text="unhandled enum value: (sizeof(void*)&lt;&lt;3) in QSysInfo::Sizes"/>
- <suppress-warning text="unmatched enum ~0u"/>
- <suppress-warning text="unmatched enum (sizeof(void*)&lt;&lt;3)"/>
- <suppress-warning text="^signature 'setCustomType(float)' for function modification in 'QEasingCurve' not found.*$"/>
- <suppress-warning text="enum 'enum_4' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'enum_5' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'FP_NORMAL' does not have a type entry or is not an enum"/>
- <suppress-warning text="Shadowing: *"/>
- <!-- QCborStreamReader: Suppress warnings about 32/64bit signatures not found depending on qsizetype -->
- <suppress-warning text="^signature 'readStringChunk\(char.*in 'QCborStreamReader' not found.*$"/>
+ <object-type name="QLoggingCategory"/>
- <!-- this enum is defined on Qt global header but only used in QtGui module -->
- <suppress-warning text="enum 'PM_MessageBoxHeight' does not have a type entry or is not an enum"/>
+ <add-function signature="qCDebug(PyObject *, const char *)">
+ <extra-includes>
+ <include file-name="qloggingcategory.h" location="global" />
+ </extra-includes>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
+ qCDebug((*category), "%s", %2);
+ </inject-code>
+ </add-function>
+
+ <add-function signature="qCCritical(PyObject *, const char *)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
+ qCCritical((*category), "%s", %2);
+ </inject-code>
+ </add-function>
+
+ <add-function signature="qCInfo(PyObject *, const char *)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
+ qCInfo((*category), "%s", %2);
+ </inject-code>
+ </add-function>
- <!-- this function only exists on Windows -->
- <suppress-warning text="^signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found.*"/>
+ <add-function signature="qCWarning(PyObject *, const char *)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
+ qCWarning((*category), "%s", %2);
+ </inject-code>
+ </add-function>
- <!-- this is necessary to avoid warning on other modules -->
- <suppress-warning text="^signature 'operator*(QByteArray,const char*)' for function modification in 'QByteArray' not found.*"/>
- <suppress-warning text="^signature 'operator+(QByteArray,QString)' for function modification in 'QByteArray' not found.*"/>
+ <suppress-warning text="^.*enum 'Qt::Initialization' does not have a type entry.*$"/>
+ <suppress-warning text="^.*Enum 'QRandomGenerator::System'.*does not have a type entry.*$"/>
- <!-- This enum is intenaly used -->
- <suppress-warning text="enum 'PM_CbaIconHeight' does not have a type entry or is not an enum"/>
+ <suppress-warning text="^Anonymous enum.*does not have a type entry.*$"/>
+ <suppress-warning text="Visibility of function '*' modified in class '*'"/>
+ <suppress-warning text="Shadowing: *"/>
+ <suppress-warning text="^namespace '.*' does not have a type entry.*$"/>
+ <!-- QCborStreamReader: Suppress warnings about 32/64bit signatures not found depending on qsizetype -->
+ <suppress-warning text="^signature 'readStringChunk\(char.*in 'QCborStreamReader' not found.*$"/>
<!-- TODO: this need be removed -->
- <suppress-warning text="^skipping function '.*', unmatched return type '.*$"/>
- <suppress-warning text="^skipping function '.*', unmatched type '.*$"/>
-
- <suppress-warning text="enum 'q_static_assert_result39' does not have a type entry or is not an enum"/>
- <suppress-warning text="horribly broken type ''"/>
- <suppress-warning text="Pure virtual method 'QTextCodec::convertFromUnicode(const QChar*,int,QTextCodec::ConverterState*)const' must be implement but was completely removed on type system."/>
-
- <!-- Qt5.5: No idea how to get rid of the following five enums, which are moved elsewhere since 5.5: -->
- <suppress-warning text="enum 'QLocale::MeasurementSystem' is specified in typesystem, but not declared"/>
- <suppress-warning text="enum 'QState::RestorePolicy' is specified in typesystem, but not declared"/>
- <!-- <suppress-warning text="enum 'QLocale::FormatType' is specified in typesystem, but not declared"/> -->
- <suppress-warning text="enum 'QAbstractAnimation::DeletionPolicy' is specified in typesystem, but not declared"/>
- <!-- <suppress-warning text="enum 'QAbstractAnimation::State' is specified in typesystem, but not declared"/> -->
- <!-- Qt5.5: we also suppress these warnings, instead of adding wrong enums -->
- <suppress-warning text="enum 'InterfaceType' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'TextBoundaryType' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'RelationFlag' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'Role' does not have a type entry or is not an enum"/>
-
- <!-- Anonymous enum in qtbase/src/corelib/global/qtypeinfo.h -->
- <suppress-warning text="Anonymous enum (Q_COMPLEX_TYPE, ... , Q_RELOCATABLE_TYPE) does not have a type entry"/>
-
- <!-- Another anonymous enum / value pair in in qtbase/src/corelib/kernel/qcoreapplication.h -->
- <suppress-warning text="no matching enum 'QT_VERSION'"/>
- <suppress-warning text="unhandled enum value: QT_VERSION in QCoreApplication::ApplicationFlags from header 'qcoreapplication.h'"/>
- <suppress-warning text="unmatched enum QT_VERSION from header 'qcoreapplication.h'"/>
-
- <suppress-warning text="skipping field 'QSysInfo::WindowsVersion' with unmatched type 'const QSysInfo::WinVersion'"/>
+ <suppress-warning text="^skipping.*function '.*', unmatched return type '.*$"/>
+ <suppress-warning text="^skipping.*function '.*', unmatched type '.*$"/>
+ <suppress-warning text="skipping protected field 'QStringConverter::iface' with unmatched type 'QStringConverter::Interface'"/>
+ <suppress-warning text="^skipping public field 'Qt::.*' with unmatched type 'Qt::.*ordering'$"/>
+ <suppress-warning text="skipping public field 'Qt::Uninitialized' with unmatched type 'Qt::Initialization'"/>
+ <suppress-warning text="skipping public field 'State::clearFn' with unmatched type 'void'"/>
<suppress-warning text="template baseclass 'QListSpecialMethods&lt;T&gt;' of 'QList' is not known"/>
+ <suppress-warning text="^.*inherits from a non polymorphic type.*QIODeviceBase.*type discovery based on RTTI is impossible.*$"/>
+ <suppress-warning text="Base class 'QOperatingSystemVersionUnexported' of class 'QOperatingSystemVersion' not found in the type system for setting up inheritance."/>
- <suppress-warning text="skipping field 'QSysInfo::MacintoshVersion' with unmatched type 'QSysInfo::MacVersion'"/>
- <suppress-warning text="skipping field 'QSysInfo::WindowsVersion' with unmatched type 'QSysInfo::MacVersion'"/>
- <suppress-warning text="enum 'QSysInfo::MacVersion' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'QSysInfo::WinVersion' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'QSysInfo::Endian' is specified in typesystem, but not declared"/>
</typesystem>