Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Entry.cpp')
-rw-r--r--src/core/Entry.cpp39
1 files changed, 3 insertions, 36 deletions
diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp
index e386a349d..e7e000c2d 100644
--- a/src/core/Entry.cpp
+++ b/src/core/Entry.cpp
@@ -19,7 +19,7 @@
#include "Entry.h"
#include "core/Config.h"
-#include "core/DatabaseIcons.h"
+#include "core/Database.h"
#include "core/Group.h"
#include "core/Metadata.h"
#include "core/PasswordHealth.h"
@@ -159,40 +159,6 @@ const QString Entry::uuidToHex() const
return Tools::uuidToHex(m_uuid);
}
-QImage Entry::icon() const
-{
- if (m_data.customIcon.isNull()) {
- return databaseIcons()->icon(m_data.iconNumber).toImage();
- } else {
- Q_ASSERT(database());
-
- if (database()) {
- return database()->metadata()->customIcon(m_data.customIcon);
- } else {
- return QImage();
- }
- }
-}
-
-QPixmap Entry::iconPixmap(IconSize size) const
-{
- QPixmap icon(size, size);
- if (m_data.customIcon.isNull()) {
- icon = databaseIcons()->icon(m_data.iconNumber, size);
- } else {
- Q_ASSERT(database());
- if (database()) {
- icon = database()->metadata()->customIconPixmap(m_data.customIcon, size);
- }
- }
-
- if (isExpired()) {
- icon = databaseIcons()->applyBadge(icon, DatabaseIcons::Badges::Expired);
- }
-
- return icon;
-}
-
int Entry::iconNumber() const
{
return m_data.iconNumber;
@@ -1217,7 +1183,8 @@ void Entry::setGroup(Group* group)
// copy custom icon to the new database
if (!iconUuid().isNull() && group->database() && m_group->database()->metadata()->hasCustomIcon(iconUuid())
&& !group->database()->metadata()->hasCustomIcon(iconUuid())) {
- group->database()->metadata()->addCustomIcon(iconUuid(), icon());
+ group->database()->metadata()->addCustomIcon(iconUuid(),
+ m_group->database()->metadata()->customIcon(iconUuid()));
}
}
}