summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
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();
}