mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-21 01:21:37 -08:00
Store database icons as QImage instead of QIcon.
This has the advantage that they can be used without a running X server. Add methods to retrieve QPixmaps that are converted from the stored QImages and cached by QPixmapCache.
This commit is contained in:
1 parent
fdf600e09a
commit
00aafa69f5
15 files changed
+137
-60
No files matched your search
@@ -120,12 +120,12 @@ bool Metadata::autoEnableVisualHiding() const
|
||||
return m_autoEnableVisualHiding;
|
||||
}
|
||||
|
||||
QIcon Metadata::customIcon(const Uuid& uuid) const
|
||||
QImage Metadata::customIcon(const Uuid& uuid) const
|
||||
{
|
||||
return m_customIcons.value(uuid);
|
||||
}
|
||||
|
||||
QHash<Uuid, QIcon> Metadata::customIcons() const
|
||||
QHash<Uuid, QImage> Metadata::customIcons() const
|
||||
{
|
||||
return m_customIcons;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ void Metadata::setAutoEnableVisualHiding(bool value)
|
||||
m_autoEnableVisualHiding = value;
|
||||
}
|
||||
|
||||
void Metadata::addCustomIcon(const Uuid& uuid, const QIcon& icon)
|
||||
void Metadata::addCustomIcon(const Uuid& uuid, const QImage& icon)
|
||||
{
|
||||
Q_ASSERT(!uuid.isNull());
|
||||
Q_ASSERT(!m_customIcons.contains(uuid));
|
||||
|
||||
Reference in new issue
Block a user