diff --git a/thumbnailitem.cpp b/thumbnailitem.cpp index 0048998638..e5411b7a3f 100644 --- a/thumbnailitem.cpp +++ b/thumbnailitem.cpp @@ -37,7 +37,6 @@ namespace KWin AbstractThumbnailItem::AbstractThumbnailItem(QQuickItem *parent) : QQuickPaintedItem(parent) , m_parent(QWeakPointer()) - , m_parentWindow(0) , m_brightness(1.0) , m_saturation(1.0) , m_clipToItem() @@ -70,24 +69,9 @@ void AbstractThumbnailItem::init() } } -void AbstractThumbnailItem::setParentWindow(qulonglong parentWindow) -{ - m_parentWindow = parentWindow; - findParentEffectWindow(); - if (!m_parent.isNull()) { - m_parent.data()->registerThumbnail(this); - } -} - void AbstractThumbnailItem::findParentEffectWindow() { if (effects) { - if (m_parentWindow) { - if (EffectWindowImpl *w = static_cast(effects->findWindow(m_parentWindow))) { - m_parent = QWeakPointer(w); - return; - } - } QQuickWindow *qw = window(); if (!qw) { kDebug(1212) << "No QQuickWindow assigned yet"; @@ -95,7 +79,6 @@ void AbstractThumbnailItem::findParentEffectWindow() } if (auto *w = static_cast(effects->findWindow(qw->winId()))) { m_parent = QWeakPointer(w); - m_parentWindow = qw->winId(); } } } diff --git a/thumbnailitem.h b/thumbnailitem.h index 5592d7a0ed..26854b66f6 100644 --- a/thumbnailitem.h +++ b/thumbnailitem.h @@ -35,16 +35,11 @@ class EffectWindowImpl; class AbstractThumbnailItem : public QQuickPaintedItem { Q_OBJECT - Q_PROPERTY(qulonglong parentWindow READ parentWindow WRITE setParentWindow) Q_PROPERTY(qreal brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged) Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY saturationChanged) Q_PROPERTY(QQuickItem *clipTo READ clipTo WRITE setClipTo NOTIFY clipToChanged) public: virtual ~AbstractThumbnailItem(); - qulonglong parentWindow() const { - return m_parentWindow; - } - void setParentWindow(qulonglong parentWindow); qreal brightness() const; qreal saturation() const; QQuickItem *clipTo() const; @@ -73,7 +68,6 @@ private Q_SLOTS: private: void findParentEffectWindow(); QWeakPointer m_parent; - qulonglong m_parentWindow; qreal m_brightness; qreal m_saturation; QPointer m_clipToItem;