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

// module include
#include "pyside6_qtcore_python.h"

// main header
#include "qprocessenvironment_wrapper.h"

// inner classes

// Extra includes
#include <qprocess.h>


#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;
}


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

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

    ::QProcessEnvironment *cptr{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.__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_UnpackTuple(args, "QProcessEnvironment", 0, 1, &(pyArgs[0])))
        return -1;


    // Overloaded function decisor
    // 0: QProcessEnvironment::QProcessEnvironment()
    // 1: QProcessEnvironment::QProcessEnvironment(QProcessEnvironment)
    if (numArgs == 0) {
        overloadId = 0; // QProcessEnvironment()
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], (pyArgs[0])))) {
        overloadId = 1; // QProcessEnvironment(QProcessEnvironment)
    }

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

    // Call function/method
    switch (overloadId) {
        case 0: // QProcessEnvironment()
        {

            if (!PyErr_Occurred()) {
                // QProcessEnvironment()
                cptr = new ::QProcessEnvironment();
            }
            break;
        }
        case 1: // QProcessEnvironment(const QProcessEnvironment & other)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::QProcessEnvironment cppArg0_local;
            ::QProcessEnvironment *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (!PyErr_Occurred()) {
                // QProcessEnvironment(QProcessEnvironment)
                cptr = new ::QProcessEnvironment(*cppArg0);
            }
            break;
        }
    }

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

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


    return 1;

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

static PyObject *Sbk_QProcessEnvironmentFunc_clear(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.clear";
    SBK_UNUSED(fullName)

    // Call function/method
    {

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

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

static PyObject *Sbk_QProcessEnvironmentFunc_contains(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.contains";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QProcessEnvironment::contains(QString)const->bool
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) {
        overloadId = 0; // contains(QString)const
    }

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

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

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

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

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

static PyObject *Sbk_QProcessEnvironmentFunc_insert(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.insert";
    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, "insert", 1, 2, &(pyArgs[0]), &(pyArgs[1])))
        return {};


    // Overloaded function decisor
    // 0: QProcessEnvironment::insert(QProcessEnvironment)
    // 1: QProcessEnvironment::insert(QString,QString)
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) {
        overloadId = 1; // insert(QString,QString)
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], (pyArgs[0])))) {
        overloadId = 0; // insert(QProcessEnvironment)
    }

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

    // Call function/method
    switch (overloadId) {
        case 0: // insert(const QProcessEnvironment & e)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return {};
            ::QProcessEnvironment cppArg0_local;
            ::QProcessEnvironment *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (!PyErr_Occurred()) {
                // insert(QProcessEnvironment)
                cppSelf->insert(*cppArg0);
            }
            break;
        }
        case 1: // insert(const QString & name, const QString & value)
        {
            ::QString cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);
            ::QString cppArg1;
            pythonToCpp[1](pyArgs[1], &cppArg1);

            if (!PyErr_Occurred()) {
                // insert(QString,QString)
                cppSelf->insert(cppArg0, cppArg1);
            }
            break;
        }
    }

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

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

static PyObject *Sbk_QProcessEnvironmentFunc_isEmpty(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.isEmpty";
    SBK_UNUSED(fullName)

    // Call function/method
    {

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

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

static PyObject *Sbk_QProcessEnvironmentFunc_keys(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.keys";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // keys()const
            QStringList cppResult = const_cast<const ::QProcessEnvironment *>(cppSelf)->keys();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult);
        }
    }

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

static PyObject *Sbk_QProcessEnvironmentFunc_remove(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.remove";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

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

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

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

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

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

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

static PyObject *Sbk_QProcessEnvironmentFunc_swap(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.swap";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QProcessEnvironment::swap(QProcessEnvironment&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], (pyArg)))) {
        overloadId = 0; // swap(QProcessEnvironment&)
    }

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

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QProcessEnvironment cppArg0_local;
        ::QProcessEnvironment *cppArg0 = &cppArg0_local;
        if (pythonToCpp.isValue())
            pythonToCpp(pyArg, &cppArg0_local);
        else
            pythonToCpp(pyArg, &cppArg0);


        if (!PyErr_Occurred()) {
            // swap(QProcessEnvironment&)
            cppSelf->swap(*cppArg0);
        }
    }

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

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

static PyObject *Sbk_QProcessEnvironmentFunc_systemEnvironment(PyObject *self)
{
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.systemEnvironment";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // systemEnvironment()
            QProcessEnvironment cppResult = ::QProcessEnvironment::systemEnvironment();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], &cppResult);
        }
    }

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

static PyObject *Sbk_QProcessEnvironmentFunc_toStringList(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.toStringList";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // toStringList()const
            QStringList cppResult = const_cast<const ::QProcessEnvironment *>(cppSelf)->toStringList();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult);
        }
    }

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

static PyObject *Sbk_QProcessEnvironmentFunc_value(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtCore.QProcessEnvironment.value";
    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_QProcessEnvironmentFunc_value_TypeError;
    } else if (numArgs < 1) {
        static PyObject *const too_few = Shiboken::String::createStaticString("<");
        errInfo.reset(too_few);
        Py_INCREF(errInfo.object());
        goto Sbk_QProcessEnvironmentFunc_value_TypeError;
    }

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


    // Overloaded function decisor
    // 0: QProcessEnvironment::value(QString,QString)const->QString
    if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 0; // value(QString,QString)const
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) {
            overloadId = 0; // value(QString,QString)const
        }
    }

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

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_defaultValue = Shiboken::String::createStaticString("defaultValue");
            if (PyDict_Contains(kwds, key_defaultValue)) {
                value = PyDict_GetItem(kwds, key_defaultValue);
                if (value && pyArgs[1]) {
                    errInfo.reset(key_defaultValue);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QProcessEnvironmentFunc_value_TypeError;
                }
                if (value) {
                    pyArgs[1] = value;
                    if (!(pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1]))))
                        goto Sbk_QProcessEnvironmentFunc_value_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_defaultValue);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QProcessEnvironmentFunc_value_TypeError;
            }
        }
        ::QString cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        ::QString cppArg1 = QString();
        if (pythonToCpp[1])
            pythonToCpp[1](pyArgs[1], &cppArg1);

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

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

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

static PyObject *Sbk_QProcessEnvironment___copy__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto &cppSelf = *reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], &cppSelf);
    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}


static const char *Sbk_QProcessEnvironment_PropertyStrings[] = {
    nullptr // Sentinel
};

static PyMethodDef Sbk_QProcessEnvironment_methods[] = {
    {"clear", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_clear), METH_NOARGS},
    {"contains", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_contains), METH_O},
    {"insert", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_insert), METH_VARARGS},
    {"isEmpty", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_isEmpty), METH_NOARGS},
    {"keys", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_keys), METH_NOARGS},
    {"remove", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_remove), METH_O},
    {"swap", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_swap), METH_O},
    {"systemEnvironment", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_systemEnvironment), METH_NOARGS|METH_STATIC},
    {"toStringList", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_toStringList), METH_NOARGS},
    {"value", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironmentFunc_value), METH_VARARGS|METH_KEYWORDS},

    {"__copy__", reinterpret_cast<PyCFunction>(Sbk_QProcessEnvironment___copy__), METH_NOARGS},
    {nullptr, nullptr} // Sentinel
};

// Rich comparison
static PyObject * Sbk_QProcessEnvironment_richcompare(PyObject *self, PyObject *pyArg, int op)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto &cppSelf = *reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    switch (op) {
        case Py_NE:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], (pyArg)))) {
                // operator!=(const QProcessEnvironment & other) const
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::QProcessEnvironment cppArg0_local;
                ::QProcessEnvironment *cppArg0 = &cppArg0_local;
                if (pythonToCpp.isValue())
                    pythonToCpp(pyArg, &cppArg0_local);
                else
                    pythonToCpp(pyArg, &cppArg0);

                bool cppResult = cppSelf !=(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            } else {
                pyResult = Py_True;
                Py_INCREF(pyResult);
            }

            break;
        case Py_EQ:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], (pyArg)))) {
                // operator==(const QProcessEnvironment & other) const
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::QProcessEnvironment cppArg0_local;
                ::QProcessEnvironment *cppArg0 = &cppArg0_local;
                if (pythonToCpp.isValue())
                    pythonToCpp(pyArg, &cppArg0_local);
                else
                    pythonToCpp(pyArg, &cppArg0);

                bool cppResult = cppSelf ==(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            } else {
                pyResult = Py_False;
                Py_INCREF(pyResult);
            }

            break;
        default:
            // PYSIDE-74: By default, we redirect to object's tp_richcompare (which is `==`, `!=`).
            return FallbackRichCompare(self, pyArg, op);
            goto Sbk_QProcessEnvironment_RichComparison_TypeError;
    }

    if (pyResult && !PyErr_Occurred())
        return pyResult;
    Sbk_QProcessEnvironment_RichComparison_TypeError:
    PyErr_SetString(PyExc_NotImplementedError, "operator not implemented.");
    return {};

}

} // extern "C"

static int Sbk_QProcessEnvironment_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QProcessEnvironment_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QProcessEnvironment_Type = nullptr;
static PyTypeObject *Sbk_QProcessEnvironment_TypeF(void)
{
    return _Sbk_QProcessEnvironment_Type;
}

static PyType_Slot Sbk_QProcessEnvironment_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,    nullptr},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QProcessEnvironment_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QProcessEnvironment_clear)},
    {Py_tp_richcompare, reinterpret_cast<void *>(Sbk_QProcessEnvironment_richcompare)},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QProcessEnvironment_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_QProcessEnvironment_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    {0, nullptr}
};
static PyType_Spec Sbk_QProcessEnvironment_spec = {
    "2:PySide6.QtCore.QProcessEnvironment",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QProcessEnvironment_slots
};

} //extern "C"


// Type conversion functions.

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void QProcessEnvironment_PythonToCpp_QProcessEnvironment_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QProcessEnvironment_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_QProcessEnvironment_PythonToCpp_QProcessEnvironment_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QProcessEnvironment_TypeF())))
        return QProcessEnvironment_PythonToCpp_QProcessEnvironment_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *QProcessEnvironment_PTR_CppToPython_QProcessEnvironment(const void *cppIn)
{
    auto pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn));
    if (pyOut) {
        Py_INCREF(pyOut);
        return pyOut;
    }
    bool changedTypeName = false;
    auto tCppIn = reinterpret_cast<const ::QProcessEnvironment *>(cppIn);
    const char *typeName = typeid(*tCppIn).name();
    auto sbkType = Shiboken::ObjectType::typeForTypeName(typeName);
    if (sbkType && Shiboken::ObjectType::hasSpecialCastFunction(sbkType)) {
        typeName = typeNameOf(tCppIn);
        changedTypeName = true;
    }
    PyObject *result = Shiboken::Object::newObject(Sbk_QProcessEnvironment_TypeF(), const_cast<void *>(cppIn), false, /* exactType */ changedTypeName, typeName);
    if (changedTypeName)
        delete [] typeName;
    return result;
}

// C++ to Python copy conversion.
static PyObject *QProcessEnvironment_COPY_CppToPython_QProcessEnvironment(const void *cppIn)
{
    return Shiboken::Object::newObject(Sbk_QProcessEnvironment_TypeF(), new ::QProcessEnvironment(*reinterpret_cast<const ::QProcessEnvironment *>(cppIn)), true, true);
}

// Python to C++ copy conversion.
static void QProcessEnvironment_PythonToCpp_QProcessEnvironment_COPY(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QProcessEnvironment *>(cppOut) = *reinterpret_cast< ::QProcessEnvironment *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX], reinterpret_cast<SbkObject *>(pyIn)));
}
static PythonToCppFunc is_QProcessEnvironment_PythonToCpp_QProcessEnvironment_COPY_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QProcessEnvironment_TypeF())))
        return QProcessEnvironment_PythonToCpp_QProcessEnvironment_COPY;
    return {};
}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QProcessEnvironment_SignatureStrings[] = {
    "1:PySide6.QtCore.QProcessEnvironment(self)",
    "0:PySide6.QtCore.QProcessEnvironment(self,other:PySide6.QtCore.QProcessEnvironment)",
    "PySide6.QtCore.QProcessEnvironment.clear(self)",
    "PySide6.QtCore.QProcessEnvironment.contains(self,name:QString)->bool",
    "1:PySide6.QtCore.QProcessEnvironment.insert(self,e:PySide6.QtCore.QProcessEnvironment)",
    "0:PySide6.QtCore.QProcessEnvironment.insert(self,name:QString,value:QString)",
    "PySide6.QtCore.QProcessEnvironment.isEmpty(self)->bool",
    "PySide6.QtCore.QProcessEnvironment.keys(self)->QStringList",
    "PySide6.QtCore.QProcessEnvironment.remove(self,name:QString)",
    "PySide6.QtCore.QProcessEnvironment.swap(self,other:PySide6.QtCore.QProcessEnvironment)",
    "PySide6.QtCore.QProcessEnvironment.systemEnvironment()->PySide6.QtCore.QProcessEnvironment",
    "PySide6.QtCore.QProcessEnvironment.toStringList(self)->QStringList",
    "PySide6.QtCore.QProcessEnvironment.value(self,name:QString,defaultValue:QString=QString())->QString",
    "PySide6.QtCore.QProcessEnvironment.__copy__()",
    nullptr}; // Sentinel

void init_QProcessEnvironment(PyObject *module)
{
    _Sbk_QProcessEnvironment_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QProcessEnvironment",
        "QProcessEnvironment",
        &Sbk_QProcessEnvironment_spec,
        &Shiboken::callCppDestructor< ::QProcessEnvironment >,
        0,
        0,
        0);
    auto *pyType = Sbk_QProcessEnvironment_TypeF(); // references _Sbk_QProcessEnvironment_Type
    InitSignatureStrings(pyType, QProcessEnvironment_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QProcessEnvironment_Type), Sbk_QProcessEnvironment_PropertyStrings);
    SbkPySide6_QtCoreTypes[SBK_QPROCESSENVIRONMENT_IDX]
        = Sbk_QProcessEnvironment_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QProcessEnvironment_TypeF(),
        QProcessEnvironment_PythonToCpp_QProcessEnvironment_PTR,
        is_QProcessEnvironment_PythonToCpp_QProcessEnvironment_PTR_Convertible,
        QProcessEnvironment_PTR_CppToPython_QProcessEnvironment,
        QProcessEnvironment_COPY_CppToPython_QProcessEnvironment);

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

    // Add Python to C++ copy (value, not pointer neither reference) conversion to type converter.
    Shiboken::Conversions::addPythonToCppValueConversion(converter,
        QProcessEnvironment_PythonToCpp_QProcessEnvironment_COPY,
        is_QProcessEnvironment_PythonToCpp_QProcessEnvironment_COPY_Convertible);

    qRegisterMetaType< ::QProcessEnvironment >("QProcessEnvironment");
}
