summaryrefslogtreecommitdiff
path: root/main.cxx
diff options
context:
space:
mode:
authorErik Prabowo Kamal <erik@darapsa.co.id>2019-08-29 15:30:00 +0800
committerErik Prabowo Kamal <erik@darapsa.co.id>2019-08-29 15:30:00 +0800
commitc8891b50d1f30c7c07bf96f8eaf2e1002ce573b8 (patch)
tree6e3023aa0b11da7a0ccdb00c33d911e4a5aa3d69 /main.cxx
parent938ea55a0a272b6fd1e35ee383c1f444cdbebf05 (diff)
Set up a way for the thread to quit
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/main.cxx b/main.cxx
index 5f0e13d..0b52736 100644
--- a/main.cxx
+++ b/main.cxx
@@ -1,8 +1,7 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
-#include <QThread>
#include "user.hxx"
-#include "worker.hxx"
+#include "controller.hxx"
int main(int argc, char* argv[])
{
@@ -10,10 +9,6 @@ int main(int argc, char* argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
- Worker worker{};
- QThread thread;
- worker.moveToThread(&thread);
-
qmlRegisterSingletonType<User>("id.co.darapsa.kelakon.user", 0, 1, "User", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* {
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
@@ -23,7 +18,7 @@ int main(int argc, char* argv[])
});
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
- thread.start();
+ Controller controller{};
return app.exec();
}