<?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$
**
****************************************************************************/
-->
<typesystem package="PySide2.QtCore">
    <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="PySequence"/>
    <custom-type name="PyTypeObject"/>
    <custom-type name="PyUnicode"/>
    <custom-type name="list of QAbstractAnimation"/>
    <custom-type name="list of QAbstractState"/>

    <function signature="qAcos(qreal)"/>
    <function signature="qAsin(qreal)" since="4.6"/>
    <function signature="qAtan(qreal)" since="4.6"/>
    <function signature="qAtan2(qreal,qreal)" since="4.6"/>
    <function signature="qChecksum(const char*,uint)"/>
    <function signature="qExp(qreal)" since="4.6"/>
    <function signature="qFabs(qreal)" since="4.6"/>
    <function signature="qFastCos(qreal)" since="4.6"/>
    <function signature="qFastSin(qreal)" since="4.6"/>
    <function signature="qFuzzyCompare(double,double)"/>
    <function signature="qFuzzyIsNull(double)" since="4.6"/>
    <function signature="qIsFinite(double)"/>
    <function signature="qIsInf(double)"/>
    <function signature="qIsNaN(double)"/>
    <function signature="qIsNull(double)"/>
    <!-- Qt5: gone <function signature="qRound(qreal)"/> -->
    <function signature="qTan(qreal)" since="4.6"/>
    <function signature="qtTrId(const char*,int)" since="4.6"/>
    <function signature="qVersion()"/>
    <function signature="qrand()"/>
    <function signature="qsrand(uint)"/>
    <function signature="qCompress(const uchar*,int,int)"/>
    <function signature="qCompress(const QByteArray&amp;,int)"/>
    <function signature="qUncompress(const uchar*,int)"/>
    <function signature="qUncompress(const QByteArray&amp;)"/>

    <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="include-pyside"/>


    <add-function signature="qDebug(const char*)">
        <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
    </add-function>
    <add-function signature="qCritical(const char*)">
        <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
    </add-function>
    <add-function signature="qFatal(const char*)">
        <inject-code file="../glue/qtcore.cpp" snippet="qfatal"/>
    </add-function>
    <add-function signature="qWarning(const char*)">
        <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
    </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="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="*" 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"/>

  <primitive-type name="qint8"/>
  <primitive-type name="qint16"/>
  <primitive-type name="qint32"/>
  <primitive-type name="quint8"/>
  <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="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="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="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"/>
        </target-to-native>
    </conversion-rule>
  </primitive-type>
  <primitive-type name="quintptr" target-lang-api-name="PyLong">
    <conversion-rule>
        <native-to-target file="../glue/qtcore.cpp" snippet="return-pylong-quintptr"/>
        <target-to-native>
            <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong-quintptr"/>
        </target-to-native>
    </conversion-rule>
  </primitive-type>
  <primitive-type name="qptrdiff" 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"/>
        </target-to-native>
    </conversion-rule>
  </primitive-type>

  <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="pystring-check"/>

  <primitive-type name="QString" target-lang-api-name="PyUnicode">
    <include file-name="QString" location="global"/>
    <conversion-rule>
        <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode"/>
        <target-to-native>
            <add-conversion type="PyUnicode" file="../glue/qtcore.cpp" snippet="conversion-pyunicode"/>
            <add-conversion type="PyString" check="py2kStrCheck(%in)" file="../glue/qtcore.cpp" snippet="conversion-pystring"/>
            <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
        </target-to-native>
    </conversion-rule>
  </primitive-type>

  <primitive-type name="QStringRef">
    <conversion-rule>
        <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-qstringref"/>
    </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="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">
    <conversion-rule>
        <native-to-target file="../glue/qtcore.cpp" snippet="return-qvariant"/>
        <target-to-native>
            <add-conversion type="PyBool" file="../glue/qtcore.cpp" snippet="conversion-pybool"/>
            <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
            <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"/>
            <add-conversion type="PyObject" file="../glue/qtcore.cpp" snippet="conversion-pyobject"/>
        </target-to-native>
    </conversion-rule>
  </primitive-type>
    <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qvariant-conversion"/>
  <primitive-type name="QVariant::Type" default-constructor="QVariant::Invalid">
    <conversion-rule>
        <native-to-target file="../glue/qtcore.cpp" snippet="return-qvariant-type"/>
        <target-to-native>
            <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-qvariant-invalid"/>
            <add-conversion type="PyTypeObject" file="../glue/qtcore.cpp" snippet="conversion-qvariant-pytypeobject"/>
            <add-conversion type="PyString" check="Shiboken::String::check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qvariant-pystring"/>
            <add-conversion type="PyDict" check="PyDict_Check(%in) &amp;&amp; QVariantType_checkAllStringKeys(%in)" file="../glue/qtcore.cpp" snippet="conversion-qvariant-pydict"/>
            <add-conversion type="PySequence" file="../glue/qtcore.cpp" snippet="conversion-qvariant-pysequence"/>
        </target-to-native>
    </conversion-rule>
  </primitive-type>

  <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qvariantmap-check"/>
  <primitive-type name="QStringList">
    <include file-name="QStringList" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cpplist_to_pylist_conversion">
                <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">
                    <replace from="%OUTTYPE_0" to="QString"/>
                </insert-template>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </primitive-type>

  <value-type name="QCborError" since="5.12">
      <enum-type name="Code"/>
      <include file-name="qcborcommon.h" location="global"/>
  </value-type>

  <value-type name="QCborParserError" since="5.12">
      <include file-name="qcborvalue.h" location="global"/>
  </value-type>

  <value-type name="QCborValue" since="5.12">
      <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"/>

  <object-type name="QCborStreamReader" since="5.12">
    <enum-type name="StringResultCode"/>
    <enum-type name="Type"/>
    <include file-name="qcborstream.h" location="global"/>
    <value-type name="StringResult" generate="no"/>
    <!-- 64bit (qsizetype = long long) -->
    <modify-function signature="readStringChunk(char*,long long)" remove="all"/>
    <!-- 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">
    <include file-name="qcborstream.h" location="global"/>
  </object-type>

  <primitive-type name="QJsonObject">
    <conversion-rule>
        <native-to-target file="../glue/qtcore.cpp" snippet="return-qjsonobject"/>
        <target-to-native>
            <add-conversion type="PyDict" file="../glue/qtcore.cpp" snippet="conversion-qjsonobject-pydict"/>
        </target-to-native>
    </conversion-rule>
  </primitive-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>

  <container-type name="QSet" type="set">
    <include file-name="QSet" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cpplist_to_pylist_conversion"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PySequence">
                <insert-template name="pyseq_to_cpplist_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </container-type>

  <container-type name="QList" type="list">
    <include file-name="QList" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cpplist_to_pylist_conversion"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PySequence">
                <insert-template name="pyseq_to_cpplist_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </container-type>

  <container-type name="QVector" type="vector">
    <include file-name="QVector" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cppvector_to_pylist_conversion"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PySequence">
                <insert-template name="pyseq_to_cppvector_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>

  </container-type>

  <container-type name="QStack" type="stack">
    <include file-name="QStack" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cpplist_to_pylist_conversion"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PySequence">
                <insert-template name="pyseq_to_cpplist_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </container-type>

  <container-type name="QQueue" type="queue">
    <include file-name="QQueue" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cpplist_to_pylist_conversion"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PySequence">
                <insert-template name="pyseq_to_cpplist_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </container-type>

  <container-type name="QLinkedList" type="linked-list">
    <include file-name="QLinkedList" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cpplist_to_pylist_conversion"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PySequence">
                <insert-template name="pyseq_to_cpplist_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </container-type>

  <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"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PyDict">
                <insert-template name="pydict_to_cppmap_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </container-type>
  <container-type name="QMap" type="map">
    <include file-name="QMap" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cppmap_to_pymap_conversion"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PyDict">
                <insert-template name="pydict_to_cppmap_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </container-type>
  <container-type name="QMultiMap" type="multi-map">
    <include file-name="QMultiMap" location="global"/>
    <conversion-rule>
        <native-to-target>
            <insert-template name="cppmap_to_pymap_conversion"/>
        </native-to-target>
        <target-to-native>
            <add-conversion type="PyDict">
                <insert-template name="pydict_to_cppmap_conversion"/>
            </add-conversion>
        </target-to-native>
    </conversion-rule>
  </container-type>

  <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>

  <rejection class="*" function-name="d_func"/>
  <rejection class="*" function-name="data_ptr"/>
  <rejection class="*" function-name="detach"/>
  <rejection class="*" function-name="isDetached"/>
  <rejection class="*" field-name="d_ptr"/>
  <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="QtValidLicenseForXmlPatternsModule"/>
  <rejection class="" enum-name="QtValidLicenseForActiveQtModule"/>
  <rejection class="" enum-name="QtValidLicenseForCoreModule"/>
  <rejection class="" enum-name="QtValidLicenseForQt3SupportLightModule"/>
  <rejection class="" enum-name="QtValidLicenseForQt3SupportModule"/>
  <rejection class="" enum-name="QtValidLicenseForNetworkModule"/>
  <rejection class="" enum-name="QtValidLicenseForSvgModule"/>
  <rejection class="" enum-name="QtValidLicenseForGuiModule"/>
  <rejection class="" enum-name="QtValidLicenseForScriptModule"/>
  <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"/>
    <enum-type name="AnchorPoint" since="4.6"/>
    <enum-type name="ApplicationAttribute"/>
    <enum-type name="ApplicationState" flags="ApplicationStates" since="5.1"/>
    <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="CheckState"/>
    <enum-type name="ClipOperation"/>
    <enum-type name="ConnectionType"/>
    <enum-type name="ContextMenuPolicy"/>
    <enum-type name="CoordinateSystem" since="4.6"/>
    <enum-type name="Corner"/>
    <enum-type name="CursorShape"/>
    <enum-type name="DateFormat"/>
    <enum-type name="DayOfWeek"/>
    <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="EventPriority"/>
    <enum-type name="FillRule"/>
    <enum-type name="FindChildOption" flags="FindChildOptions" since="5.0"/>
    <enum-type name="FocusPolicy"/>
    <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="GlobalColor"/>
    <enum-type name="HighDpiScaleFactorRoundingPolicy" since="5.14"/>
    <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="ItemFlag" flags="ItemFlags"/>
    <enum-type name="ItemSelectionMode"/>
    <enum-type name="ItemSelectionOperation" since="5.5"/>
    <enum-type name="Key"/>
    <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="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="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="ScreenOrientation" flags="ScreenOrientations" since="5.0"/>
    <enum-type name="ScrollBarPolicy"/>
    <enum-type name="ScrollPhase" since="5.2"/>
    <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="TextElideMode"/>
    <enum-type name="TextFlag"/>
    <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="TimeSpec"/>
    <enum-type name="ToolBarArea" flags="ToolBarAreas"/>
    <enum-type name="ToolBarAreaSizes"/>
    <enum-type name="ToolButtonStyle"/>
    <enum-type name="TouchPointState" flags="TouchPointStates" since="4.6"/>
    <enum-type name="TransformationMode"/>
    <enum-type name="UIEffect"/>
    <enum-type name="WhiteSpaceMode"/>
    <enum-type name="WidgetAttribute"/>
    <enum-type name="WindowFrameSection"/>
    <enum-type name="WindowModality"/>
    <enum-type name="WindowState" flags="WindowStates"/>
    <enum-type name="WindowType" flags="WindowFlags"/>
    <enum-type name="CursorMoveStyle" since="4.8" revision="4800"/>

  </namespace-type>

  <add-function signature="QEnum(PyObject*)" return-type="PyObject*">
      <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qenum"/>
  </add-function>
  <add-function signature="QFlag(PyObject*)" return-type="PyObject*">
      <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qflag"/>
  </add-function>

  <add-function signature="__init_feature__()">
      <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-init-feature"/>
  </add-function>

  <add-function signature="qAbs(double)" return-type="double">
    <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>
  <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-qaddpostroutine"/>

  <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-version"/>

  <!-- WARNING: There is an issue when adding this code to an external file -->
  <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-module-shutdown"/>
  <add-function signature="__moduleShutdown()">
      <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="moduleshutdown"/>
  </add-function>

  <!--signal/slot-->
  <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"/>
  <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">
    <enum-type name="ForeverConstant"/>
  </value-type>

  <value-type name="QElapsedTimer" since="4.7">
    <enum-type name="ClockType" since="4.7"/>
  </value-type>

  <object-type name="QAbstractTableModel" polymorphic-id-expression="qobject_cast&lt;QAbstractTableModel*&gt;(%1)">
    <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">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="iiii"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
            </insert-template>
        </inject-code>
    </add-function>
    <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qline-hash"/>

    <add-function signature="toTuple" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="iiii"/>
                <replace from="%TT_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
            </insert-template>
        </inject-code>
    </add-function>
  </value-type>
  <value-type name="QLineF">
    <enum-type name="IntersectType"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="dddd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="toTuple" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="dddd"/>
                <replace from="%TT_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
            </insert-template>
        </inject-code>
    </add-function>
    <modify-function signature="intersect(QLineF,QPointF*)const">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <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"/>
    <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.
        </inject-documentation>
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
        <inject-code file="../glue/qtcore.cpp" snippet="qresource-data"/>
    </modify-function>

    <modify-function signature="unregisterResource(const uchar*,const QString&amp;)" rename="unregisterResourceData">
      <modify-argument index="1">
        <replace-type modified-type="PyBuffer"/>
      </modify-argument>
      <inject-code file="../glue/qtcore.cpp" snippet="qresource-registerResource"/>
    </modify-function>
    <modify-function signature="registerResource(const uchar*,const QString&amp;)" rename="registerResourceData">
      <modify-argument index="1">
        <replace-type modified-type="PyBuffer"/>
      </modify-argument>
      <inject-code file="../glue/qtcore.cpp" snippet="qresource-registerResource"/>
    </modify-function>
  </object-type>

  <object-type name="QBasicTimer"/>
  <value-type name="QByteArrayMatcher"/>
  <value-type name="QCalendar" since="5.14">
      <value-type name="YearMonthDay"/>
      <enum-type name="System"/>
  </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>
    <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"/>
        </target-to-native>
    </conversion-rule>
    <extra-includes>
      <include file-name="datetime.h" location="global"/>
    </extra-includes>
    <enum-type name="MonthNameType"/>
    <add-function signature="__repr__" return-type="PyObject">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%i, %i, %i"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.year(), %CPPSELF.month(), %CPPSELF.day()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="iii"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.year(), %CPPSELF.month(), %CPPSELF.day()"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="toPython()" return-type="PyObject">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-topython"/>
    </add-function>
    <modify-function signature="getDate(int*,int*,int*)" >
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="return">
            <replace-type modified-type="(year, month, day)"/>
        </modify-argument>
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-getdate"/>
    </modify-function>
    <modify-function signature="weekNumber(int*)const" >
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="return">
            <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>
    <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"/>
        </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>
        <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>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%i, %i, %i, %i, %i, %i, %i, %i"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.date().year(), %CPPSELF.date().month(), %CPPSELF.date().day(), %CPPSELF.time().hour(), %CPPSELF.time().minute(), %CPPSELF.time().second(), %CPPSELF.time().msec(), (int)%CPPSELF.timeSpec()"/>
             </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="iiiiiiii"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.date().year(), %CPPSELF.date().month(), %CPPSELF.date().day(), %CPPSELF.time().hour(), %CPPSELF.time().minute(), %CPPSELF.time().second(), %CPPSELF.time().msec(), (int)%CPPSELF.timeSpec()"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="toPython()" return-type="PyObject">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-topython"/>
    </add-function>
  </value-type>
  <value-type name="QDir">
    <enum-type name="Filter" flags="Filters"/>
    <enum-type name="SortFlag" flags="SortFlags"/>
    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="s"/>
              <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.path())"/>
            </insert-template>
        </inject-code>
    </add-function>
  </value-type>

  <value-type name="QPoint" hash-function="PySide::hash">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%i, %i"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="ii"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
            </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">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="ii"/>
                <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <!--### Functions removed because they return references to Python imutable objects -->
    <modify-function signature="rx()" remove="all"/>
    <modify-function signature="ry()" remove="all"/>
    <!--### -->
  </value-type>
  <value-type name="QPointF">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="dd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="toTuple" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="dd"/>
                <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <!--### Functions removed because they return references to Python imutable objects -->
    <modify-function signature="rx()" remove="all"/>
    <modify-function signature="ry()" remove="all"/>
    <!--### -->
  </value-type>
  <value-type name="QRect" hash-function="PySide::hash">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
             </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="iiii"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
            </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">
            <replace-type modified-type="PyObject"/>
        </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>
        <modify-argument index="4">
            <remove-argument />
        </modify-argument>
        <inject-code class="target">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="int"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getRect(int*,int*,int*,int*)const">
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </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>
        <modify-argument index="4">
            <remove-argument />
        </modify-argument>
        <inject-code class="target">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="int"/>
            </insert-template>
        </inject-code>
    </modify-function>
  </value-type>
  <value-type name="QRectF">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
             </insert-template>
        </inject-code>
    </add-function>

   <!--
         FIXME These functions return qreal. Will convert to double (format
         string) mess things up in other architectures?
    -->
    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="dddd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
            </insert-template>
        </inject-code>
    </add-function>
    <modify-function signature="getCoords(qreal*,qreal*,qreal*,qreal*)const">
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </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>
        <modify-argument index="4">
            <remove-argument />
        </modify-argument>
        <inject-code class="target">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="qreal"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getRect(qreal*,qreal*,qreal*,qreal*)const">
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </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>
        <modify-argument index="4">
            <remove-argument />
        </modify-argument>
        <inject-code class="target">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="qreal"/>
            </insert-template>
        </inject-code>
    </modify-function>
  </value-type>
  <value-type name="QSize" hash-function="PySide::hash">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%i, %i"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="ii"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
            </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">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="ii"/>
                <replace from="%TT_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <!--### Functions removed because they return references to Python imutable objects -->
    <modify-function signature="rheight()" remove="all"/>
    <modify-function signature="rwidth()" remove="all"/>
    <!--### -->
  </value-type>
  <value-type name="QSizeF">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="dd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="toTuple" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="dd"/>
                <replace from="%TT_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <!--### Functions removed because they return references to Python imutable objects -->
    <modify-function signature="rheight()" remove="all"/>
    <modify-function signature="rwidth()" remove="all"/>
    <!--### -->
  </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>
    <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"/>
        </target-to-native>
    </conversion-rule>

    <extra-includes>
      <include file-name="datetime.h" location="global"/>
    </extra-includes>

    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.hour(), %CPPSELF.minute(), %CPPSELF.second(), %CPPSELF.msec()"/>
             </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="iiii"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.hour(), %CPPSELF.minute(), %CPPSELF.second(), %CPPSELF.msec()"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="toPython()" return-type="PyObject">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtime-topython"/>
    </add-function>
  </value-type>
  <value-type name="QPersistentModelIndex" hash-function="qHash">
    <modify-function signature="internalPointer()const">
        <inject-code class="target" position="beginning">
            <insert-template name="return_internal_pointer" />
        </inject-code>
    </modify-function>
    <modify-function signature="operator const QModelIndex&amp;()const">
        <modify-argument index="return">
            <parent index="this" action="add"/>
        </modify-argument>
    </modify-function>
  </value-type>

  <value-type name="QTimeZone">
    <enum-type name="TimeType"/>
    <enum-type name="NameType"/>
    <value-type name="OffsetData"/>
  </value-type>

  <value-type name="QUuid">
    <enum-type name="StringFormat" since="5.11"/>
    <enum-type name="Variant"/>
    <enum-type name="Version"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="'%s'"/>
               <replace from="%REPR_ARGS" to="qPrintable(%CPPSELF.toString())"/>
             </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="s"/>
              <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.toString())"/>
            </insert-template>
        </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMimeType" since="5.0"/>
  <object-type name="QMimeDatabase" since="5.0">
    <enum-type name="MatchMode"/>
  </object-type>

  <value-type name="QLocale">
    <enum-type name="Country"/>
    <enum-type name="DataSizeFormat" flags="DataSizeFormats" since="5.10"/>
    <enum-type name="FloatingPointPrecisionOption" since="5.7"/>
    <enum-type name="FormatType"/>
    <enum-type name="Language"/>
    <enum-type name="MeasurementSystem"/>
    <enum-type name="NumberOption" flags="NumberOptions"/>
    <enum-type name="Script" since="4.8" revision="4800"/>
    <enum-type name="CurrencySymbolFormat" since="4.8" revision="4800"/>
    <enum-type name="QuotationStyle" since="4.8" revision="4800"/>
    <!--### All those C++ number types have the same representation in Python -->
    <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"/>
    <!--### -->
    <extra-includes>
      <include file-name="QDate" location="global"/>
    </extra-includes>
    <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-argument index="2">
            <rename to="format"/>
        </modify-argument>
    </modify-function>
    <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
    <modify-function signature="toUInt(QStringRef,bool*)const" remove="all"/>
    <modify-function signature="toUInt(QString,bool*)const">
        <modify-argument index="2">
            <remove-argument />
            <remove-default-expression />
        </modify-argument>
        <modify-argument index="return">
            <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>
    <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
    <modify-function signature="toULongLong(QStringRef,bool*)const" remove="all"/>
    <modify-function signature="toULongLong(QString,bool*)const">
        <modify-argument index="2">
            <remove-argument />
            <remove-default-expression />
        </modify-argument>
        <modify-argument index="return">
            <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>
    <!-- Qt5: ignore the new QStringRef versions -->
    <modify-function signature="toDouble(QStringRef,bool*)const" remove="all"/>
    <modify-function signature="toDouble(QString,bool*)const">
        <modify-argument index="2">
            <remove-argument />
            <remove-default-expression />
        </modify-argument>
        <modify-argument index="return">
            <replace-type modified-type="(float, bool ok)"/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_args,bool*"/>
        </inject-code>
    </modify-function>
    <!-- Qt5: ignore the new QStringRef versions -->
    <modify-function signature="toFloat(QStringRef,bool*)const" remove="all"/>
    <modify-function signature="toFloat(QString,bool*)const">
        <modify-argument index="2">
            <remove-argument />
            <remove-default-expression />
        </modify-argument>
        <modify-argument index="return">
            <replace-type modified-type="(float, bool ok)"/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_args,bool*"/>
        </inject-code>
    </modify-function>
    <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
    <modify-function signature="toInt(QStringRef,bool*)const" remove="all"/>
    <modify-function signature="toInt(QString,bool*)const">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <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>
    <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
    <modify-function signature="toLongLong(QStringRef,bool*)const" remove="all"/>
    <modify-function signature="toLongLong(QString,bool*)const">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <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>
    <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
    <modify-function signature="toShort(QStringRef,bool*)const" remove="all"/>
    <modify-function signature="toShort(QString,bool*)const">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <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>
    <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
    <modify-function signature="toUShort(QStringRef,bool*)const" remove="all"/>
    <modify-function signature="toUShort(QString,bool*)const">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <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>
  </value-type>
  <value-type name="QBitArray" hash-function="qHash" >
    <add-function signature="__len__">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-len"/>
    </add-function>
    <add-function signature="__getitem__">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-getitem"/>
    </add-function>
    <add-function signature="__setitem__">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-setitem"/>
    </add-function>
  </value-type>
  <object-type name="QLockFile">
      <enum-type name="LockError"/>
      <modify-function signature="isLocked()const" allow-thread="yes"/>
      <modify-function signature="lock()" allow-thread="yes"/>
      <modify-function signature="removeStaleLockFile()" allow-thread="yes"/>
      <modify-function signature="tryLock(int)" allow-thread="yes"/>
      <modify-function signature="unlock()" allow-thread="yes"/>
  </object-type>
  <object-type name="QMessageAuthenticationCode"/>
  <object-type name="QSignalBlocker"/>
  <value-type name="QStorageInfo"/>
  <!-- QReadWriteLock does not have a copy ctor! -->
  <object-type name="QReadWriteLock">
    <enum-type name="RecursionMode"/>
    <modify-function signature="lockForRead()" allow-thread="yes"/>
    <modify-function signature="tryLockForRead(int)" allow-thread="yes"/>
    <modify-function signature="lockForWrite()" allow-thread="yes"/>
    <modify-function signature="tryLockForWrite(int)" allow-thread="yes"/>
  </object-type>
  <object-type name="QReadLocker">
    <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="__exit__(PyObject*,PyObject*,PyObject*)">
        <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
    </add-function>
  </object-type>
  <object-type name="QWriteLocker">
    <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="__exit__(PyObject*,PyObject*,PyObject*)">
        <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
    </add-function>
  </object-type>
  <object-type name="QDirIterator">
    <enum-type name="IteratorFlag" flags="IteratorFlags"/>
  </object-type>
  <object-type name="QThread">
    <inject-code file="../glue/qtcore.cpp" class="native" position="beginning" snippet="qthread_pthread_cleanup"/>
    <enum-type name="Priority"/>
    <modify-function signature="currentThreadId()" remove="all"/>
    <modify-function signature="run()" allow-thread="yes">
        <inject-code file="../glue/qtcore.cpp" class="native" position="beginning"
                     snippet="qthread_pthread_cleanup_install"/>
        <inject-code file="../glue/qtcore.cpp" class="native" position="end"
                     snippet="qthread_pthread_cleanup_uninstall"/>
    </modify-function>
    <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
    <modify-function signature="msleep(unsigned long)" allow-thread="yes"/>
    <modify-function signature="sleep(unsigned long)" allow-thread="yes"/>
    <modify-function signature="usleep(unsigned long)" allow-thread="yes"/>
    <modify-function signature="wait(QDeadlineTimer)" allow-thread="yes"/>
    <modify-function signature="wait(unsigned long)" allow-thread="yes"/>
    <modify-function signature="yieldCurrentThread()" allow-thread="yes"/>
    <modify-function signature="start(QThread::Priority)" allow-thread="yes">
      <modify-argument index="1">
        <rename to="priority"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="exit(int)" allow-thread="yes"/>
  </object-type>

  <object-type name="QAbstractItemModel">
    <enum-type name="CheckIndexOption" flags="CheckIndexOptions" since="5.11"/>
    <enum-type name="LayoutChangeHint"/>
     <!-- This function was replaced by a added function -->
    <modify-function signature="createIndex(int,int,void*)const" remove="all"/>
    <!-- This function is the same as createIndex(int, int, int)const -->
    <modify-function signature="createIndex(int,int,quintptr)const">
        <modify-argument index="3">
            <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>
        <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.
            When using a QSortFilterProxyModel, its indexes have their own internal pointer.
            It is not advisable to access this internal pointer outside of the model.
            Use the data() function instead.
            This function provides a consistent interface that model subclasses must use to create model indexes.

            .. warning:: Because of some Qt/Python itegration rules, the ptr argument do not get the reference
                incremented during the QModelIndex life time. So it is necessary to keep the object used
                on ptr argument alive during the whole process.
                Do not destroy the object if you are not sure about that.
        </inject-documentation>
    </add-function>
    <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qabstractitemmodel"/>
    <modify-function signature="mimeData(QModelIndexList)const">
      <modify-argument index="return">
        <define-ownership class="native" owner="c++"/>
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="data(const QModelIndex&amp;,int)const">
      <modify-argument index="return">
        <define-ownership class="native" owner="c++"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="dataChanged(const QModelIndex&amp;,const QModelIndex&amp;,const QVector&lt;int&gt;&amp;)" allow-thread="yes"/>
    <modify-function signature="layoutAboutToBeChanged(const QList&lt;QPersistentModelIndex&gt;&amp;,QAbstractItemModel::LayoutChangeHint)" allow-thread="yes"/>
    <modify-function signature="layoutChanged(const QList&lt;QPersistentModelIndex&gt;&amp;,QAbstractItemModel::LayoutChangeHint)" allow-thread="yes"/>
    <modify-function signature="beginResetModel()" allow-thread="yes"/>
    <modify-function signature="endResetModel()" allow-thread="yes"/>
  </object-type>
  <value-type name="QItemSelection">
    <include file-name="QList" location="global"/>
  </value-type>

  <object-type name="QItemSelectionModel">
    <extra-includes>
        <include file-name="QItemSelection" location="global"/>
    </extra-includes>
    <enum-type name="SelectionFlag" flags="SelectionFlags"/>
  </object-type>

  <value-type name="QItemSelectionRange">
  </value-type>
  <object-type name="QAbstractProxyModel" polymorphic-id-expression="qobject_cast&lt;QAbstractProxyModel*&gt;(%1)">
    <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="QSortFilterProxyModel">
    <extra-includes>
      <include file-name="QItemSelection" location="global"/>
      <include file-name="QStringList" location="global"/>
      <include file-name="QSize" location="global"/>
    </extra-includes>
    <modify-function signature="setSourceModel(QAbstractItemModel*)">
      <modify-argument index="1">
        <reference-count action="set"/>
      </modify-argument>
    </modify-function>
    <!--### Obsolete in 4.3-->
    <modify-function signature="clear()" remove="all"/>
    <modify-function signature="filterChanged()" remove="all"/>
    <!--### End of obsolete section -->
  </object-type>
  <object-type name="QIdentityProxyModel"/>
  <object-type name="QTransposeProxyModel" since="5.13"/>
  <!-- QObject is created manually -->
  <object-type name="QObject">
    <extra-includes>
      <include file-name="QThread" location="global"/>
      <include file-name="QCoreApplication" location="global"/>
      <include file-name="signalmanager.h" location="local"/>
    </extra-includes>
    <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>

    <modify-function signature="deleteLater()">
      <modify-argument index="this">
        <define-ownership owner="c++"/>
      </modify-argument>
    </modify-function>
    <!-- Invalidate-after-use stuff -->
    <modify-function signature="childEvent(QChildEvent*)">
        <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="customEvent(QEvent*)">
        <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="event(QEvent*)">
        <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="eventFilter(QObject*,QEvent*)">
        <modify-argument index="2" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="timerEvent(QTimerEvent*)">
        <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <!-- End of Invalidate-after-use fix -->
    <modify-function signature="parent()const">
      <modify-argument index="this">
        <parent index="return" action="add"/>
      </modify-argument>
      <modify-argument index="return">
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="setParent(QObject*)">
      <modify-argument index="this">
        <parent index="1" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="connect(const QObject*,const char*,const char*,Qt::ConnectionType)const">
        <modify-argument index="4">
            <rename to="type"/>
        </modify-argument>
        <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>
        <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-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="bool" static="yes">
        <modify-argument index="4">
            <rename to="type"/>
            <replace-default-expression with="Qt::AutoConnection"/>
        </modify-argument>
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-4"/>
    </add-function>
    <!-- static version -->
    <add-function signature="connect(const char*,PyCallable*,Qt::ConnectionType)" return-type="bool">
        <modify-argument index="3">
            <rename to="type"/>
            <replace-default-expression with="Qt::AutoConnection"/>
        </modify-argument>
        <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="bool">
        <modify-argument index="4">
            <rename to="type"/>
            <replace-default-expression with="Qt::AutoConnection"/>
        </modify-argument>
        <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">
         <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">
         <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-disconnect-2"/>
    </add-function>


    <inject-code class="native" file="../glue/qtcore.cpp" snippet="qobject-findchild-1"/>
    <add-function signature="findChild(PyTypeObject*,const QString&amp;)" 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:

        ::

            ...
            parent = QWidget()
            ...
            # The first argument must be the child type
            child1 = parent.findChild(QPushButton, "child_button")
            child2 = parent.findChild(QWidget, "child_widget")

        </inject-documentation>
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchild-2"/>
      <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*,const QString&amp;)" return-type="PySequence*" >
        <inject-documentation format="target" mode="append">
        Like the method *findChild*, the first parameter should be the child's type.
        </inject-documentation>
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
        <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*,const QRegExp&amp;)" return-type="PySequence*" >
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
        <modify-argument index="return">
            <parent index="this" action="add"/>
        </modify-argument>
    </add-function>
    <add-function signature="findChildren(PyTypeObject*,const QRegularExpression&amp;)" return-type="PySequence*" >
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
        <modify-argument index="return">
            <parent index="this" action="add"/>
        </modify-argument>
    </add-function>

    <add-function signature="tr(const char*,const char*,int)" return-type="QString">
        <modify-argument index="2">
          <replace-default-expression with="0"/>
        </modify-argument>
        <modify-argument index="3">
          <replace-default-expression with="-1"/>
        </modify-argument>

        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-tr"/>
    </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"/>
     </modify-argument>
   </modify-function>

   <modify-function signature="sender()const" allow-thread="yes">
      <modify-argument index="return">
         <define-ownership owner="default"/>
      </modify-argument>
  </modify-function>

   <!-- This is not supported due the lack of information durring the call with no arguments,  this can cause a memory leak -->
   <modify-function signature="disconnect(const char*,const QObject*,const char*)const">
       <modify-argument index="1">
           <remove-default-expression />
       </modify-argument>
       <modify-argument index="2">
           <remove-default-expression />
       </modify-argument>
       <modify-argument index="3">
           <remove-default-expression />
       </modify-argument>
   </modify-function>
  </object-type>
  <object-type name="QAbstractListModel" polymorphic-id-expression="qobject_cast&lt;QAbstractListModel*&gt;(%1)">
    <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="QUrl" hash-function="PySide::hash">
    <!-- Qt5: lots of changes -->
    <enum-type name="ComponentFormattingOption" flags="ComponentFormattingOptions,FormattingOptions"/>
    <!-- note: above duplication of attribute is not by default XML compliant! -->
    <enum-type name="UrlFormattingOption"/>
    <enum-type name="UserInputResolutionOption" flags="UserInputResolutionOptions"/>
    <enum-type name="ParsingMode"/>
    <extra-includes>
      <include file-name="QStringList" location="global"/>
    </extra-includes>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="'%s'"/>
               <replace from="%REPR_ARGS" to="qPrintable(%CPPSELF.toString())"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="s"/>
              <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.toString())"/>
            </insert-template>
        </inject-code>
    </add-function>
  </value-type>
  <value-type name="QRegExp">
    <enum-type name="CaretMode"/>
    <enum-type name="PatternSyntax"/>
    <extra-includes>
      <include file-name="QStringList" location="global"/>
    </extra-includes>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="'%s', %i, %i"/>
               <replace from="%REPR_ARGS" to="qPrintable(%CPPSELF.pattern()), (int)%CPPSELF.caseSensitivity(), (int)%CPPSELF.patternSyntax()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="sii"/>
              <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.pattern()), (int)%CPPSELF.caseSensitivity(), (int)%CPPSELF.patternSyntax()"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="replace(QString,QString)" return-type="QString">
        <modify-argument index="1">
            <rename to="sourceString"/>
        </modify-argument>
        <modify-argument index="2">
            <rename to="after"/>
        </modify-argument>
        <inject-documentation format="target" mode="append">
        Replaces every occurrence of the regular expression in *sourceString* with *after*.
        Returns a new Python string with the modified contents. For example:

        ::

            s = "Banana"
            re = QRegExp("a[mn]")
            s = re.replace(s, "ox")
            # s == "Boxoxa"


        For regular expressions containing capturing parentheses, occurrences of \1, \2, ..., in *after*
        are replaced with rx.cap(1), cap(2), ...

        ::

            t = "A &lt;i>bon mot&lt;/i>."
            re = QRegExp("&lt;i>([^&lt;]*)&lt;/i>")
            t = re.replace(t, "\\emph{\\1}")
            # t == "A \\emph{bon mot}."

        </inject-documentation>
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qregexp-replace"/>
    </add-function>
  </value-type>

  <value-type name="QRegularExpression">
    <enum-type name="MatchOption" flags="MatchOptions"/>
    <enum-type name="MatchType"/>
    <enum-type name="PatternOption" flags="PatternOptions"/>
  </value-type>
  <value-type name="QRegularExpressionMatch"/>
  <value-type name="QRegularExpressionMatchIterator"/>

  <value-type name="QFileInfo">
    <extra-includes>
      <include file-name="QDateTime" location="global"/>
      <include file-name="QDir" location="global"/>
    </extra-includes>
    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="s"/>
              <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.filePath())"/>
            </insert-template>
        </inject-code>
    </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"/>
    <conversion-rule>
        <target-to-native>
            <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
            <add-conversion type="PyBytes" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pybytes"/>
            <add-conversion type="PyByteArray" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pybytearray"/>
            <add-conversion type="PyString" check="Shiboken::String::check(%in) &amp;&amp; !PyUnicode_Check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pystring"/>
        </target-to-native>
    </conversion-rule>

    <extra-includes>
      <!-- qt5: this is a pre-defined macro <include file-name="QNoImplicitBoolCast" location="global"/> -->
    </extra-includes>

    <!-- ### These overloads must be removed accept strings with \x00 in their contents -->
    <modify-function signature="append(const char*,int)" remove="all"/>
    <modify-function signature="append(const char*)" remove="all"/>
    <modify-function signature="append(QString)" remove="all"/>
    <modify-function signature="contains(const char*)const" remove="all"/>
    <modify-function signature="count(const char*)const" remove="all"/>
    <modify-function signature="endsWith(const char*)const" remove="all"/>
    <modify-function signature="indexOf(const char*,int)const" remove="all"/>
    <modify-function signature="indexOf(char,int)const" remove="all"/>
    <modify-function signature="indexOf(QString,int)const" remove="all"/>
    <modify-function signature="insert(int,const char*)" remove="all"/>
    <modify-function signature="insert(int,char)" remove="all"/>
    <modify-function signature="insert(int,const char*,int)" since="4.6" remove="all"/>
    <modify-function signature="insert(int,QString)" remove="all"/>
    <modify-function signature="lastIndexOf(const char*,int)const" remove="all"/>
    <modify-function signature="lastIndexOf(QString,int)const" remove="all"/>
    <modify-function signature="lastIndexOf(char,int)const" remove="all"/>
    <modify-function signature="prepend(const char*)" remove="all"/>
    <modify-function signature="prepend(const char*,int)" since="4.6" remove="all"/>
    <modify-function signature="replace(QByteArray,const char*)" remove="all"/>
    <modify-function signature="replace(const char*,int,const char*,int)" remove="all"/>
    <modify-function signature="replace(QString,const char*)" remove="all"/>
    <modify-function signature="replace(const char*,QByteArray)" remove="all"/>
    <modify-function signature="replace(const char*,const char*)" remove="all"/>
    <modify-function signature="replace(int,int,const char*)" remove="all"/>
    <modify-function signature="replace(int,int,const char*,int)" since="4.6" remove="all"/>
    <modify-function signature="replace(char,const char*)" remove="all"/>
    <modify-function signature="replace(char,QString)" remove="all"/>
    <modify-function signature="startsWith(const char*)const" remove="all"/>
    <modify-function signature="operator==(QString)const" remove="all"/>
    <modify-function signature="operator==(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator==(QByteArray,const char*)" remove="all"/>
    <modify-function signature="operator>(QString)const" remove="all"/>
    <modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator>(QByteArray,const char*)" remove="all"/>
    <modify-function signature="operator>=(QString)const" remove="all"/>
    <modify-function signature="operator>=(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator>=(QByteArray,const char*)" remove="all"/>
    <modify-function signature="operator&lt;(QString)const" remove="all"/>
    <modify-function signature="operator&lt;(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator&lt;=(QString)const" remove="all"/>
    <modify-function signature="operator&lt;=(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator&lt;=(QByteArray,const char*)" remove="all"/>
    <modify-function signature="operator!=(QString)const" remove="all"/>
    <modify-function signature="operator!=(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator!=(QByteArray,const char*)" remove="all"/>
    <modify-function signature="operator+=(QString)" remove="all"/>
    <modify-function signature="operator+=(const char*)" remove="all"/>
    <modify-function signature="operator+(QByteArray,const char*)" remove="all"/>
    <modify-function signature="operator+(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator+(QByteArray,const char*)" remove="all"/>
    <modify-function signature="operator+(QString,QByteArray)" remove="all"/>
    <modify-function signature="operator+(QByteArray,QString)" remove="all"/>
    <add-function signature="operator+(PyBytes,QByteArray)">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-1"/>
    </add-function>
    <add-function signature="operator+(PyByteArray, QByteArray)" return-type="QByteArray">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-2"/>
    </add-function>
    <add-function signature="operator+(PyByteArray)" return-type="QByteArray">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-3"/>
    </add-function>
    <add-function signature="operator+=(PyByteArray)" return-type="QByteArray">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplusequal"/>
    </add-function>
    <add-function signature="operator==(PyUnicode)">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorequalequal"/>
    </add-function>
    <add-function signature="operator!=(PyUnicode)">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatornotequal"/>
    </add-function>
    <add-function signature="operator&gt;(PyUnicode)">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorgreater"/>
    </add-function>
    <add-function signature="operator&gt;=(PyUnicode)">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorgreaterequal"/>
    </add-function>
    <add-function signature="operator&lt;(PyUnicode)">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorlower"/>
    </add-function>
    <add-function signature="operator&lt;=(PyUnicode)">
        <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorlowerequal"/>
    </add-function>
    <!-- ### -->

    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-repr"/>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
                <replace from="%REDUCE_FORMAT" to="N"/>
                <replace from="%REDUCE_ARGS" to="PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size())"/>
            </insert-template>
        </inject-code>
    </add-function>
    <modify-function signature="QByteArray(const char*,int)">
        <!-- Keep \x00 bytes passed in python strings -->
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-1"/>
    </modify-function>
    <add-function signature="QByteArray(PyByteArray)">
         <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-2"/>
    </add-function>
    <add-function signature="QByteArray(PyBytes)">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-3"/>
    </add-function>
    <!-- buffer protocol -->
    <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-bufferprotocol"/>
    <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qbytearray-py3"/>

   <modify-function signature="data()">
       <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-data"/>
   </modify-function>

    <!-- removed functions -->
    <!--### Functions removed because they return STL-like iterators -->
    <modify-function signature="begin()" remove="all"/>
    <modify-function signature="begin()const" remove="all"/>
    <modify-function signature="constBegin()const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <modify-function signature="constEnd()const" remove="all"/>
    <modify-function signature="end()" remove="all"/>
    <modify-function signature="end()const" remove="all"/>
    <!--### -->

    <!--### Functions removed because they provide useless overloads from Python point of view -->
    <modify-function signature="number(uint,int)" remove="all"/>
    <modify-function signature="number(qulonglong,int)" remove="all"/>
    <modify-function signature="operator+=(const char*)" remove="all"/>
    <modify-function signature="operator+(char,QByteArray)" remove="all"/>
    <modify-function signature="operator==(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator!=(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator&lt;(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator&lt;=(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator>=(const char*,QByteArray)" remove="all"/>
    <modify-function signature="operator[](int)const" remove="all"/>
    <modify-function signature="operator[](uint)const" remove="all"/>
    <!-- Those types have the same representation in Python, an overload
         would be useless and cause overflow errors. -->
    <modify-function signature="setNum(uint,int)" remove="all"/>
    <modify-function signature="setNum(ushort,int)" remove="all"/>
    <modify-function signature="setNum(float,char,int)" remove="all"/>
    <modify-function signature="setNum(short,int)" remove="all"/>
    <modify-function signature="setNum(qulonglong,int)" remove="all"/>
    <modify-function signature="number(uint,int)" remove="all"/>
    <modify-function signature="number(qulonglong,int)" remove="all"/>

    <!--### -->

    <modify-function signature="operator const char*()const" remove="all"/>
    <modify-function signature="operator const void*()const" remove="all"/>

    <!--### STL compatibility functions not supported by PySide -->
    <modify-function signature="push_back(char)" remove="all"/>
    <modify-function signature="push_back(const QByteArray&amp;)" remove="all"/>
    <modify-function signature="push_back(const char*)" remove="all"/>
    <modify-function signature="push_front(char)" remove="all"/>
    <modify-function signature="push_front(const QByteArray&amp;)" remove="all"/>
    <modify-function signature="push_front(const char*)" remove="all"/>
    <!--### -->

    <modify-function signature="toLong(bool*,int)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*,arg"/>
      </inject-code>
    </modify-function>
    <modify-function signature="toLongLong(bool*,int)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*,arg"/>
      </inject-code>
    </modify-function>
    <modify-function signature="toShort(bool*,int)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*,arg"/>
      </inject-code>
    </modify-function>
    <modify-function signature="toUInt(bool*,int)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*,arg"/>
      </inject-code>
    </modify-function>
    <modify-function signature="toULong(bool*,int)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*,arg"/>
      </inject-code>
    </modify-function>
    <modify-function signature="toULongLong(bool*,int)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*,arg"/>
      </inject-code>
    </modify-function>
    <modify-function signature="toInt(bool*,int)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*,arg"/>
      </inject-code>
    </modify-function>
    <modify-function signature="toUShort(bool*,int)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*,arg"/>
      </inject-code>
    </modify-function>
    <!-- QByteArray(const char *) do the job of this constructor -->
    <modify-function signature="QByteArray(const char*,int)" remove="all"/>
    <modify-function signature="fromRawData(const char*,int)">
        <modify-argument index="1">
            <replace-type modified-type="PyBytes"/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <inject-code class="target" file="../glue/qtcore.cpp" snippet="qbytearray-fromrawdata"/>
    </modify-function>
    <modify-function signature="toDouble(bool*)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*"/>
      </inject-code>
    </modify-function>
    <modify-function signature="toFloat(bool*)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*"/>
      </inject-code>
    </modify-function>
    <add-function signature="__str__" return-type="PyObject*">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-str"/>
    </add-function>
    <add-function signature="__len__">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-len"/>
    </add-function>
    <add-function signature="__getitem__">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-getitem"/>
    </add-function>
    <add-function signature="__mgetitem__">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-mgetitem"/>
    </add-function>
    <add-function signature="__setitem__">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-setitem"/>
    </add-function>
    <add-function signature="__msetitem__">
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-msetitem"/>
    </add-function>
  </value-type>
  <value-type name="QTextBoundaryFinder">
    <enum-type name="BoundaryReason" flags="BoundaryReasons"/>
    <enum-type name="BoundaryType"/>
    <!-- There's no QChar in PySide -->
    <modify-function signature="QTextBoundaryFinder(QTextBoundaryFinder::BoundaryType,const QChar*,int,unsigned char*,int)" remove="all"/>
  </value-type>
  <object-type name="QXmlStreamEntityResolver"/>

  <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
  <object-type name="QAbstractNativeEventFilter">
    <!-- see QWidget::nativeEvent(), QWindow::nativeEvent() -->
    <modify-function signature="nativeEventFilter(const QByteArray&amp;,void*,long*)">
      <modify-argument index="3">
        <remove-argument/>
        <conversion-rule class="native">
            <insert-template name="return_native_eventfilter_conversion_variables"/>
        </conversion-rule>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="PyObject"/>
        <conversion-rule class="native">
            <insert-template name="return_native_eventfilter_conversion"/>
        </conversion-rule>
      </modify-argument>
      <inject-code position="end">
          <insert-template name="return_native_eventfilter"/>
      </inject-code>
    </modify-function>
  </object-type>

  <object-type name="QEventLoop">
      <enum-type name="ProcessEventsFlag" flags="ProcessEventsFlags"/>
      <modify-function signature="exec(QFlags&lt;QEventLoop::ProcessEventsFlag>)" rename="exec_" allow-thread="yes"/>
      <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">
    <enum-type name="FileError"/>
    <enum-type name="FileTime" since="5.10"/>
    <enum-type name="MemoryMapFlags"/>
    <enum-type name="Permission" flags="Permissions"/>
    <enum-type name="FileHandleFlag" flags="FileHandleFlags"/>
    <extra-includes>
      <!-- Qt5: private <include file-name="QAbstractFileEngine" location="global"/> -->
    </extra-includes>
    <modify-function signature="unmap(uchar*)">
        <modify-argument index="1">
            <replace-type modified-type="PyBuffer"/>
        </modify-argument>
        <inject-code file="../glue/qtcore.cpp" snippet="qfiledevice-unmap"/>
    </modify-function>
    <modify-function signature="map(qint64,qint64,QFileDevice::MemoryMapFlags)">
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
        <inject-code file="../glue/qtcore.cpp" snippet="qfiledevice-map"/>
    </modify-function>
    <modify-function signature="flush()" allow-thread="yes"/>
  </object-type>
  <object-type name="QFile">
    <modify-function signature="open(QFlags&lt;QIODevice::OpenModeFlag&gt;)" allow-thread="yes"/>
    <modify-function signature="open(int,QFlags&lt;QIODevice::OpenModeFlag&gt;,QFlags&lt;QFileDevice::FileHandleFlag&gt;)" allow-thread="yes"/>
    <modify-function signature="copy(const QString&amp;)" allow-thread="yes"/>
    <modify-function signature="copy(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
    <modify-function signature="link(const QString&amp;)" allow-thread="yes"/>
    <modify-function signature="link(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
    <modify-function signature="remove()" allow-thread="yes"/>
    <modify-function signature="remove(const QString&amp;)" allow-thread="yes"/>
    <modify-function signature="rename(const QString&amp;)" allow-thread="yes"/>
    <modify-function signature="rename(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
  </object-type>
  <object-type name="QSaveFile"/>
  <object-type name="QFileSelector"/>

  <object-type name="QIODevice">
    <enum-type name="OpenModeFlag" flags="OpenMode"/>
    <modify-function signature="open(QFlags&lt;QIODevice::OpenModeFlag>)" allow-thread="yes"/>
    <modify-function signature="close()" allow-thread="yes"/>
    <modify-function signature="seek(qint64)" allow-thread="yes"/>
    <modify-function signature="readAll()" allow-thread="yes"/>
    <modify-function signature="peek(qint64)" allow-thread="yes"/>
    <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 -->
    <modify-function signature="read(char*,qint64)" remove="all"/>
    <!-- ### readLine(qint64) do the job -->
    <modify-function signature="readLine(char*,qint64)" remove="all"/>
    <!-- ### write(str) do the job -->
    <modify-function signature="write(const char*,qint64)" remove="all"/>
    <modify-function signature="write(const char*)" remove="all"/>
    <modify-function signature="getChar(char*)">
        <modify-argument index="1">
            <remove-argument />
            <remove-default-expression />
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_char*"/>
        </inject-code>
    </modify-function>
    <modify-function signature="readData(char*,qint64)">
        <inject-code class="target" file="../glue/qtcore.cpp" snippet="qiodevice-readData"/>
        <modify-argument index="1">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
        <inject-code class="native" position="end" file="../glue/qtcore.cpp" snippet="return-readData"/>
    </modify-function>
    <modify-function signature="readLineData(char*,qint64)">
        <inject-code class="target" file="../glue/qtcore.cpp" snippet="qiodevice-readData"/>
        <modify-argument index="1">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
        <inject-code class="native" position="end" file="../glue/qtcore.cpp" snippet="return-readData"/>
    </modify-function>
  </object-type>
  <object-type name="QCryptographicHash">
    <enum-type name="Algorithm"/>
    <modify-function signature="addData(const char*,int)">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <inject-code file="../glue/qtcore.cpp" snippet="qcryptographichash-adddata"/>
    </modify-function>
  </object-type>
  <value-type name="QOperatingSystemVersion" since="5.9">
      <enum-type name="OSType"/>
  </value-type>
  <object-type name="QLibraryInfo">
    <enum-type name="LibraryLocation"/>
    <modify-function signature="build()">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qlibraryinfo_build"/>
    </modify-function>
  </object-type>
  <object-type name="QMutexLocker" copyable="no">
    <!-- 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
    QMutexLocker inside a QThread::run.
    The reason of having this change is due to the new way of handling the GIL
    in the Qt calls on the whole PySide2 module, that started on 5.14.2-->
    <modify-function signature="QMutexLocker(QBasicMutex*)" allow-thread="yes">
        <modify-argument index="1">
            <reference-count action="set" variable-name="mutex()const0"/>
        </modify-argument>
    </modify-function>
    <modify-function signature="relock()" allow-thread="yes"/>
    <modify-function signature="mutex()const">
      <modify-argument index="return">
        <reference-count action="set"/>
      </modify-argument>
    </modify-function>
    <add-function signature="__enter__()"/>
    <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
        <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
    </add-function>
  </object-type>

  <!-- Qt5 addition -->
  <object-type name="QBasicMutex">
    <modify-function signature="lock()" allow-thread="yes"/>
    <modify-function signature="tryLock()" allow-thread="yes"/>
  </object-type>

  <object-type name="QMutex">
    <enum-type name="RecursionMode"/>
    <modify-function signature="lock()" allow-thread="yes"/>
    <modify-function signature="tryLock(int)" allow-thread="yes"/>
  </object-type>
  <object-type name="QRecursiveMutex" since="5.14"/>
  <object-type name="QRandomGenerator" since="5.10">
      <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">
      <modify-function signature="global()" rename="global_"/>
      <modify-function signature="operator()()" remove="all"/>
  </object-type>
  <object-type name="QSemaphore">
    <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"/>

  <value-type name="QSocketDescriptor" since="5.15">
    <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>
      <inject-code file="../glue/qtcore.cpp" snippet="qsocketnotifier"/>
    </add-function>
  </object-type>

  <object-type name="QTemporaryFile">
    <extra-includes>
      <!-- Qt5: private <include file-name="QAbstractFileEngine" location="global"/> -->
    </extra-includes>
    <modify-function signature="createNativeFile(QFile&amp;)" allow-thread="yes"/>
    <modify-function signature="createNativeFile(const QString&amp;)" allow-thread="yes"/>
    <modify-function signature="open()" allow-thread="yes"/>
  </object-type>
  <object-type name="QTemporaryDir"/>
  <object-type name="QMimeData">
    <extra-includes>
      <include file-name="QStringList" location="global"/>
      <include file-name="QUrl" location="global"/>
    </extra-includes>
  </object-type>
  <object-type name="QTextCodec">
    <enum-type name="ConversionFlag" flags="ConversionFlags"/>

    <object-type name="ConverterState">
      <include file-name="QTextCodec" location="global"/>
      <modify-function signature="ConverterState(QFlags&lt;QTextCodec::ConversionFlag&gt;)">
        <modify-argument index="1">
          <replace-default-expression with="QTextCodec::DefaultConversion"/>
        </modify-argument>
      </modify-function>
    </object-type>

    <modify-function signature="setCodecForLocale(QTextCodec*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <!-- fromUnicode(QString) does the job -->
    <modify-function signature="fromUnicode(const QChar*,int,QTextCodec::ConverterState*)const" remove="all"/>
    <modify-function signature="convertFromUnicode(const QChar*,int,QTextCodec::ConverterState*)const" remove="all"/>
    <!-- this causes a warning that I cannot avoid. See suppressed warning at the end. -->
  </object-type>
  <object-type name="QTextDecoder">
    <!-- ### toUnicode(QByteArray) does the job -->
    <modify-function signature="toUnicode(const char*,int)" remove="all"/>
    <modify-function signature="toUnicode(QString*,const char*,int)" remove="all"/>
    <!-- ### -->
  </object-type>
  <object-type name="QTextEncoder">
    <!-- fromUnicode(QString) does the job -->
    <modify-function signature="fromUnicode(const QChar*,int)" remove="all"/>
  </object-type>
  <object-type name="QTimeLine">
    <enum-type name="CurveShape"/>
    <enum-type name="Direction"/>
    <enum-type name="State"/>
  </object-type>
  <object-type name="QTranslator">
    <modify-function signature="load(const uchar*,int,QString)" allow-thread="yes">
        <modify-argument index="1">
            <replace-type modified-type="PyBuffer"/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <inject-code file="../glue/qtcore.cpp" snippet="qtranslator-load"/>
    </modify-function>
  </object-type>
  <object-type name="QWaitCondition">
    <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"/>
    <modify-function signature="wait(QReadWriteLock*,unsigned long)" allow-thread="yes"/>
  </object-type>
  <object-type name="QFileSystemWatcher">
    <extra-includes>
      <include file-name="QStringList" location="global"/>
    </extra-includes>
  </object-type>
  <object-type name="QBuffer">
    <!-- ### setData(QByteArray) do the job -->
    <modify-function signature="setData(const char*,int)" remove="all"/>
    <!-- Disambiguate from Qt3DRender/qbuffer.h -->
    <include file-name="QtCore/qbuffer.h" location="global"/>
  </object-type>
  <object-type name="QTimer">
    <modify-function signature="singleShot(int,const QObject*,const char*)">
      <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-1"/>
    </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>
  </object-type>
  <object-type name="QProcess">
    <enum-type name="ExitStatus"/>
    <enum-type name="InputChannelMode"/>
    <enum-type name="ProcessChannel"/>
    <enum-type name="ProcessChannelMode"/>
    <enum-type name="ProcessError"/>
    <enum-type name="ProcessState"/>

    <modify-function signature="waitForStarted(int)" allow-thread="yes"/>
    <modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
    <modify-function signature="waitForFinished(int)" allow-thread="yes"/>
    <modify-function signature="readAllStandardOutput()" allow-thread="yes"/>
    <modify-function signature="readAllStandardError()" allow-thread="yes"/>
    <modify-function signature="execute(QString,QStringList)" allow-thread="yes"/>
    <modify-function signature="execute(QString)" allow-thread="yes"/>
    <modify-function signature="startDetached(QString,QStringList,QString,qint64*)">
        <modify-argument index="4">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <replace-type modified-type="(retval, pid)"/>
        </modify-argument>
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qprocess-startdetached"/>
    </modify-function>
    <!-- Function removed because on windows it returns a win32 specific structure -->
    <modify-function signature="pid()const" remove="all"/>
    <add-function signature="pid()" return-type="long">
        <inject-code file="../glue/qtcore.cpp" snippet="qprocess-pid"/>
    </add-function>
    <!--### Obsolete in 4.3-->
    <modify-function signature="setReadChannelMode(QProcess::ProcessChannelMode)" remove="all"/>
    <modify-function signature="readChannelMode()const" remove="all"/>
    <!-- ### -->
  </object-type>
  <object-type name="QSignalMapper"/>

  <object-type name="QCollatorSortKey" since="5.2"/>
  <object-type name="QCollator" since="5.2"/>

  <object-type name="QCommandLineOption" since="5.2">
    <enum-type name="Flag" flags="Flags" since="5.8"/>
  </object-type>
  <object-type name="QCommandLineParser" since="5.2">
    <enum-type name="OptionsAfterPositionalArgumentsMode" since="5.6"/>
    <enum-type name="SingleDashWordOptionMode"/>
  </object-type>

  <object-type name="QCoreApplication">
    <!--Qt5: gone <enum-type name="Encoding"/> -->
    <enum-type identified-by-value="ApplicationFlags" since="4.8" revision="4800"/>
    <extra-includes>
      <include file-name="QStringList" location="global"/>
      <include file-name="QTranslator" 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)">
        <inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-1"/>
    </add-function>
    <add-function signature="QCoreApplication()">
        <inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-2"/>
    </add-function>
    <!-- Addition for qApp.
         To be fixed: This function deletes a little too much ATM that is missing later
         when creating a new qApp. -->
    <add-function signature="shutdown()">
      <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="moduleshutdown"/>
    </add-function>

    <!-- blocking functions -->
    <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;,int)" allow-thread="yes"/>
    <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;)" allow-thread="yes"/>
    <modify-function signature="flush()" allow-thread="yes"/>
    <modify-function signature="sendEvent(QObject*,QEvent*)" allow-thread="yes"/>
    <modify-function signature="sendPostedEvents(QObject*,int)" allow-thread="yes"/>
    <modify-function signature="instance()">
      <inject-code class="target" file="../glue/qtcore.cpp" snippet="qcoreapplication-instance"/>
    </modify-function>

    <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
    <modify-function signature="notify(QObject*,QEvent*)" allow-thread="yes">
      <modify-argument index="2" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="QCoreApplication(int &amp;,char **,int)" access="private"/>
    <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qcoreapplication-init"/>
    <modify-function signature="postEvent(QObject*,QEvent*,int)">
      <modify-argument index="2">
        <define-ownership owner="c++"/>
      </modify-argument>
    </modify-function>
  </object-type>
  <object-type name="QSettings">
    <enum-type name="Format"/>
    <enum-type name="Scope"/>
    <enum-type name="Status"/>
    <extra-includes>
      <include file-name="QStringList" location="global"/>
    </extra-includes>
    <!--### Obsolete in 4.3-->
    <modify-function signature="setSystemIniPath(const QString&amp;)" remove="all"/>
    <modify-function signature="setUserIniPath(const QString&amp;)" remove="all"/>
    <!--### Obsolete in 4.3-->
    <modify-function signature="iniCodec()const">
      <modify-argument index="return">
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
    <!-- 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*">
      <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()``
        to automatically cast the type that is being returned by the function.

        An example of this situation could be an ini file that contains
        the value of a one-element list::

            settings.setValue('var', ['a'])

        The the ini file will be::

            [General]
            var=a  # we cannot know that this is a list!

        Once we read it, we could specify if we want
        the default behavior, a str, or to cast the output
        to a list.

            settings.value('var')  # Will get "a"
            settings.value('var', type=list)  # Will get ["a"]
      </inject-documentation>
    </add-function>
  </object-type>
  <object-type name="QEvent"  polymorphic-id-expression="%1-&gt;type() == QEvent::None">
    <enum-type name="Type"/>
  </object-type>
  <object-type name="QChildEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ChildAdded || %1-&gt;type() == QEvent::ChildPolished || %1-&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="QDataStream" stream="yes">
    <enum-type name="FloatingPointPrecision" since="4.6"/>
    <enum-type name="Status"/>
    <enum-type name="Version"/>
    <enum-type name="ByteOrder"/>
    <extra-includes>
      <include file-name="QtCore/QtCore" location="global"/>
    </extra-includes>

    <!-- ### Replaced by write<TYPE> methods -->
    <modify-function signature="operator&gt;&gt;(qint8&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(bool&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(quint8&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(qint16&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(quint16&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(qint32&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(quint32&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(qint64&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(quint64&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(float&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(double&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(char*&amp;)" remove="all"/>
    <!-- ### -->

    <!-- ### Replaced by read<TYPE> methods -->
    <modify-function signature="operator&lt;&lt;(qint8)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(bool)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(quint8)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(qint16)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(quint16)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(qint32)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(quint32)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(qint64)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(quint64)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(float)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(double)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(const char*)" remove="all"/>
    <!-- ### -->
    <add-function signature="operator&lt;&lt;(const QString&amp;)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeQString(const QString&amp;)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="readQString()" return-type="QString">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="writeQChar(const QChar&amp;)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="readQChar()" return-type="QChar">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="writeQStringList(const QStringList&amp;)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="readQStringList()" return-type="QStringList">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="writeQVariant(const QVariant&amp;)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <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-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)">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <inject-code class="target" file="../glue/qtcore.cpp" snippet="qdatastream-writerawdata"/>
    </modify-function>

    <!-- Extra functions for primitive type handling -->
    <add-function signature="readBool()" return-type="bool">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readInt8()" return-type="qint8">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readUInt8()" return-type="quint8">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readUInt16()" return-type="quint16">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readInt16()" return-type="qint16">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readInt32()" return-type="qint32">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readUInt32()" return-type="quint32">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readInt64()" return-type="qint64">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readUInt64()" return-type="quint64">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readFloat()" return-type="float">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readDouble()" return-type="qreal">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>
    <add-function signature="readString()" return-type="QString">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
    </add-function>

    <add-function signature="writeBool(bool)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeInt8(qint8)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeUInt8(quint8)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeUInt16(quint16)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeInt16(qint16)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeInt32(qint32)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeUInt32(quint32)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeInt64(qint64)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeUInt64(quint64)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeFloat(float)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <add-function signature="writeDouble(qreal)">
        <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
    </add-function>
    <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;,uint&amp;)" remove="all"/>
    <modify-function signature="writeBytes(const char*,uint)" remove="all"/>
  </object-type>

  <value-type name="QTextStreamManipulator" default-constructor="QTextStreamManipulator(0, 0)">
    <modify-function signature="exec(QTextStream &amp;)" rename="exec_"/>
  </value-type>
  <object-type name="QTextStream" stream="yes">
    <enum-type name="FieldAlignment"/>
    <enum-type name="NumberFlag" flags="NumberFlags"/>
    <enum-type name="RealNumberNotation"/>
    <enum-type name="Status"/>
    <!-- Removed because it expect QString to be mutable -->
    <modify-function signature="QTextStream(QString*,QFlags&lt;QIODevice::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"/>
    <!-- Removed because we use the non-const version -->
    <modify-function signature="QTextStream(const QByteArray&amp;,QFlags&lt;QIODevice::OpenModeFlag&gt;)" remove="all"/>

    <!-- Removed because it expect QString to be mutable -->
    <modify-function signature="setString(QString*,QFlags&lt;QIODevice::OpenModeFlag&gt;)" remove="all"/>

    <modify-function signature="operator&lt;&lt;(const void*)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(float)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(qlonglong)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(qulonglong)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(short)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(int)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(unsigned int)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(unsigned short)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(const char*)" remove="all"/>

    <modify-function signature="operator&gt;&gt;(char*)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(char&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(float&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(double&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(qlonglong&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(qulonglong&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(long&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(int&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(short&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(unsigned long&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(unsigned int&amp;)" remove="all"/>
    <modify-function signature="operator&gt;&gt;(unsigned short&amp;)" remove="all"/>
    <!-- Removed because it expect QChar to be mutable -->
    <modify-function signature="operator&gt;&gt;(QChar&amp;)" remove="all"/>
    <!-- Removed because it expect QString to be mutable -->
    <modify-function signature="operator&gt;&gt;(QString&amp;)" remove="all"/>

    <modify-function signature="string()const">
      <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="return-qstring-ref"/>
    </modify-function>

    <modify-function signature="flush()" allow-thread="yes"/>
    <modify-function signature="read(qint64)" allow-thread="yes"/>
    <modify-function signature="readLine(qint64)" allow-thread="yes"/>
    <modify-function signature="readAll()" allow-thread="yes"/>
  </object-type>
  <object-type name="QStandardPaths" since="5.0">
    <enum-type name="StandardLocation"/>
    <enum-type name="LocateOption" flags="LocateOptions"/>
  </object-type>
  <object-type name="QSystemSemaphore">
    <enum-type name="AccessMode"/>
    <enum-type name="SystemSemaphoreError"/>
  </object-type>

  <object-type name="QThreadPool">
    <modify-function signature="clear()" allow-thread="yes"/>
    <modify-function signature="activeThreadCount()const" allow-thread="yes"/>
    <modify-function signature="releaseThread()" allow-thread="yes"/>
    <modify-function signature="reserveThread()" allow-thread="yes"/>
    <modify-function signature="setMaxThreadCount(int)" allow-thread="yes"/>
    <modify-function signature="waitForDone(int)" allow-thread="yes"/>
    <modify-function signature="start(QRunnable*,int)" allow-thread="yes">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="tryStart(QRunnable*)" allow-thread="yes">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="tryTake(QRunnable*)" allow-thread="yes"/>

    <modify-function signature="globalInstance()" >
      <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="releaseownership"/>
    </modify-function>
  </object-type>
  <value-type name="QXmlStreamAttribute"/>
  <value-type name="QXmlStreamAttributes">
    <modify-function signature="push_back(QXmlStreamAttribute)" remove="all"/>
    <modify-function signature="pop_back()" remove="all"/>
    <modify-function signature="push_front(QXmlStreamAttribute)" remove="all"/>
    <modify-function signature="pop_front()" remove="all"/>
    <modify-function signature="toList()const" remove="all"/>
    <modify-function signature="fromList(const QList&lt;QXmlStreamAttribute&gt; &amp;)" remove="all"/>
    <modify-function signature="operator+=(QVector&lt;QXmlStreamAttribute&gt;)" remove="all"/>
  </value-type>
  <value-type name="QXmlStreamNamespaceDeclaration"/>
  <value-type name="QXmlStreamNotationDeclaration"/>
  <value-type name="QXmlStreamEntityDeclaration"/>
  <object-type name="QXmlStreamReader">
    <enum-type name="Error"/>
    <enum-type name="TokenType"/>
    <enum-type name="ReadElementTextBehaviour" since="4.6"/>
  </object-type>
  <object-type name="QXmlStreamWriter">
    <!-- Removed because it expect QString to be mutable -->
    <modify-function signature="QXmlStreamWriter(QString*)" remove="all"/>
    <modify-function signature="codec()const">
      <modify-argument index="return">
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
  </object-type>
  <value-type name="QModelIndex" hash-function="qHash">
    <modify-function signature="internalPointer()const">
        <inject-code class="target" position="beginning">
            <insert-template name="return_internal_pointer" />
        </inject-code>
    </modify-function>
    <modify-function signature="model()const">
      <modify-argument index="return">
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
  </value-type>

  <object-type name="QFutureInterfaceBase">
      <enum-type name="State"/>
  </object-type>
  <value-type name="QFuture" generate="no">
      <include file-name="QtCore/qfuture.h" location="global"/>
      <modify-function signature="waitForFinished()" allow-thread="yes"/>
  </value-type>
  <object-type name="QFutureWatcherBase" generate="no">
      <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"/>
  </object-type>

  <value-type name="QGenericArgument">
    <include file-name="qobjectdefs.h" location="global"/>
  </value-type>

  <value-type name="QGenericReturnArgument">
    <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>

  <value-type name="QMetaMethod">
    <enum-type name="Access"/>
    <enum-type name="MethodType"/>
    <!-- This isn't part of Qt public API -->
    <modify-function signature="attributes()const" remove="all"/>
    <modify-function signature="getParameterTypes(int*)const" remove="all"/>
  </value-type>
  <object-type name="QMetaObject">
    <enum-type name="Call"/>
    <include file-name="qobjectdefs.h" location="global"/>
    <!-- This isn't part of Qt public API -->
    <modify-function signature="connect(const QObject*,int,const QObject*,int,int,int*)" remove="all"/>
      <object-type name="Connection">
        <include file-name="qobjectdefs.h" location="global"/>
      </object-type>
    <modify-function signature="^invokeMethod\(" allow-thread="yes"/>
  </object-type>
  <value-type name="QMetaProperty" >
    <!-- This isn't part of Qt public API -->
    <modify-function signature="enclosingMetaObject()const" remove="all"/>
  </value-type>
  <value-type name="QMetaClassInfo">
    <!-- This isn't part of Qt public API -->
    <modify-function signature="enclosingMetaObject()const" remove="all"/>
  </value-type>

  <value-type name="QMetaEnum">
    <modify-function signature="keyToValue(const char*,bool*)const">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <replace-type modified-type="PyTuple"/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_args,bool*"/>
        </inject-code>
    </modify-function>
    <modify-function signature="keysToValue(const char*,bool*)const">
        <modify-argument index="2">
            <remove-argument />
        </modify-argument>
        <modify-argument index="return">
            <replace-type modified-type="PyTuple"/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_args,bool*"/>
        </inject-code>
    </modify-function>
    <!-- This isn't part of Qt public API -->
    <modify-function signature="enclosingMetaObject()const" remove="all"/>
  </value-type>

  <!-- From Qt4.6 -->
  <object-type name="QAbstractAnimation" since="4.6">
    <enum-type name="DeletionPolicy"/>
    <enum-type name="Direction"/>
    <enum-type name="State"/>
  </object-type>

  <object-type name="QAbstractState" since="4.6">
    <modify-function signature="machine()const">
        <modify-argument index="this">
            <parent index="return" action="add"/>
        </modify-argument>
    </modify-function>
  </object-type>

  <object-type name="QAbstractTransition" since="4.6">
    <enum-type name="TransitionType" since="5.5"/>

    <modify-function signature="QAbstractTransition(QState*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="addAnimation(QAbstractAnimation*)">
      <modify-argument index="1">
        <reference-count action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="removeAnimation(QAbstractAnimation*)">
      <modify-argument index="1">
        <reference-count action="remove"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="setTargetState(QAbstractState*)">
      <modify-argument index="1">
        <reference-count action="set"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="targetState()const">
      <modify-argument index="return">
        <reference-count action="set" variable-name="setTargetState(QAbstractState*)1"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="targetStates()const">
      <modify-argument index="return">
        <reference-count action="set" variable-name="setTargetState(QAbstractState*)1"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="setTargetStates(QList&lt;QAbstractState*&gt;)">
      <modify-argument index="1">
        <reference-count action="set" variable-name="setTargetState(QAbstractState*)1"/>
      </modify-argument>
    </modify-function>

  </object-type>

  <object-type name="QAnimationGroup" since="4.6">
    <modify-function signature="addAnimation(QAbstractAnimation*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="insertAnimation(int,QAbstractAnimation*)">
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="removeAnimation(QAbstractAnimation*)">
      <modify-argument index="1">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="takeAnimation(int)">
      <modify-argument index="return">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="clear()" >
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qanimationgroup-clear"/>
    </modify-function>
  </object-type>

  <!-- We will use inject code to implement the function below -->
  <rejection class="QEasingCurve" function-name="setCustomType"/>
  <rejection class="QEasingCurve" function-name="customType"/>
  <value-type name="QEasingCurve" since="4.6">
    <extra-includes>
      <include file-name="pysideweakref.h" location="global"/>
      <include file-name="glue/qeasingcurve_glue.h" location="local"/>
    </extra-includes>
    <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve"/>
    <enum-type name="Type"/>
    <add-function signature="setCustomType(PyObject*)">
      <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve-setcustomtype"/>
    </add-function>
    <add-function signature="customType()" return-type="PyObject">
      <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve-customtype"/>
    </add-function>
  </value-type>

  <value-type name="QJsonArray">
    <extra-includes>
      <include file-name="QStringList" location="global"/>
    </extra-includes>
  </value-type>

  <value-type name="QJsonDocument">
    <enum-type name="DataValidation"/>
    <enum-type name="JsonFormat"/>
  </value-type>

  <rejection class="QJsonDocument" field-name="BinaryFormatTag"/>

  <value-type name="QJsonParseError">
    <enum-type name="ParseError"/>
  </value-type>

  <value-type name="QJsonValue">
    <enum-type name="Type"/>
    <extra-includes>
      <include file-name="QVariant" location="global"/>
      <include file-name="QJsonArray" location="global"/>
      <include file-name="QJsonObject" location="global"/>
    </extra-includes>
  </value-type>

  <object-type name="QEventTransition" since="4.6">
    <modify-function signature="QEventTransition(QState*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="QEventTransition(QObject*,QEvent::Type,QState*)">
      <modify-argument index="3">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

  </object-type>

  <object-type name="QFinalState" since="4.6"/>

  <object-type name="QHistoryState" since="4.6">
    <enum-type name="HistoryType"/>
    <modify-documentation xpath='description/code'>
        &lt;code>machine = QStateMachine()

s1 = QState()
s11 = QState(s1)
s12 = QState(s1)

s1h = QHistoryState(s1)
s1h.setDefaultState(s11)

machine.addState(s1)

s2 = QState()
machine.addState(s2)

button = QPushButton()
# Clicking the button will cause the state machine to enter the child state
# that s1 was in the last time s1 was exited, or the history state's default
# state if s1 has never been entered.
s1.addTransition(button.clicked, s1h)&lt;/code>
    </modify-documentation>
  </object-type>

  <value-type name="QMargins" since="4.6"/>
  <value-type name="QMarginsF" since="5.3"/>

  <object-type name="QParallelAnimationGroup" since="4.6"/>

  <object-type name="QPauseAnimation" since="4.6"/>

  <value-type name="QProcessEnvironment" since="4.6"/>

  <object-type name="QPropertyAnimation" since="4.6"/>

  <object-type name="QSequentialAnimationGroup" since="4.6"/>

  <object-type name="QSignalTransition" since="4.6">
    <add-function signature="QSignalTransition(PyObject*,QState*)" return-type="QSignalTransition*">
        <modify-argument index="2">
            <replace-default-expression with="0"/>
        </modify-argument>
        <inject-code file="../glue/qtcore.cpp" snippet="qsignaltransition"/>
    </add-function>
  </object-type>

  <object-type name="QState" since="4.6">
    <enum-type name="ChildMode"/>
    <enum-type name="RestorePolicy"/>
    <modify-function signature="addTransition(QAbstractTransition*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="addTransition(const QObject*,const char*,QAbstractState*)">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qstate-addtransition-1"/>
    </modify-function>
    <modify-function signature="addTransition(QAbstractState*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <!-- FIXME: the proper signature for this added function would be something like
         addTransition(PySide2.QtCore.Signal, QAbstractState*)
         but that depends on bug #362. -->
    <add-function signature="addTransition(PyObject*,QAbstractState*)" return-type="QSignalTransition*">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qstate-addtransition-2"/>
    </add-function>

    <modify-function signature="removeTransition(QAbstractTransition*)">
      <modify-argument index="1">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>
  </object-type>

  <object-type name="QStateMachine" since="4.6">
    <enum-type name="Error"/>
    <enum-type name="EventPriority"/>

    <value-type name="SignalEvent" since="4.6"/>
    <value-type name="WrappedEvent" since="4.6"/>

    <modify-function signature="addState(QAbstractState*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="removeState(QAbstractState*)">
      <modify-argument index="1">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>

    <add-function signature="configuration()" return-type="list of QAbstractState" >
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qstatemachine-configuration"/>
    </add-function>

    <!-- Replaced by a added function -->
    <modify-function signature="defaultAnimations()const" remove="all"/>
    <add-function signature="defaultAnimations()" return-type="list of QAbstractAnimation" >
        <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qstatemachine-defaultanimations"/>
    </add-function>
  </object-type>

  <object-type name="QVariantAnimation" since="4.6"/>

  <value-type name="QVersionNumber" since="5.6">
    <modify-function signature="fromString(const QString &amp;,int*)">
      <modify-argument index="2">
        <remove-argument/>
      </modify-argument>
    </modify-function>
  </value-type>

  <!-- From Qt4.6 ^^^ -->

  <add-function signature="SIGNAL(const char*)" return-type="str">
    <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-signal"/>
  </add-function>

  <add-function signature="SLOT(const char*)" return-type="str">
    <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-slot"/>
  </add-function>

  <add-function signature="QT_TR_NOOP(PyObject)" return-type="PyObject*">
    <inject-code class="target" position="beginning">
      <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
    </inject-code>
  </add-function>
  <add-function signature="QT_TR_NOOP_UTF8(PyObject)" return-type="PyObject*">
    <inject-code class="target" position="beginning">
      <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
    </inject-code>
  </add-function>
  <add-function signature="QT_TRANSLATE_NOOP(PyObject,PyObject)" return-type="PyObject*">
    <inject-code class="target" position="beginning">
      <insert-template name="return_argument"><replace from="#" to="2"/></insert-template>
    </inject-code>
  </add-function>
  <add-function signature="QT_TRANSLATE_NOOP3(PyObject,PyObject,PyObject)" return-type="PyObject*">
    <inject-code class="target" position="beginning">
      <insert-template name="return_argument"><replace from="#" to="2"/></insert-template>
    </inject-code>
  </add-function>
  <add-function signature="QT_TRANSLATE_NOOP_UTF8(PyObject)" return-type="PyObject*">
    <inject-code class="target" position="beginning">
      <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
    </inject-code>
  </add-function>

  <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qt-registerresourcedata"/>
  <add-function signature="qRegisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool">
    <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qregisterresourcedata"/>
  </add-function>
  <add-function signature="qUnregisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool">
    <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qunregisterresourcedata"/>
  </add-function>

  <object-type name="QFactoryInterface"/>
  <object-type name="QRunnable"/>

  <object-type name="QPluginLoader"/>
  <object-type name="QStringListModel"/>

  <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.*$"/>

  <!-- 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"/>

  <!-- this function only exists on Windows -->
  <suppress-warning text="^signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found.*"/>

  <!-- 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.*"/>

  <!-- This enum is intenaly used -->
  <suppress-warning text="enum 'PM_CbaIconHeight' does not have a type entry or is not an enum"/>

  <!-- 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="template baseclass 'QListSpecialMethods&lt;T&gt;' of 'QList' is not known"/>


</typesystem>
