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