mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Update timeinfo of group only when properties of the group itself change.
This commit is contained in:
parent
34204f3281
commit
84d9d2ec47
@ -35,8 +35,6 @@ Group::Group()
|
|||||||
m_searchingEnabled = Inherit;
|
m_searchingEnabled = Inherit;
|
||||||
|
|
||||||
m_updateTimeinfo = true;
|
m_updateTimeinfo = true;
|
||||||
|
|
||||||
connect(this, SIGNAL(modified()), this, SLOT(updateTimeinfo()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Group::~Group()
|
Group::~Group()
|
||||||
@ -47,6 +45,7 @@ Group::~Group()
|
|||||||
template <class T> bool Group::set(T& property, const T& value) {
|
template <class T> bool Group::set(T& property, const T& value) {
|
||||||
if (property != value) {
|
if (property != value) {
|
||||||
property = value;
|
property = value;
|
||||||
|
updateTimeinfo();
|
||||||
Q_EMIT modified();
|
Q_EMIT modified();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -177,6 +176,7 @@ void Group::setIcon(int iconNumber)
|
|||||||
|
|
||||||
m_pixmapCacheKey = QPixmapCache::Key();
|
m_pixmapCacheKey = QPixmapCache::Key();
|
||||||
|
|
||||||
|
updateTimeinfo();
|
||||||
Q_EMIT modified();
|
Q_EMIT modified();
|
||||||
Q_EMIT dataChanged(this);
|
Q_EMIT dataChanged(this);
|
||||||
}
|
}
|
||||||
|
@ -92,9 +92,6 @@ Q_SIGNALS:
|
|||||||
|
|
||||||
void modified();
|
void modified();
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void updateTimeinfo();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <class T> inline bool set(T& property, const T& value);
|
template <class T> inline bool set(T& property, const T& value);
|
||||||
|
|
||||||
@ -128,6 +125,8 @@ private:
|
|||||||
friend void Database::setRootGroup(Group* group);
|
friend void Database::setRootGroup(Group* group);
|
||||||
friend Entry::~Entry();
|
friend Entry::~Entry();
|
||||||
friend void Entry::setGroup(Group *group);
|
friend void Entry::setGroup(Group *group);
|
||||||
|
|
||||||
|
void updateTimeinfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // KEEPASSX_GROUP_H
|
#endif // KEEPASSX_GROUP_H
|
||||||
|
Loading…
Reference in New Issue
Block a user