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

//workaround to access protected functions
#define protected public

// default includes
#include <shiboken.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED

#include <typeinfo>
#include <signalmanager.h>
#include <pysidemetafunction.h>
#include <algorithm>
#include <set>
#include <iterator>

// module include
#include "pyside6_qtnetwork_python.h"

// main header
#include "qlocalsocket_wrapper.h"

// inner classes

#include <cctype>
#include <cstring>



template <class T>
static const char *typeNameOf(const T &t)
{
    const char *typeName =  typeid(t).name();
    auto size = std::strlen(typeName);
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
    if (auto lastStar = strchr(typeName, '*')) {
        // MSVC: "class QPaintDevice * __ptr64"
        while (*--lastStar == ' ') {
        }
        size = lastStar - typeName + 1;
    }
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
    if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
        ++typeName;
        --size;
    }
#endif
    char *result = new char[size + 1];
    result[size] = '\0';
    memcpy(result, typeName, size);
    return result;
}

// Native ---------------------------------------------------------

void QLocalSocketWrapper::resetPyMethodCache()
{
    std::fill_n(m_PyMethodCache, sizeof(m_PyMethodCache) / sizeof(m_PyMethodCache[0]), false);
}

QLocalSocketWrapper::QLocalSocketWrapper(QObject * parent) : QLocalSocket(parent)
{
    resetPyMethodCache();
    // ... middle
}

bool QLocalSocketWrapper::atEnd() const
{
    if (m_PyMethodCache[0])
        return this->::QIODevice::atEnd();
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "atEnd";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[0] = true;
        return this->::QIODevice::atEnd();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.atEnd",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

qint64 QLocalSocketWrapper::bytesAvailable() const
{
    if (m_PyMethodCache[1])
        return this->::QLocalSocket::bytesAvailable();
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return 0;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "bytesAvailable";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[1] = true;
        return this->::QLocalSocket::bytesAvailable();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return 0;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.bytesAvailable",
            "qint64",
            Py_TYPE(pyResult)->tp_name);
        return 0;
    }
    qint64 cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

qint64 QLocalSocketWrapper::bytesToWrite() const
{
    if (m_PyMethodCache[2])
        return this->::QLocalSocket::bytesToWrite();
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return 0;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "bytesToWrite";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[2] = true;
        return this->::QLocalSocket::bytesToWrite();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return 0;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.bytesToWrite",
            "qint64",
            Py_TYPE(pyResult)->tp_name);
        return 0;
    }
    qint64 cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QLocalSocketWrapper::canReadLine() const
{
    if (m_PyMethodCache[3])
        return this->::QLocalSocket::canReadLine();
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "canReadLine";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[3] = true;
        return this->::QLocalSocket::canReadLine();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.canReadLine",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

void QLocalSocketWrapper::childEvent(QChildEvent * event)
{
    if (m_PyMethodCache[4]) {
        return this->::QObject::childEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "childEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[4] = true;
        return this->::QObject::childEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QCHILDEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QLocalSocketWrapper::close()
{
    if (m_PyMethodCache[5]) {
        return this->::QLocalSocket::close();
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "close";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[5] = true;
        return this->::QLocalSocket::close();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QLocalSocketWrapper::connectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[6]) {
        return this->::QObject::connectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "connectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[6] = true;
        return this->::QObject::connectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QLocalSocketWrapper::customEvent(QEvent * event)
{
    if (m_PyMethodCache[7]) {
        return this->::QObject::customEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "customEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[7] = true;
        return this->::QObject::customEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QLocalSocketWrapper::disconnectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[8]) {
        return this->::QObject::disconnectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "disconnectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[8] = true;
        return this->::QObject::disconnectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

bool QLocalSocketWrapper::event(QEvent * event)
{
    if (m_PyMethodCache[9])
        return this->::QObject::event(event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "event";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[9] = true;
        return this->::QObject::event(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.event",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QLocalSocketWrapper::eventFilter(QObject * watched, QEvent * event)
{
    if (m_PyMethodCache[10])
        return this->::QObject::eventFilter(watched, event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "eventFilter";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[10] = true;
        return this->::QObject::eventFilter(watched, event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(NN)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], watched),
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg2 = PyTuple_GET_ITEM(pyArgs, 1)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg2)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 1));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.eventFilter",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QLocalSocketWrapper::isSequential() const
{
    if (m_PyMethodCache[11])
        return this->::QLocalSocket::isSequential();
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "isSequential";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[11] = true;
        return this->::QLocalSocket::isSequential();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.isSequential",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QLocalSocketWrapper::open(QFlags<QIODeviceBase::OpenModeFlag> openMode)
{
    if (m_PyMethodCache[13])
        return this->::QLocalSocket::open(openMode);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "open";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[13] = true;
        return this->::QLocalSocket::open(openMode);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, &openMode)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.open",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

qint64 QLocalSocketWrapper::pos() const
{
    if (m_PyMethodCache[14])
        return this->::QIODevice::pos();
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return 0;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "pos";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[14] = true;
        return this->::QIODevice::pos();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return 0;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.pos",
            "qint64",
            Py_TYPE(pyResult)->tp_name);
        return 0;
    }
    qint64 cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

qint64 QLocalSocketWrapper::readData(char * arg__1, qint64 arg__2)
{
    if (m_PyMethodCache[15]) {
        return this->::QLocalSocket::readData(arg__1, arg__2);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return 0;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "readData";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[15] = true;
        return this->::QLocalSocket::readData(arg__1, arg__2);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(L)",
        arg__2
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return 0;
    }

    // Begin code injection
    // ========================================================================
    // START of custom code block [file: ../glue/qtcore.cpp (return-readData)]
    qint64 cppResult = 0;
    if (PyBytes_Check(pyResult.object())) {
        cppResult = PyBytes_GET_SIZE(pyResult.object());
        memcpy(arg__1, PyBytes_AS_STRING(pyResult.object()), cppResult);
    } else if (Shiboken::String::check(pyResult.object())) {
        cppResult = Shiboken::String::len(pyResult.object());
        memcpy(arg__1, Shiboken::String::toCString(pyResult.object()), cppResult);
    }
    // END of custom code block [file: ../glue/qtcore.cpp (return-readData)]
    // ========================================================================
    // End of code injection

    return cppResult;
}

qint64 QLocalSocketWrapper::readLineData(char * data, qint64 maxlen)
{
    if (m_PyMethodCache[16]) {
        return this->::QIODevice::readLineData(data, maxlen);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return 0;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "readLineData";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[16] = true;
        return this->::QIODevice::readLineData(data, maxlen);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(L)",
        maxlen
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return 0;
    }

    // Begin code injection
    // ========================================================================
    // START of custom code block [file: ../glue/qtcore.cpp (return-readData)]
    qint64 cppResult = 0;
    if (PyBytes_Check(pyResult.object())) {
        cppResult = PyBytes_GET_SIZE(pyResult.object());
        memcpy(data, PyBytes_AS_STRING(pyResult.object()), cppResult);
    } else if (Shiboken::String::check(pyResult.object())) {
        cppResult = Shiboken::String::len(pyResult.object());
        memcpy(data, Shiboken::String::toCString(pyResult.object()), cppResult);
    }
    // END of custom code block [file: ../glue/qtcore.cpp (return-readData)]
    // ========================================================================
    // End of code injection

    return cppResult;
}

bool QLocalSocketWrapper::reset()
{
    if (m_PyMethodCache[17])
        return this->::QIODevice::reset();
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "reset";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[17] = true;
        return this->::QIODevice::reset();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.reset",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QLocalSocketWrapper::seek(qint64 pos)
{
    if (m_PyMethodCache[18])
        return this->::QIODevice::seek(pos);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "seek";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[18] = true;
        return this->::QIODevice::seek(pos);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(L)",
        pos
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.seek",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

qint64 QLocalSocketWrapper::size() const
{
    if (m_PyMethodCache[19])
        return this->::QIODevice::size();
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return 0;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "size";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[19] = true;
        return this->::QIODevice::size();
    }

    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return 0;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.size",
            "qint64",
            Py_TYPE(pyResult)->tp_name);
        return 0;
    }
    qint64 cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

qint64 QLocalSocketWrapper::skipData(qint64 maxSize)
{
    if (m_PyMethodCache[20])
        return this->::QLocalSocket::skipData(maxSize);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return 0;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "skipData";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[20] = true;
        return this->::QLocalSocket::skipData(maxSize);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(L)",
        maxSize
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return 0;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.skipData",
            "qint64",
            Py_TYPE(pyResult)->tp_name);
        return 0;
    }
    qint64 cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

void QLocalSocketWrapper::timerEvent(QTimerEvent * event)
{
    if (m_PyMethodCache[21]) {
        return this->::QObject::timerEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "timerEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[21] = true;
        return this->::QObject::timerEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QTIMEREVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

bool QLocalSocketWrapper::waitForBytesWritten(int msecs)
{
    if (m_PyMethodCache[22])
        return this->::QLocalSocket::waitForBytesWritten(msecs);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "waitForBytesWritten";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[22] = true;
        return this->::QLocalSocket::waitForBytesWritten(msecs);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(i)",
        msecs
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.waitForBytesWritten",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QLocalSocketWrapper::waitForReadyRead(int msecs)
{
    if (m_PyMethodCache[23])
        return this->::QLocalSocket::waitForReadyRead(msecs);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "waitForReadyRead";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[23] = true;
        return this->::QLocalSocket::waitForReadyRead(msecs);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(i)",
        msecs
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.waitForReadyRead",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

qint64 QLocalSocketWrapper::writeData(const char * arg__1, qint64 arg__2)
{
    if (m_PyMethodCache[24])
        return this->::QLocalSocket::writeData(arg__1, arg__2);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return 0;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "writeData";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[24] = true;
        return this->::QLocalSocket::writeData(arg__1, arg__2);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(NL)",
        Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<const char *>(), arg__1),
        arg__2
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return 0;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLocalSocket.writeData",
            "qint64",
            Py_TYPE(pyResult)->tp_name);
        return 0;
    }
    qint64 cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

const QMetaObject *QLocalSocketWrapper::metaObject() const
{
    if (QObject::d_ptr->metaObject)
        return QObject::d_ptr->dynamicMetaObject();
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf == nullptr)
        return QLocalSocket::metaObject();
    return PySide::SignalManager::retrieveMetaObject(reinterpret_cast<PyObject *>(pySelf));
}

int QLocalSocketWrapper::qt_metacall(QMetaObject::Call call, int id, void **args)
{
    int result = QLocalSocket::qt_metacall(call, id, args);
    return result < 0 ? result : PySide::SignalManager::qt_metacall(this, call, id, args);
}

void *QLocalSocketWrapper::qt_metacast(const char *_clname)
{
    if (!_clname)
        return {};
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf && PySide::inherits(Py_TYPE(pySelf), _clname))
        return static_cast<void *>(const_cast< QLocalSocketWrapper *>(this));
    return QLocalSocket::qt_metacast(_clname);
}

QLocalSocketWrapper::~QLocalSocketWrapper()
{
    SbkObject *wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this);
    Shiboken::Object::destroy(wrapper, this);
}

// Target ---------------------------------------------------------

extern "C" {
static int
Sbk_QLocalSocket_Init(PyObject *self, PyObject *args, PyObject *kwds)
{
    const QMetaObject *metaObject;
    SbkObject *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::QLocalSocket >()))
        return -1;

    ::QLocalSocketWrapper *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.__init__";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths


    if (!PyArg_ParseTuple(args, "|O:QLocalSocket", &(pyArgs[0])))
        return -1;


    // Overloaded function decisor
    // 0: QLocalSocket::QLocalSocket(QObject*)
    if (numArgs == 0) {
        overloadId = 0; // QLocalSocket(QObject*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[0])))) {
        overloadId = 0; // QLocalSocket(QObject*)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocket_Init_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_parent = Shiboken::String::createStaticString("parent");
            if (PyDict_Contains(kwds, key_parent)) {
                value = PyDict_GetItem(kwds, key_parent);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_parent);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLocalSocket_Init_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], (pyArgs[0]))))
                        goto Sbk_QLocalSocket_Init_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_parent);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                // fall through to handle extra keyword signals and properties
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return -1;
        ::QObject *cppArg0 = nullptr;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // QLocalSocket(QObject*)
            void *addr = PySide::nextQObjectMemoryAddr();
            if (addr) {
                cptr = new (addr) ::QLocalSocketWrapper(cppArg0);
                PySide::setNextQObjectMemoryAddr(0);
            } else {
                cptr = new ::QLocalSocketWrapper(cppArg0);
            }

            Shiboken::Object::setParent(pyArgs[0], self);
        }
    }

    if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::QLocalSocket >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (!cptr) goto Sbk_QLocalSocket_Init_TypeError;

    Shiboken::Object::setValidCpp(sbkSelf, true);
    Shiboken::Object::setHasCppWrapper(sbkSelf, true);
    if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
        Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
    }
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);

    // QObject setup
    PySide::Signal::updateSourceObject(self);
    metaObject = cptr->metaObject(); // <- init python qt properties
    if (!errInfo.isNull() && PyDict_Check(errInfo.object())) {
        if (!PySide::fillQtProperties(self, metaObject, errInfo))
            goto Sbk_QLocalSocket_Init_TypeError;
    };


    return 1;

    Sbk_QLocalSocket_Init_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return -1;
}

static PyObject *Sbk_QLocalSocketFunc_abort(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.abort";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // abort()
            cppSelf->abort();
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;
}

static PyObject *Sbk_QLocalSocketFunc_bytesAvailable(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.bytesAvailable";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // bytesAvailable()const
            qint64 cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? const_cast<const ::QLocalSocket *>(cppSelf)->::QLocalSocket::bytesAvailable()
                : const_cast<const ::QLocalSocket *>(cppSelf)->bytesAvailable();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_bytesToWrite(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.bytesToWrite";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // bytesToWrite()const
            qint64 cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? const_cast<const ::QLocalSocket *>(cppSelf)->::QLocalSocket::bytesToWrite()
                : const_cast<const ::QLocalSocket *>(cppSelf)->bytesToWrite();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_canReadLine(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.canReadLine";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // canReadLine()const
            bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? const_cast<const ::QLocalSocket *>(cppSelf)->::QLocalSocket::canReadLine()
                : const_cast<const ::QLocalSocket *>(cppSelf)->canReadLine();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_close(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.close";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // close()
            Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? cppSelf->::QLocalSocket::close()
                : cppSelf->close();
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;
}

static PyObject *Sbk_QLocalSocketFunc_connectToServer(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.connectToServer";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths
    if (numArgs > 2) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLocalSocketFunc_connectToServer_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OO:connectToServer", &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: QLocalSocket::connectToServer(QFlags<QIODeviceBase::OpenModeFlag>)
    // 1: QLocalSocket::connectToServer(QString,QFlags<QIODeviceBase::OpenModeFlag>)
    if (numArgs == 0) {
        overloadId = 0; // connectToServer(QFlags<QIODeviceBase::OpenModeFlag>)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 1; // connectToServer(QString,QFlags<QIODeviceBase::OpenModeFlag>)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, (pyArgs[1])))) {
            overloadId = 1; // connectToServer(QString,QFlags<QIODeviceBase::OpenModeFlag>)
        }
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, (pyArgs[0])))) {
        overloadId = 0; // connectToServer(QFlags<QIODeviceBase::OpenModeFlag>)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_connectToServer_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // connectToServer(QFlags<QIODeviceBase::OpenModeFlag> openMode)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                PyObject *value{};
                Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
                static PyObject *const key_openMode = Shiboken::String::createStaticString("openMode");
                if (PyDict_Contains(kwds, key_openMode)) {
                    value = PyDict_GetItem(kwds, key_openMode);
                    if (value && pyArgs[0]) {
                        errInfo.reset(key_openMode);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QLocalSocketFunc_connectToServer_TypeError;
                    }
                    if (value) {
                        pyArgs[0] = value;
                        if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, (pyArgs[0]))))
                            goto Sbk_QLocalSocketFunc_connectToServer_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_openMode);
                }
                if (PyDict_Size(kwds_dup) > 0) {
                    errInfo.reset(kwds_dup.release());
                    goto Sbk_QLocalSocketFunc_connectToServer_TypeError;
                }
            }
            ::QFlags<QIODeviceBase::OpenModeFlag> cppArg0(QIODeviceBase::OpenModeFlag::ReadWrite);
            if (pythonToCpp[0])
                pythonToCpp[0](pyArgs[0], &cppArg0);

            if (!PyErr_Occurred()) {
                // connectToServer(QFlags<QIODeviceBase::OpenModeFlag>)
                cppSelf->connectToServer(cppArg0);
            }
            break;
        }
        case 1: // connectToServer(const QString & name, QFlags<QIODeviceBase::OpenModeFlag> openMode)
        {
            if (kwds && PyDict_Size(kwds) > 0) {
                PyObject *value{};
                Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
                static PyObject *const key_openMode = Shiboken::String::createStaticString("openMode");
                if (PyDict_Contains(kwds, key_openMode)) {
                    value = PyDict_GetItem(kwds, key_openMode);
                    if (value && pyArgs[1]) {
                        errInfo.reset(key_openMode);
                        Py_INCREF(errInfo.object());
                        goto Sbk_QLocalSocketFunc_connectToServer_TypeError;
                    }
                    if (value) {
                        pyArgs[1] = value;
                        if (!(pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, (pyArgs[1]))))
                            goto Sbk_QLocalSocketFunc_connectToServer_TypeError;
                    }
                    PyDict_DelItem(kwds_dup, key_openMode);
                }
                if (PyDict_Size(kwds_dup) > 0) {
                    errInfo.reset(kwds_dup.release());
                    goto Sbk_QLocalSocketFunc_connectToServer_TypeError;
                }
            }
            ::QString cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            ::QFlags<QIODeviceBase::OpenModeFlag> cppArg1(QIODeviceBase::OpenModeFlag::ReadWrite);
            if (pythonToCpp[1])
                pythonToCpp[1](pyArgs[1], &cppArg1);

            if (!PyErr_Occurred()) {
                // connectToServer(QString,QFlags<QIODeviceBase::OpenModeFlag>)
                cppSelf->connectToServer(cppArg0, cppArg1);
            }
            break;
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLocalSocketFunc_connectToServer_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_disconnectFromServer(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.disconnectFromServer";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // disconnectFromServer()
            cppSelf->disconnectFromServer();
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;
}

static PyObject *Sbk_QLocalSocketFunc_error(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.error";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // error()const
            QLocalSocket::LocalSocketError cppResult = const_cast<const ::QLocalSocket *>(cppSelf)->error();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_flush(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.flush";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // flush()
            bool cppResult = cppSelf->flush();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_fullServerName(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.fullServerName";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // fullServerName()const
            QString cppResult = const_cast<const ::QLocalSocket *>(cppSelf)->fullServerName();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_isSequential(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.isSequential";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isSequential()const
            bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? const_cast<const ::QLocalSocket *>(cppSelf)->::QLocalSocket::isSequential()
                : const_cast<const ::QLocalSocket *>(cppSelf)->isSequential();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_isValid(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.isValid";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // isValid()const
            bool cppResult = const_cast<const ::QLocalSocket *>(cppSelf)->isValid();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_open(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.open";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLocalSocketFunc_open_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|O:open", &(pyArgs[0])))
        return {};


    // Overloaded function decisor
    // 0: QIODevice::open(QFlags<QIODeviceBase::OpenModeFlag>)->bool
    if (numArgs == 0) {
        overloadId = 0; // open(QFlags<QIODeviceBase::OpenModeFlag>)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, (pyArgs[0])))) {
        overloadId = 0; // open(QFlags<QIODeviceBase::OpenModeFlag>)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_open_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_openMode = Shiboken::String::createStaticString("openMode");
            if (PyDict_Contains(kwds, key_openMode)) {
                value = PyDict_GetItem(kwds, key_openMode);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_openMode);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLocalSocketFunc_open_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, (pyArgs[0]))))
                        goto Sbk_QLocalSocketFunc_open_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_openMode);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QLocalSocketFunc_open_TypeError;
            }
        }
        ::QFlags<QIODeviceBase::OpenModeFlag> cppArg0(QIODeviceBase::OpenModeFlag::ReadWrite);
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // open(QFlags<QIODeviceBase::OpenModeFlag>)
            bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? cppSelf->::QLocalSocket::open(cppArg0)
                : cppSelf->open(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_open_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_readBufferSize(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.readBufferSize";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // readBufferSize()const
            qint64 cppResult = const_cast<const ::QLocalSocket *>(cppSelf)->readBufferSize();
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_readData(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.readData";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QIODevice::readData(char*,qint64)->PyObject
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), (pyArg)))) {
        overloadId = 0; // readData(char*,qint64)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_readData_TypeError;

    // Call function/method
    {
        qint64 cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // readData(char*,qint64)
            // Begin code injection
            // ========================================================================
            // START of custom code block [file: ../glue/qtcore.cpp (qiodevice-readData)]
            QByteArray ba(1 + qsizetype(cppArg0), char(0));
            Py_BEGIN_ALLOW_THREADS
            (Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self)) ? cppSelf->::QLocalSocket::readData(ba.data(), qint64(cppArg0)) : cppSelf->readData(ba.data(), qint64(cppArg0)));
            Py_END_ALLOW_THREADS
            pyResult = Shiboken::String::fromCString(ba.constData());
            // END of custom code block [file: ../glue/qtcore.cpp (qiodevice-readData)]
            // ========================================================================
            // End of code injection

        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_readData_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_serverName(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.serverName";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // serverName()const
            QString cppResult = const_cast<const ::QLocalSocket *>(cppSelf)->serverName();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_setReadBufferSize(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.setReadBufferSize";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLocalSocket::setReadBufferSize(qint64)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), (pyArg)))) {
        overloadId = 0; // setReadBufferSize(qint64)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_setReadBufferSize_TypeError;

    // Call function/method
    {
        qint64 cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setReadBufferSize(qint64)
            cppSelf->setReadBufferSize(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLocalSocketFunc_setReadBufferSize_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_setServerName(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.setServerName";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLocalSocket::setServerName(QString)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) {
        overloadId = 0; // setServerName(QString)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_setServerName_TypeError;

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setServerName(QString)
            cppSelf->setServerName(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLocalSocketFunc_setServerName_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_setSocketDescriptor(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.setSocketDescriptor";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[3];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0, 0};

    // invalid argument lengths
    if (numArgs > 3) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError;
    } else if (numArgs < 1) {
        static PyObject *const too_few = Shiboken::String::createStaticString("<");
        errInfo.reset(too_few);
        Py_INCREF(errInfo.object());
        goto Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|OOO:setSocketDescriptor", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2])))
        return {};


    // Overloaded function decisor
    // 0: QLocalSocket::setSocketDescriptor(qintptr,QLocalSocket::LocalSocketState,QFlags<QIODeviceBase::OpenModeFlag>)->bool
    if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QINTPTR_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 0; // setSocketDescriptor(qintptr,QLocalSocket::LocalSocketState,QFlags<QIODeviceBase::OpenModeFlag>)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX]))->converter, (pyArgs[1])))) {
            if (numArgs == 2) {
                overloadId = 0; // setSocketDescriptor(qintptr,QLocalSocket::LocalSocketState,QFlags<QIODeviceBase::OpenModeFlag>)
            } else if (numArgs >= 3
                && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, (pyArgs[2])))) {
                overloadId = 0; // setSocketDescriptor(qintptr,QLocalSocket::LocalSocketState,QFlags<QIODeviceBase::OpenModeFlag>)
            }
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_socketState = Shiboken::String::createStaticString("socketState");
            if (PyDict_Contains(kwds, key_socketState)) {
                value = PyDict_GetItem(kwds, key_socketState);
                if (value && pyArgs[1]) {
                    errInfo.reset(key_socketState);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError;
                }
                if (value) {
                    pyArgs[1] = value;
                    if (!(pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX]))->converter, (pyArgs[1]))))
                        goto Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_socketState);
            }
            static PyObject *const key_openMode = Shiboken::String::createStaticString("openMode");
            if (PyDict_Contains(kwds, key_openMode)) {
                value = PyDict_GetItem(kwds, key_openMode);
                if (value && pyArgs[2]) {
                    errInfo.reset(key_openMode);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError;
                }
                if (value) {
                    pyArgs[2] = value;
                    if (!(pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtCoreTypes[SBK_QFLAGS_QIODEVICEBASE_OPENMODEFLAG_IDX]))->converter, (pyArgs[2]))))
                        goto Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_openMode);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError;
            }
        }
        ::qintptr cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        ::QLocalSocket::LocalSocketState cppArg1(QLocalSocket::LocalSocketState::ConnectedState);
        if (pythonToCpp[1])
            pythonToCpp[1](pyArgs[1], &cppArg1);
        ::QFlags<QIODeviceBase::OpenModeFlag> cppArg2(QIODeviceBase::OpenModeFlag::ReadWrite);
        if (pythonToCpp[2])
            pythonToCpp[2](pyArgs[2], &cppArg2);

        if (!PyErr_Occurred()) {
            // setSocketDescriptor(qintptr,QLocalSocket::LocalSocketState,QFlags<QIODeviceBase::OpenModeFlag>)
            bool cppResult = cppSelf->setSocketDescriptor(cppArg0, cppArg1, cppArg2);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_setSocketDescriptor_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_setSocketOptions(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.setSocketOptions";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLocalSocket::setSocketOptions(QFlags<QLocalSocket::SocketOption>)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, (pyArg)))) {
        overloadId = 0; // setSocketOptions(QFlags<QLocalSocket::SocketOption>)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_setSocketOptions_TypeError;

    // Call function/method
    {
        ::QFlags<QLocalSocket::SocketOption> cppArg0 = QFlags<QLocalSocket::SocketOption>(0);
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // setSocketOptions(QFlags<QLocalSocket::SocketOption>)
            cppSelf->setSocketOptions(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLocalSocketFunc_setSocketOptions_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_skipData(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.skipData";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QIODevice::skipData(qint64)->qint64
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), (pyArg)))) {
        overloadId = 0; // skipData(qint64)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_skipData_TypeError;

    // Call function/method
    {
        qint64 cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (!PyErr_Occurred()) {
            // skipData(qint64)
            qint64 cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? cppSelf->::QLocalSocket::skipData(cppArg0)
                : cppSelf->skipData(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_skipData_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_socketDescriptor(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.socketDescriptor";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // socketDescriptor()const
            qintptr cppResult = const_cast<const ::QLocalSocket *>(cppSelf)->socketDescriptor();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QINTPTR_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_socketOptions(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.socketOptions";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // socketOptions()const
            QFlags<QLocalSocket::SocketOption> cppResult = const_cast<const ::QLocalSocket *>(cppSelf)->socketOptions();
            pyResult = Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_state(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.state";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // state()const
            QLocalSocket::LocalSocketState cppResult = const_cast<const ::QLocalSocket *>(cppSelf)->state();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLocalSocketFunc_waitForBytesWritten(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.waitForBytesWritten";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLocalSocketFunc_waitForBytesWritten_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|O:waitForBytesWritten", &(pyArgs[0])))
        return {};


    // Overloaded function decisor
    // 0: QIODevice::waitForBytesWritten(int)->bool
    if (numArgs == 0) {
        overloadId = 0; // waitForBytesWritten(int)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))) {
        overloadId = 0; // waitForBytesWritten(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_waitForBytesWritten_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_msecs = Shiboken::String::createStaticString("msecs");
            if (PyDict_Contains(kwds, key_msecs)) {
                value = PyDict_GetItem(kwds, key_msecs);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_msecs);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLocalSocketFunc_waitForBytesWritten_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0]))))
                        goto Sbk_QLocalSocketFunc_waitForBytesWritten_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_msecs);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QLocalSocketFunc_waitForBytesWritten_TypeError;
            }
        }
        int cppArg0 = 30000;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // waitForBytesWritten(int)
            bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? cppSelf->::QLocalSocket::waitForBytesWritten(cppArg0)
                : cppSelf->waitForBytesWritten(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_waitForBytesWritten_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_waitForConnected(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.waitForConnected";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLocalSocketFunc_waitForConnected_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|O:waitForConnected", &(pyArgs[0])))
        return {};


    // Overloaded function decisor
    // 0: QLocalSocket::waitForConnected(int)->bool
    if (numArgs == 0) {
        overloadId = 0; // waitForConnected(int)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))) {
        overloadId = 0; // waitForConnected(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_waitForConnected_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_msecs = Shiboken::String::createStaticString("msecs");
            if (PyDict_Contains(kwds, key_msecs)) {
                value = PyDict_GetItem(kwds, key_msecs);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_msecs);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLocalSocketFunc_waitForConnected_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0]))))
                        goto Sbk_QLocalSocketFunc_waitForConnected_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_msecs);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QLocalSocketFunc_waitForConnected_TypeError;
            }
        }
        int cppArg0 = 30000;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // waitForConnected(int)
            bool cppResult = cppSelf->waitForConnected(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_waitForConnected_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_waitForDisconnected(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.waitForDisconnected";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLocalSocketFunc_waitForDisconnected_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|O:waitForDisconnected", &(pyArgs[0])))
        return {};


    // Overloaded function decisor
    // 0: QLocalSocket::waitForDisconnected(int)->bool
    if (numArgs == 0) {
        overloadId = 0; // waitForDisconnected(int)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))) {
        overloadId = 0; // waitForDisconnected(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_waitForDisconnected_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_msecs = Shiboken::String::createStaticString("msecs");
            if (PyDict_Contains(kwds, key_msecs)) {
                value = PyDict_GetItem(kwds, key_msecs);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_msecs);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLocalSocketFunc_waitForDisconnected_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0]))))
                        goto Sbk_QLocalSocketFunc_waitForDisconnected_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_msecs);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QLocalSocketFunc_waitForDisconnected_TypeError;
            }
        }
        int cppArg0 = 30000;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // waitForDisconnected(int)
            bool cppResult = cppSelf->waitForDisconnected(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_waitForDisconnected_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_waitForReadyRead(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.waitForReadyRead";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLocalSocketFunc_waitForReadyRead_TypeError;
    }

    if (!PyArg_ParseTuple(args, "|O:waitForReadyRead", &(pyArgs[0])))
        return {};


    // Overloaded function decisor
    // 0: QIODevice::waitForReadyRead(int)->bool
    if (numArgs == 0) {
        overloadId = 0; // waitForReadyRead(int)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))) {
        overloadId = 0; // waitForReadyRead(int)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_waitForReadyRead_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_msecs = Shiboken::String::createStaticString("msecs");
            if (PyDict_Contains(kwds, key_msecs)) {
                value = PyDict_GetItem(kwds, key_msecs);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_msecs);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLocalSocketFunc_waitForReadyRead_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0]))))
                        goto Sbk_QLocalSocketFunc_waitForReadyRead_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_msecs);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QLocalSocketFunc_waitForReadyRead_TypeError;
            }
        }
        int cppArg0 = 30000;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // waitForReadyRead(int)
            bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? cppSelf->::QLocalSocket::waitForReadyRead(cppArg0)
                : cppSelf->waitForReadyRead(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_waitForReadyRead_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLocalSocketFunc_writeData(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtNetwork.QLocalSocket.writeData";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths


    if (!PyArg_UnpackTuple(args, "writeData", 2, 2, &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: QIODevice::writeData(const char*,qint64)->qint64
    if (numArgs == 2
        && Shiboken::String::check(pyArgs[0]) && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<const char *>(), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), (pyArgs[1])))) {
        overloadId = 0; // writeData(const char*,qint64)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLocalSocketFunc_writeData_TypeError;

    // Call function/method
    {
        const char* cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        qint64 cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);

        if (!PyErr_Occurred()) {
            // writeData(const char*,qint64)
            qint64 cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
                ? cppSelf->::QLocalSocket::writeData(cppArg0, cppArg1)
                : cppSelf->writeData(cppArg0, cppArg1);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<qint64>(), &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLocalSocketFunc_writeData_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}


static const char *Sbk_QLocalSocket_PropertyStrings[] = {
    "socketOptions::",
    nullptr // Sentinel
};

static PyMethodDef Sbk_QLocalSocket_methods[] = {
    {"abort", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_abort), METH_NOARGS},
    {"bytesAvailable", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_bytesAvailable), METH_NOARGS},
    {"bytesToWrite", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_bytesToWrite), METH_NOARGS},
    {"canReadLine", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_canReadLine), METH_NOARGS},
    {"close", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_close), METH_NOARGS},
    {"connectToServer", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_connectToServer), METH_VARARGS|METH_KEYWORDS},
    {"disconnectFromServer", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_disconnectFromServer), METH_NOARGS},
    {"error", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_error), METH_NOARGS},
    {"flush", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_flush), METH_NOARGS},
    {"fullServerName", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_fullServerName), METH_NOARGS},
    {"isSequential", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_isSequential), METH_NOARGS},
    {"isValid", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_isValid), METH_NOARGS},
    {"open", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_open), METH_VARARGS|METH_KEYWORDS},
    {"readBufferSize", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_readBufferSize), METH_NOARGS},
    {"readData", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_readData), METH_O},
    {"serverName", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_serverName), METH_NOARGS},
    {"setReadBufferSize", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_setReadBufferSize), METH_O},
    {"setServerName", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_setServerName), METH_O},
    {"setSocketDescriptor", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_setSocketDescriptor), METH_VARARGS|METH_KEYWORDS},
    {"setSocketOptions", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_setSocketOptions), METH_O},
    {"skipData", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_skipData), METH_O},
    {"socketDescriptor", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_socketDescriptor), METH_NOARGS},
    {"socketOptions", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_socketOptions), METH_NOARGS},
    {"state", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_state), METH_NOARGS},
    {"waitForBytesWritten", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_waitForBytesWritten), METH_VARARGS|METH_KEYWORDS},
    {"waitForConnected", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_waitForConnected), METH_VARARGS|METH_KEYWORDS},
    {"waitForDisconnected", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_waitForDisconnected), METH_VARARGS|METH_KEYWORDS},
    {"waitForReadyRead", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_waitForReadyRead), METH_VARARGS|METH_KEYWORDS},
    {"writeData", reinterpret_cast<PyCFunction>(Sbk_QLocalSocketFunc_writeData), METH_VARARGS},

    {nullptr, nullptr} // Sentinel
};

static int Sbk_QLocalSocket_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value && PyCallable_Check(value)) {
        auto plain_inst = reinterpret_cast< ::QLocalSocket *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX], reinterpret_cast<SbkObject *>(self)));
        auto inst = dynamic_cast<QLocalSocketWrapper *>(plain_inst);
        if (inst)
            inst->resetPyMethodCache();
    }
    Shiboken::AutoDecRef pp(reinterpret_cast<PyObject *>(PySide::Property::getObject(self, name)));
    if (!pp.isNull())
        return PySide::Property::setValue(reinterpret_cast<PySideProperty *>(pp.object()), self, value);
    return PyObject_GenericSetAttr(self, name, value);
}

} // extern "C"

static int Sbk_QLocalSocket_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QLocalSocket_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
static void * Sbk_QLocalSocketSpecialCastFunction(void *obj, PyTypeObject *desiredType)
{
    auto me = reinterpret_cast< ::QLocalSocket *>(obj);
    if (desiredType == SbkPySide6_QtCoreTypes[SBK_QIODEVICE_IDX])
        return static_cast< ::QIODevice *>(me);
    else if (desiredType == SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX])
        return static_cast< ::QObject *>(me);
    else if (desiredType == SbkPySide6_QtCoreTypes[SBK_QIODEVICEBASE_IDX])
        return static_cast< ::QIODeviceBase *>(me);
    return me;
}


// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QLocalSocket_Type = nullptr;
static PyTypeObject *Sbk_QLocalSocket_TypeF(void)
{
    return _Sbk_QLocalSocket_Type;
}

static PyType_Slot Sbk_QLocalSocket_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        nullptr},
    {Py_tp_hash,        nullptr},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_QLocalSocket_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QLocalSocket_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QLocalSocket_clear)},
    {Py_tp_richcompare, nullptr},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QLocalSocket_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QLocalSocket_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    {0, nullptr}
};
static PyType_Spec Sbk_QLocalSocket_spec = {
    "2:PySide6.QtNetwork.QLocalSocket",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QLocalSocket_slots
};

} //extern "C"

static void *Sbk_QLocalSocket_typeDiscovery(void *cptr, PyTypeObject *instanceType)
{
    if (instanceType == Shiboken::SbkType< ::QObject >())
        return dynamic_cast< ::QLocalSocket *>(reinterpret_cast< ::QObject *>(cptr));
    return {};
}

PyObject *SbkPySide6_QtNetwork_QLocalSocket_SocketOption___and__(PyObject *self, PyObject *pyArg)
{
    ::QLocalSocket::SocketOptions cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QLocalSocket::SocketOptions>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QLocalSocket::SocketOptions>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf & cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtNetwork_QLocalSocket_SocketOption___or__(PyObject *self, PyObject *pyArg)
{
    ::QLocalSocket::SocketOptions cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QLocalSocket::SocketOptions>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QLocalSocket::SocketOptions>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf | cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtNetwork_QLocalSocket_SocketOption___xor__(PyObject *self, PyObject *pyArg)
{
    ::QLocalSocket::SocketOptions cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QLocalSocket::SocketOptions>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QLocalSocket::SocketOptions>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf ^ cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtNetwork_QLocalSocket_SocketOption___invert__(PyObject *self, PyObject *pyArg)
{
    ::QLocalSocket::SocketOptions cppSelf;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, self, &cppSelf);
    ::QLocalSocket::SocketOptions cppResult = ~cppSelf;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, &cppResult);
}

static PyObject *SbkPySide6_QtNetwork_QLocalSocket_SocketOption_long(PyObject *self)
{
    int val;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, self, &val);
    return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &val);
}
static int SbkPySide6_QtNetwork_QLocalSocket_SocketOption__nonzero(PyObject *self)
{
    int val;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))->converter, self, &val);
    return val != 0;
}

static PyType_Slot SbkPySide6_QtNetwork_QLocalSocket_SocketOption_number_slots[] = {
    {Py_nb_bool,    reinterpret_cast<void *>(SbkPySide6_QtNetwork_QLocalSocket_SocketOption__nonzero)},
    {Py_nb_invert,  reinterpret_cast<void *>(SbkPySide6_QtNetwork_QLocalSocket_SocketOption___invert__)},
    {Py_nb_and,     reinterpret_cast<void *>(SbkPySide6_QtNetwork_QLocalSocket_SocketOption___and__)},
    {Py_nb_xor,     reinterpret_cast<void *>(SbkPySide6_QtNetwork_QLocalSocket_SocketOption___xor__)},
    {Py_nb_or,      reinterpret_cast<void *>(SbkPySide6_QtNetwork_QLocalSocket_SocketOption___or__)},
    {Py_nb_int,     reinterpret_cast<void *>(SbkPySide6_QtNetwork_QLocalSocket_SocketOption_long)},
    {Py_nb_index,   reinterpret_cast<void *>(SbkPySide6_QtNetwork_QLocalSocket_SocketOption_long)},
    {0, nullptr} // sentinel
};



// Type conversion functions.

// Python to C++ enum conversion.
static void QLocalSocket_LocalSocketError_PythonToCpp_QLocalSocket_LocalSocketError(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLocalSocket::LocalSocketError *>(cppOut) =
        static_cast<::QLocalSocket::LocalSocketError>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QLocalSocket_LocalSocketError_PythonToCpp_QLocalSocket_LocalSocketError_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX]))
        return QLocalSocket_LocalSocketError_PythonToCpp_QLocalSocket_LocalSocketError;
    return {};
}
static PyObject *QLocalSocket_LocalSocketError_CppToPython_QLocalSocket_LocalSocketError(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QLocalSocket::LocalSocketError *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX], castCppIn);

}

static void QLocalSocket_LocalSocketState_PythonToCpp_QLocalSocket_LocalSocketState(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLocalSocket::LocalSocketState *>(cppOut) =
        static_cast<::QLocalSocket::LocalSocketState>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QLocalSocket_LocalSocketState_PythonToCpp_QLocalSocket_LocalSocketState_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX]))
        return QLocalSocket_LocalSocketState_PythonToCpp_QLocalSocket_LocalSocketState;
    return {};
}
static PyObject *QLocalSocket_LocalSocketState_CppToPython_QLocalSocket_LocalSocketState(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QLocalSocket::LocalSocketState *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX], castCppIn);

}

static void QLocalSocket_SocketOption_PythonToCpp_QLocalSocket_SocketOption(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLocalSocket::SocketOption *>(cppOut) =
        static_cast<::QLocalSocket::SocketOption>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QLocalSocket_SocketOption_PythonToCpp_QLocalSocket_SocketOption_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX]))
        return QLocalSocket_SocketOption_PythonToCpp_QLocalSocket_SocketOption;
    return {};
}
static PyObject *QLocalSocket_SocketOption_CppToPython_QLocalSocket_SocketOption(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QLocalSocket::SocketOption *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX], castCppIn);

}

static void QFlags_QLocalSocket_SocketOption__PythonToCpp_QFlags_QLocalSocket_SocketOption_(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QFlags<QLocalSocket::SocketOption> *>(cppOut) =
        ::QFlags<QLocalSocket::SocketOption>(QFlag(int(PySide::QFlags::getValue(reinterpret_cast<PySideQFlagsObject *>(pyIn)))));

}
static PythonToCppFunc is_QFlags_QLocalSocket_SocketOption__PythonToCpp_QFlags_QLocalSocket_SocketOption__Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]))
        return QFlags_QLocalSocket_SocketOption__PythonToCpp_QFlags_QLocalSocket_SocketOption_;
    return {};
}
static PyObject *QFlags_QLocalSocket_SocketOption__CppToPython_QFlags_QLocalSocket_SocketOption_(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QFlags<QLocalSocket::SocketOption> *>(cppIn));
    return reinterpret_cast<PyObject *>(PySide::QFlags::newObject(castCppIn, SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]));

}

static void QLocalSocket_SocketOption_PythonToCpp_QFlags_QLocalSocket_SocketOption_(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QFlags<QLocalSocket::SocketOption> *>(cppOut) =
        ::QFlags<QLocalSocket::SocketOption>(QFlag(int(Shiboken::Enum::getValue(pyIn))));

}
static PythonToCppFunc is_QLocalSocket_SocketOption_PythonToCpp_QFlags_QLocalSocket_SocketOption__Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX]))
        return QLocalSocket_SocketOption_PythonToCpp_QFlags_QLocalSocket_SocketOption_;
    return {};
}
static void number_PythonToCpp_QFlags_QLocalSocket_SocketOption_(PyObject *pyIn, void *cppOut)
{
    Shiboken::AutoDecRef pyLong(PyNumber_Long(pyIn));
    *reinterpret_cast<::QFlags<QLocalSocket::SocketOption> *>(cppOut) =
        ::QFlags<QLocalSocket::SocketOption>(QFlag(int(PyLong_AsLong(pyLong.object()))));

}
static PythonToCppFunc is_number_PythonToCpp_QFlags_QLocalSocket_SocketOption__Convertible(PyObject *pyIn)
{
    if (PyNumber_Check(pyIn) && PyObject_TypeCheck(pyIn, SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX]))
        return number_PythonToCpp_QFlags_QLocalSocket_SocketOption_;
    return {};
}
// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void QLocalSocket_PythonToCpp_QLocalSocket_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QLocalSocket_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_QLocalSocket_PythonToCpp_QLocalSocket_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QLocalSocket_TypeF())))
        return QLocalSocket_PythonToCpp_QLocalSocket_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *QLocalSocket_PTR_CppToPython_QLocalSocket(const void *cppIn)
{
    return PySide::getWrapperForQObject(reinterpret_cast<::QLocalSocket *>(const_cast<void *>(cppIn)), Sbk_QLocalSocket_TypeF());

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QLocalSocket_SignatureStrings[] = {
    "PySide6.QtNetwork.QLocalSocket(self,parent:PySide6.QtCore.QObject=nullptr)",
    "PySide6.QtNetwork.QLocalSocket.abort(self)",
    "PySide6.QtNetwork.QLocalSocket.bytesAvailable(self)->qint64",
    "PySide6.QtNetwork.QLocalSocket.bytesToWrite(self)->qint64",
    "PySide6.QtNetwork.QLocalSocket.canReadLine(self)->bool",
    "PySide6.QtNetwork.QLocalSocket.close(self)",
    "1:PySide6.QtNetwork.QLocalSocket.connectToServer(self,openMode:PySide6.QtCore.QIODeviceBase.OpenMode=QIODeviceBase.OpenModeFlag.ReadWrite)",
    "0:PySide6.QtNetwork.QLocalSocket.connectToServer(self,name:QString,openMode:PySide6.QtCore.QIODeviceBase.OpenMode=QIODeviceBase.OpenModeFlag.ReadWrite)",
    "PySide6.QtNetwork.QLocalSocket.disconnectFromServer(self)",
    "PySide6.QtNetwork.QLocalSocket.error(self)->PySide6.QtNetwork.QLocalSocket.LocalSocketError",
    "PySide6.QtNetwork.QLocalSocket.flush(self)->bool",
    "PySide6.QtNetwork.QLocalSocket.fullServerName(self)->QString",
    "PySide6.QtNetwork.QLocalSocket.isSequential(self)->bool",
    "PySide6.QtNetwork.QLocalSocket.isValid(self)->bool",
    "PySide6.QtNetwork.QLocalSocket.open(self,openMode:PySide6.QtCore.QIODeviceBase.OpenMode=QIODeviceBase.OpenModeFlag.ReadWrite)->bool",
    "PySide6.QtNetwork.QLocalSocket.readBufferSize(self)->qint64",
    "PySide6.QtNetwork.QLocalSocket.readData(self,arg__1:char*,arg__2:qint64)->PyObject",
    "PySide6.QtNetwork.QLocalSocket.serverName(self)->QString",
    "PySide6.QtNetwork.QLocalSocket.setReadBufferSize(self,size:qint64)",
    "PySide6.QtNetwork.QLocalSocket.setServerName(self,name:QString)",
    "PySide6.QtNetwork.QLocalSocket.setSocketDescriptor(self,socketDescriptor:qintptr,socketState:PySide6.QtNetwork.QLocalSocket.LocalSocketState=QLocalSocket.LocalSocketState.ConnectedState,openMode:PySide6.QtCore.QIODeviceBase.OpenMode=QIODeviceBase.OpenModeFlag.ReadWrite)->bool",
    "PySide6.QtNetwork.QLocalSocket.setSocketOptions(self,option:PySide6.QtNetwork.QLocalSocket.SocketOptions)",
    "PySide6.QtNetwork.QLocalSocket.skipData(self,maxSize:qint64)->qint64",
    "PySide6.QtNetwork.QLocalSocket.socketDescriptor(self)->qintptr",
    "PySide6.QtNetwork.QLocalSocket.socketOptions(self)->PySide6.QtNetwork.QLocalSocket.SocketOptions",
    "PySide6.QtNetwork.QLocalSocket.state(self)->PySide6.QtNetwork.QLocalSocket.LocalSocketState",
    "PySide6.QtNetwork.QLocalSocket.waitForBytesWritten(self,msecs:int=30000)->bool",
    "PySide6.QtNetwork.QLocalSocket.waitForConnected(self,msecs:int=30000)->bool",
    "PySide6.QtNetwork.QLocalSocket.waitForDisconnected(self,msecs:int=30000)->bool",
    "PySide6.QtNetwork.QLocalSocket.waitForReadyRead(self,msecs:int=30000)->bool",
    "PySide6.QtNetwork.QLocalSocket.writeData(self,arg__1:char*,arg__2:qint64)->qint64",
    nullptr}; // Sentinel

void init_QLocalSocket(PyObject *module)
{
    _Sbk_QLocalSocket_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QLocalSocket",
        "QLocalSocket*",
        &Sbk_QLocalSocket_spec,
        &Shiboken::callCppDestructor< ::QLocalSocket >,
        SbkPySide6_QtCoreTypes[SBK_QIODEVICE_IDX],
        0,
        0);
    auto *pyType = Sbk_QLocalSocket_TypeF(); // references _Sbk_QLocalSocket_Type
    InitSignatureStrings(pyType, QLocalSocket_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QLocalSocket_Type), Sbk_QLocalSocket_PropertyStrings);
    SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_IDX]
        = Sbk_QLocalSocket_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QLocalSocket_TypeF(),
        QLocalSocket_PythonToCpp_QLocalSocket_PTR,
        is_QLocalSocket_PythonToCpp_QLocalSocket_PTR_Convertible,
        QLocalSocket_PTR_CppToPython_QLocalSocket);

    Shiboken::Conversions::registerConverterName(converter, "QLocalSocket");
    Shiboken::Conversions::registerConverterName(converter, "QLocalSocket*");
    Shiboken::Conversions::registerConverterName(converter, "QLocalSocket&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::QLocalSocket).name());
    Shiboken::Conversions::registerConverterName(converter, typeid(::QLocalSocketWrapper).name());


    MultipleInheritanceInitFunction func = Shiboken::ObjectType::getMultipleInheritanceFunction(SbkPySide6_QtCoreTypes[SBK_QIODEVICE_IDX]);
    Shiboken::ObjectType::setMultipleInheritanceFunction(Sbk_QLocalSocket_TypeF(), func);
    Shiboken::ObjectType::setCastFunction(Sbk_QLocalSocket_TypeF(), &Sbk_QLocalSocketSpecialCastFunction);
    Shiboken::ObjectType::setTypeDiscoveryFunctionV2(Sbk_QLocalSocket_TypeF(), &Sbk_QLocalSocket_typeDiscovery);

    // Initialization of enums.

    // Initialization of enum 'LocalSocketError'.
    SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QLocalSocket_TypeF(),
        "LocalSocketError",
        "2:PySide6.QtNetwork.QLocalSocket.LocalSocketError",
        "QLocalSocket::LocalSocketError");
    if (!SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "ConnectionRefusedError", (long) QLocalSocket::LocalSocketError::ConnectionRefusedError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "PeerClosedError", (long) QLocalSocket::LocalSocketError::PeerClosedError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "ServerNotFoundError", (long) QLocalSocket::LocalSocketError::ServerNotFoundError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "SocketAccessError", (long) QLocalSocket::LocalSocketError::SocketAccessError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "SocketResourceError", (long) QLocalSocket::LocalSocketError::SocketResourceError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "SocketTimeoutError", (long) QLocalSocket::LocalSocketError::SocketTimeoutError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "DatagramTooLargeError", (long) QLocalSocket::LocalSocketError::DatagramTooLargeError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "ConnectionError", (long) QLocalSocket::LocalSocketError::ConnectionError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "UnsupportedSocketOperationError", (long) QLocalSocket::LocalSocketError::UnsupportedSocketOperationError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "UnknownSocketError", (long) QLocalSocket::LocalSocketError::UnknownSocketError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
        Sbk_QLocalSocket_TypeF(), "OperationError", (long) QLocalSocket::LocalSocketError::OperationError))
        return;
    // Register converter for enum 'QLocalSocket::LocalSocketError'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX],
            QLocalSocket_LocalSocketError_CppToPython_QLocalSocket_LocalSocketError);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLocalSocket_LocalSocketError_PythonToCpp_QLocalSocket_LocalSocketError,
            is_QLocalSocket_LocalSocketError_PythonToCpp_QLocalSocket_LocalSocketError_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETERROR_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QLocalSocket::LocalSocketError");
        Shiboken::Conversions::registerConverterName(converter, "LocalSocketError");
    }
    // End of 'LocalSocketError' enum.

    // Initialization of enum 'LocalSocketState'.
    SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QLocalSocket_TypeF(),
        "LocalSocketState",
        "2:PySide6.QtNetwork.QLocalSocket.LocalSocketState",
        "QLocalSocket::LocalSocketState");
    if (!SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX],
        Sbk_QLocalSocket_TypeF(), "UnconnectedState", (long) QLocalSocket::LocalSocketState::UnconnectedState))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX],
        Sbk_QLocalSocket_TypeF(), "ConnectingState", (long) QLocalSocket::LocalSocketState::ConnectingState))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX],
        Sbk_QLocalSocket_TypeF(), "ConnectedState", (long) QLocalSocket::LocalSocketState::ConnectedState))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX],
        Sbk_QLocalSocket_TypeF(), "ClosingState", (long) QLocalSocket::LocalSocketState::ClosingState))
        return;
    // Register converter for enum 'QLocalSocket::LocalSocketState'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX],
            QLocalSocket_LocalSocketState_CppToPython_QLocalSocket_LocalSocketState);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLocalSocket_LocalSocketState_PythonToCpp_QLocalSocket_LocalSocketState,
            is_QLocalSocket_LocalSocketState_PythonToCpp_QLocalSocket_LocalSocketState_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_LOCALSOCKETSTATE_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QLocalSocket::LocalSocketState");
        Shiboken::Conversions::registerConverterName(converter, "LocalSocketState");
    }
    // End of 'LocalSocketState' enum.

    // Initialization of enum 'SocketOption'.
    SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX] = PySide::QFlags::create("2:PySide6.QtNetwork.QLocalSocket.SocketOptions", SbkPySide6_QtNetwork_QLocalSocket_SocketOption_number_slots);
    SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QLocalSocket_TypeF(),
        "SocketOption",
        "2:PySide6.QtNetwork.QLocalSocket.SocketOption",
        "QLocalSocket::SocketOption",
        SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX]);
    if (!SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX],
        Sbk_QLocalSocket_TypeF(), "NoOptions", (long) QLocalSocket::SocketOption::NoOptions))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX],
        Sbk_QLocalSocket_TypeF(), "AbstractNamespaceOption", (long) QLocalSocket::SocketOption::AbstractNamespaceOption))
        return;
    // Register converter for enum 'QLocalSocket::SocketOption'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX],
            QLocalSocket_SocketOption_CppToPython_QLocalSocket_SocketOption);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLocalSocket_SocketOption_PythonToCpp_QLocalSocket_SocketOption,
            is_QLocalSocket_SocketOption_PythonToCpp_QLocalSocket_SocketOption_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtNetworkTypes[SBK_QLOCALSOCKET_SOCKETOPTION_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QLocalSocket::SocketOption");
        Shiboken::Conversions::registerConverterName(converter, "SocketOption");
    }
    // Register converter for flag 'QFlags<QLocalSocket::SocketOption>'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX],
            QFlags_QLocalSocket_SocketOption__CppToPython_QFlags_QLocalSocket_SocketOption_);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLocalSocket_SocketOption_PythonToCpp_QFlags_QLocalSocket_SocketOption_,
            is_QLocalSocket_SocketOption_PythonToCpp_QFlags_QLocalSocket_SocketOption__Convertible);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QFlags_QLocalSocket_SocketOption__PythonToCpp_QFlags_QLocalSocket_SocketOption_,
            is_QFlags_QLocalSocket_SocketOption__PythonToCpp_QFlags_QLocalSocket_SocketOption__Convertible);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            number_PythonToCpp_QFlags_QLocalSocket_SocketOption_,
            is_number_PythonToCpp_QFlags_QLocalSocket_SocketOption__Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtNetworkTypes[SBK_QFLAGS_QLOCALSOCKET_SOCKETOPTION_IDX], converter, true);
        Shiboken::Conversions::registerConverterName(converter, "QLocalSocket::SocketOptions");
        Shiboken::Conversions::registerConverterName(converter, "SocketOptions");
        Shiboken::Conversions::registerConverterName(converter, "QFlags<QLocalSocket::SocketOption>");
    }
    // End of 'SocketOption' enum/flags.

    PySide::Signal::registerSignals(Sbk_QLocalSocket_TypeF(), &::QLocalSocket::staticMetaObject);
    qRegisterMetaType< ::QLocalSocket::LocalSocketError >("QLocalSocket::LocalSocketError");
    qRegisterMetaType< ::QLocalSocket::LocalSocketState >("QLocalSocket::LocalSocketState");
    qRegisterMetaType< ::QLocalSocket::SocketOption >("QLocalSocket::SocketOption");
    qRegisterMetaType< ::QLocalSocket::SocketOptions >("QLocalSocket::SocketOptions");
    Shiboken::ObjectType::setSubTypeInitHook(Sbk_QLocalSocket_TypeF(), &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(Sbk_QLocalSocket_TypeF(), &::QLocalSocket::staticMetaObject, sizeof(QLocalSocketWrapper));
}
