Compare commits
2 commits
e06b07ac01
...
4cfe6ee0a1
Author | SHA1 | Date | |
---|---|---|---|
outfoxxed | 4cfe6ee0a1 | ||
outfoxxed | 7467b65809 |
|
@ -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) {
|
||||
|
|
|
@ -95,7 +95,7 @@ void Variants::updateVariants() {
|
|||
|
||||
auto* instance = this->mComponent->createWithInitialProperties(
|
||||
variant,
|
||||
QQmlEngine::contextForObject(this)
|
||||
QQmlEngine::contextForObject(this->mComponent)
|
||||
);
|
||||
|
||||
if (instance == nullptr) {
|
||||
|
|
|
@ -177,7 +177,7 @@ void SocketServer::disableServer() {
|
|||
|
||||
void SocketServer::onNewConnection() {
|
||||
if (auto* connection = this->server->nextPendingConnection()) {
|
||||
auto* instanceObj = this->mHandler->create(QQmlEngine::contextForObject(this));
|
||||
auto* instanceObj = this->mHandler->create(QQmlEngine::contextForObject(this->mHandler));
|
||||
auto* instance = qobject_cast<Socket*>(instanceObj);
|
||||
|
||||
if (instance == nullptr) {
|
||||
|
|
|
@ -73,7 +73,8 @@ void SessionLock::updateSurfaces(SessionLock* old) {
|
|||
|
||||
for (auto* screen: screens) {
|
||||
if (!this->surfaces.contains(screen)) {
|
||||
auto* instanceObj = this->mSurfaceComponent->create(QQmlEngine::contextForObject(this));
|
||||
auto* instanceObj =
|
||||
this->mSurfaceComponent->create(QQmlEngine::contextForObject(this->mSurfaceComponent));
|
||||
auto* instance = qobject_cast<SessionLockSurface*>(instanceObj);
|
||||
|
||||
if (instance == nullptr) {
|
||||
|
|
Loading…
Reference in a new issue