diff options
| author | Peter Penz <[email protected]> | 2008-05-06 05:47:11 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-05-06 05:47:11 +0000 |
| commit | 0de9ce998583f5b7ed2e741edfbfcd1271224886 (patch) | |
| tree | b20023a12c4c4608e4c5ba473ccac431acb8ba76 /src/iconmanager.h | |
| parent | 7059f31bc8507eacd563606d3729d7c0eb293bb0 (diff) | |
prevent a possible crash if an item is deleted during previews are generated
svn path=/trunk/KDE/kdebase/apps/; revision=804457
Diffstat (limited to 'src/iconmanager.h')
| -rw-r--r-- | src/iconmanager.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/iconmanager.h b/src/iconmanager.h index 1621441d8..f72811c27 100644 --- a/src/iconmanager.h +++ b/src/iconmanager.h @@ -80,10 +80,10 @@ private slots: private: /** - * Replaces the icon of the item \a item by the preview pixmap + * Replaces the icon of the item with the \a url by the preview pixmap * \a pixmap. */ - void replaceIcon(const KFileItem& item, const QPixmap& pixmap); + void replaceIcon(const KUrl& url, const QPixmap& pixmap); /** * Returns true, if the item \a item has been cut into @@ -112,24 +112,14 @@ private: private: /** - * Remembers the original pixmap for an item before - * the cut effect is applied. + * Remembers the pixmap for an item specified by an URL. */ - struct CutItem + struct ItemInfo { KUrl url; QPixmap pixmap; }; - /** - * Remembers the received preview pixmap for an item. - */ - struct Preview - { - KFileItem item; - QPixmap pixmap; - }; - bool m_showPreview; QAbstractItemView* m_view; @@ -138,8 +128,8 @@ private: DolphinModel* m_dolphinModel; DolphinSortFilterProxyModel* m_proxyModel; - QList<CutItem> m_cutItemsCache; - QList<Preview> m_previews; + QList<ItemInfo> m_cutItemsCache; + QList<ItemInfo> m_previews; }; inline bool IconManager::showPreview() const |
