summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-02-03 16:19:53 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2026-02-03 16:26:52 +0100
commit0311bed34d80abe518f11838271e39d1615ebf67 (patch)
treed89854d97ba7b326909e10027d863d677dc5b15d /main.cpp
parentfdb64c59865e4db76addfb8222f6421443e25240 (diff)
downloadyachat6-0311bed34d80abe518f11838271e39d1615ebf67.tar.gz
Import xxcc.{cpp,h} as yc.{cpp,h}
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/main.cpp b/main.cpp
index c0aab91..fd9a56e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,28 +4,19 @@
#include <QObject>
#include <QVariant>
#include <memory>
-#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>("Test");
-
- qmlRegisterType<Test>("org.yachat.lib", 1, 0, "Test");
-#endif
-#if 1
- qmlRegisterSingletonType<Test>("org.yachat.lib", 1, 0, "Test",
+ qmlRegisterSingletonType<Yc>("org.yachat.app", 1, 0, "Yc",
[](QQmlEngine *, QJSEngine *) -> QObject *
{
- return std::make_unique<Test>().release();
+ return std::make_unique<Yc>().release();
}
);
-#else
- Test test;
- engine.rootContext()->setContextProperty("Test", &test);
-#endif
+
return app.exec();
}