core/window: fix attached property prior to backer creation

This commit is contained in:
outfoxxed 2024-07-18 01:57:40 -07:00
parent e48af44607
commit 6367b56f55
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 11 additions and 7 deletions

View file

@ -26,6 +26,7 @@ ProxyWindowBase::ProxyWindowBase(QObject* parent)
, mContentItem(new QQuickItem()) {
QQmlEngine::setObjectOwnership(this->mContentItem, QQmlEngine::CppOwnership);
this->mContentItem->setParent(this);
this->mContentItem->setProperty("__qs_proxywindow", QVariant::fromValue(this));
// clang-format off
QObject::connect(this, &ProxyWindowBase::widthChanged, this, &ProxyWindowBase::onWidthChanged);
@ -124,8 +125,6 @@ void ProxyWindowBase::connectWindow() {
generation->registerIncubationController(this->window->incubationController());
}
this->window->setProperty("__qs_proxywindow", QVariant::fromValue(this));
// clang-format off
QObject::connect(this->window, &QWindow::visibilityChanged, this, &ProxyWindowBase::visibleChanged);
QObject::connect(this->window, &QWindow::xChanged, this, &ProxyWindowBase::xChanged);