Changeset View
Changeset View
Standalone View
Standalone View
effects.cpp
Show First 20 Lines • Show All 2055 Lines • ▼ Show 20 Line(s) | 2055 | if (WindowThumbnailItem *item = qobject_cast<WindowThumbnailItem*>(sender())) { | |||
---|---|---|---|---|---|
2056 | insertThumbnail(item); | 2056 | insertThumbnail(item); | ||
2057 | } | 2057 | } | ||
2058 | } | 2058 | } | ||
2059 | 2059 | | |||
2060 | void EffectWindowImpl::insertThumbnail(WindowThumbnailItem *item) | 2060 | void EffectWindowImpl::insertThumbnail(WindowThumbnailItem *item) | ||
2061 | { | 2061 | { | ||
2062 | EffectWindow *w = effects->findWindow(item->wId()); | 2062 | EffectWindow *w = effects->findWindow(item->wId()); | ||
2063 | if (w) { | 2063 | if (w) { | ||
2064 | m_thumbnails.insert(item, QWeakPointer<EffectWindowImpl>(static_cast<EffectWindowImpl*>(w))); | 2064 | m_thumbnails.insert(item, QPointer<EffectWindowImpl>(static_cast<EffectWindowImpl*>(w))); | ||
2065 | } else { | 2065 | } else { | ||
2066 | m_thumbnails.insert(item, QWeakPointer<EffectWindowImpl>()); | 2066 | m_thumbnails.insert(item, QPointer<EffectWindowImpl>()); | ||
2067 | } | 2067 | } | ||
2068 | } | 2068 | } | ||
2069 | 2069 | | |||
2070 | void EffectWindowImpl::desktopThumbnailDestroyed(QObject *object) | 2070 | void EffectWindowImpl::desktopThumbnailDestroyed(QObject *object) | ||
2071 | { | 2071 | { | ||
2072 | // we know it is a DesktopThumbnailItem | 2072 | // we know it is a DesktopThumbnailItem | ||
2073 | m_desktopThumbnails.removeAll(static_cast<DesktopThumbnailItem*>(object)); | 2073 | m_desktopThumbnails.removeAll(static_cast<DesktopThumbnailItem*>(object)); | ||
2074 | } | 2074 | } | ||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |