diff --git a/src/core/variants.cpp b/src/core/variants.cpp index f984f6d..3a05c47 100644 --- a/src/core/variants.cpp +++ b/src/core/variants.cpp @@ -95,7 +95,7 @@ void Variants::updateVariants() { auto* instance = this->mComponent->createWithInitialProperties( variant, - QQmlEngine::contextForObject(this) + QQmlEngine::contextForObject(this->mComponent) ); if (instance == nullptr) { diff --git a/src/io/socket.cpp b/src/io/socket.cpp index 0270316..fa840f0 100644 --- a/src/io/socket.cpp +++ b/src/io/socket.cpp @@ -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(instanceObj); if (instance == nullptr) { diff --git a/src/wayland/session_lock.cpp b/src/wayland/session_lock.cpp index 94b427e..bd93dc0 100644 --- a/src/wayland/session_lock.cpp +++ b/src/wayland/session_lock.cpp @@ -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(instanceObj); if (instance == nullptr) {