Files
logos-plugin-qt/cmake/LogosViewReplicaFactory.cpp.in
T

35 lines
1.1 KiB
Plaintext

// Auto-generated by logos_module(REP_FILE ...) — DO NOT EDIT.
#include "LogosViewReplicaFactory.h"
#include "rep_@LOGOS_REP_BASE@_replica.h"
#include <QCoreApplication>
#include <QRemoteObjectNode>
#include <QQmlEngine>
QObject* @LOGOS_FACTORY_CLASS@::acquire(QRemoteObjectNode* node)
{
return node->acquire<@LOGOS_REP_CLASS@Replica>();
}
const QMetaObject* @LOGOS_FACTORY_CLASS@::replicaMetaObject() const
{
return &@LOGOS_REP_CLASS@Replica::staticMetaObject;
}
// Register the replica's meta-object (and its Q_ENUMs) with QML at plugin
// load time. The URI and type name are baked in by CMake from the .rep file
// — no runtime virtuals required. qmlRegisterUncreatableMetaObject is a
// process-global registration, so a single call here is sufficient for every
// QQmlEngine instance in the host process.
namespace {
void registerQmlMetaObject()
{
qmlRegisterUncreatableMetaObject(
@LOGOS_REP_CLASS@Replica::staticMetaObject,
"@LOGOS_QML_URI@", 1, 0, "@LOGOS_QML_TYPE_NAME@",
QStringLiteral("Enum-only type"));
}
} // namespace
Q_COREAPP_STARTUP_FUNCTION(registerQmlMetaObject)