mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Mark m_pixmapCacheKey as mutable so we don't have to const_cast.
This commit is contained in:
parent
6b13d18137
commit
e9a96ff80a
@ -109,7 +109,7 @@ QPixmap Entry::iconPixmap() const
|
|||||||
if (!QPixmapCache::find(m_pixmapCacheKey, &pixmap)) {
|
if (!QPixmapCache::find(m_pixmapCacheKey, &pixmap)) {
|
||||||
// TODO: check if database() is 0
|
// TODO: check if database() is 0
|
||||||
pixmap = QPixmap::fromImage(database()->metadata()->customIcon(m_data.customIcon));
|
pixmap = QPixmap::fromImage(database()->metadata()->customIcon(m_data.customIcon));
|
||||||
const_cast<Entry*>(this)->m_pixmapCacheKey = QPixmapCache::insert(pixmap);
|
m_pixmapCacheKey = QPixmapCache::insert(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pixmap;
|
return pixmap;
|
||||||
|
@ -154,7 +154,7 @@ private:
|
|||||||
Entry* m_tmpHistoryItem;
|
Entry* m_tmpHistoryItem;
|
||||||
bool m_modifiedSinceBegin;
|
bool m_modifiedSinceBegin;
|
||||||
QPointer<Group> m_group;
|
QPointer<Group> m_group;
|
||||||
QPixmapCache::Key m_pixmapCacheKey;
|
mutable QPixmapCache::Key m_pixmapCacheKey;
|
||||||
bool m_updateTimeinfo;
|
bool m_updateTimeinfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ QPixmap Group::iconPixmap() const
|
|||||||
if (!QPixmapCache::find(m_pixmapCacheKey, &pixmap)) {
|
if (!QPixmapCache::find(m_pixmapCacheKey, &pixmap)) {
|
||||||
// TODO: check if m_db is 0
|
// TODO: check if m_db is 0
|
||||||
pixmap = QPixmap::fromImage(m_db->metadata()->customIcon(m_customIcon));
|
pixmap = QPixmap::fromImage(m_db->metadata()->customIcon(m_customIcon));
|
||||||
const_cast<Group*>(this)->m_pixmapCacheKey = QPixmapCache::insert(pixmap);
|
m_pixmapCacheKey = QPixmapCache::insert(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pixmap;
|
return pixmap;
|
||||||
|
@ -141,7 +141,7 @@ private:
|
|||||||
QList<Entry*> m_entries;
|
QList<Entry*> m_entries;
|
||||||
|
|
||||||
QPointer<Group> m_parent;
|
QPointer<Group> m_parent;
|
||||||
QPixmapCache::Key m_pixmapCacheKey;
|
mutable QPixmapCache::Key m_pixmapCacheKey;
|
||||||
|
|
||||||
bool m_updateTimeinfo;
|
bool m_updateTimeinfo;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user