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/Group.cpp')
-rw-r--r--src/core/Group.cpp48
1 files changed, 6 insertions, 42 deletions
diff --git a/src/core/Group.cpp b/src/core/Group.cpp
index 196f230c1..6684d1ab9 100644
--- a/src/core/Group.cpp
+++ b/src/core/Group.cpp
@@ -20,14 +20,16 @@
#include "config-keepassx.h"
#include "core/Config.h"
-#include "core/DatabaseIcons.h"
-#include "core/Metadata.h"
-#include "core/Tools.h"
#ifdef WITH_XC_KEESHARE
#include "keeshare/KeeShare.h"
#endif
+#include "core/Global.h"
+#include "core/Metadata.h"
+#include "core/Tools.h"
+
+#include <QtConcurrent>
#include <QtConcurrentFilter>
const int Group::DefaultIconNumber = 48;
@@ -123,44 +125,6 @@ QString Group::notes() const
return m_data.notes;
}
-QImage Group::icon() const
-{
- if (m_data.customIcon.isNull()) {
- return databaseIcons()->icon(m_data.iconNumber).toImage();
- } else {
- Q_ASSERT(m_db);
- if (m_db) {
- return m_db->metadata()->customIcon(m_data.customIcon);
- } else {
- return QImage();
- }
- }
-}
-
-QPixmap Group::iconPixmap(IconSize size) const
-{
- QPixmap icon(size, size);
- if (m_data.customIcon.isNull()) {
- icon = databaseIcons()->icon(m_data.iconNumber, size);
- } else {
- Q_ASSERT(m_db);
- if (m_db) {
- icon = m_db->metadata()->customIconPixmap(m_data.customIcon, size);
- }
- }
-
- if (isExpired()) {
- icon = databaseIcons()->applyBadge(icon, DatabaseIcons::Badges::Expired);
- }
-#ifdef WITH_XC_KEESHARE
- else if (KeeShare::isShared(this)) {
- icon = KeeShare::indicatorBadge(this, icon);
- }
-#endif
-
- return icon;
-}
-
int Group::iconNumber() const
{
return m_data.iconNumber;
@@ -469,7 +433,7 @@ void Group::setParent(Group* parent, int index)
// copy custom icon to the new database
if (!iconUuid().isNull() && parent->m_db && m_db->metadata()->hasCustomIcon(iconUuid())
&& !parent->m_db->metadata()->hasCustomIcon(iconUuid())) {
- parent->m_db->metadata()->addCustomIcon(iconUuid(), icon());
+ parent->m_db->metadata()->addCustomIcon(iconUuid(), m_db->metadata()->customIcon(iconUuid()));
}
}
if (m_db != parent->m_db) {