mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-31 03:25:04 +00:00
feat: attach Qt.quit and Qt.exit functions
This commit is contained in:
1 file changed
+5
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user