/****************************************************************************
** Meta object code from reading C++ file 'ScriptUploader.h'
**
** Created by: The Qt Meta Object Compiler version 69 (Qt 6.10.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#include "../../../../ksnip/src/backend/uploader/script/ScriptUploader.h"
#include <QtCore/qmetatype.h>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'ScriptUploader.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.10.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

#ifndef Q_CONSTINIT
#define Q_CONSTINIT
#endif

QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
namespace {
struct qt_meta_tag_ZN14ScriptUploaderE_t {};
} // unnamed namespace

template <> constexpr inline auto ScriptUploader::qt_create_metaobjectdata<qt_meta_tag_ZN14ScriptUploaderE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "ScriptUploader",
        "scriptFinished",
        "",
        "exitCode",
        "QProcess::ExitStatus",
        "exitStatus",
        "errorOccurred",
        "QProcess::ProcessError",
        "error",
        "saveImageLocally",
        "QImage",
        "image",
        "parseOutput",
        "output",
        "writeToConsole",
        "mapErrorTypeToStatus",
        "UploadStatus",
        "errorType",
        "handleSuccess",
        "handleError",
        "status",
        "stdErrOutput"
    };

    QtMocHelpers::UintData qt_methods {
        // Slot 'scriptFinished'
        QtMocHelpers::SlotData<void(int, QProcess::ExitStatus)>(1, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::Int, 3 }, { 0x80000000 | 4, 5 },
        }}),
        // Slot 'errorOccurred'
        QtMocHelpers::SlotData<void(QProcess::ProcessError)>(6, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 7, 8 },
        }}),
        // Slot 'saveImageLocally'
        QtMocHelpers::SlotData<bool(const QImage &)>(9, 2, QMC::AccessPrivate, QMetaType::Bool, {{
            { 0x80000000 | 10, 11 },
        }}),
        // Slot 'parseOutput'
        QtMocHelpers::SlotData<QString(const QString &) const>(12, 2, QMC::AccessPrivate, QMetaType::QString, {{
            { QMetaType::QString, 13 },
        }}),
        // Slot 'writeToConsole'
        QtMocHelpers::SlotData<void(const QString &) const>(14, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { QMetaType::QString, 13 },
        }}),
        // Slot 'mapErrorTypeToStatus'
        QtMocHelpers::SlotData<UploadStatus(QProcess::ProcessError) const>(15, 2, QMC::AccessPrivate, 0x80000000 | 16, {{
            { 0x80000000 | 7, 17 },
        }}),
        // Slot 'handleSuccess'
        QtMocHelpers::SlotData<void()>(18, 2, QMC::AccessPrivate, QMetaType::Void),
        // Slot 'handleError'
        QtMocHelpers::SlotData<void(const UploadStatus &, const QString &)>(19, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 16, 20 }, { QMetaType::QString, 21 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
    };
    return QtMocHelpers::metaObjectData<ScriptUploader, qt_meta_tag_ZN14ScriptUploaderE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject ScriptUploader::staticMetaObject = { {
    QMetaObject::SuperData::link<IScriptUploader::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14ScriptUploaderE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14ScriptUploaderE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN14ScriptUploaderE_t>.metaTypes,
    nullptr
} };

void ScriptUploader::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<ScriptUploader *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->scriptFinished((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QProcess::ExitStatus>>(_a[2]))); break;
        case 1: _t->errorOccurred((*reinterpret_cast<std::add_pointer_t<QProcess::ProcessError>>(_a[1]))); break;
        case 2: { bool _r = _t->saveImageLocally((*reinterpret_cast<std::add_pointer_t<QImage>>(_a[1])));
            if (_a[0]) *reinterpret_cast<bool*>(_a[0]) = std::move(_r); }  break;
        case 3: { QString _r = _t->parseOutput((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])));
            if (_a[0]) *reinterpret_cast<QString*>(_a[0]) = std::move(_r); }  break;
        case 4: _t->writeToConsole((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1]))); break;
        case 5: { UploadStatus _r = _t->mapErrorTypeToStatus((*reinterpret_cast<std::add_pointer_t<QProcess::ProcessError>>(_a[1])));
            if (_a[0]) *reinterpret_cast<UploadStatus*>(_a[0]) = std::move(_r); }  break;
        case 6: _t->handleSuccess(); break;
        case 7: _t->handleError((*reinterpret_cast<std::add_pointer_t<UploadStatus>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2]))); break;
        default: ;
        }
    }
}

const QMetaObject *ScriptUploader::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

void *ScriptUploader::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14ScriptUploaderE_t>.strings))
        return static_cast<void*>(this);
    return IScriptUploader::qt_metacast(_clname);
}

int ScriptUploader::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = IScriptUploader::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 8)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 8;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 8)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 8;
    }
    return _id;
}
QT_WARNING_POP
