/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtTest.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtTest/qsignalspy.sip"
#include <qsignalspy.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 50 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 53 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 247 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 56 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 235 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 74 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 77 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 80 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 83 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 86 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"


class sipQSignalSpy : public  ::QSignalSpy
{
public:
    sipQSignalSpy(const  ::QObject*,const char*);
    sipQSignalSpy(const  ::QObject*,const  ::QMetaMethod&);
    virtual ~sipQSignalSpy();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool event( ::QEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQSignalSpy(const sipQSignalSpy &);
    sipQSignalSpy &operator = (const sipQSignalSpy &);

    char sipPyMethods[7];
};

sipQSignalSpy::sipQSignalSpy(const  ::QObject*a0,const char*a1):  ::QSignalSpy(a0,a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSignalSpy::sipQSignalSpy(const  ::QObject*a0,const  ::QMetaMethod& a1):  ::QSignalSpy(a0,a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSignalSpy::~sipQSignalSpy()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

const QMetaObject *sipQSignalSpy::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtTest_qt_metaobject(sipPySelf,sipType_QSignalSpy);

    return  ::QSignalSpy::metaObject();
}

int sipQSignalSpy::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::QSignalSpy::qt_metacall(_c,_id,_a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtTest_qt_metacall(sipPySelf,sipType_QSignalSpy,_c,_id,_a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQSignalSpy::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtTest_qt_metacast(sipPySelf, sipType_QSignalSpy, _clname, &sipCpp) ? sipCpp :  ::QSignalSpy::qt_metacast(_clname));
}

bool sipQSignalSpy::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return  ::QSignalSpy::event(a0);

    extern bool sipVH_QtTest_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_QtTest_5(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSignalSpy::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return  ::QSignalSpy::eventFilter(a0,a1);

    extern bool sipVH_QtTest_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_QtTest_4(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQSignalSpy::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
         ::QSignalSpy::timerEvent(a0);
        return;
    }

    extern void sipVH_QtTest_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_QtTest_3(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSignalSpy::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
         ::QSignalSpy::childEvent(a0);
        return;
    }

    extern void sipVH_QtTest_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_QtTest_2(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSignalSpy::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
         ::QSignalSpy::customEvent(a0);
        return;
    }

    extern void sipVH_QtTest_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_QtTest_1(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSignalSpy::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
         ::QSignalSpy::connectNotify(a0);
        return;
    }

    extern void sipVH_QtTest_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtTest_0(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSignalSpy::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::QSignalSpy::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtTest_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtTest_0(sipGILState, sipImportedVirtErrorHandlers_QtTest_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QSignalSpy_isValid, "isValid(self) -> bool");

extern "C" {static PyObject *meth_QSignalSpy_isValid(PyObject *, PyObject *);}
static PyObject *meth_QSignalSpy_isValid(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSignalSpy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSignalSpy, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSignalSpy, sipName_isValid, doc_QSignalSpy_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSignalSpy_signal, "signal(self) -> QByteArray");

extern "C" {static PyObject *meth_QSignalSpy_signal(PyObject *, PyObject *);}
static PyObject *meth_QSignalSpy_signal(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSignalSpy *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSignalSpy, &sipCpp))
        {
             ::QByteArray*sipRes;

            sipRes = new  ::QByteArray(sipCpp->signal());

            return sipConvertFromNewType(sipRes,sipType_QByteArray,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSignalSpy, sipName_signal, doc_QSignalSpy_signal);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSignalSpy_wait, "wait(self, timeout: int = 5000) -> bool");

extern "C" {static PyObject *meth_QSignalSpy_wait(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSignalSpy_wait(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0 = 5000;
         ::QSignalSpy *sipCpp;

        static const char *sipKwdList[] = {
            sipName_timeout,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_QSignalSpy, &sipCpp, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->wait(a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSignalSpy, sipName_wait, doc_QSignalSpy_wait);

    return SIP_NULLPTR;
}


extern "C" {static int slot_QSignalSpy___delitem__(PyObject *,PyObject *);}
static int slot_QSignalSpy___delitem__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QSignalSpy *sipCpp = reinterpret_cast< ::QSignalSpy *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSignalSpy));

    if (!sipCpp)
        return -1;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
            int sipIsErr = 0;

#line 83 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtTest/qsignalspy.sip"
        if ((a0 = (int)sipConvertFromSequenceIndex(a0, sipCpp->count())) < 0)
            sipIsErr = 1;
        else
            sipCpp->removeAt(a0);
#line 398 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"

            if (sipIsErr)
                return -1;

            return 0;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSignalSpy, sipName___delitem__, SIP_NULLPTR);

    return -1;
}


extern "C" {static int slot_QSignalSpy___setitem__(PyObject *,PyObject *);}
static int slot_QSignalSpy___setitem__(PyObject *sipSelf,PyObject *sipArgs)
{
     ::QSignalSpy *sipCpp = reinterpret_cast< ::QSignalSpy *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSignalSpy));

    if (!sipCpp)
        return -1;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
        const QList< ::QVariant>* a1;
        int a1State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "iJ1", &a0, sipType_QList_0100QVariant, &a1, &a1State))
        {
            int sipIsErr = 0;

#line 73 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtTest/qsignalspy.sip"
        int len = sipCpp->count();
        
        if ((a0 = (int)sipConvertFromSequenceIndex(a0, len)) < 0)
            sipIsErr = 1;
        else
            (*sipCpp)[a0] = *a1;
#line 439 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"
            sipReleaseType(const_cast<QList< ::QVariant> *>(a1), sipType_QList_0100QVariant, a1State);

            if (sipIsErr)
                return -1;

            return 0;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSignalSpy, sipName___setitem__, SIP_NULLPTR);

    return -1;
}


extern "C" {static PyObject *slot_QSignalSpy___getitem__(PyObject *,PyObject *);}
static PyObject *slot_QSignalSpy___getitem__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QSignalSpy *sipCpp = reinterpret_cast< ::QSignalSpy *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSignalSpy));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
            QList< ::QVariant>*sipRes = 0;
            int sipIsErr = 0;

#line 63 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtTest/qsignalspy.sip"
        Py_ssize_t idx = sipConvertFromSequenceIndex(a0, sipCpp->count());
        
        if (idx < 0)
            sipIsErr = 1;
        else
            sipRes = new QList<QVariant>(sipCpp->at((int)idx));
#line 480 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"

            if (sipIsErr)
                return 0;

            return sipConvertFromNewType(sipRes,sipType_QList_0100QVariant,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSignalSpy, sipName___getitem__, SIP_NULLPTR);

    return SIP_NULLPTR;
}


extern "C" {static Py_ssize_t slot_QSignalSpy___len__(PyObject *);}
static Py_ssize_t slot_QSignalSpy___len__(PyObject *sipSelf)
{
     ::QSignalSpy *sipCpp = reinterpret_cast< ::QSignalSpy *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSignalSpy));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes = 0;

#line 58 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtTest/qsignalspy.sip"
        sipRes = sipCpp->count();
#line 510 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"

            return sipRes;
        }
    }

    return 0;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QSignalSpy(void *, const sipTypeDef *);}
static void *cast_QSignalSpy(void *sipCppV, const sipTypeDef *targetType)
{
     ::QSignalSpy *sipCpp = reinterpret_cast< ::QSignalSpy *>(sipCppV);

    if (targetType == sipType_QSignalSpy)
        return sipCppV;

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QSignalSpy(void *, int);}
static void release_QSignalSpy(void *sipCppV, int)
{
     ::QSignalSpy *sipCpp = reinterpret_cast< ::QSignalSpy *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


extern "C" {static void dealloc_QSignalSpy(sipSimpleWrapper *);}
static void dealloc_QSignalSpy(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQSignalSpy *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QSignalSpy(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QSignalSpy(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QSignalSpy(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipQSignalSpy *sipCpp = SIP_NULLPTR;

    {
        PyObject * a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "P0", &a0))
        {
            sipErrorState sipError = sipErrorNone;

#line 41 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtTest/qsignalspy.sip"
        QObject *sender;
        QByteArray signal_signature;
        
        if ((sipError = pyqt5_qttest_get_pyqtsignal_parts(a0, &sender, signal_signature)) == sipErrorNone)
            sipCpp = new sipQSignalSpy(sender, signal_signature.constData());
        else if (sipError == sipErrorContinue)
            sipError = sipBadCallableArg(0, a0);
#line 582 "/build/pyqt5/src/PyQt5-5.15.7/build/QtTest/sipQtTestQSignalSpy.cpp"

            if (sipError == sipErrorNone)
            {
                sipCpp->sipPySelf = sipSelf;

                return sipCpp;
            }

            if (sipUnused)
            {
                Py_XDECREF(*sipUnused);
            }

            sipAddException(sipError, sipParseErr);

            if (sipError == sipErrorFail)
                return SIP_NULLPTR;
        }
    }

    {
        const  ::QObject* a0;
        const  ::QMetaMethod* a1;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J8J9", sipType_QObject, &a0, sipType_QMetaMethod, &a1))
        {
            sipCpp = new sipQSignalSpy(a0,*a1);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QSignalSpy[] = {{6, 0, 1}};


/* Define this type's Python slots. */
static sipPySlotDef slots_QSignalSpy[] = {
    {(void *)slot_QSignalSpy___delitem__, delitem_slot},
    {(void *)slot_QSignalSpy___setitem__, setitem_slot},
    {(void *)slot_QSignalSpy___getitem__, getitem_slot},
    {(void *)slot_QSignalSpy___len__, len_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QSignalSpy[] = {
    {sipName_isValid, meth_QSignalSpy_isValid, METH_VARARGS, doc_QSignalSpy_isValid},
    {sipName_signal, meth_QSignalSpy_signal, METH_VARARGS, doc_QSignalSpy_signal},
    {sipName_wait, SIP_MLMETH_CAST(meth_QSignalSpy_wait), METH_VARARGS|METH_KEYWORDS, doc_QSignalSpy_wait}
};

PyDoc_STRVAR(doc_QSignalSpy, "\1QSignalSpy(pyqtBoundSignal)\n"
"QSignalSpy(QObject, QMetaMethod)");


static pyqt5ClassPluginDef plugin_QSignalSpy = {
    & ::QSignalSpy::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtTest_QSignalSpy = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSignalSpy,
        SIP_NULLPTR,
        &plugin_QSignalSpy
    },
    {
        sipNameNr_QSignalSpy,
        {0, 0, 1},
        3, methods_QSignalSpy,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSignalSpy,
    -1,
    -1,
    supers_QSignalSpy,
    slots_QSignalSpy,
    init_type_QSignalSpy,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSignalSpy,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QSignalSpy,
    cast_QSignalSpy,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QSignalSpy),
};
