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

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.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 47 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 50 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.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/QtCore/sipQtCoreQIODevice.cpp"


class sipQIODevice : public  ::QIODevice
{
public:
    sipQIODevice();
    sipQIODevice( ::QObject*);
    virtual ~sipQIODevice();

    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:
     ::qint64 writeData(const char*,long long) SIP_OVERRIDE;
     ::qint64 readLineData(char*, ::qint64) SIP_OVERRIDE;
     ::qint64 readData(char*, ::qint64) SIP_OVERRIDE;
    bool waitForBytesWritten(int) SIP_OVERRIDE;
    bool waitForReadyRead(int) SIP_OVERRIDE;
    bool canReadLine() const SIP_OVERRIDE;
     ::qint64 bytesToWrite() const SIP_OVERRIDE;
     ::qint64 bytesAvailable() const SIP_OVERRIDE;
    bool reset() SIP_OVERRIDE;
    bool atEnd() const SIP_OVERRIDE;
    bool seek( ::qint64) SIP_OVERRIDE;
     ::qint64 size() const SIP_OVERRIDE;
     ::qint64 pos() const SIP_OVERRIDE;
    void close() SIP_OVERRIDE;
    bool open( ::QIODevice::OpenMode) SIP_OVERRIDE;
    bool isSequential() const SIP_OVERRIDE;
    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:
    sipQIODevice(const sipQIODevice &);
    sipQIODevice &operator = (const sipQIODevice &);

    char sipPyMethods[23];
};

sipQIODevice::sipQIODevice():  ::QIODevice(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQIODevice::sipQIODevice( ::QObject*a0):  ::QIODevice(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipQIODevice::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtCore_qt_metaobject(sipPySelf,sipType_QIODevice);

    return  ::QIODevice::metaObject();
}

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

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

    return _id;
}

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

    return (sip_QtCore_qt_metacast(sipPySelf, sipType_QIODevice, _clname, &sipCpp) ? sipCpp :  ::QIODevice::qt_metacast(_clname));
}

 ::qint64 sipQIODevice::writeData(const char*a0,long long a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, sipName_QIODevice, sipName_writeData);

    if (!sipMeth)
        return 0;

    extern  ::qint64 sipVH_QtCore_49(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const char*,long long);

    return sipVH_QtCore_49(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0, a1);
}

 ::qint64 sipQIODevice::readLineData(char*a0, ::qint64 a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QIODevice::readLineData(a0,a1);

    extern  ::qint64 sipVH_QtCore_48(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, char*, ::qint64);

    return sipVH_QtCore_48(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0, a1);
}

 ::qint64 sipQIODevice::readData(char*a0, ::qint64 a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, sipName_QIODevice, sipName_readData);

    if (!sipMeth)
        return 0;

    extern  ::qint64 sipVH_QtCore_47(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, char*, ::qint64);

    return sipVH_QtCore_47(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0, a1);
}

bool sipQIODevice::waitForBytesWritten(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QIODevice::waitForBytesWritten(a0);

    extern bool sipVH_QtCore_14(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    return sipVH_QtCore_14(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

bool sipQIODevice::waitForReadyRead(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QIODevice::waitForReadyRead(a0);

    extern bool sipVH_QtCore_14(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    return sipVH_QtCore_14(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

bool sipQIODevice::canReadLine() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[5]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_canReadLine);

    if (!sipMeth)
        return  ::QIODevice::canReadLine();

    extern bool sipVH_QtCore_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_11(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

 ::qint64 sipQIODevice::bytesToWrite() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[6]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_bytesToWrite);

    if (!sipMeth)
        return  ::QIODevice::bytesToWrite();

    extern  ::qint64 sipVH_QtCore_45(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_45(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

 ::qint64 sipQIODevice::bytesAvailable() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[7]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_bytesAvailable);

    if (!sipMeth)
        return  ::QIODevice::bytesAvailable();

    extern  ::qint64 sipVH_QtCore_45(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_45(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

bool sipQIODevice::reset()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[8], &sipPySelf, SIP_NULLPTR, sipName_reset);

    if (!sipMeth)
        return  ::QIODevice::reset();

    extern bool sipVH_QtCore_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_11(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

bool sipQIODevice::atEnd() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[9]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_atEnd);

    if (!sipMeth)
        return  ::QIODevice::atEnd();

    extern bool sipVH_QtCore_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_11(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

bool sipQIODevice::seek( ::qint64 a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[10], &sipPySelf, SIP_NULLPTR, sipName_seek);

    if (!sipMeth)
        return  ::QIODevice::seek(a0);

    extern bool sipVH_QtCore_46(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::qint64);

    return sipVH_QtCore_46(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

 ::qint64 sipQIODevice::size() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[11]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_size);

    if (!sipMeth)
        return  ::QIODevice::size();

    extern  ::qint64 sipVH_QtCore_45(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_45(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

 ::qint64 sipQIODevice::pos() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[12]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_pos);

    if (!sipMeth)
        return  ::QIODevice::pos();

    extern  ::qint64 sipVH_QtCore_45(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_45(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

void sipQIODevice::close()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[13], &sipPySelf, SIP_NULLPTR, sipName_close);

    if (!sipMeth)
    {
         ::QIODevice::close();
        return;
    }

    extern void sipVH_QtCore_17(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH_QtCore_17(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

bool sipQIODevice::open( ::QIODevice::OpenMode a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[14], &sipPySelf, SIP_NULLPTR, sipName_open);

    if (!sipMeth)
        return  ::QIODevice::open(a0);

    extern bool sipVH_QtCore_44(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QIODevice::OpenMode);

    return sipVH_QtCore_44(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

bool sipQIODevice::isSequential() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[15]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_isSequential);

    if (!sipMeth)
        return  ::QIODevice::isSequential();

    extern bool sipVH_QtCore_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_11(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth);
}

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

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

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

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

    return sipVH_QtCore_0(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    return sipVH_QtCore_1(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0, a1);
}

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

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

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

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

    sipVH_QtCore_2(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtCore_3(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtCore_4(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtCore_5(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}

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

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

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

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

    sipVH_QtCore_5(sipGILState, sipVEH_QtCore_PyQt5, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QIODevice_openMode, "openMode(self) -> QIODevice.OpenMode");

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

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
             ::QIODevice::OpenMode*sipRes;

            sipRes = new  ::QIODevice::OpenMode(sipCpp->openMode());

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

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_openMode, doc_QIODevice_openMode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_setTextModeEnabled, "setTextModeEnabled(self, bool)");

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

    {
        bool a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            sipCpp->setTextModeEnabled(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_setTextModeEnabled, doc_QIODevice_setTextModeEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_isTextModeEnabled, "isTextModeEnabled(self) -> bool");

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

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = sipCpp->isTextModeEnabled();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_isTextModeEnabled, doc_QIODevice_isTextModeEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_isOpen, "isOpen(self) -> bool");

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

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = sipCpp->isOpen();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_isOpen, doc_QIODevice_isOpen);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_isReadable, "isReadable(self) -> bool");

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

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = sipCpp->isReadable();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_isReadable, doc_QIODevice_isReadable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_isWritable, "isWritable(self) -> bool");

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

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = sipCpp->isWritable();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_isWritable, doc_QIODevice_isWritable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_isSequential, "isSequential(self) -> bool");

extern "C" {static PyObject *meth_QIODevice_isSequential(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_isSequential(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::isSequential() : sipCpp->isSequential());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_isSequential, doc_QIODevice_isSequential);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_open, "open(self, Union[QIODevice.OpenMode, QIODevice.OpenModeFlag]) -> bool");

extern "C" {static PyObject *meth_QIODevice_open(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_open(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QIODevice::OpenMode* a0;
        int a0State = 0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QIODevice, &sipCpp, sipType_QIODevice_OpenMode, &a0, &a0State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::open(*a0) : sipCpp->open(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0, sipType_QIODevice_OpenMode, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_open, doc_QIODevice_open);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_close, "close(self)");

extern "C" {static PyObject *meth_QIODevice_close(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_close(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp-> ::QIODevice::close() : sipCpp->close());
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_close, doc_QIODevice_close);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_pos, "pos(self) -> int");

extern "C" {static PyObject *meth_QIODevice_pos(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_pos(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
             ::qint64 sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::pos() : sipCpp->pos());

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_pos, doc_QIODevice_pos);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_size, "size(self) -> int");

extern "C" {static PyObject *meth_QIODevice_size(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_size(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
             ::qint64 sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::size() : sipCpp->size());

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_size, doc_QIODevice_size);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_seek, "seek(self, int) -> bool");

extern "C" {static PyObject *meth_QIODevice_seek(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_seek(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::qint64 a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::seek(a0) : sipCpp->seek(a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_seek, doc_QIODevice_seek);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_atEnd, "atEnd(self) -> bool");

extern "C" {static PyObject *meth_QIODevice_atEnd(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_atEnd(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::atEnd() : sipCpp->atEnd());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_atEnd, doc_QIODevice_atEnd);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_reset, "reset(self) -> bool");

extern "C" {static PyObject *meth_QIODevice_reset(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_reset(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QIODevice *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::reset() : sipCpp->reset());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_reset, doc_QIODevice_reset);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_bytesAvailable, "bytesAvailable(self) -> int");

extern "C" {static PyObject *meth_QIODevice_bytesAvailable(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_bytesAvailable(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
             ::qint64 sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::bytesAvailable() : sipCpp->bytesAvailable());

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_bytesAvailable, doc_QIODevice_bytesAvailable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_bytesToWrite, "bytesToWrite(self) -> int");

extern "C" {static PyObject *meth_QIODevice_bytesToWrite(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_bytesToWrite(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
             ::qint64 sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::bytesToWrite() : sipCpp->bytesToWrite());

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_bytesToWrite, doc_QIODevice_bytesToWrite);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_read, "read(self, int) -> bytes");

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

    {
         ::qint64 a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            PyObject * sipRes = SIP_NULLPTR;
            int sipIsErr = 0;

#line 70 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
        // Return the data read or None if there was an error.
        if (a0 < 0)
        {
            PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
            sipIsErr = 1;
        }
        else
        {
            char *s = new char[a0];
            qint64 len;
        
            Py_BEGIN_ALLOW_THREADS
            len = sipCpp->read(s, a0);
            Py_END_ALLOW_THREADS
        
            if (len < 0)
            {
                Py_INCREF(Py_None);
                sipRes = Py_None;
            }
            else
            {
                sipRes = SIPBytes_FromStringAndSize(s, len);
        
                if (!sipRes)
                    sipIsErr = 1;
            }
        
            delete[] s;
        }
#line 1046 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.cpp"

            if (sipIsErr)
                return 0;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_read, doc_QIODevice_read);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_readAll, "readAll(self) -> QByteArray");

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

    {
         ::QIODevice *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::QByteArray(sipCpp->readAll());
            Py_END_ALLOW_THREADS

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

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_readAll, doc_QIODevice_readAll);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_readLine, "readLine(self, maxlen: int = 0) -> bytes");

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

    {
         ::qint64 a0 = 0;
         ::QIODevice *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|n", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            PyObject * sipRes = SIP_NULLPTR;
            int sipIsErr = 0;

#line 105 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
        // The two C++ overloads would have the same Python signature so we get most of
        // the combined functionality by treating an argument of 0 (the default) as
        // meaning return a QByteArray of any length.  Otherwise it is treated as a
        // maximum buffer size and a Python string is returned.
        if (a0 < 0)
        {
            PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
            sipIsErr = 1;
        }
        else if (a0 == 0)
        {
            QByteArray *ba;
        
            Py_BEGIN_ALLOW_THREADS
            ba = new QByteArray(sipCpp->readLine(a0));
            Py_END_ALLOW_THREADS
        
            sipRes = sipBuildResult(&sipIsErr, "N", ba, sipType_QByteArray, 0);
        }
        else
        {
            char *s = new char[a0];
            qint64 len;
        
            Py_BEGIN_ALLOW_THREADS
            len = sipCpp->readLine(s, a0);
            Py_END_ALLOW_THREADS
        
            if (len < 0)
            {
                Py_INCREF(Py_None);
                sipRes = Py_None;
            }
            else
            {
                sipRes = SIPBytes_FromStringAndSize(s, len);
        
                if (!sipRes)
                    sipIsErr = 1;
            }
        
            delete[] s;
        }
#line 1155 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.cpp"

            if (sipIsErr)
                return 0;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_readLine, doc_QIODevice_readLine);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_canReadLine, "canReadLine(self) -> bool");

extern "C" {static PyObject *meth_QIODevice_canReadLine(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_canReadLine(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::canReadLine() : sipCpp->canReadLine());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_canReadLine, doc_QIODevice_canReadLine);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_peek, "peek(self, int) -> QByteArray");

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

    {
         ::qint64 a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
             ::QByteArray*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::QByteArray(sipCpp->peek(a0));
            Py_END_ALLOW_THREADS

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

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_peek, doc_QIODevice_peek);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_write, "write(self, Union[QByteArray, bytes, bytearray]) -> int");

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

    {
        const  ::QByteArray* a0;
        int a0State = 0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QIODevice, &sipCpp, sipType_QByteArray, &a0, &a0State))
        {
             ::qint64 sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->write(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::QByteArray *>(a0), sipType_QByteArray, a0State);

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_write, doc_QIODevice_write);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_waitForReadyRead, "waitForReadyRead(self, int) -> bool");

extern "C" {static PyObject *meth_QIODevice_waitForReadyRead(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_waitForReadyRead(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::waitForReadyRead(a0) : sipCpp->waitForReadyRead(a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_waitForReadyRead, doc_QIODevice_waitForReadyRead);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_waitForBytesWritten, "waitForBytesWritten(self, int) -> bool");

extern "C" {static PyObject *meth_QIODevice_waitForBytesWritten(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_waitForBytesWritten(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::QIODevice::waitForBytesWritten(a0) : sipCpp->waitForBytesWritten(a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_waitForBytesWritten, doc_QIODevice_waitForBytesWritten);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_ungetChar, "ungetChar(self, str)");

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

    {
        char a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BaA", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            sipCpp->ungetChar(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_ungetChar, doc_QIODevice_ungetChar);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_putChar, "putChar(self, str) -> bool");

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

    {
        char a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BaA", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->putChar(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_putChar, doc_QIODevice_putChar);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_getChar, "getChar(self) -> Tuple[bool, bytes]");

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

    {
        char a0;
         ::QIODevice *sipCpp;

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

            sipRes = sipCpp->getChar(&a0);

            return sipBuildResult(0,"(bc)",sipRes,a0);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_getChar, doc_QIODevice_getChar);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_errorString, "errorString(self) -> str");

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

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = new  ::QString(sipCpp->errorString());

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

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_errorString, doc_QIODevice_errorString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_readData, "readData(self, int) -> bytes");

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

    {
         ::qint64 a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pn", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            PyObject * sipRes = SIP_NULLPTR;
            int sipIsErr = 0;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QIODevice, sipName_readData);
                return SIP_NULLPTR;
            }

#line 169 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
        // Return the data read or None if there was an error.
        if (a0 < 0)
        {
            PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
            sipIsErr = 1;
        }
        else
        {
            char *s = new char[a0];
            qint64 len;
        
            Py_BEGIN_ALLOW_THREADS
        #if defined(SIP_PROTECTED_IS_PUBLIC)
            len = sipCpp->readData(s, a0);
        #else
            len = sipCpp->sipProtect_readData(s, a0);
        #endif
            Py_END_ALLOW_THREADS
        
            if (len < 0)
            {
                Py_INCREF(Py_None);
                sipRes = Py_None;
            }
            else
            {
                sipRes = SIPBytes_FromStringAndSize(s, len);
        
                if (!sipRes)
                    sipIsErr = 1;
            }
        
            delete[] s;
        }
#line 1491 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.cpp"

            if (sipIsErr)
                return 0;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_readData, doc_QIODevice_readData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_readLineData, "readLineData(self, int) -> bytes");

extern "C" {static PyObject *meth_QIODevice_readLineData(PyObject *, PyObject *);}
static PyObject *meth_QIODevice_readLineData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::qint64 a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pn", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            PyObject * sipRes = SIP_NULLPTR;
            int sipIsErr = 0;

#line 234 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
        // Return the data read or None if there was an error.
        if (a0 < 0)
        {
            PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
            sipIsErr = 1;
        }
        else
        {
            char *s = new char[a0];
            qint64 len;
        
            Py_BEGIN_ALLOW_THREADS
        #if defined(SIP_PROTECTED_IS_PUBLIC)
            len = sipSelfWasArg ? sipCpp->QIODevice::readLineData(s, a0) : sipCpp->readLineData(s, a0);
        #else
            len = sipCpp->sipProtectVirt_readLineData(sipSelfWasArg, s, a0);
        #endif
            Py_END_ALLOW_THREADS
        
            if (len < 0)
            {
                Py_INCREF(Py_None);
                sipRes = Py_None;
            }
            else
            {
                sipRes = SIPBytes_FromStringAndSize(s, len);
        
                if (!sipRes)
                    sipIsErr = 1;
            }
        
            delete[] s;
        }
#line 1559 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQIODevice.cpp"

            if (sipIsErr)
                return 0;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_readLineData, doc_QIODevice_readLineData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_writeData, "writeData(self, PyQt5.sip.array[bytes]) -> int");

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

    {
        const char* a0;
        Py_ssize_t a1;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pk", &sipSelf, sipType_QIODevice, &sipCpp, &a0, &a1))
        {
             ::qint64 sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QIODevice, sipName_writeData);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->writeData(a0,(long long)a1);

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_writeData, doc_QIODevice_writeData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_setOpenMode, "setOpenMode(self, Union[QIODevice.OpenMode, QIODevice.OpenModeFlag])");

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

    {
         ::QIODevice::OpenMode* a0;
        int a0State = 0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ1", &sipSelf, sipType_QIODevice, &sipCpp, sipType_QIODevice_OpenMode, &a0, &a0State))
        {
            sipCpp->setOpenMode(*a0);
            sipReleaseType(a0, sipType_QIODevice_OpenMode, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_setOpenMode, doc_QIODevice_setOpenMode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_setErrorString, "setErrorString(self, str)");

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

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ1", &sipSelf, sipType_QIODevice, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setErrorString(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_setErrorString, doc_QIODevice_setErrorString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_readChannelCount, "readChannelCount(self) -> int");

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

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->readChannelCount();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_readChannelCount, doc_QIODevice_readChannelCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_writeChannelCount, "writeChannelCount(self) -> int");

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

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->writeChannelCount();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_writeChannelCount, doc_QIODevice_writeChannelCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_currentReadChannel, "currentReadChannel(self) -> int");

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

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->currentReadChannel();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_currentReadChannel, doc_QIODevice_currentReadChannel);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_setCurrentReadChannel, "setCurrentReadChannel(self, int)");

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

    {
        int a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            sipCpp->setCurrentReadChannel(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_setCurrentReadChannel, doc_QIODevice_setCurrentReadChannel);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_currentWriteChannel, "currentWriteChannel(self) -> int");

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

    {
        const  ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->currentWriteChannel();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_currentWriteChannel, doc_QIODevice_currentWriteChannel);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_setCurrentWriteChannel, "setCurrentWriteChannel(self, int)");

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

    {
        int a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
            sipCpp->setCurrentWriteChannel(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_setCurrentWriteChannel, doc_QIODevice_setCurrentWriteChannel);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_startTransaction, "startTransaction(self)");

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

    {
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
            sipCpp->startTransaction();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_startTransaction, doc_QIODevice_startTransaction);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_commitTransaction, "commitTransaction(self)");

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

    {
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
            sipCpp->commitTransaction();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_commitTransaction, doc_QIODevice_commitTransaction);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_rollbackTransaction, "rollbackTransaction(self)");

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

    {
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QIODevice, &sipCpp))
        {
            sipCpp->rollbackTransaction();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_rollbackTransaction, doc_QIODevice_rollbackTransaction);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_isTransactionStarted, "isTransactionStarted(self) -> bool");

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

    {
        const  ::QIODevice *sipCpp;

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

            sipRes = sipCpp->isTransactionStarted();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_isTransactionStarted, doc_QIODevice_isTransactionStarted);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QIODevice_skip, "skip(self, int) -> int");

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

    {
         ::qint64 a0;
         ::QIODevice *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QIODevice, &sipCpp, &a0))
        {
             ::qint64 sipRes;

            sipRes = sipCpp->skip(a0);

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QIODevice, sipName_skip, doc_QIODevice_skip);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QIODevice)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

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


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

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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new sipQIODevice();

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
         ::QObject* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQIODevice(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QIODevice[] = {{191, 255, 1}};


static PyMethodDef methods_QIODevice[] = {
    {sipName_atEnd, meth_QIODevice_atEnd, METH_VARARGS, doc_QIODevice_atEnd},
    {sipName_bytesAvailable, meth_QIODevice_bytesAvailable, METH_VARARGS, doc_QIODevice_bytesAvailable},
    {sipName_bytesToWrite, meth_QIODevice_bytesToWrite, METH_VARARGS, doc_QIODevice_bytesToWrite},
    {sipName_canReadLine, meth_QIODevice_canReadLine, METH_VARARGS, doc_QIODevice_canReadLine},
    {sipName_close, meth_QIODevice_close, METH_VARARGS, doc_QIODevice_close},
    {sipName_commitTransaction, meth_QIODevice_commitTransaction, METH_VARARGS, doc_QIODevice_commitTransaction},
    {sipName_currentReadChannel, meth_QIODevice_currentReadChannel, METH_VARARGS, doc_QIODevice_currentReadChannel},
    {sipName_currentWriteChannel, meth_QIODevice_currentWriteChannel, METH_VARARGS, doc_QIODevice_currentWriteChannel},
    {sipName_errorString, meth_QIODevice_errorString, METH_VARARGS, doc_QIODevice_errorString},
    {sipName_getChar, meth_QIODevice_getChar, METH_VARARGS, doc_QIODevice_getChar},
    {sipName_isOpen, meth_QIODevice_isOpen, METH_VARARGS, doc_QIODevice_isOpen},
    {sipName_isReadable, meth_QIODevice_isReadable, METH_VARARGS, doc_QIODevice_isReadable},
    {sipName_isSequential, meth_QIODevice_isSequential, METH_VARARGS, doc_QIODevice_isSequential},
    {sipName_isTextModeEnabled, meth_QIODevice_isTextModeEnabled, METH_VARARGS, doc_QIODevice_isTextModeEnabled},
    {sipName_isTransactionStarted, meth_QIODevice_isTransactionStarted, METH_VARARGS, doc_QIODevice_isTransactionStarted},
    {sipName_isWritable, meth_QIODevice_isWritable, METH_VARARGS, doc_QIODevice_isWritable},
    {sipName_open, meth_QIODevice_open, METH_VARARGS, doc_QIODevice_open},
    {sipName_openMode, meth_QIODevice_openMode, METH_VARARGS, doc_QIODevice_openMode},
    {sipName_peek, meth_QIODevice_peek, METH_VARARGS, doc_QIODevice_peek},
    {sipName_pos, meth_QIODevice_pos, METH_VARARGS, doc_QIODevice_pos},
    {sipName_putChar, meth_QIODevice_putChar, METH_VARARGS, doc_QIODevice_putChar},
    {sipName_read, meth_QIODevice_read, METH_VARARGS, doc_QIODevice_read},
    {sipName_readAll, meth_QIODevice_readAll, METH_VARARGS, doc_QIODevice_readAll},
    {sipName_readChannelCount, meth_QIODevice_readChannelCount, METH_VARARGS, doc_QIODevice_readChannelCount},
    {sipName_readData, meth_QIODevice_readData, METH_VARARGS, doc_QIODevice_readData},
    {sipName_readLine, SIP_MLMETH_CAST(meth_QIODevice_readLine), METH_VARARGS|METH_KEYWORDS, doc_QIODevice_readLine},
    {sipName_readLineData, meth_QIODevice_readLineData, METH_VARARGS, doc_QIODevice_readLineData},
    {sipName_reset, meth_QIODevice_reset, METH_VARARGS, doc_QIODevice_reset},
    {sipName_rollbackTransaction, meth_QIODevice_rollbackTransaction, METH_VARARGS, doc_QIODevice_rollbackTransaction},
    {sipName_seek, meth_QIODevice_seek, METH_VARARGS, doc_QIODevice_seek},
    {sipName_setCurrentReadChannel, meth_QIODevice_setCurrentReadChannel, METH_VARARGS, doc_QIODevice_setCurrentReadChannel},
    {sipName_setCurrentWriteChannel, meth_QIODevice_setCurrentWriteChannel, METH_VARARGS, doc_QIODevice_setCurrentWriteChannel},
    {sipName_setErrorString, meth_QIODevice_setErrorString, METH_VARARGS, doc_QIODevice_setErrorString},
    {sipName_setOpenMode, meth_QIODevice_setOpenMode, METH_VARARGS, doc_QIODevice_setOpenMode},
    {sipName_setTextModeEnabled, meth_QIODevice_setTextModeEnabled, METH_VARARGS, doc_QIODevice_setTextModeEnabled},
    {sipName_size, meth_QIODevice_size, METH_VARARGS, doc_QIODevice_size},
    {sipName_skip, meth_QIODevice_skip, METH_VARARGS, doc_QIODevice_skip},
    {sipName_startTransaction, meth_QIODevice_startTransaction, METH_VARARGS, doc_QIODevice_startTransaction},
    {sipName_ungetChar, meth_QIODevice_ungetChar, METH_VARARGS, doc_QIODevice_ungetChar},
    {sipName_waitForBytesWritten, meth_QIODevice_waitForBytesWritten, METH_VARARGS, doc_QIODevice_waitForBytesWritten},
    {sipName_waitForReadyRead, meth_QIODevice_waitForReadyRead, METH_VARARGS, doc_QIODevice_waitForReadyRead},
    {sipName_write, meth_QIODevice_write, METH_VARARGS, doc_QIODevice_write},
    {sipName_writeChannelCount, meth_QIODevice_writeChannelCount, METH_VARARGS, doc_QIODevice_writeChannelCount},
    {sipName_writeData, meth_QIODevice_writeData, METH_VARARGS, doc_QIODevice_writeData}
};

static sipEnumMemberDef enummembers_QIODevice[] = {
    {sipName_Append, static_cast<int>( ::QIODevice::Append), 104},
    {sipName_ExistingOnly, static_cast<int>( ::QIODevice::ExistingOnly), 104},
    {sipName_NewOnly, static_cast<int>( ::QIODevice::NewOnly), 104},
    {sipName_NotOpen, static_cast<int>( ::QIODevice::NotOpen), 104},
    {sipName_ReadOnly, static_cast<int>( ::QIODevice::ReadOnly), 104},
    {sipName_ReadWrite, static_cast<int>( ::QIODevice::ReadWrite), 104},
    {sipName_Text, static_cast<int>( ::QIODevice::Text), 104},
    {sipName_Truncate, static_cast<int>( ::QIODevice::Truncate), 104},
    {sipName_Unbuffered, static_cast<int>( ::QIODevice::Unbuffered), 104},
    {sipName_WriteOnly, static_cast<int>( ::QIODevice::WriteOnly), 104},
};

PyDoc_STRVAR(doc_QIODevice, "\1QIODevice()\n"
"QIODevice(QObject)");


/* Define this type's signals. */
static const pyqt5QtSignal signals_QIODevice[] = {
    {"channelBytesWritten(int,qint64)", "\1channelBytesWritten(self, int, int)", SIP_NULLPTR, SIP_NULLPTR},
    {"channelReadyRead(int)", "\1channelReadyRead(self, int)", SIP_NULLPTR, SIP_NULLPTR},
    {"readChannelFinished()", "\1readChannelFinished(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"aboutToClose()", "\1aboutToClose(self)", SIP_NULLPTR, SIP_NULLPTR},
    {"bytesWritten(qint64)", "\1bytesWritten(self, int)", SIP_NULLPTR, SIP_NULLPTR},
    {"readyRead()", "\1readyRead(self)", SIP_NULLPTR, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


static pyqt5ClassPluginDef plugin_QIODevice = {
    & ::QIODevice::staticMetaObject,
    0,
    signals_QIODevice,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtCore_QIODevice = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QIODevice,
        SIP_NULLPTR,
        &plugin_QIODevice
    },
    {
        sipNameNr_QIODevice,
        {0, 0, 1},
        44, methods_QIODevice,
        10, enummembers_QIODevice,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QIODevice,
    -1,
    -1,
    supers_QIODevice,
    SIP_NULLPTR,
    init_type_QIODevice,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QIODevice,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QIODevice,
    cast_QIODevice,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QIODevice),
};
