base viewmodel and interactions

This commit is contained in:
Andrew nuark G 2020-12-21 23:39:04 +07:00
parent 50aa95e659
commit d69b18f083
14 changed files with 228 additions and 77 deletions

View file

@ -7,13 +7,16 @@
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
bool fr = apparatus::isFirstRun();
apparatus::init();
AuthWindow w(nullptr, fr);
w.show();
int ecode = a.exec();
apparatus::shutdown();
return ecode;
AuthWindow w(nullptr);
w.show();
QObject::connect(&a, &QApplication::aboutToQuit, []() {
apparatus::shutdown();
if (apparatus::isFirstRun()) {
apparatus::generate_lock_file();
}
});
return a.exec();
}