/****************************************************************************
** Meta object code from reading C++ file 'quickitemsmodel.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 "../../../../../knewstuff-6.27.0/src/qtquick/quickitemsmodel.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 'quickitemsmodel.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_ZN10ItemsModelE_t {};
} // unnamed namespace

template <> constexpr inline auto ItemsModel::qt_create_metaobjectdata<qt_meta_tag_ZN10ItemsModelE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "ItemsModel",
        "engineChanged",
        "",
        "entryChanged",
        "KNSCore::Entry",
        "entry",
        "indexOfEntryId",
        "providerId",
        "entryId",
        "indexOfEntry",
        "e",
        "engine",
        "Engine*",
        "Roles",
        "NameRole",
        "UniqueIdRole",
        "CategoryRole",
        "HomepageRole",
        "AuthorRole",
        "LicenseRole",
        "ShortSummaryRole",
        "SummaryRole",
        "ChangelogRole",
        "VersionRole",
        "ReleaseDateRole",
        "UpdateVersionRole",
        "UpdateReleaseDateRole",
        "PayloadRole",
        "PreviewsSmallRole",
        "PreviewsRole",
        "InstalledFilesRole",
        "UnInstalledFilesRole",
        "RatingRole",
        "NumberOfCommentsRole",
        "DownloadCountRole",
        "NumberFansRole",
        "NumberKnowledgebaseEntriesRole",
        "KnowledgebaseLinkRole",
        "DownloadLinksRole",
        "DonationLinkRole",
        "ProviderIdRole",
        "SourceRole",
        "CommentsModelRole",
        "EntryRole",
        "LinkId",
        "AutoDetectLinkId",
        "FirstLinkId"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'engineChanged'
        QtMocHelpers::SignalData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
        // Signal 'entryChanged'
        QtMocHelpers::SignalData<void(const KNSCore::Entry &)>(3, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 4, 5 },
        }}),
        // Method 'indexOfEntryId'
        QtMocHelpers::MethodData<int(const QString &, const QString &)>(6, 2, QMC::AccessPublic, QMetaType::Int, {{
            { QMetaType::QString, 7 }, { QMetaType::QString, 8 },
        }}),
        // Method 'indexOfEntry'
        QtMocHelpers::MethodData<int(const KNSCore::Entry &)>(9, 2, QMC::AccessPublic, QMetaType::Int, {{
            { 0x80000000 | 4, 10 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
        // property 'engine'
        QtMocHelpers::PropertyData<Engine*>(11, 0x80000000 | 12, QMC::DefaultPropertyFlags | QMC::Writable | QMC::EnumOrFlag | QMC::StdCppSet | QMC::Required, 0),
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Roles'
        QtMocHelpers::EnumData<enum Roles>(13, 13, QMC::EnumFlags{}).add({
            {   14, Roles::NameRole },
            {   15, Roles::UniqueIdRole },
            {   16, Roles::CategoryRole },
            {   17, Roles::HomepageRole },
            {   18, Roles::AuthorRole },
            {   19, Roles::LicenseRole },
            {   20, Roles::ShortSummaryRole },
            {   21, Roles::SummaryRole },
            {   22, Roles::ChangelogRole },
            {   23, Roles::VersionRole },
            {   24, Roles::ReleaseDateRole },
            {   25, Roles::UpdateVersionRole },
            {   26, Roles::UpdateReleaseDateRole },
            {   27, Roles::PayloadRole },
            {   28, Roles::PreviewsSmallRole },
            {   29, Roles::PreviewsRole },
            {   30, Roles::InstalledFilesRole },
            {   31, Roles::UnInstalledFilesRole },
            {   32, Roles::RatingRole },
            {   33, Roles::NumberOfCommentsRole },
            {   34, Roles::DownloadCountRole },
            {   35, Roles::NumberFansRole },
            {   36, Roles::NumberKnowledgebaseEntriesRole },
            {   37, Roles::KnowledgebaseLinkRole },
            {   38, Roles::DownloadLinksRole },
            {   39, Roles::DonationLinkRole },
            {   40, Roles::ProviderIdRole },
            {   41, Roles::SourceRole },
            {   42, Roles::CommentsModelRole },
            {   43, Roles::EntryRole },
        }),
        // enum 'LinkId'
        QtMocHelpers::EnumData<enum LinkId>(44, 44, QMC::EnumFlags{}).add({
            {   45, LinkId::AutoDetectLinkId },
            {   46, LinkId::FirstLinkId },
        }),
    };
    return QtMocHelpers::metaObjectData<ItemsModel, qt_meta_tag_ZN10ItemsModelE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject ItemsModel::staticMetaObject = { {
    QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN10ItemsModelE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN10ItemsModelE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN10ItemsModelE_t>.metaTypes,
    nullptr
} };

void ItemsModel::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<ItemsModel *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->engineChanged(); break;
        case 1: _t->entryChanged((*reinterpret_cast<std::add_pointer_t<KNSCore::Entry>>(_a[1]))); break;
        case 2: { int _r = _t->indexOfEntryId((*reinterpret_cast<std::add_pointer_t<QString>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QString>>(_a[2])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        case 3: { int _r = _t->indexOfEntry((*reinterpret_cast<std::add_pointer_t<KNSCore::Entry>>(_a[1])));
            if (_a[0]) *reinterpret_cast<int*>(_a[0]) = std::move(_r); }  break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (ItemsModel::*)()>(_a, &ItemsModel::engineChanged, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (ItemsModel::*)(const KNSCore::Entry & )>(_a, &ItemsModel::entryChanged, 1))
            return;
    }
    if (_c == QMetaObject::RegisterPropertyMetaType) {
        switch (_id) {
        default: *reinterpret_cast<int*>(_a[0]) = -1; break;
        case 0:
            *reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< Engine* >(); break;
        }
    }
    if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast<Engine**>(_v) = _t->engine(); break;
        default: break;
        }
    }
    if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: _t->setEngine(*reinterpret_cast<Engine**>(_v)); break;
        default: break;
        }
    }
}

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

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

int ItemsModel::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 < 4)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 4;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 4)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 4;
    }
    if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
            || _c == QMetaObject::ResetProperty || _c == QMetaObject::BindableProperty
            || _c == QMetaObject::RegisterPropertyMetaType) {
        qt_static_metacall(this, _c, _id, _a);
        _id -= 1;
    }
    return _id;
}

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

// SIGNAL 1
void ItemsModel::entryChanged(const KNSCore::Entry & _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}
QT_WARNING_POP
