feat: attach Qt.quit and Qt.exit functions

This commit is contained in:
outfoxxed 2024-03-03 21:37:47 -08:00
parent e06b07ac01
commit 7467b65809
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -2,6 +2,7 @@
#include <cstdlib>
#include <utility>
#include <qcoreapplication.h>
#include <qdir.h>
#include <qfileinfo.h>
#include <qlogging.h>
@ -21,6 +22,10 @@ RootWrapper::RootWrapper(QString rootPath)
, rootPath(std::move(rootPath))
, engine(this)
, originalWorkingDirectory(QDir::current().absolutePath()) {
auto* app = QCoreApplication::instance();
QObject::connect(&this->engine, &QQmlEngine::quit, app, &QCoreApplication::quit);
QObject::connect(&this->engine, &QQmlEngine::exit, app, &QCoreApplication::exit);
this->reloadGraph(true);
if (this->root == nullptr) {