From 0311bed34d80abe518f11838271e39d1615ebf67 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Tue, 3 Feb 2026 16:19:53 +0100 Subject: Import xxcc.{cpp,h} as yc.{cpp,h} --- main.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index c0aab91..fd9a56e 100644 --- a/main.cpp +++ b/main.cpp @@ -4,28 +4,19 @@ #include #include #include -#include "test.h" +#include "yc.h" int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - QQmlApplicationEngine engine("qrc:/org/yachat/lib/Main.qml"); + QQmlApplicationEngine engine("qrc:/org/yachat/app/Main.qml"); -#if 0 - qRegisterMetaType("Test"); - - qmlRegisterType("org.yachat.lib", 1, 0, "Test"); -#endif -#if 1 - qmlRegisterSingletonType("org.yachat.lib", 1, 0, "Test", + qmlRegisterSingletonType("org.yachat.app", 1, 0, "Yc", [](QQmlEngine *, QJSEngine *) -> QObject * { - return std::make_unique().release(); + return std::make_unique().release(); } ); -#else - Test test; - engine.rootContext()->setContextProperty("Test", &test); -#endif + return app.exec(); } -- cgit v1.2.3