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

#include "../../../../discover-6.7.3/libdiscover/ReviewsBackend/ReviewsModel.h"
#include <QtCore/qmetatype.h>
#include <QtCore/QList>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'ReviewsModel.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.1. 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_ZN12ReviewsModelE_t {};
} // unnamed namespace

template <> constexpr inline auto ReviewsModel::qt_create_metaobjectdata<qt_meta_tag_ZN12ReviewsModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "ReviewsModel",
        "rowsChanged",
        "",
        "resourceChanged",
        "fetchingChanged",
        "fetching",
        "preferredSortRoleChanged",
        "deleteReview",
        "row",
        "flagReview",
        "reason",
        "text",
        "markUseful",
        "useful",
        "addReviews",
        "QList<ReviewPtr>",
        "reviews",
        "canFetchMore",
        "restartFetching",
        "backend",
        "AbstractReviewsBackend*",
        "resource",
        "AbstractResource*",
        "count",
        "preferredSortRole",
        "Roles",
        "ShouldShow",
        "Reviewer",
        "CreationDate",
        "UsefulnessTotal",
        "UsefulnessFavorable",
        "WilsonScore",
        "UsefulChoice",
        "Rating",
        "Summary",
        "Depth",
        "PackageVersion",
        "UserChoice",
        "None",
        "Yes",
        "No"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'rowsChanged'
        QtMocHelpers::SignalData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'resourceChanged'
        QtMocHelpers::SignalData<void()>(3, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'fetchingChanged'
        QtMocHelpers::SignalData<void(bool)>(4, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Bool, 5 },
        }}),
        // Signal 'preferredSortRoleChanged'
        QtMocHelpers::SignalData<void()>(6, 2, QMC::AccessPublic, QMetaType::Void),
        // Slot 'deleteReview'
        QtMocHelpers::SlotData<void(int)>(7, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 8 },
        }}),
        // Slot 'flagReview'
        QtMocHelpers::SlotData<void(int, const QString &, const QString &)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 8 }, { QMetaType::QString, 10 }, { QMetaType::QString, 11 },
        }}),
        // Slot 'markUseful'
        QtMocHelpers::SlotData<void(int, bool)>(12, 2, QMC::AccessPublic, QMetaType::Void, {{
            { QMetaType::Int, 8 }, { QMetaType::Bool, 13 },
        }}),
        // Slot 'addReviews'
        QtMocHelpers::SlotData<void(const QVector<ReviewPtr> &, bool)>(14, 2, QMC::AccessPrivate, QMetaType::Void, {{
            { 0x80000000 | 15, 16 }, { QMetaType::Bool, 17 },
        }}),
        // Slot 'restartFetching'
        QtMocHelpers::SlotData<void()>(18, 2, QMC::AccessPrivate, QMetaType::Void),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'backend'
        QtMocHelpers::PropertyData<AbstractReviewsBackend*>(19, 0x80000000 | 20, QMC::DefaultPropertyFlags | QMC::EnumOrFlag, 1),
        // property 'resource'
        QtMocHelpers::PropertyData<AbstractResource*>(21, 0x80000000 | 22, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet, 1),
        // property 'count'
        QtMocHelpers::PropertyData<int>(23, QMetaType::Int, QMC::DefaultPropertyFlags, 0),
        // property 'fetching'
        QtMocHelpers::PropertyData<bool>(5, QMetaType::Bool, QMC::DefaultPropertyFlags, 2),
        // property 'preferredSortRole'
        QtMocHelpers::PropertyData<QString>(24, QMetaType::QString, QMC::DefaultPropertyFlags | QMC::Writable | QMC::StdCppSet, 3),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Roles'
        QtMocHelpers::EnumData<enum Roles>(25, 25, QMC::EnumFlags{}).add({
            {   26, Roles::ShouldShow },
            {   27, Roles::Reviewer },
            {   28, Roles::CreationDate },
            {   29, Roles::UsefulnessTotal },
            {   30, Roles::UsefulnessFavorable },
            {   31, Roles::WilsonScore },
            {   32, Roles::UsefulChoice },
            {   33, Roles::Rating },
            {   34, Roles::Summary },
            {   35, Roles::Depth },
            {   36, Roles::PackageVersion },
        }),
        // enum 'UserChoice'
        QtMocHelpers::EnumData<enum UserChoice>(37, 37, QMC::EnumFlags{}).add({
            {   38, UserChoice::None },
            {   39, UserChoice::Yes },
            {   40, UserChoice::No },
        }),
    };
    return QtMocHelpers::metaObjectData<ReviewsModel, qt_meta_tag_ZN12ReviewsModelE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject ReviewsModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12ReviewsModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN12ReviewsModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN12ReviewsModelE_t>.metaTypes,
    nullptr
} };

void ReviewsModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<ReviewsModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->rowsChanged(); break;
        case 1: _t->resourceChanged(); break;
        case 2: _t->fetchingChanged((*reinterpret_cast<std::add_pointer_t<bool>>(_a[1]))); break;
        case 3: _t->preferredSortRoleChanged(); break;
        case 4: _t->deleteReview((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
        case 5: _t->flagReview((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[3]))); break;
        case 6: _t->markUseful((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[2]))); break;
        case 7: _t->addReviews((*reinterpret_cast<std::add_pointer_t<QList<ReviewPtr>>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<bool>>(_a[2]))); break;
        case 8: _t->restartFetching(); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (ReviewsModel::*)()>(_a, &ReviewsModel::rowsChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (ReviewsModel::*)()>(_a, &ReviewsModel::resourceChanged, 1))
            return;
        if (QtMocHelpers::indexOfMethod<void (ReviewsModel::*)(bool )>(_a, &ReviewsModel::fetchingChanged, 2))
            return;
        if (QtMocHelpers::indexOfMethod<void (ReviewsModel::*)()>(_a, &ReviewsModel::preferredSortRoleChanged, 3))
            return;
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<AbstractReviewsBackend**>(_v) = _t->backend(); break;
        case 1: *reinterpret_cast<AbstractResource**>(_v) = _t->resource(); break;
        case 2: *reinterpret_cast<int*>(_v) = _t->rowCount(); break;
        case 3: *reinterpret_cast<bool*>(_v) = _t->isFetching(); break;
        case 4: *reinterpret_cast<QString*>(_v) = _t->preferredSortRole(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 1: _t->setResource(*reinterpret_cast<AbstractResource**>(_v)); break;
        case 4: _t->setPreferredSortRole(*reinterpret_cast<QString*>(_v)); break;
        default: break;
        }
    }
}

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

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

int ReviewsModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QAbstractListModel::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 9)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 9;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 9)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 9;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 5;
    }
    return _id;
}

// SIGNAL 0
void ReviewsModel::rowsChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}

// SIGNAL 1
void ReviewsModel::resourceChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}

// SIGNAL 2
void ReviewsModel::fetchingChanged(bool _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1);
}

// SIGNAL 3
void ReviewsModel::preferredSortRoleChanged()
{
    QMetaObject::activate(this, &staticMetaObject, 3, nullptr);
}
QT_WARNING_POP
