diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index 7de75850e4..f2d6104c7b 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -251,7 +251,7 @@ AuroraeClient::AuroraeClient(KDecorationBridge *bridge, KDecorationFactory *fact connect(AuroraeFactory::instance(), SIGNAL(buttonsChanged()), SIGNAL(buttonsChanged())); connect(AuroraeFactory::instance(), SIGNAL(configChanged()), SIGNAL(configChanged())); connect(AuroraeFactory::instance(), SIGNAL(titleFontChanged()), SIGNAL(fontChanged())); - connect(m_item.data(), SIGNAL(alphaChanged()), SLOT(slotAlphaChanged())); + connect(m_item, SIGNAL(alphaChanged()), SLOT(slotAlphaChanged())); connect(this, SIGNAL(appMenuAvailable()), SIGNAL(appMenuAvailableChanged())); connect(this, SIGNAL(appMenuUnavailable()), SIGNAL(appMenuAvailableChanged())); } @@ -291,6 +291,7 @@ void AuroraeClient::init() } if (m_item) { m_item->setParentItem(m_view->contentItem()); + m_item->setParent(m_view); } slotAlphaChanged(); @@ -454,13 +455,15 @@ void AuroraeClient::titlePressed(Qt::MouseButton button, Qt::MouseButtons button void AuroraeClient::themeChanged() { - m_item.reset(AuroraeFactory::instance()->createQmlDecoration(this)); + m_item->deleteLater(); + m_item = AuroraeFactory::instance()->createQmlDecoration(this); if (!m_item) { return; } m_item->setParentItem(m_view->contentItem()); - connect(m_item.data(), SIGNAL(alphaChanged()), SLOT(slotAlphaChanged())); + m_item->setParent(m_view); + connect(m_item, SIGNAL(alphaChanged()), SLOT(slotAlphaChanged())); slotAlphaChanged(); } diff --git a/clients/aurorae/src/aurorae.h b/clients/aurorae/src/aurorae.h index a5d085ce95..646ff3f7e1 100644 --- a/clients/aurorae/src/aurorae.h +++ b/clients/aurorae/src/aurorae.h @@ -164,7 +164,7 @@ private Q_SLOTS: private: void sizesFromBorders(const QObject *borders, int &left, int &right, int &top, int &bottom) const; QQuickWindow *m_view; - QScopedPointer m_item; + QQuickItem *m_item; QScopedPointer m_fbo; QImage m_buffer; };